summaryrefslogtreecommitdiff
path: root/app/views/projects/wikis/history.html.haml
blob: dd7213622c19d3739fb46963acc9f7c1598d381d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
- page_title "History", @page.title.capitalize, "Wiki"

%div{ class: container_class }
  .wiki-page-header.has-sidebar-toggle
    %button.btn.btn-default.sidebar-toggle.js-sidebar-wiki-toggle{ role: "button", type: "button" }
      = icon('angle-double-left')

    .nav-text
      %h2.wiki-page-title
        = link_to @page.title.capitalize, namespace_project_wiki_path(@project.namespace, @project, @page)
        %span.light
          ·
          History

  .table-holder
    %table.table
      %thead
        %tr
          %th Page version
          %th Author
          %th Commit Message
          %th Last updated
          %th Format
      %tbody
        - @page.versions.each_with_index do |version, index|
          - commit = version
          %tr
            %td
              = link_to project_wiki_path_with_version(@project, @page,
                                                       commit.id, index == 0) do
                = truncate_sha(commit.id)
            %td
              = commit.author.name
            %td
              = commit.message
            %td
              #{time_ago_with_tooltip(version.authored_date)}
            %td
              %strong
                = @page.page.wiki.page(@page.page.name, commit.id).try(:format)

= render 'sidebar'