-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
this includes partials to add a class to elements that needed a white…
… background for legibility in the table view of collections
- Loading branch information
1 parent
33e2fb1
commit 56125cc
Showing
2 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
app/views/hyrax/dashboard/collections/_show_document_list.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<table class="table table-striped panel"> | ||
<caption class="sr-only">List of items in this collection</caption> | ||
<thead> | ||
<tr> | ||
<th> </th> | ||
<th>Title</th> | ||
<th>Date Uploaded</th> | ||
<th>Visibility</th> | ||
<% if current_user %> | ||
<th>Action</th> | ||
<% end %> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<%= render partial: 'show_document_list_row', collection: documents, as: :document %> | ||
</tbody> | ||
</table> |
32 changes: 32 additions & 0 deletions
32
app/views/hyrax/dashboard/collections/_sort_and_per_page.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<div class="batch-info panel"> | ||
<%= render 'form_for_select_collection', user_collections: @user_collections %> | ||
<% if params[:action] == "edit" && @response.response['numFound'] > 1 %> | ||
<div class="batch-toggle"> | ||
<% session[:batch_edit_state] = "on" %> | ||
<%= button_for_remove_selected_from_collection collection %> | ||
</div> | ||
<% end %> | ||
<div class="sort-toggle"> | ||
<%# kind of hacky way to get this to work on catalog and folder controllers. May be able to simple do {action: "index"} but I'm not sure -%> | ||
<% if @response.response['numFound'] > 1 && !sort_fields.empty? %> | ||
<%= form_tag collection_path(collection), method: :get, class: 'per_page form-horizontal' do %> | ||
<div class="form-group form-group-lg"> | ||
<fieldset class="col-xs-12 col-sm-9 col-md-8 col-lg-10"> | ||
<legend class="sr-only"><%= t('hyrax.sort_label') %></legend> | ||
<%= label_tag(:sort, "<span>Sort By:</span>".html_safe) %> | ||
<%= select_tag(:sort, options_for_select(sort_fields, h(params[:sort]))) %> | ||
<%= label_tag(:per_page) do %> | ||
Show <%= select_tag(:per_page, options_for_select(['10', '20', '50', '100'], h(params[:per_page])), title: "Number of results to display per page") %> | ||
per page | ||
<% end %> | ||
<%= render_hash_as_hidden_fields(search_state.params_for_search.except(:per_page, :sort)) %> | ||
| ||
<button class="btn btn-info"><span class="glyphicon glyphicon-refresh"></span> Refresh</button> | ||
</fieldset> | ||
<%= render 'view_type_group' %> | ||
</div> | ||
<% end %> | ||
<% end %> | ||
</div> | ||
</div> |