2011-04-13 10:19:51 +00:00
|
|
|
<% content_for :secondary do %>
|
|
|
|
<ul class="list">
|
2011-02-01 07:12:23 +00:00
|
|
|
<li><%= link_to t("admin.new_user_#{@attribute}"), eval("new_admin_user_#{@attribute}_model_path"), :class => 'button positive' %></li>
|
2011-04-13 10:19:51 +00:00
|
|
|
</ul>
|
|
|
|
<% end -%>
|
|
|
|
|
2011-02-01 07:12:23 +00:00
|
|
|
<h1><%= t("admin.list_user_#{@attribute}s") %></h1>
|
2011-04-13 10:19:51 +00:00
|
|
|
|
|
|
|
<table>
|
|
|
|
<tr>
|
2011-02-01 07:12:23 +00:00
|
|
|
<th><%= t("admin.#{@attribute}") %></th>
|
2011-04-13 10:19:51 +00:00
|
|
|
<th><%= t('admin.key') %></th>
|
|
|
|
<th><%= t('admin.action') %></th>
|
|
|
|
</tr>
|
|
|
|
|
2011-02-01 07:12:23 +00:00
|
|
|
<% @user_attribute_models.each do |user_attribute_model| %>
|
2011-04-13 10:19:51 +00:00
|
|
|
<tr>
|
2011-02-01 07:12:23 +00:00
|
|
|
<td><%= user_attribute_model.i18n_variable[I18n.locale] %></td>
|
|
|
|
<td><%= user_attribute_model.key %></td>
|
2011-04-13 10:19:51 +00:00
|
|
|
<td>
|
2011-02-01 07:12:23 +00:00
|
|
|
<%= link_to t(:edit), eval("edit_admin_user_#{@attribute}_model_path(user_attribute_model)") %> |
|
2011-05-02 04:07:31 +00:00
|
|
|
<% if user_attribute_model.is_built_in? %>
|
|
|
|
<%= link_to t(:disable), eval("admin_user_#{@attribute}_model_path(user_attribute_model, :authenticity_token => form_authenticity_token, :user_#{@attribute}_model => {:disabled => true})"), :remote => true, :method => :put, :id => "disable_#{user_attribute_model.id}", :style => "display:#{user_attribute_model.is_disabled? ? 'none' : 'inline'}" %>
|
|
|
|
<%= link_to t(:enable), eval("admin_user_#{@attribute}_model_path(user_attribute_model, :authenticity_token => form_authenticity_token, :user_#{@attribute}_model => {:disabled => false})"), :remote => true, :method => :put, :id => "enable_#{user_attribute_model.id}", :style => "display:#{user_attribute_model.is_disabled? ? 'inline' : 'none'}" %>
|
|
|
|
<% else %>
|
|
|
|
<%= link_to t(:delete), eval("admin_user_#{@attribute}_model_path(user_attribute_model)"), :confirm => t('sure?'), :method => :delete %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
</td>
|
2011-04-13 10:19:51 +00:00
|
|
|
</tr>
|
|
|
|
<% end %>
|
2011-02-01 02:46:26 +00:00
|
|
|
</table>
|