parent
95d3803864
commit
7d72871a7b
@ -1,6 +1,8 @@ |
||||
<div class="menu-wiki-pages-tree"> |
||||
<div class="main-menu--segment-header ellipsis"><%= t('label_table_of_contents') %></div> |
||||
<% pages = @project.wiki.pages.with_updated_on.order('title').includes(wiki: :project) |
||||
pages_by_parent_id = pages.group_by(&:parent_id) %> |
||||
<%= render_page_hierarchy(pages_by_parent_id, nil, timestamp: false) %> |
||||
<div class="menu-wiki-pages-tree tree-menu--container" data-selected-page="<%= @page.present? ? @page.slug : '' %>"> |
||||
<% cache @project.wiki do %> |
||||
<div class="main-menu--segment-header ellipsis"><%= t('label_table_of_contents') %></div> |
||||
<% pages = @project.wiki.pages.order('title').includes(wiki: :project) |
||||
pages_by_parent_id = pages.group_by(&:parent_id) %> |
||||
<%= render_page_hierarchy(pages_by_parent_id, nil, timestamp: false) %> |
||||
<% end %> |
||||
</div> |
||||
|
@ -0,0 +1,10 @@ |
||||
class AddTimestampsToWiki < ActiveRecord::Migration[5.1] |
||||
def change |
||||
add_timestamps :wikis, default: DateTime.now |
||||
change_column_default :wikis, :created_at, nil |
||||
change_column_default :wikis, :updated_at, nil |
||||
|
||||
add_column :wiki_pages, :updated_at, :datetime, default: DateTime.now, null: false |
||||
change_column_default :wiki_pages, :updated_at, nil |
||||
end |
||||
end |
Loading…
Reference in new issue