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 %h3.page_title
%span.cgray History for %span.cgray History for
= @wikis.last.title = @wiki_pages.first.title
%br %br
%table %table
%thead %thead
%tr %tr
%th # %th Page version
%th last edit %th Last updated
%th created by %th Updated by
%tbody %tbody
- @wikis.each_with_index do |wiki_page, i| - @wiki_pages.each_with_index do |wiki_page, i|
%tr %tr
%td= i + 1
%td %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)} (#{time_ago_in_words(wiki_page.created_at)}
ago) ago)
%td= wiki_page.user.name %td= link_to_member(@project, wiki_page.user)
...@@ -4,15 +4,17 @@ ...@@ -4,15 +4,17 @@
%thead %thead
%tr %tr
%th Title %th Title
%th slug %th Slug
%th created by %th Last updated
%th Updated by
%tbody %tbody
- @wikis.each_with_index do |wiki_page, i| - @wiki_pages.each do |wiki_page|
%tr %tr
%td %td
= link_to wiki_page.title, project_wiki_path(@project, wiki_page) %strong= link_to wiki_page.title, project_wiki_path(@project, wiki_page)
(#{time_ago_in_words(wiki_page.created_at)}
ago)
%td= wiki_page.slug %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 @@ ...@@ -15,4 +15,4 @@
= preserve do = preserve do
= markdown @wiki.content = 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