history.html.haml 797 Bytes
Newer Older
1
= render 'nav'
2
%h3.page-title
3
  %span.light History for
4
  = link_to @page.title, project_wiki_path(@project, @page)
5

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