Project

General

Profile

Feature #43632 » show_message_no_page_found_recent_page_makro.patch

Florian Walchshofer, 2025-12-31 00:42

View differences:

config/locales/en.yml (working copy)
reaction_text_x_other_users:
one: "1 other"
other: "%{count} others"
label_no_recent_wiki_pages: "No wiki pages updated within the last %{days} days."
lib/redmine/wiki_formatting/macros.rb (working copy)
order("#{WikiContent.table_name}.updated_on desc, id").
limit(limit)
return l(:label_no_recent_wiki_pages, days: days_to_list) if pages.empty?
tag.ul do
pages.each do |page|
concat(
test/unit/lib/redmine/wiki_formatting/macros_test.rb (working copy)
end
end
end
def test_recent_pages_macro_with_message_no_pages
@project = Project.find(1)
freeze_time do
with_locale :en do
with_settings :text_formatting => 'textile' do
result = textilizable('{{recent_pages(days=3)}}')
expected = I18n.t(:label_no_recent_wiki_pages, days: 3)
assert_select_in result, 'p:first-of-type', text: expected
end
end
end
end
end
(1-1/6)