orbit-basic/app/views/admin/user_attribute_models/index.html.erb

61 lines
2.8 KiB
Plaintext
Raw Normal View History

2011-11-18 08:43:14 +00:00
<% content_for :body_id do %>roles_list<% end -%>
<% content_for :secondary do %>
2011-11-18 08:43:14 +00:00
<div class="member_setup">
<h1>Member Setup</h1>
<ul class="list">
<li class="set_1"><%= link_to content_tag(:span, t('admin.list_users')), admin_users_path %></li>
<li class="set_2"><%= link_to content_tag(:span, t('admin.list_user_roles')), admin_user_role_models_path %></li>
</ul>
2011-11-17 12:02:58 +00:00
</div>
<% end -%>
2011-11-17 12:02:58 +00:00
<!-- <table>
<tr>
2011-02-01 07:12:23 +00:00
<th><%= t("admin.#{@attribute}") %></th>
<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| %>
<tr>
2011-02-01 07:12:23 +00:00
<td><%= user_attribute_model.i18n_variable[I18n.locale] %></td>
<td><%= user_attribute_model.key %></td>
<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>
</tr>
<% end %>
2011-11-17 12:02:58 +00:00
</table> -->
2011-11-18 08:43:14 +00:00
<div class="main_list">
<div id="add_new" class="buttom clear">
<%= link_to t('admin.new_user_role'), new_admin_user_role_model_path %>
</div>
<ul>
<li class="list_head clear">
<span class="roles">Roles</span>
<span class="action">Action</span>
</li>
<% @user_attribute_models.each do |user_attribute_model| %>
2011-11-17 12:02:58 +00:00
<li class="list_item clear">
2011-11-18 08:43:14 +00:00
<span class="roles <%= user_attribute_model.i18n_variable[:key].downcase %>"><%= user_attribute_model.i18n_variable[I18n.locale] %></span>
2011-11-17 12:02:58 +00:00
<span class="action">
<%= link_to t(:edit), eval("edit_admin_user_#{@attribute}_model_path(user_attribute_model)"), :class => 'edit' %>
<%= link_to t(:delete), eval("admin_user_#{@attribute}_model_path(user_attribute_model)"), :class => 'delete', :confirm => t('sure?'), :method => :delete unless user_attribute_model.is_built_in? %>
</span>
</li>
2011-11-18 08:43:14 +00:00
<% end %>
</ul>
<div id="add_new" class="buttom clear">
<%= link_to t('admin.new_user_role'), new_admin_user_role_model_path %>
</div>
2011-11-17 12:02:58 +00:00
</div>