-
Notifications
You must be signed in to change notification settings - Fork 253
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
show back to search and start over for 1 result show pages #1065
Conversation
@@ -1,18 +1,19 @@ | |||
<% #Using the Bootstrap Pagination class -%> | |||
<% if @previous_document || @next_document %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you fix the indentation in this file? it seems a little screwy (and probably not really your fault.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
screwy for sure... force pushed
f8adada
to
fc03302
Compare
<% end %> | ||
<%= link_back_to_catalog :class => 'btn' %> | ||
|
||
<%=link_to "#{t('blacklight.search.start_over')}", start_over_path(current_search_session.try(:query_params) || {}), :id=>"startOverLink", :class => 'btn' %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While you're touching this file... want to change this line:
<%= link_to t('blacklight.search.start_over'), start_over_path(current_search_session.try(:query_params) || {}), id: "startOverLink", class: 'btn' %>
Yes, this is a good idea. |
fc03302
to
e4dc581
Compare
Changing the HTML DOM id from #previousNextDocument to #paginationSearchWidgets will be a backwards compatibility issue for anyone with local CSS styling using that HTML id. (I do!). If you're going to go all the way to backwards incompat -- is there any reason this is styled with an Change to a class? Or, hey, best of both worlds -- leave the ? |
@jrochkind I'm ok with your suggestion for backwards compatibility, with a comment to remove id selectors in Blacklight 6 |
e4dc581
to
0ccea05
Compare
Ok so now updated with @jrochkind s suggestion for backward compatibility with deprecation notice. |
@@ -1,18 +1,20 @@ | |||
<% #Using the Bootstrap Pagination class -%> | |||
<% if @previous_document || @next_document %> | |||
<div id="previousNextDocument"> | |||
<% Deprecation.warn('', 'using id="previousNextDocument" as a selector is deprecated and will be removed in Blacklight 6.0') %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this unconditional deprecation warning will get annoying really fast. Can we either leave a comment (or comment out the block) instead, and remember to include it in release notes when we kill the id?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cbeer added as a comment
0ccea05
to
fe8fed1
Compare
👍 |
show back to search and start over for 1 result show pages
This pull request modifies a show page to include the "Back to Search" and "Start Over" buttons from a navigated search that only includes 1 search result. Previously both the pagination and search buttons were both inside
#previousNextDocument
and only shownif @previous_document || @next_document
. I think this logic should be decoupled and that these are separate concerns.GeoBlacklight usability testing indicated not showing "Back to Search" and "Start Over" on every show page navigated from a search was confusing for users. It also was not clear to users why this was happening.