A filter UI for permission select. with Harry's JS
This commit is contained in:
1 parent
0909156eb4
commit
e4c41ab54c
6 files changed
+25
-61
No files matched your search
+7
-4
@@ -1,11 +1,14 @@
|
||||
<%= content_tag :div ,:id => "users_checkbox_ary", do -%>
|
||||
<%= content_tag :div ,:id => "users_checkbox_ary",:class => 'clear' do -%>
|
||||
<% sys_users = User.all -%>
|
||||
<% sys_users.each do |user| -%>
|
||||
|
||||
<div class="checkblock">
|
||||
<div class="checkbox clear">
|
||||
|
||||
<% user.sub_roles.each do |sr| %>
|
||||
<div class="for_unit" style="display:none;"> <%= sr.key %></div>
|
||||
<% end %>
|
||||
<%= content_tag :div,:data=>{'original-title'=>t('announcement.bulletin.fact_check_setting_window_title'),:content => "#{user.sub_roles.collect{|sr| sr.key}.join(',')}"},:class=>"checkbox clear" do %>
|
||||
<div class="check-icon">
|
||||
<i class="icons-check-2 icons-white"></i>
|
||||
</div>
|
||||
<div class='member-avatar'>
|
||||
<% if user.avatar? %>
|
||||
@@ -16,7 +19,7 @@
|
||||
</div>
|
||||
<%= 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" -%>
|
||||
</div>
|
||||
<%end -%>
|
||||
</div>
|
||||
|
||||
<% end -%>
|
||||
|
||||
+6
@@ -2,7 +2,9 @@
|
||||
<%= stylesheet_link_tag "inc/permission-checkbox" %>
|
||||
<% end %>
|
||||
<% content_for :page_specific_javascript do %>
|
||||
<%= javascript_include_tag "bootstrap" %>
|
||||
<%= javascript_include_tag "inc/permission-checkbox" %>
|
||||
<%= javascript_include_tag "inc/search" %>
|
||||
<% end %>
|
||||
<%#= label_tag :fact_check_setting, t("announcement.bulletin.fact_check_setting") %>
|
||||
<%= form_tag('', :remote => true) %>
|
||||
@@ -12,6 +14,7 @@
|
||||
<div class="form-search" style="margin: 5px 10px;">
|
||||
<%= label_tag :category, t("announcement.bulletin.category") %>
|
||||
<%= select_tag "category_id", options_from_collection_for_select(@bulletin_categorys, "id", "key") %>
|
||||
<%= search_field_tag 'user_filter' %>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -27,6 +30,9 @@
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
var availableTags = [];
|
||||
$(function() {
|
||||
|
||||
$('#category_id').change(function() {
|
||||
$(this).parents('form').submit();
|
||||
});
|
||||
|
||||
@@ -42,6 +42,8 @@ en:
|
||||
fact_check_not_pass_reason: 'Reason'
|
||||
fact_check_pending: 'Pending'
|
||||
fact_check_pass: 'Pass'
|
||||
fact_check_setting_window_title: 'Unit'
|
||||
|
||||
# admin:
|
||||
# action: Action
|
||||
# add_language: Add language
|
||||
|
||||
@@ -37,7 +37,7 @@ zh_tw:
|
||||
fact_check_not_pass: '不通過'
|
||||
fact_check_pass: '通過'
|
||||
fact_check_not_pass_reason: '不通過原因'
|
||||
|
||||
fact_check_setting_window_title: '單位'
|
||||
# admin:
|
||||
# action: 行動
|
||||
# add_language: 新增語言
|
||||
|
||||
Reference in new issue
Block a user