history.html.haml 942 Bytes
Newer Older
1 2 3
- page_title "History", @page.title.capitalize, "Wiki"
= render "header_title"

4
= render 'nav'
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
5 6 7 8
.gray-content-block
  %h3.page-title
    %span.light History for
    = link_to @page.title, namespace_project_wiki_path(@project.namespace, @project, @page)
9

10
%table.table
Valery Sizov's avatar
Valery Sizov committed
11 12
  %thead
    %tr
Riyad Preukschas's avatar
Riyad Preukschas committed
13
      %th Page version
14 15
      %th Author
      %th Commit Message
Riyad Preukschas's avatar
Riyad Preukschas committed
16
      %th Last updated
17
      %th Format
Valery Sizov's avatar
Valery Sizov committed
18
  %tbody
19
    - @page.versions.each_with_index do |version, index|
20
      - commit = version
Valery Sizov's avatar
Valery Sizov committed
21
      %tr
Valery Sizov's avatar
Valery Sizov committed
22
        %td
23 24
          = link_to project_wiki_path_with_version(@project, @page,
                                                   commit.id, index == 0) do
25
            = truncate_sha(commit.id)
26
        %td
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
27
          = commit.author.name
28
        %td
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
29
          = commit.message
Riyad Preukschas's avatar
Riyad Preukschas committed
30
        %td
31
          #{time_ago_with_tooltip(version.authored_date)}
32 33
        %td
          %strong
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
34
            = @page.page.wiki.page(@page.page.name, commit.id).try(:format)