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 / list.erb
100644 18 lines (17 sloc) 0.997 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<% if @pages.empty? %>
  <h1>No pages yet</h1>
<% else %>
  <h1>All pages</h1>
  
  <div class="content">
    <ul>
      <% @pages.each do |page| %>
        <li>
          <strong><a href="/<%= page.name %>"><%= page.name %></a></strong> &mdash;
          <a href="/e/<%= page.name %>">edit</a> &bull;
          <a href="/h/<%= page.name %>">history</a> &bull;
          <a href="javascript:var q; if (window.getSelection) q=window.getSelection(); else if (document.selection) q=document.selection.createRange().text; if (q != '') location.href='<%= page_url(page.name) %>/append?text='+encodeURIComponent(q+' (from &quot;'+document.title+'&quot;:'+location.href+')'); else location.href='<%= page_url(page.name) %>/append?text='+encodeURIComponent('&quot;'+document.title+'&quot;:'+location.href);" title="Click to save current page in browser to '<%= page.name %>' page. Select text to save it along with the link.">bookmarklet</a>
        </li>
      <% end %>
    </ul>
  </div>
<% end %>