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

🧹 Updates to search form overrides #2409

Merged
merged 2 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
13 changes: 6 additions & 7 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ GIT

GIT
remote: https://github.com/samvera/hyrax.git
revision: abd5955f325b966ebd21d0de8d96b61cf0421cf3
revision: b6dcb8af85ab346b475c05e6e68b93da7825d319
branch: main
specs:
hyrax (5.0.1)
Expand All @@ -174,7 +174,6 @@ GIT
dry-logic (~> 1.5)
dry-monads (~> 1.6)
dry-validation (~> 1.10)
faraday (= 2.9.1)
flipflop (~> 2.3)
flot-rails (~> 0.0.6)
font-awesome-rails (~> 4.2)
Expand All @@ -193,7 +192,7 @@ GIT
noid-rails (~> 3.0)
oauth
oauth2 (~> 1.2)
openseadragon
openseadragon (~> 0.9)
posix-spawn
qa (~> 5.5, >= 5.5.1)
rails (~> 6.1)
Expand All @@ -211,7 +210,7 @@ GIT
signet
sprockets (= 3.7.2)
tinymce-rails (~> 5.10)
valkyrie (~> 3.3)
valkyrie (~> 3.5)
view_component (~> 2.74.1)

GIT
Expand Down Expand Up @@ -1005,8 +1004,8 @@ GEM
validate_email
validate_url
webfinger (~> 2.0)
openseadragon (0.6.0)
rails (> 3.2.0)
openseadragon (0.9.0)
rails (> 6.1.0)
openssl (3.2.0)
optimist (3.1.0)
order_already (0.3.2)
Expand Down Expand Up @@ -1416,7 +1415,7 @@ GEM
validate_url (1.0.15)
activemodel (>= 3.0.0)
public_suffix
valkyrie (3.3.0)
valkyrie (3.5.0)
activemodel
activesupport
dry-struct
Expand Down
24 changes: 9 additions & 15 deletions app/views/themes/cultural_repository/catalog/_search_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<% # OVERRIDE: Hyrax v5.0.0rc2 template to change the size of the column on line 8 from col-sm-3 to col-sm-4 %>
<% # OVERRIDE: Hyrax v5.0.0rc2 template to change the size of the column on line 8 from col-sm-3 to col-sm-4 %>

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very nitpicky of me, but i think this comment should be updated to v5.0.1

<%= form_tag search_form_action, method: :get, class: "cultural-repository form-horizontal search-form", id: "search-form-header", role: "search" do %>
<%= render Blacklight::HiddenSearchStateComponent.new(params: search_state.params_for_search.except(:q, :search_field, :qt, :page, :utf8)) %>
Expand Down Expand Up @@ -26,20 +26,14 @@
<span class="caret"></span>
</button>

<ul class="dropdown-menu dropdown-menu-right">
<li class="dropdown-item">
<%= link_to t("hyrax.search.form.option.all.label_long", application_name: application_name), "#",
data: { "search-option" => main_app.search_catalog_path, "search-label" => t("hyrax.search.form.option.all.label_short") } %>
</li>
<li class="dropdown-item">
<%= link_to t("hyrax.search.form.option.my_works.label_long"), "#",
data: { "search-option" => hyrax.my_works_path, "search-label" => t("hyrax.search.form.option.my_works.label_short") } %>
</li>
<li class="dropdown-item">
<%= link_to t("hyrax.search.form.option.my_collections.label_long"), "#",
data: { "search-option" => hyrax.my_collections_path, "search-label" => t("hyrax.search.form.option.my_collections.label_short") } %>
</li>
</ul>
<div class="dropdown-menu dropdown-menu-right">
<%= link_to t("hyrax.search.form.option.all.label_long", application_name: application_name), "#", class: "dropdown-item",
data: { "search-option" => main_app.search_catalog_path, "search-label" => t("hyrax.search.form.option.all.label_short") } %>
<%= link_to t("hyrax.search.form.option.my_works.label_long"), "#", class: "dropdown-item",
data: { "search-option" => hyrax.my_works_path, "search-label" => t("hyrax.search.form.option.my_works.label_short") } %>
<%= link_to t("hyrax.search.form.option.my_collections.label_long"), "#", class: "dropdown-item",
data: { "search-option" => hyrax.my_collections_path, "search-label" => t("hyrax.search.form.option.my_collections.label_short") } %>
</div>
<% end %>
</div><!-- /.input-group-btn -->
</div><!-- /.input-group -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<% # OVERRIDE: Hyrax v5.0.0rc2 template to change the size of the column on line 8 from col-sm-3 to col-sm-6 %>
<% # OVERRIDE: Hyrax v5.0.0rc2 template to change the size of the column on line 8 from col-sm-3 to col-sm-6 %>

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same with this one

<%= form_tag search_form_action, method: :get, class: "institutional-repository form-horizontal search-form", id: "search-form-header", role: "search" do %>
<%= render Blacklight::HiddenSearchStateComponent.new(params: search_state.params_for_search.except(:q, :search_field, :qt, :page, :utf8)) %>
Expand Down Expand Up @@ -26,20 +26,14 @@
<span class="caret"></span>
</button>

<ul class="dropdown-menu dropdown-menu-right">
<li class="dropdown-item">
<%= link_to t("hyrax.search.form.option.all.label_long", application_name: application_name), "#",
data: { "search-option" => main_app.search_catalog_path, "search-label" => t("hyrax.search.form.option.all.label_short") } %>
</li>
<li class="dropdown-item">
<%= link_to t("hyrax.search.form.option.my_works.label_long"), "#",
data: { "search-option" => hyrax.my_works_path, "search-label" => t("hyrax.search.form.option.my_works.label_short") } %>
</li>
<li class="dropdown-item">
<%= link_to t("hyrax.search.form.option.my_collections.label_long"), "#",
data: { "search-option" => hyrax.my_collections_path, "search-label" => t("hyrax.search.form.option.my_collections.label_short") } %>
</li>
</ul>
<div class="dropdown-menu dropdown-menu-right">
<%= link_to t("hyrax.search.form.option.all.label_long", application_name: application_name), "#", class: "dropdown-item",
data: { "search-option" => main_app.search_catalog_path, "search-label" => t("hyrax.search.form.option.all.label_short") } %>
<%= link_to t("hyrax.search.form.option.my_works.label_long"), "#", class: "dropdown-item",
data: { "search-option" => hyrax.my_works_path, "search-label" => t("hyrax.search.form.option.my_works.label_short") } %>
<%= link_to t("hyrax.search.form.option.my_collections.label_long"), "#", class: "dropdown-item",
data: { "search-option" => hyrax.my_collections_path, "search-label" => t("hyrax.search.form.option.my_collections.label_short") } %>
</div>
<% end %>
</div><!-- /.input-group-btn -->
</div><!-- /.input-group -->
Expand Down
Loading