Commit b55ed840 authored by Riyad Preukschas's avatar Riyad Preukschas

Update wiki pages

* Properly name columns in Pages and History views
* Link to Authors
* Make views more consistent
parent b3bfb752
%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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment