Skip to content

Commit

Permalink
Merge pull request #932 from sarken/issue_3355
Browse files Browse the repository at this point in the history
3355 with empty navigation on works and bookmarks indexes
  • Loading branch information
CristinaRO committed Jun 28, 2014
2 parents 356a4ce + 4a30bd8 commit 15deeaf
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 42 deletions.
8 changes: 4 additions & 4 deletions app/views/bookmarks/_bookmark_blurb.html.erb
Expand Up @@ -19,9 +19,9 @@
<%= render 'bookmarks/bookmark_item_module', :bookmarkable => bookmarkable %>
<!--actions-->
<% if (bookmark_count > 1 && (params[:tag_id] || @most_recent_bookmarks)) || (logged_in? && !is_author_of?(bookmark)) %>
<% if (bookmark_count > 1 && params[:tag_id]) || (bookmark_count > 1 && (@owner.blank? && @bookmarkable.blank?)) || (logged_in? && !is_author_of?(bookmark)) %>
<ul class="actions" role="navigation">
<% # let the user reading this bookmark save a copy for themselves %>
<% # If this bookmark does not belong to the current user, let them save a new copy or edit their existing copy %>
<% if logged_in? && !is_author_of?(bookmark) %>
<li>
<% if (current_user_bookmark ||= bookmark_if_exists(bookmarkable)) %>
Expand All @@ -33,7 +33,7 @@
<% end %>
<% if bookmark_count > 1 %>
<% if params[:tag_id] || @most_recent_bookmarks %>
<% if params[:tag_id] || (@owner.blank? && @bookmarkable.blank?) %>
<li id="recent_link_<%= "#{bookmark.bookmarkable_type.underscore}_#{bookmark.id}" %>" style="display: none;" class="showme">
<%= link_to ts("Show Most Recent Bookmarks"),
url_for({:controller => 'bookmarks', :action => 'fetch_recent', :id => bookmark.id }), :class => "actions", :remote => true %>
Expand All @@ -42,7 +42,7 @@
<% end %>
</ul>
<% end %>
<% # bookmark form loaded here if requested %>
<div class="new dynamic" id="bookmark_form_placement_for_<%= bookmark_form_id %>"></div>
<% end %>
Expand Down
20 changes: 10 additions & 10 deletions app/views/bookmarks/index.html.erb
Expand Up @@ -5,9 +5,9 @@
<!-- /descriptions-->

<!--subnav-->
<ul class="navigation actions" role="navigation">
<% if current_user.is_a?(User) %>
<% if @user == current_user || @most_recent_bookmarks || @collection %>
<% if current_user.is_a?(User) || @tag %>
<ul class="navigation actions" role="navigation">
<% if @user == current_user || (@owner.blank? && @bookmarkable.blank?) || @collection %>
<li><%= link_to ts("Bookmark External Work"), new_external_work_path %></li>
<% elsif params[:work_id] || params[:series_id] || params[:external_work_id] %>
<% bookmark_form_id = (@bookmarkable.blank? ? "#{@bookmark.id}" : "#{@bookmarkable.id}") %>
Expand All @@ -22,12 +22,12 @@
</li>
<% end %>
<% end %>
<% end %>
<% if @tag %>
<li><%= span_if_current ts('Works'), tag_works_path(@tag) %></li>
<li><%= span_if_current ts('Bookmarks'), tag_bookmarks_path(@tag) %></li>
<% end %>
</ul>
<% if @tag %>
<li><%= span_if_current ts('Works'), tag_works_path(@tag) %></li>
<li><%= span_if_current ts('Bookmarks'), tag_bookmarks_path(@tag) %></li>
<% end %>
</ul>
<% end %>
<!--/subnav-->
<% if params[:work_id] || params[:series_id] || params[:external_work_id] %>
Expand All @@ -36,7 +36,7 @@
<% end %>
<% unless @owner.present? || @bookmarkable.present? %>
<p><%= ts("These are some of the latest bookmarks created on the archive. To find more bookmarks, #{link_to 'choose a fandom', media_path} or #{link_to 'try our advanced search', search_bookmarks_path}.").html_safe %>
<p><%= ts("These are some of the latest bookmarks created on the Archive. To find more bookmarks, #{link_to 'choose a fandom', media_path} or #{link_to 'try our advanced search', search_bookmarks_path}.").html_safe %>
<% end %>
<% if @bookmarks.respond_to?(:total_pages) %>
Expand Down
58 changes: 30 additions & 28 deletions app/views/works/index.html.erb
Expand Up @@ -4,48 +4,50 @@
</h2>
<!-- /end descriptions-->

<div class="navigation actions module">
<!--Subnavigation, sorting and actions.-->
<% if (@collection && @collection.gift_exchange?) || @tag || @user %>
<div class="navigation actions module">

<!--Subnavigation, sorting and actions.-->
<h3 class="landmark heading">Navigation, Sorting and Actions</h3>
<!--gift search subnav-->
<% if @collection && @collection.gift_exchange? %>
<%= render :partial => 'gifts/gift_search' %>
<% end %>
<h3 class="landmark heading"><%= ts("Navigation, Sorting and Actions") %></h3>
<!--gift search subnav-->
<% if @collection && @collection.gift_exchange? %>
<%= render :partial => 'gifts/gift_search' %>
<% end %>

<!--user role subnav-->
<% if @tag || @user %>
<ul class="user navigation actions" role="navigation">
<% if @user %>
<% if @user == current_user %>
<li id="edit_multiple"><%= link_to ts('Edit Works'), show_multiple_user_works_path(@user) %></li>
<!--user role subnav-->
<% if @tag || @user %>
<ul class="user navigation actions" role="navigation">
<% if @user %>
<% if @user == current_user %>
<li id="edit_multiple"><%= link_to ts('Edit Works'), show_multiple_user_works_path(@user) %></li>
<% end %>
<li><%= span_if_current ts('Works in Collections'), collected_user_works_path(@user) %></li>
<li><%= span_if_current ts('Works'), user_works_path(@user) %></li>
<% end %>
<li><%= span_if_current ts('Works in Collections'), collected_user_works_path(@user) %></li>
<li><%= span_if_current ts('Works'), user_works_path(@user) %></li>
<% end %>
<% if @tag %>
<li><%= span_if_current ts('Works'), tag_works_path(@tag) %></li>
<li><%= span_if_current ts('Bookmarks'), tag_bookmarks_path(@tag) %></li>
<% end %>
<% if @tag && (%w(Fandom Character Relationship).include?(@tag.type.to_s) || @tag.name == "F/F") %>
<li><%= link_to_rss feed_tag_path(:id => @tag.id, :format => :atom) %></li>
<% end %>
</ul>
<% end %>
<% if @tag %>
<li><%= span_if_current ts('Works'), tag_works_path(@tag) %></li>
<li><%= span_if_current ts('Bookmarks'), tag_bookmarks_path(@tag) %></li>
<% end %>
<% if @tag && (%w(Fandom Character Relationship).include?(@tag.type.to_s) || @tag.name == "F/F") %>
<li><%= link_to_rss feed_tag_path(:id => @tag.id, :format => :atom) %></li>
<% end %>
</ul>
<% end %>

</div>
</div>
<% end %>
<!---/subnav-->

<% unless @owner.present? %>
<p><%= ts("These are some of the latest works posted to the archive. To find more works, #{link_to 'choose a fandom', media_path} or #{link_to 'try our advanced search', search_works_path}.").html_safe %>
<p><%= ts("These are some of the latest works posted to the Archive. To find more works, #{link_to 'choose a fandom', media_path} or #{link_to 'try our advanced search', search_works_path}.").html_safe %>
<% end %>
<% if @works.respond_to?(:total_pages) %>
<%= will_paginate @works %>
<% end %>

<!--main content-->
<h3 class="landmark heading">Listing Works</h3>
<h3 class="landmark heading"><%= ts("Listing Works") %></h3>
<ol class="work index group">
<% for work in @works %>
<% if work %><%= render 'work_blurb', :work => work %><% end %>
Expand Down

0 comments on commit 15deeaf

Please sign in to comment.