summaryrefslogtreecommitdiffstats
path: root/app/views/wiki/date_index.html.erb
blob: 274f19a8a2b3e810116ac199409822bd84175935 (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
<div class="contextual">
<% if User.current.allowed_to?(:edit_wiki_pages, @project) %>
<%= link_to l(:label_wiki_page_new), new_project_wiki_page_path(@project), :remote => true, :class => 'icon icon-add' %>
<% end %>
<%= watcher_link(@wiki, User.current) %>
<% if User.current.allowed_to?(:manage_wiki, @project) %>
<%= link_to l(:button_delete), {:controller => 'wikis', :action => 'destroy', :id => @project}, :class => 'icon icon-del' %>
<% end %>
</div>

<h2><%= l(:label_index_by_date) %></h2>

<% if @pages.empty? %>
<p class="nodata"><%= l(:label_no_data) %></p>
<% end %>

<% @pages_by_date.keys.sort.reverse_each do |date| %>
<h3><%= format_date(date) %></h3>
<ul>
<% @pages_by_date[date].each do |page| %>
    <li><%= link_to page.pretty_title, :action => 'show', :id => page.title, :project_id => page.project %></li>
<% end %>
</ul>
<% end %>

<% content_for :sidebar do %>
  <%= render :partial => 'sidebar' %>
<% end %>

<% unless @pages.empty? %>
<% other_formats_links do |f| %>
  <%= f.link_to 'Atom', :url => {:controller => 'activities', :action => 'index', :id => @project, :show_wiki_edits => 1, :key => User.current.rss_key} %>
  <% if User.current.allowed_to?(:export_wiki_pages, @project) %>
  <%= f.link_to('PDF', :url => {:action => 'export', :format => 'pdf'}) %>
  <%= f.link_to('HTML', :url => {:action => 'export'}) %>
  <% end %>
<% end %>
<% end %>

<% content_for :header_tags do %>
<%= auto_discovery_link_tag(:atom, :controller => 'activities', :action => 'index', :id => @project, :show_wiki_edits => 1, :format => 'atom', :key => User.current.rss_key) %>
<% end %>