Add class for Ray's check-box
Fix some typos Change the default index for auth Add some hard code in object_auth.rb to handle page_context A user cannot select himself in authorisation
This commit is contained in:
1 parent
b1755bdc80
commit
d632439f80
10 files changed
+45
-28
No files matched your search
@@ -1,8 +1,10 @@
|
||||
<li class="filter-item selected_user" id="<%= user.id %>">
|
||||
<li class="filter-item selected_user <%= 'check-item' unless user == current_user || is_admin? %>" id="<%= user.id %>">
|
||||
<label>
|
||||
<%= image_tag (user.avatar? ? user.avatar.thumb : 'menber-pic.png'), :class => "user-pic" %>
|
||||
<span class="user-name"><%= user.name %></span>
|
||||
<!-- <span>國際事務學院,國際研究英語碩士學位學程</span> -->
|
||||
<span><%= get_user_module_role(user) %></span>
|
||||
</label>
|
||||
<input type="checkbox">
|
||||
<% unless user == current_user || is_admin? %>
|
||||
<input type="checkbox">
|
||||
<% end %>
|
||||
</li>
|
||||
@@ -15,7 +15,7 @@
|
||||
<div class="mini-layout-body span10">
|
||||
<%= link_to t(:module_authorization), admin_authorizations_path(@module_app.key) %>
|
||||
<% @module_app.authorizable_models.each do |authorizable_model| %>
|
||||
<%= link_to (authorizable_model.eql?('Category') ? t(:category_auth) : "#{authorizable_model.underscore.humanize.capitalize} #{t(:authorization_)}"), admin_authorizations_path(@module_app.key, type: authorizable_model.downcase) %>
|
||||
<%= link_to (authorizable_model.eql?('Category') ? t(:category_auth) : "#{authorizable_model.underscore.humanize.capitalize} #{t(:authorization_)}"), admin_authorizations_path(@module_app.key, type: authorizable_model.underscore) %>
|
||||
<% end %>
|
||||
<%= link_to t(:approval_), admin_authorizations_path(@module_app.key, type: 'approval') if @module_app.is_approvable %>
|
||||
<% if @error %>
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
$("#select_user").html("<%= j render partial: 'admin/member_selects/modal_select', locals: {role_form_url: admin_add_roles_authorizations_path(@module_app.key, @type, @object_id), user_form_url: admin_add_users_authorizations_path(@module_app.key, @type, @cobject_id)} %>");
|
||||
$("#select_user").html("<%= j render partial: 'admin/member_selects/modal_select', locals: {role_form_url: admin_add_roles_authorizations_path(@module_app.key, @type, @object_id), user_form_url: admin_add_users_authorizations_path(@module_app.key, @type, @object_id)} %>");
|
||||
$("#member-filter").modal();
|
||||
@@ -39,7 +39,7 @@
|
||||
<div class="content">
|
||||
<ul class="checkbox-card clearfix">
|
||||
<% users.each do |user| %>
|
||||
<li>
|
||||
<li class="check-item">
|
||||
<label>
|
||||
<%= image_tag (user.avatar.file ? user.avatar : "menber-pic.png"), class: "user-pic" %>
|
||||
<span class="user-name"><%= user.name %></span>
|
||||
@@ -72,9 +72,7 @@
|
||||
$('#member-filter').on('shown', function() {
|
||||
$('#member-filter').off('shown')
|
||||
$(this).find('.nano').nanoScroller({ scrollTop: 0, iOSNativeScrolling: true });
|
||||
$(this).find('.checkbox-card > li').cardCheck({
|
||||
check: $(this).find('.checkbox-card > li input[type="checkbox"]'),
|
||||
});
|
||||
$(this).find('.checkbox-card').cardCheck();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -5,11 +5,11 @@
|
||||
<%= render 'layouts/meta' %>
|
||||
<%= render 'layouts/google_font' %>
|
||||
<%= stylesheet_link_tag "back_end" %>
|
||||
<%= stylesheet_link_tag params[:controller] if Rails.application.assets.find_asset params[:controller] %>
|
||||
<%= stylesheet_link_tag params[:controller] if Rails.application.assets.find_asset "#{params[:controller]}.css" %>
|
||||
<%= yield :page_specific_css %>
|
||||
<%= render 'layouts/ie_html5_fix' %>
|
||||
<%= javascript_include_tag "back_end" %>
|
||||
<%= javascript_include_tag params[:controller] if Rails.application.assets.find_asset params[:controller] %>
|
||||
<%= javascript_include_tag params[:controller] if Rails.application.assets.find_asset "#{params[:controller]}.js" %>
|
||||
<%= yield :page_specific_javascript %>
|
||||
<%= csrf_meta_tag %>
|
||||
</head>
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
<%= render 'layouts/meta' %>
|
||||
<%= render 'layouts/google_font' %>
|
||||
<%= stylesheet_link_tag "basic" %>
|
||||
<%= stylesheet_link_tag params[:controller] %>
|
||||
<%= stylesheet_link_tag params[:controller] if Rails.application.assets.find_asset "#{params[:controller]}.css" %>
|
||||
<%= render 'layouts/ie_html5_fix' %>
|
||||
<%= javascript_include_tag "basic" %>
|
||||
<%= javascript_include_tag params[:controller] %>
|
||||
<%= javascript_include_tag params[:controller] if Rails.application.assets.find_asset "#{params[:controller]}.js" %>
|
||||
<%= yield :page_specific_css %>
|
||||
<%= yield :page_specific_javascript %>
|
||||
<%= csrf_meta_tag %>
|
||||
|
||||
Reference in new issue
Block a user