New authorization
This commit is contained in:
1 parent
d24bd176cc
commit
c474fa063f
25 files changed
+440
-172
No files matched your search
@@ -1,10 +1,10 @@
|
||||
<li class="filter-item selected_user <%= 'check-item' unless user == current_user || is_admin? %>" id="<%= user.id %>">
|
||||
<li class="filter-item selected_user <%= 'check-item' unless user == current_user || user.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><%= get_user_module_role(user) %></span>
|
||||
</label>
|
||||
<% unless user == current_user || is_admin? %>
|
||||
<% unless user == current_user || user.admin %>
|
||||
<input type="checkbox">
|
||||
<% end %>
|
||||
</li>
|
||||
@@ -13,11 +13,13 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="mini-layout-body span10">
|
||||
<%= link_to t(:module_authorization), admin_authorizations_path(@module_app.key) %>
|
||||
<%= link_to t(:module_authorization), admin_authorizations_path(@module_app.key) if @module_app.is_authorizable %>
|
||||
<% @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.underscore) %>
|
||||
<%= 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}_authorization") %>
|
||||
<% end %>
|
||||
<% @module_app.approvable_models.each do |approvable_model| %>
|
||||
<%= link_to (approvable_model.eql?('Category') ? t(:approval_) : "#{approvable_model.underscore.humanize.capitalize} #{t(:approval_)}"), admin_authorizations_path(@module_app.key, type: "#{approvable_model.underscore}_approval") %>
|
||||
<% end %>
|
||||
<%= link_to t(:approval_), admin_authorizations_path(@module_app.key, type: 'approval') if @module_app.is_approvable %>
|
||||
<% if @error %>
|
||||
<%= @error %>
|
||||
<% else %>
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
$("#card-list").append("<%= j render partial: 'user', collection: @users %>");
|
||||
$("#member-filter").modal('hide');
|
||||
@@ -0,0 +1,2 @@
|
||||
$("#card-list").html("<%= j render partial: 'user', collection: @users %>");
|
||||
$("#member-filter").modal('hide');
|
||||
Reference in new issue
Block a user