From 01bda515a694eee4fa1f3af0a29372614ae2a9a2 Mon Sep 17 00:00:00 2001 From: "Matthew K. Fu JuYuan" Date: Thu, 5 Apr 2012 15:06:01 +0800 Subject: [PATCH] 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 251d83462..cf5cf13c9 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) %>