orbit-basic/app/views/admin/attributes/_attribute.html.erb

32 lines
1.8 KiB
Plaintext
Raw Normal View History

2013-08-09 07:07:05 +00:00
<tr id="<%= dom_id attribute %>" class="<%= attribute.disabled ? 'disable' : '' %>">
<td>
<span class="label label-info"><%= attribute.title %></span>
<div class="quick-edit">
<ul class="nav nav-pills">
<li><%= link_to t(:edit), eval("edit_admin_#{@attribute_type}_path(attribute)"), :class=>"open-slide" %></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>
<% end %>
<li><%#= link_to attribute.disabled ? t(:disable) : t(:enable) , eval("admin_#{@attribute_type}_toggle_path(attribute)"), method: :post, remote: true, class: "switch" %></li>
</ul>
</div>
</td>
<td class="action span3">
<div class="toggle-control" style="float: right;">
<div class="togglebox <%= attribute.disabled ? 'disabled' : '' %>">
<%= link_to (check_box_tag 'accept', false , :class => 'toggle-check', :data=>{:deploy=>"right"}) , eval("admin_#{@attribute_type}_toggle_path(attribute)"), method: :post, remote: true, class: "switch" %>
2013-08-09 07:07:05 +00:00
<label><b></b></label>
</div>
</div>
<% if !attribute.is_built_in? %>
<%= link_to (content_tag :i,'',:class=>'icon-trash')+t(:delete_), eval("admin_#{@attribute_type}_path(attribute)"), :type=>"button", :class => 'btn btn-mini btn-danger', :confirm => t('sure?'), :method => :delete, :remote => true %>
<% end %>
</td>
</tr>