Multi language and side bar update

This commit is contained in:
Harry Bomrah 2012-08-01 20:07:54 +08:00
parent 7accbed1a0
commit b0ef2b6957
6 changed files with 23 additions and 1 deletions

View File

@ -3,7 +3,7 @@ require 'mongo'
class GridfsController < ActionController::Metal class GridfsController < ActionController::Metal
def serve def serve
gridfs_path = env["PATH_INFO"].gsub("/gridfs/", "").force_encoding("UTF-8") gridfs_path = (params[:path]+'.'+params[:format]).gsub("/gridfs/", "").force_encoding("UTF-8")
begin begin
gridfs_file = Mongo::GridFileSystem.new(Mongoid.database).open(gridfs_path, 'r') gridfs_file = Mongo::GridFileSystem.new(Mongoid.database).open(gridfs_path, 'r')
self.response_body = gridfs_file.read self.response_body = gridfs_file.read

View File

@ -67,6 +67,17 @@
<% end -%> <% end -%>
<% end -%> <% end -%>
<%= content_tag :li, :class => active_for_controllers('orbit_galleries','tags') do -%>
<%= link_to content_tag(:i, nil, :class => 'icons-link') + t('admin.orbit_gallery'), panel_gallery_back_end_orbit_gallery_path %>
<%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('orbit_gallery') ) do -%>
<%#= content_tag :li, link_to(t('admin.ad.all_banners'), admin_ad_banners_path), :class => active_for_action('ad_banners', 'index') %>
<%#= content_tag :li, link_to(t('admin.ad.new_banner'), new_admin_ad_banner_path), :class => active_for_action('ad_banners', 'new') %>
<%#= content_tag :li, link_to(t('admin.ad.new_image'), new_ad_image_admin_ad_banners_path), :class => active_for_action('ad_images', 'new') %>
<%= content_tag :li, link_to(t('gallery.tags'), panel_gallery_back_end_tags_path), :class => active_for_action('/panel/orbit_gallery/back_end/tags', 'index') %>
<%= content_tag :li, link_to(t('admin.module.authorization'),admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {title: "orbit_gallery"}))), :class => active_for_app_auth('orbit_gallery') if (is_admin? rescue nil) %>
<% end -%>
<% end %>
<%#= content_tag :li, :class => active_for_controllers('assets', '/admin/asset_tags', 'asset_categories') do -%> <%#= content_tag :li, :class => active_for_controllers('assets', '/admin/asset_tags', 'asset_categories') do -%>
<%#= link_to content_tag(:i, nil, :class => 'icons-link') + t('admin.asset'), admin_assets_path %> <%#= link_to content_tag(:i, nil, :class => 'icons-link') + t('admin.asset'), admin_assets_path %>
<%#= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('assets', '/admin/asset_tags', 'asset_categories')) do -%> <%#= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('assets', '/admin/asset_tags', 'asset_categories')) do -%>

View File

@ -86,6 +86,7 @@ en:
object: "Access Denied for you don't have permission for this object" object: "Access Denied for you don't have permission for this object"
action: Action action: Action
ad_banner: AD Banner ad_banner: AD Banner
orbit_gallery: Gallery
ad: ad:
sec_place_holder: Enter 3 if 3 sec sec_place_holder: Enter 3 if 3 sec
ab_fx: FX ab_fx: FX

View File

@ -80,6 +80,7 @@ zh_tw:
object: 拒絕存取因你不是網站管理者 object: 拒絕存取因你不是網站管理者
action: 操作 action: 操作
ad_banner: 廣告輪播 ad_banner: 廣告輪播
orbit_gallery: 活動花絮
ad: ad:
sec_place_holder: 3秒請輸入3 sec_place_holder: 3秒請輸入3
ab_fx: 轉場特效 ab_fx: 轉場特效

View File

@ -0,0 +1,8 @@
class Panel::Gallery::BackEnd::TagsController < Admin::TagsController
def initialize
super
@app_title = 'orbit_gallery'
end
end

View File

@ -18,6 +18,7 @@ Rails.application.routes.draw do
match "set_cover" => "orbit_galleries#set_cover" match "set_cover" => "orbit_galleries#set_cover"
match "delete_images" => "orbit_galleries#delete_images" match "delete_images" => "orbit_galleries#delete_images"
match "update_album" => "orbit_galleries#update_album" match "update_album" => "orbit_galleries#update_album"
resources :tags
end end
end end
end end