Skip to content

Commit

Permalink
Merge pull request #152 from pulibrary/return-to-search-function
Browse files Browse the repository at this point in the history
Add return to home page link so user can enter new search
  • Loading branch information
sandbergja authored Sep 28, 2023
2 parents b64f0cf + ec2e706 commit fb90ef0
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ group :development do
gem 'web-console'

# Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler]
# gem "rack-mini-profiler"
gem 'rack-mini-profiler'

# Speed up commands on slow machines / big apps [https://github.com/rails/spring]
# gem "spring"
Expand Down
3 changes: 3 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ GEM
nio4r (~> 2.0)
racc (1.7.1)
rack (2.2.8)
rack-mini-profiler (3.1.1)
rack (>= 1.2.0)
rack-proxy (0.7.6)
rack
rack-test (2.1.0)
Expand Down Expand Up @@ -342,6 +344,7 @@ DEPENDENCIES
pry
pry-byebug
puma (~> 5.6)
rack-mini-profiler
rails (~> 7.0.4)
rspec-rails
rubocop-rails
Expand Down
2 changes: 2 additions & 0 deletions app/views/guide_cards/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<h1 id="list_header"> GuideCard Index </h1>

<%= render "shared/return_to_home" %>

<% @guide_cards.each do |card| %>
<h2><%= link_to card.heading, guide_card_path(card.id) %></h2>
<% end %>
Expand Down
1 change: 1 addition & 0 deletions app/views/guide_cards/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<h2>Guide: <%= @guide_card.heading %></h2>

<%= render "shared/return_to_home" %>

<h3>List of SubGuide Cards</h3>
<ul id="sg_index">
Expand Down
1 change: 1 addition & 0 deletions app/views/shared/_return_to_home.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<h3>Return to <%= link_to("Home Page", root_path) %> to enter a new search.</h3>
2 changes: 2 additions & 0 deletions app/views/sub_guide_cards/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<h2>SubGuide: <%= @sub_guide_card.heading %></h2>
<p><%= page_entries_info @card_images, entry_name: 'card' %></p>

<%= render "shared/return_to_home" %>

<%= paginate @card_images %>

<% if @sub_guide_card.children.present? %>
Expand Down

0 comments on commit fb90ef0

Please sign in to comment.