This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
orbit-4-1/app/views/admin/roles/sub_role.html.erb

60 lines
2.6 KiB
Plaintext

<% # encoding: utf-8 %>
<% content_for :side_bar do %>
<%= render :partial => 'layouts/side_bar', :locals => {:link_name => t(:member), :link_url => admin_site_site_info_path(@site), :icon => 'icons-group', :side_bar_content => 'admin/users_new_interface/side_bar'} %>
<% end %>
<div class="subnav">
<ul class="breadcrumb">
<li><%= link_to( t("#{@attribute_type}"), admin_roles_path ) %> <span class="divider">/</span></li>
<li class="active"><%= @attribute.title %></li>
</ul>
<div id="accordion">
<div class="accordion-group filters">
<div class="table-label">
<table class="table main-list">
<thead>
<tr class="sort-header">
<th id="sort-name" class="sort span1-2 select active"><span><a href="#">Name<b class="web-symbol"></b></a></span></th>
</tr>
</thead>
</table>
</div>
</div>
</div>
</div>
<table class="table main-list member-list">
<thead>
<tr>
<th class="span1-2"></th>
</tr>
</thead>
<tbody>
<% @attribute_fields_upper_object.each do |attribute| %>
<tr class="with_action">
<td class="span1-2">
<%= attribute.title %>
<div class="quick-edit">
<ul class="nav nav-pills hide">
<li><%= link_to t(:edit), eval("admin_#{@attribute_type}_edit_sub_role_path(attribute)") %></li>
<li><%= link_to t(:sub_role_field), eval("admin_#{@attribute_type}_sub_role_field_path(attribute)"), :class => 'edit' %></li>
<li><%= link_to t(:enable), eval("admin_#{@attribute_type}_path(attribute, :authenticity_token => form_authenticity_token, :sub_role => {:disabled => true, :id => attribute })"), :remote => true, :method => :put, :id => "disable_#{attribute.id}", :style => "display:#{attribute.is_disabled? ? 'none' : ''}", :class => 'switch' %></li>
<li><%= link_to t(:disable), eval("admin_#{@attribute_type}_path(attribute, :authenticity_token => form_authenticity_token, :sub_role => {:disabled => false, :id => attribute })"), :remote => true, :method => :put, :id => "enable_#{attribute.id}", :style => "display:#{attribute.is_disabled? ? '' : 'none'}", :class => 'switch' %></li>
<% if !attribute.is_built_in? %>
<li><%= link_to t(:delete_), eval("admin_#{@attribute_type}_path(attribute, :sub_role => {:id => attribute })"), :class => 'delete', :confirm => t('sure?'), :method => :delete %></li>
<% end %>
</ul>
</div>
</td>
</tr>
<% end %>
</tbody>
</table>
<div class="form-actions form-fixed pagination-right">
<%= link_to content_tag(:i,t(:new_sub_role),:class=>"icon-plus icon-white"),eval("admin_#{@attribute_type}_add_sub_role_path(@attribute)"),:class=>"btn btn-primary pull-right"%>
</div>