Orbit/app/views/admin/attributes/index.html.erb

60 lines
2.7 KiB
Plaintext
Raw Permalink Normal View History

2013-01-08 08:58:01 +00:00
<% 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'} %>
2011-12-23 10:34:21 +00:00
<% end %>
2013-01-08 08:58:01 +00:00
<div class="subnav">
<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="#"><%= t("#{@attribute_type}") %><b class="web-symbol"></b></a></span></th>
</tr>
</thead>
</table>
</div>
</div>
2011-12-23 10:34:21 +00:00
</div>
2013-01-08 08:58:01 +00:00
</div>
<table class="table main-list member-list">
<thead>
2011-12-23 10:34:21 +00:00
<tr>
2013-01-08 08:58:01 +00:00
<th class="span1-2"></th>
2011-12-23 10:34:21 +00:00
</tr>
2013-01-08 08:58:01 +00:00
</thead>
<tbody>
2011-12-23 10:34:21 +00:00
<% @attributes.each do |attribute| %>
2013-01-08 08:58:01 +00:00
<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("edit_admin_#{@attribute_type}_path(attribute)") %></li>
<% if @attribute_type == 'role' %>
<li><%= link_to t(:role_field), eval("admin_#{@attribute_type}_role_field_path(attribute)") %></li>
<li><%= link_to t(:sub_role), eval("admin_#{@attribute_type}_sub_role_path(attribute)") %></li>
<li><%= link_to t(:status), eval("admin_role_statuses_path(:role_id=>attribute)") %></li>
<li><%= link_to t(:category), eval("admin_role_categorys_path(:role_id=>attribute)") %></li>
2013-01-08 08:58:01 +00:00
<% end %>
<li><%= link_to t(:enable), eval("admin_#{@attribute_type}_path(attribute, :authenticity_token => form_authenticity_token, :#{@attribute_type} => {:disabled => true})"), :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, :#{@attribute_type} => {:disabled => false})"), :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)"), :class => 'delete', :confirm => t('sure?'), :method => :delete %></li>
<% end %>
</ul>
</div>
2011-12-23 10:34:21 +00:00
</td>
</tr>
2013-01-08 08:58:01 +00:00
<% end %>
</tbody>
</table>
<div class="form-actions form-fixed pagination-right">
<%= link_to content_tag(:i,t("new.#{@attribute_type}"),:class=>"icon-plus icon-white"),eval("new_admin_#{@attribute_type}_path"),:class=>"btn btn-primary pull-right"%>
2011-12-23 10:34:21 +00:00
</div>
2013-01-08 08:58:01 +00:00