Project

General

Profile

Feature #43632 » B_show_message_no_page_found_recent_page_makro.patch

Florian Walchshofer, 2026-03-09 22:53

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 tag.ul(tag.li(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)}}')
assert_select_in result, 'ul>li', :text => I18n.t(:label_no_recent_wiki_pages, days: 3), :count => 1
end
end
end
end
end
(5-5/6)