diff --git a/app/views/admin_posts/index.html.erb b/app/views/admin_posts/index.html.erb
index 806895b9b1e..0763b3ff1b9 100755
--- a/app/views/admin_posts/index.html.erb
+++ b/app/views/admin_posts/index.html.erb
@@ -4,33 +4,33 @@
<% else %>
- <% @admin_posts.each do |admin_post| %>
-
- <%= render "admin_post", admin_post: admin_post %>
-
-
<%= ts("Comment") %>
-
- <% if admin_post.count_visible_comments > 0 %>
- - <%= link_to (admin_post.count_visible_comments == 1 ?
- ts("Read %{comment_count} Comment", comment_count: admin_post.count_visible_comments.to_s) :
- ts("Read %{comment_count} Comments", comment_count: admin_post.count_visible_comments.to_s)),
- admin_post_path(id: admin_post.id, anchor: "comments", show_comments: true) %>
- <% end %>
-
-
-
+ <% if @admin_posts.present? %>
+ <% @admin_posts.each do |admin_post| %>
+
+ <%= render "admin_post", admin_post: admin_post %>
+
+
<%= t(".landmark") %>
+
+ <% if admin_post.count_visible_comments > 0 %>
+ - <%= link_to t(".read_comments", count: admin_post.count_visible_comments),
+ admin_post_path(id: admin_post.id, anchor: "comments", show_comments: true) %>
+ <% end %>
+
+
+
+ <% end %>
<% end %>
diff --git a/config/locales/views/en.yml b/config/locales/views/en.yml
index 03b5b0cf4cb..902b44c4dfe 100644
--- a/config/locales/views/en.yml
+++ b/config/locales/views/en.yml
@@ -539,7 +539,12 @@ en:
page_heading: AO3 News Drafts
page_title: AO3 News Drafts
index:
+ landmark: Comment
+ page_heading: AO3 News
page_title: AO3 News
+ read_comments:
+ one: Read %{count} Comment
+ other: Read %{count} Comments
posting_fieldset:
actions:
cancel: Cancel
diff --git a/features/admins/admin_post_news.feature b/features/admins/admin_post_news.feature
index 5e5d4c94f07..0b9e36db2bc 100755
--- a/features/admins/admin_post_news.feature
+++ b/features/admins/admin_post_news.feature
@@ -129,6 +129,20 @@ Feature: Admin Actions to Post News
And "quotes" should be selected within "Tag"
And "Deutsch" should be selected within "Language"
+ Scenario: Admin post list is empty if page parameter is too large
+ Given the admin post "first"
+ And it is currently 1 second from now
+ And the admin post "second"
+ And there is 1 admin post per page
+ When I go to the admin-posts page
+ Then I should see "second"
+ And I should see "2" within ".pagination"
+ But I should not see "first"
+ When there are 20 admin posts per page
+ And I follow "2" within ".pagination"
+ Then I should see "AO3 News"
+ But I should not see "first"
+
Scenario: Translation of an admin post keeps tags of original post
Given I have posted an admin post with tags "original1, original2"
And basic languages
diff --git a/features/step_definitions/admin_steps.rb b/features/step_definitions/admin_steps.rb
index a80eeab212e..99b64d3748a 100644
--- a/features/step_definitions/admin_steps.rb
+++ b/features/step_definitions/admin_steps.rb
@@ -246,6 +246,10 @@
admin_post.update_attribute(:moderated_commenting_enabled, true)
end
+When "there is/are {int} admin post(s) per page" do |amount|
+ allow_any_instance_of(ApplicationController).to receive(:pagy_get_limit).and_return(amount)
+end
+
Given "an abuse ticket ID exists" do
ticket = {
"departmentId" => ArchiveConfig.ABUSE_ZOHO_DEPARTMENT_ID,