-
Notifications
You must be signed in to change notification settings - Fork 519
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
AO3-6238 Random Items button on a collection doesn't work from the collection homepage #4462
Merged
brianjaustin
merged 12 commits into
otwcode:master
from
Cesium-Ice:AO3-6238-random-items-button-on-a-collection-doesnt-work-from-the-collection-homepage
Jan 22, 2025
+68
−35
Merged
Changes from 11 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
428c21a
change remote from true to false
Cesium-Ice 93c8efa
Merge branch 'master' into AO3-6238-random-items-button-on-a-collecti…
Cesium-Ice b3cb41c
address linter comments pt 1
Cesium-Ice 62af829
address linter comments pt 2
Cesium-Ice 8646693
fix UTs by fixing missing translation error
Cesium-Ice 481ecc7
Merge branch 'master' into AO3-6238-random-items-button-on-a-collecti…
Cesium-Ice 967773e
internationalization changes
Cesium-Ice c1a09f3
fixed random link and added UT
Cesium-Ice 16d0b41
commit erb linter autocorrect
Cesium-Ice de6a358
fix linter issue
Cesium-Ice 5f734cb
revert mistaken change
Cesium-Ice 8bc9d70
Merge upstream
brianjaustin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,54 @@ | ||
<div id="dashboard" class="region" role="navigation region"> | ||
<h3 class="landmark heading">Dashboard</h3> | ||
<h3 class="landmark heading"><%= t(".landmark.dashboard") %></h3> | ||
<ul class="navigation actions"> | ||
<li><%= span_if_current ts('Dashboard', key: 'dashboard'), @collection %></li> | ||
<li><%= span_if_current ts('Profile', key: 'dashboard'), collection_profile_path(@collection) %></li> | ||
<li><%= span_if_current t(".dashboard"), @collection %></li> | ||
<li><%= span_if_current t(".profile"), collection_profile_path(@collection) %></li> | ||
<% if [email protected]_profile.faq.blank? %> | ||
<li><%= span_if_current ts('FAQ', key: 'dashboard'), collection_profile_path(@collection, :anchor => "faq") %></li> | ||
<li><%= span_if_current t(".faq"), collection_profile_path(@collection, anchor: "faq") %></li> | ||
<% end %> | ||
<% if [email protected]_profile.rules.blank? %> | ||
<li><%= span_if_current ts('Rules', key: 'dashboard'), collection_profile_path(@collection, :anchor => "rules") %></li> | ||
<li><%= span_if_current t(".rules"), collection_profile_path(@collection, anchor: "rules") %></li> | ||
<% end %> | ||
|
||
<% if @collection.parent %> | ||
<li><%= link_to ts('Parent Collection', key: 'dashboard'), collection_path(@collection.parent) %></li> | ||
<li><%= link_to t(".parent_collection"), collection_path(@collection.parent) %></li> | ||
<% else %> | ||
<li><%= span_if_current ts("Subcollections (%{count})", key: 'dashboard', :count => @collection.children.count), collection_collections_path(@collection) %></li> | ||
<li><%= span_if_current t(".subcollections", count: @collection.children.count), collection_collections_path(@collection) %></li> | ||
<% end %> | ||
</ul> | ||
|
||
<!-- challenge section of dash --> | ||
<% if @collection.challenge %> | ||
<%= render :partial => "challenge/#{challenge_class_name(@collection)}/challenge_sidebar" %> | ||
<%= render partial: "challenge/#{challenge_class_name(@collection)}/challenge_sidebar" %> | ||
<% end %> | ||
|
||
<h4 class="landmark heading">Contents</h4> | ||
<h4 class="landmark heading"><%= t(".landmark.contents") %></h4> | ||
<ul class="navigation actions"> | ||
<li><%= span_if_current ts("Fandoms (%{count})", key: 'dashboard', count: SearchCounts.fandom_count_for_collection(@collection)), collection_fandoms_path(@collection) %></li> | ||
<li><%= span_if_current t(".fandoms", count: SearchCounts.fandom_count_for_collection(@collection)), collection_fandoms_path(@collection) %></li> | ||
|
||
<li><%= span_if_current ts("Works (%{count})", key: 'dashboard', count: SearchCounts.work_count_for_collection(@collection)), collection_works_path(@collection) %></li> | ||
<li><%= span_if_current t(".works", count: SearchCounts.work_count_for_collection(@collection)), collection_works_path(@collection) %></li> | ||
|
||
<li><%= span_if_current ts("Bookmarked Items (%{count})", key: 'dashboard', count: SearchCounts.bookmarkable_count_for_collection(@collection)), collection_bookmarks_path(@collection) %></li> | ||
<li><%= span_if_current t(".bookmarks", count: SearchCounts.bookmarkable_count_for_collection(@collection)), collection_bookmarks_path(@collection) %></li> | ||
|
||
<li> | ||
<% if controller.controller_name == 'collections' && controller.action_name == 'show' %> | ||
<%= link_to 'Random Items', | ||
:url => collection_path(@collection, :show_random => true), :method => :get, :remote => true %> | ||
<% else %> | ||
<%= link_to 'Random Items', collection_path(@collection, :show_random => true) %> | ||
<% end %> | ||
</li> | ||
<li><%= span_if_current ts('People', key: 'dashboard'), collection_people_path(@collection) %></li> | ||
<li><%= span_if_current ts('Tags', key: 'dashboard'), collection_tags_path(@collection) %></li> | ||
</ul> | ||
<li><%= span_if_current t(".random_items"), collection_path(@collection, show_random: true) %></li> | ||
<li><%= span_if_current t(".people"), collection_people_path(@collection) %></li> | ||
<li><%= span_if_current t(".tags"), collection_tags_path(@collection) %></li> | ||
</ul> | ||
|
||
<% if @collection.user_is_maintainer?(current_user)%> | ||
<h4 class="landmark heading">Choices</h4> | ||
<% if @collection.user_is_maintainer?(current_user) %> | ||
<h4 class="landmark heading"><%= t(".landmark.choices") %></h4> | ||
<ul class="navigation actions"> | ||
<li><%= span_if_current(ts('Manage Items', key: 'dashboard'), collection_items_path(@collection)) %></li> | ||
<li><%= span_if_current(t(".manage_items"), collection_items_path(@collection)) %></li> | ||
<% if @collection.user_is_owner?(current_user) %> | ||
<% if @collection.challenge %> | ||
<% if @collection.prompt_meme? %> | ||
<li><%= span_if_current ts('Challenge Settings', key: 'dashboard'), edit_collection_prompt_meme_path(@collection) %></li> | ||
<li><%= span_if_current t(".challenge_settings"), edit_collection_prompt_meme_path(@collection) %></li> | ||
<% elsif @collection.gift_exchange? %> | ||
<li><%= span_if_current ts('Challenge Settings', key: 'dashboard'), edit_collection_gift_exchange_path(@collection) %></li> | ||
<li><%= span_if_current t(".challenge_settings"), edit_collection_gift_exchange_path(@collection) %></li> | ||
<% end %> | ||
<% end %> | ||
<li><%= span_if_current ts('Collection Settings', key: 'dashboard'), edit_collection_path(@collection) %></li> | ||
<li><%= span_if_current t(".collection_settings"), edit_collection_path(@collection) %></li> | ||
<% end %> | ||
</ul> | ||
<% end %> | ||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is this
>
the typo you're referring to? It's not a typo -- it's part of the heading, to make it breadcrumb-like. For example, "Wrangling Guidelines > Wrangling Guidelines - Intro and General Concepts" on these guidelines.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.
whoops, I'll fix that...