Project

General

Profile

Feature #31631 » add-child-pages.patch

Mizuki ISHIKAWA, 2019-06-27 08:25

View differences:

app/views/wiki/_sidebar.html.erb
:action => 'date_index'}) %></li>
</ul>
<% if @page.present? && @page.children.present? %>
<h3><%= l(:label_child_pages) %></h3>
<%= render_page_hierarchy(@page.children.group_by(&:parent_id), @page.id, :timestamp => true) %>
<% end %>
<%= call_hook(:view_wiki_show_sidebar_bottom, :wiki => @wiki, :page => @page) %>
config/locales/en.yml
label_wiki_page: Wiki page
label_wiki_page_plural: Wiki pages
label_wiki_page_new: New wiki page
label_child_pages: Child pages
label_index_by_title: Index by title
label_index_by_date: Index by date
label_current_version: Current version
test/functional/wiki_controller_test.rb
# Included page with an inline image
assert_select 'p', :text => /This is an inline image/
assert_select 'img[src=?][alt=?]', '/attachments/download/3/logo.gif', 'This is a logo'
assert_select '#sidebar ul.pages-hierarchy' do
assert_select 'a', :text => 'Child 1'
assert_select 'a', :text => 'Child 2'
end
end
def test_show_old_version
(2-2/2)