Skip to content

Commit

Permalink
Merge pull request #499 from UCLALibrary/URS-478_Create-More_Results-…
Browse files Browse the repository at this point in the history
…card-link-in-gallery-view

Create "More Results" card/link
  • Loading branch information
pghorpade authored Nov 6, 2019
2 parents 3c85bcf + 90a2938 commit 9c2920f
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ Layout/BlockEndNewline:
Exclude:
- 'spec/features/search_catalog_spec.rb'

Lint/RequireParentheses:
Exclude:
- app/helpers/blacklight_helper.rb

Metrics/AbcSize:
Exclude:
- 'app/helpers/blacklight/url_helper_behavior.rb'
Expand Down Expand Up @@ -100,6 +104,11 @@ Style/BlockDelimiters:
Style/IfUnlessModifier:
Exclude:
- 'app/helpers/blacklight/url_helper_behavior.rb'
- app/helpers/blacklight_helper.rb

Style/AndOr:
Exclude:
- app/helpers/blacklight_helper.rb

Style/MethodDefParentheses:
Exclude:
Expand Down
22 changes: 22 additions & 0 deletions app/assets/stylesheets/ursus/_gallery.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,18 @@
}
}
}
@media screen and (max-width: 1199px) {
#documents.row.gallery {
.gallery-box {
outline: 1px solid $light-gray;
padding: 5px;
height: 200px;
}
.gallery-text {
margin: 10px;
}
}
}
}

@media screen and (max-width: 1199px) {
Expand Down Expand Up @@ -87,3 +99,13 @@
}
}
}

.extra-result-see-more {
a {
border: 1px solid #ddd;
padding: 20px;
font-size: 18px;
display: block;
margin-top: 60px;
}
}
7 changes: 7 additions & 0 deletions app/views/catalog/_index_gallery.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,10 @@
</div>
</div>
</div>

<% if document_counter + 1 == current_per_page and @response.total != current_per_page %>
<div class='document col-6 col-sm-6 col-md-6 col-lg-4 extra-result-see-more'>
<% current_next_page = @response.next_page.to_s %>
<%= link_to "See More >", url_for(request.parameters.merge(:only_path => false, page: current_next_page)) %>
</div>
<% end %>

0 comments on commit 9c2920f

Please sign in to comment.