Skip to content

Commit

Permalink
Merge pull request #958 from sarken/issue_3376
Browse files Browse the repository at this point in the history
3376 with inconsistencies on bookmark back buttons
  • Loading branch information
CristinaRO committed Jun 11, 2014
2 parents dfae6ee + d439d19 commit 46b4e12
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/views/bookmarks/_bookmark_form.html.erb
Expand Up @@ -99,7 +99,7 @@
<p class="submit actions">
<%= f.submit(button_name) %>
<% unless in_page %>
<%= link_to ts("Back to My Bookmarks"), user_bookmarks_path(current_user) %>
<%= link_to ts("My Bookmarks"), user_bookmarks_path(current_user) %>
<% end %>
</p>
</fieldset>
Expand Down
2 changes: 1 addition & 1 deletion app/views/bookmarks/edit.html.erb
Expand Up @@ -16,7 +16,7 @@
<li><%= link_to_user_bookmarkable_bookmarks(@bookmark.bookmarkable) %></li>
<% end %>
<li><%= link_to ts("Show"), bookmark_path(@bookmark) %></li>
<li><%= link_to ts("Back to My Bookmarks"), user_bookmarks_path(current_user) %></li>
<li><%= link_to ts("My Bookmarks"), user_bookmarks_path(current_user) %></li>
</ul>
<!--/subnav-->

Expand Down
24 changes: 22 additions & 2 deletions app/views/bookmarks/show.html.erb
@@ -1,6 +1,26 @@
<ul class="index group"><%= render 'bookmark_blurb', :bookmark => @bookmark %></ul>
<!--Descriptive page name, messages and instructions-->
<h2 class="heading">
<%= ts("Bookmark") %>
</h2>
<!--/descriptions-->

<p class="navigation actions" role="navigation"><%= link_to ts("Back to Bookmarks"), user_bookmarks_path(@bookmark.pseud.user) %></p>
<!--subnav-->
<ul class="navigation actions" role="navigation">
<li>
<% if is_author_of?(@bookmark) %>
<%= link_to ts("My Bookmarks"), user_bookmarks_path(@bookmark.pseud.user) %>
<% else %>
<%= link_to ts("Bookmarks by %{bookmarker}", :bookmarker => @bookmark.pseud.byline), user_bookmarks_path(@bookmark.pseud.user) %>
<% end %>
</li>
</ul>
<!--/subnav-->

<!--main content-->
<ul class="bookmark index group">
<%= render 'bookmark_blurb', :bookmark => @bookmark %>
</ul>
<!--/content-->

<% # FRONT END NOTE: Twitter widget JavaScript included here for share/_share to ensure it is only loaded once per page %>
<% content_for :footer_js do %>
Expand Down
2 changes: 1 addition & 1 deletion features/bookmarks/bookmark_create.feature
Expand Up @@ -22,7 +22,7 @@ Scenario: Create a bookmark
And I check "bookmark_rec"
And I press "Create"
Then I should see "Bookmark was successfully created"
And I should see "Back to Bookmarks"
And I should see "My Bookmarks"
When I am logged in as "another_bookmark_user"
And I go to the bookmarks page
Then I should see "Revenge of the Sith"
Expand Down

0 comments on commit 46b4e12

Please sign in to comment.