app/views/spotlight/roles/index.html.erb in blacklight-spotlight-0.0.2 vs app/views/spotlight/roles/index.html.erb in blacklight-spotlight-0.0.3

- old
+ new

@@ -1,29 +1,27 @@ <%= render 'spotlight/shared/curation_sidebar' %> <div id="content" class="col-md-9"> - <% @page_title = t(:'spotlight.administration.users.title') %> - - <h1><%= t :'spotlight.administration.header' %></h1> - <h2 class="text-muted"><%= t :'spotlight.administration.users.header' %></h2> + <%= administration_page_title %> <%= bootstrap_form_for @exhibit, url: spotlight.update_all_exhibit_roles_path(@exhibit) do |f| %> - <%= button_tag t(:'spotlight.administration.users.new'), class: 'btn btn-default', data: {behavior: 'new-user'} %> <table class="table table-striped"> <thead> - <th>Name</th> - <th>Role</th> - <th>Actions</th> + <th><%= t '.name' %></th> + <th><%= t '.role' %></th> + <th><%= t '.actions' %></th> </thead> <tbody> <%= f.fields_for :roles do |r| %> <% if r.object.new_record? %> <%= render partial: 'edit_fields', locals: {f: r} %> <tr data-edit-for="new"> <td></td> <td colspan=2> - <%= button_tag t(:'spotlight.administration.users.cancel'), class: 'btn btn-text', data: {behavior: 'cancel-edit' } %> - <%=f.submit t(:'spotlight.administration.users.update'), class: 'btn btn-primary'%> + <div class="pull-right"> + <%= cancel_link r.object, '#', class: 'btn btn-text', data: {behavior: 'cancel-edit' } %> + <%=f.submit nil, class: 'btn btn-primary'%> + </div> </td> </tr> <% else %> <tr data-show-for="<%= r.object.id %>"> <td><%= r.object.user.to_s %></td> @@ -32,19 +30,25 @@ <span class="glyphicon glyphicon-edit"></span> <% end %></td> </tr> <%= render partial: 'edit_fields', locals: {f: r} %> <tr data-edit-for="<%= r.object.id %>"> - <td><%= f.submit t(:'spotlight.administration.users.remove'), class: 'btn btn-danger', data: { behavior: 'destroy-user', target: r.object.id} %> + <td><%= f.submit action_label(r.object, :destroy), class: 'btn btn-danger', data: { behavior: 'destroy-user', target: r.object.id} %> <%= r.hidden_field :_destroy, data: {'destroy-for' => r.object.id} %> </td> <td colspan=2> - <%= button_tag t(:'spotlight.administration.users.cancel'), class: 'btn btn-text', data: {behavior: 'cancel-edit' } %> - <%=f.submit t(:'spotlight.administration.users.update'), class: 'btn btn-primary'%> + <div class="pull-right"> + <%= cancel_link r.object, '#', class: 'btn btn-text', data: {behavior: 'cancel-edit' } %> + <%=f.submit nil, class: 'btn btn-primary'%> + </div> </td> </tr> <% end %> <% end %> </tbody> </table> + + <div class="pull-right"> + <%= exhibit_create_link Spotlight::Role.new, '#', class: 'btn btn-default', data: {behavior: 'new-user'} %> + </div> <% end %> </div>