Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collection and sidebar style fixes #6360

Merged
merged 4 commits into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/assets/javascripts/hyrax/batch_select_all.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
var checked = $("#check_all")[0]['checked'];

// check each individual box
$("input[type='checkbox'].batch_document_selector").each(function(index, value) {
$("input[type='checkbox'].batch_document_selector:not(.disabled)").each(function(index, value) {
value['checked'] = checked;
});
toggleButtons();
Expand Down
2 changes: 0 additions & 2 deletions app/assets/stylesheets/hyrax/_file-listing.scss
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ h4 .small {
.batch-info {

.sort-toggle {
height: 5.1em;

button {
margin-left: 10px;
}
Expand Down
23 changes: 23 additions & 0 deletions app/assets/stylesheets/hyrax/sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,29 @@ $gutter-width: $grid-gutter-width/2;
}
}

&:not(.maximized) {
.sidebar-action-text,
a span + span,
h5 {
display: none;
}

.nav li {
text-align: center;
a {
padding-left: 0;
padding-right: 0;
}
.fa {
margin-right: 0;
}
}

.nav-item {
width: $drawer-small;
}
}

.sidebar-toggle {
cursor: pointer;
background-color: $body-background-color;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</td>
<td>
<div class="media">
<%= link_to [main_app, document], "class" => "media-left", "aria-hidden" => "true" do %>
<%= link_to [main_app, document], "class" => "media-left mr-3", "aria-hidden" => "true" do %>
<%= document_presenter(document)&.thumbnail&.thumbnail_tag(
{ class: "d-none d-md-block file_listing_thumbnail", alt: "#{document.title_or_label} #{t('hyrax.homepage.admin_sets.thumbnail')}" },
{ suppress_link: true }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<input type="checkbox" name="batch_document_ids[]" id="batch_document_<%= id %>" value="<%= id %>" class="batch_document_selector"
data-hasaccess="<%= (can?(:edit, collection_presenter.solr_document)) %>" />
<% else %>
<input type="checkbox" class="disabled" disabled=true />
<input type="checkbox" class="disabled batch_document_selector" disabled=true />
<% end %>
</td>
<td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</td>
<td>
<div class="media">
<%= link_to [main_app, document], "class" => "media-left", "aria-hidden" => "true" do %>
<%= link_to [main_app, document], "class" => "media-left mr-3", "aria-hidden" => "true" do %>
<%= document_presenter(document)&.thumbnail&.thumbnail_tag(
{ class: "d-none d-md-block file_listing_thumbnail", alt: document.title_or_label }, { suppress_link: true }
) %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<% if show_sort_and_per_page? && collection_member_sort_fields.many? %>
<div class="sort-toggle">
<%= form_tag dashboard_collection_path(collection), method: :get, class: 'per_page' do %>
<div class="form-group row form-control-lg">
<fieldset class="col-sm-9">
<div class="form-group row">
<fieldset class="col-sm-7 col-lg-8">
<legend class="sr-only"><%= t('hyrax.sort_label') %></legend>
<%= label_tag(:sort, t(".sort_by")) %>
<%= select_tag(:sort, options_from_collection_for_select(collection_member_sort_fields, 'first', lambda {|field| field.last.label}, h(params[:sort]))) %>
Expand All @@ -22,7 +22,7 @@
<%= render Blacklight::HiddenSearchStateComponent.new(params: search_state.params_for_search.except(:per_page, :sort)) %>
<button class="btn btn-info"><span class="fa fa-refresh"></span> <%= t('helpers.action.refresh') %></button>
</fieldset>
<div class="col-sm-3">
<div class="col-sm-5 col-lg-4">
<%= render 'hyrax/collections/view_type_group' %>
</div>
</div>
Expand Down