Skip to content

Commit

Permalink
AO3-6313 Removed updated at info from FAQ categories on admin (#5026)
Browse files Browse the repository at this point in the history
* AO3-6313 Removed updated at info from FAQ categories on admin

* AO3-6313 Removing updated at from cucumber tests

---------

Co-authored-by: indes-castille <[email protected]>
  • Loading branch information
indesotw and indesotw authored Mar 11, 2025
1 parent 9fddb0a commit f362050
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/views/archive_faqs/_admin_index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<% @archive_faqs.each do |archive_faq| %>
<dt><%= link_to archive_faq.title, archive_faq %></dt>
<dd>
<p class="datetime"><%= t(".created_updated_date", date_created: l(archive_faq.created_at), date_updated: l(archive_faq.updated_at)) %></p>
<p class="datetime"><%= t(".created_date", date_created: l(archive_faq.created_at)) %></p>
<ul class="navigation actions">
<li><%= link_to t(".show"), archive_faq %></li>
<% if Globalize.locale.to_s != "en" || policy(ArchiveFaq).full_access? %>
Expand Down
3 changes: 1 addition & 2 deletions app/views/archive_faqs/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
<% if policy(ArchiveFaq).translation_access? %>
<div class="header">
<h3 class="heading">
Updated: <%= h @archive_faq.updated_at %>
<% if Globalize.locale.to_s != "en" || policy(ArchiveFaq).full_access? -%>
| <%= link_to t(".edit"), edit_archive_faq_path(@archive_faq) %>
<%= link_to t(".edit"), edit_archive_faq_path(@archive_faq) %>
<% end %>
</h3>
</div>
Expand Down
2 changes: 1 addition & 1 deletion config/locales/views/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ en:
archive_faqs:
admin_index:
confirm_delete: Are you sure you want to delete this FAQ category?
created_updated_date: Created at %{date_created} and updated at %{date_updated}
created_date: Created at %{date_created}
delete: Delete
edit: Edit
manage_faqs: Manage Archive FAQs
Expand Down
3 changes: 0 additions & 3 deletions features/admins/admin_post_faqs.feature
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ Feature: Admin Actions to Post FAQs
And I should not see "Delete"
When I follow "Show"
Then I should not see "Edit" within ".header"
But I should see "Updated:" within ".header"
When I go to the archive_faqs page
And I select "Deutsch" from "Language:"
And I press "Go" within "div#inner.wrapper"
Expand All @@ -171,7 +170,6 @@ Feature: Admin Actions to Post FAQs
And I should not see "Delete"
When I follow "Show"
Then I should see "Edit" within ".header"
And I should see "Updated:" within ".header"

Scenario Outline: Links to create and edit FAQs are not shown to unauthorized admins
Given an archive FAQ category with the title "Very important FAQ" exists
Expand All @@ -186,7 +184,6 @@ Feature: Admin Actions to Post FAQs
But I should see "Available Categories"
When I follow "Very important FAQ"
Then I should not see "Edit"
And I should not see "Updated:"

Examples:
| role |
Expand Down

0 comments on commit f362050

Please sign in to comment.