Skip to content

Commit

Permalink
WIP moving search view controls around
Browse files Browse the repository at this point in the history
  • Loading branch information
barmintor committed Mar 14, 2024
1 parent a19330b commit f62b88a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 25 deletions.
27 changes: 6 additions & 21 deletions app/views/shared/_sort_and_per_page.html.erb
Original file line number Diff line number Diff line change
@@ -1,25 +1,10 @@
<div id="sortAndPerPage" class="border-bottom-0 d-flex justify-content-between">
<div id="search-result-pagination">
<%= render(partial: "paginate_compact", object: @response) if has_search_parameters? %>
<div id="sortAndPerPage" class="border-bottom-0 d-flex justify-content-center">
<div id="search-widgets" class="btn-group btn-group-sm search-index-tool-group col-12">
<%= render :partial => 'sort_widget' %>
<%= render :partial => 'per_page_widget' %>
<%= render :partial => 'view_type_group' %>
</div>
<div id="search-index-tools">
<div id="search-widgets" class="btn-group btn-group-sm float-right search-index-tool-group">
<%= render :partial => 'sort_widget' %>
<%= render :partial => 'per_page_widget' %>
<%= render :partial => 'view_type_group' %>
</div>
<div id="view-options" class="hidden-xs btn-group btn-group-sm float-right search-index-tool-group">
<%= search_mode_button(:grid) %>
<%= search_mode_button(:list) %>
<% if controller.subsite_config.dig('display_options', 'show_other_sources') && @response.params[:q].present? %>
<button id="extended-search-mode" type="button" class="btn btn-outline-secondary result-type-button" title="Search Other Sources"><i class="fa fa-link"></i></button>
<% end %>
</div>
<div>
<%= render Dcv::Search::Ui::CsvExportComponent.new %>
<% if controller.subsite_config.dig('date_search_configuration', 'show_timeline') %>
<div id="date-toggle" class="btn-group btn-group-sm float-right search-index-tool-group">
<button id="date-graph-toggle" type="button" class="btn btn-outline-secondary result-type-button" data-toggle="tooltip" aria-label="timeline view" title="timeline view"><i class="fa fa-bar-chart"></i></button>
</div>
<% end %>
</div>
</div>
6 changes: 2 additions & 4 deletions app/views/shared/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<div class="row">
<div id="nav" class="col-md-12">
<div id="sidebar" class="col-md-3">
<div id="nav">
<%= render 'sort_and_per_page' %>
</div>
<div id="sidebar" class="col-md-3">
<%= render 'search_sidebar' %>
</div>

Expand Down Expand Up @@ -41,8 +41,6 @@
</div>
</div>

<%= render 'results_pagination' %>
<% if show_other_sources? %>
<div class="text-right">
<button title="return to results" class="pagination btn btn-sm btn-link hidden" id="return-to-results" type="button">&laquo; Return to Results</button>
Expand Down

0 comments on commit f62b88a

Please sign in to comment.