public
Fork of sr/git-wiki
Description: A wiki engine that uses a Git repository as its data store.
Homepage: http://atonie.org/2008/02/git-wiki
Clone URL: git://github.com/al3x/git-wiki.git
Search Repo:
git-wiki / views / branch_history.erb
100644 29 lines (27 sloc) 0.942 kb
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
<h1>Branch History</h1>
 
<div class="sub_nav">
  <a href="/a/branches" class="nav_link"><%= $repo.current_branch %> branch</a><br />
  <span class="sub_nav details"><%= @history.size %> commits</span>
</div>
 
<div class="content">
  <br />
  <ul>
  <% @history.each do |commit| %>
    <li>
      <% if commit != @history.first %>
        <a href="/a/revert_branch/<%= commit.sha %>" title="Click to revert to this revision." onclick="return confirm('Are you sure you want to revert to this revision?');">
          <script type="text/javascript">
          document.write(time_ago_in_words(<%= commit.date.for_time_ago_in_words %>) + ' ago');
          </script>
        </a>
      <% else %>
        <script type="text/javascript">
        document.write(time_ago_in_words(<%= commit.date.for_time_ago_in_words %>) + ' ago');
        </script>
      <% end %>
      &mdash;
      <%= commit.message %>
    </li>
  <% end %>
  </ul>
</div>