From d8b20ae9938788afe61ebdd55dabf7b20cc60bc3 Mon Sep 17 00:00:00 2001 From: "Matthew K. Fu JuYuan" Date: Thu, 5 Apr 2012 11:11:48 +0800 Subject: [PATCH 1/2] fix ad_banner sidebar --- app/views/layouts/_side_bar.html.erb | 8 +++++--- config/locales/zh_tw.yml | 5 ++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/app/views/layouts/_side_bar.html.erb b/app/views/layouts/_side_bar.html.erb index 130c208d..0952b202 100644 --- a/app/views/layouts/_side_bar.html.erb +++ b/app/views/layouts/_side_bar.html.erb @@ -31,9 +31,11 @@ <%= content_tag :li, :class => active_for_controllers('ad_banners') do -%> <%= link_to content_tag(:i, nil, :class => 'icons-link') + t('admin.ad_banner'), admin_ad_banners_path %> - <%= content_tag :li, link_to(t('admin.all_ad_banners'), admin_ad_banners_path), :class => active_for_action('ad_banners', 'index') %> - <%= content_tag :li, link_to(t('admin.new_ad_banner'), new_admin_ad_banner_path), :class => active_for_action('ad_banners', 'new') %> - <%= content_tag :li, link_to(t('admin.new_ad_image'), new_ad_image_admin_ad_banners_path), :class => active_for_action('ad_banners', 'new_image') %> + <%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('ad_banners')) 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_banners', 'new_image') %> + <% end -%> <% end -%> diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index a4ce62b6..491d80e8 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -40,8 +40,11 @@ zh_tw: action: 操作 ad_banner: 廣告輪播 ad: - title: 標題 ab_fx: 轉場特效 + all_banners: 輪播清單 + new_banner: 新增輪播 + new_image: 新增橫幅 + title: 標題 transition_sec: 轉場單位時間 trans_unit_sec: 秒 add: 新增 From ef88c2dbc2142ebeaca1040679d677c63437d7e4 Mon Sep 17 00:00:00 2001 From: "Matthew K. Fu JuYuan" Date: Thu, 5 Apr 2012 15:06:01 +0800 Subject: [PATCH 2/2] fact_check with Ray's permission check. needs Ray's new css --- app/assets/javascripts/.DS_Store | Bin 6148 -> 6148 bytes .../javascripts/inc/permission-checkbox.js | 20 ++++++++++-------- .../fact_checks/_privilege_user.html.erb | 20 ++++++++++++++++-- .../back_end/fact_checks/setting.html.erb | 6 ++++++ 4 files changed, 35 insertions(+), 11 deletions(-) diff --git a/app/assets/javascripts/.DS_Store b/app/assets/javascripts/.DS_Store index 5008ddfcf53c02e82d7eee2e57c38e5672ef89f6..51582ef8aa6a5ea474683aee9d3de008e14c257f 100644 GIT binary patch delta 334 zcmZoMXfc=|#>B`mF;Q%yo}vgd0|Nsi1A_nqLtaX8a!yiyeh%Zr#1-`*aaM*zh7^We zhD;lOn7EqN`ARh zeksuC=-`a}^5D#r)TG3sSTMUJv81%vDX|DF6OdSv0h9r=Lx66m2XbPd%EL2LN;2XF z#Hy<;jLmcujB9lis?E&}bQDZXO=@d7IXF25UUP^l>DhRMBvw_|)YbuA1O$vgZ-D_X zl!j3aKnBzgWx+*xIr(|%KoOW~h^mcw|5zs*h_Gzt=HTW4hStW!@640=MHE??fbt5H N4Ml`Edx-2|1^}?8QM>>E delta 70 zcmZoMXfc=|#>AjHu~2NHo+1YW5HK<@2yA9#Vq@DZz_f~SGdl-A2T%b} "users_checkbox_ary", do -%> <% sys_users = User.all -%> <% sys_users.each do |user| -%> - <%= label_tag "lab-user-#{user.id}", user.name rescue '' -%> - <%= check_box_tag "[users][#{user.id}]", 'true',users.include?(user) -%> + +
+
+
+ +
+
+ <% if user.avatar? %> + <%= image_tag(user.avatar.thumb.url,:class => "member-img") %> + <% else %> + <%= image_tag "person.png",:class => "member-img" %> + <% end %> +
+ <%= label_tag "lab-user-#{user.id}", (user.name rescue ''),:class=>"member-name",:id=>nil -%> + <%= check_box_tag "[users][#{user.id}]", 'true',users.include?(user),:class => "check" -%> +
+
+ <% end -%> <% end -%> \ No newline at end of file diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/fact_checks/setting.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/fact_checks/setting.html.erb index 16e76f09..a4c903c7 100644 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/fact_checks/setting.html.erb +++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/fact_checks/setting.html.erb @@ -1,3 +1,9 @@ +<% content_for :page_specific_css do %> + <%= stylesheet_link_tag "inc/permission-checkbox" %> +<% end %> +<% content_for :page_specific_javascript do %> + <%= javascript_include_tag "inc/permission-checkbox" %> +<% end %> <%#= label_tag :fact_check_setting, t("announcement.bulletin.fact_check_setting") %> <%= form_tag('', :remote => true) %>