Update wiki pages
* Properly name columns in Pages and History views * Link to Authors * Make views more consistent
This commit is contained in:
parent
b3bfb75252
commit
b55ed840e6
|
@ -1,20 +1,23 @@
|
|||
%h3.page_title
|
||||
%span.cgray History for
|
||||
= @wikis.last.title
|
||||
= @wiki_pages.first.title
|
||||
%br
|
||||
%table
|
||||
%thead
|
||||
%tr
|
||||
%th #
|
||||
%th last edit
|
||||
%th created by
|
||||
%th Page version
|
||||
%th Last updated
|
||||
%th Updated by
|
||||
%tbody
|
||||
- @wikis.each_with_index do |wiki_page, i|
|
||||
- @wiki_pages.each_with_index do |wiki_page, i|
|
||||
%tr
|
||||
%td= i + 1
|
||||
%td
|
||||
= link_to wiki_page.created_at.to_s(:short), project_wiki_path(@project, wiki_page, old_page_id: wiki_page.id)
|
||||
%strong
|
||||
= link_to project_wiki_path(@project, wiki_page, version_id: wiki_page.id) do
|
||||
Version
|
||||
= @wiki_pages.count - i
|
||||
%td
|
||||
= wiki_page.created_at.to_s(:short)
|
||||
(#{time_ago_in_words(wiki_page.created_at)}
|
||||
ago)
|
||||
%td= wiki_page.user.name
|
||||
|
||||
%td= link_to_member(@project, wiki_page.user)
|
||||
|
|
|
@ -4,15 +4,17 @@
|
|||
%thead
|
||||
%tr
|
||||
%th Title
|
||||
%th slug
|
||||
%th created by
|
||||
%th Slug
|
||||
%th Last updated
|
||||
%th Updated by
|
||||
%tbody
|
||||
- @wikis.each_with_index do |wiki_page, i|
|
||||
- @wiki_pages.each do |wiki_page|
|
||||
%tr
|
||||
%td
|
||||
= link_to wiki_page.title, project_wiki_path(@project, wiki_page)
|
||||
(#{time_ago_in_words(wiki_page.created_at)}
|
||||
ago)
|
||||
%strong= link_to wiki_page.title, project_wiki_path(@project, wiki_page)
|
||||
%td= wiki_page.slug
|
||||
%td= wiki_page.user.name
|
||||
|
||||
%td
|
||||
= wiki_page.created_at.to_s(:short) do
|
||||
(#{time_ago_in_words(wiki_page.created_at)}
|
||||
ago)
|
||||
%td= link_to_member(@project, wiki_page.user)
|
||||
|
|
|
@ -15,4 +15,4 @@
|
|||
= preserve do
|
||||
= markdown @wiki.content
|
||||
|
||||
%p.time Last edited by #{@wiki.user.name}, #{time_ago_in_words @wiki.created_at} ago
|
||||
%p.time Last edited by #{link_to_member @project, @wiki.user}, #{time_ago_in_words @wiki.created_at} ago
|
||||
|
|
Loading…
Reference in a new issue