This commit is contained in:
albert
2013-03-18 22:02:03 -07:00
parent 70a52628dd
commit c59afe4726
8 changed files with 20 additions and 23 deletions

View File

@@ -4,16 +4,16 @@
<li><%= link_to "Search", search_wiki_pages_path %></li>
<li><%= link_to "New", new_wiki_page_path %></li>
<li><%= link_to "Help", wiki_pages_path(:search => {:title => "help:wiki"}) %></li>
<% if @wiki_page && !@wiki_page.new_record? %>
<% if @wiki_page %>
<li>|</li>
<li><%= link_to "Posts (#{Post.fast_count(@wiki_page.title)})", posts_path(:tags => @wiki_page.title) %></li>
<li><%= link_to "History", wiki_page_versions_path(:search => {:wiki_page_id => @wiki_page.id}) %></li>
<% if CurrentUser.is_member? %>
<% unless @wiki_page.new_record? %>
<% unless @wiki_page.new_record? %>
<li><%= link_to "History", wiki_page_versions_path(:search => {:wiki_page_id => @wiki_page.id}) %></li>
<% if CurrentUser.is_member? %>
<li><%= link_to "Edit", edit_wiki_page_path(@wiki_page) %></li>
<% if CurrentUser.is_moderator? %>
<li><%= link_to "Delete", wiki_page_path(@wiki_page), :remote => true, :method => :delete, :confirm => "Do you want to delete this wiki page?" %></li>
<% end %>
<% end %>
<% if CurrentUser.is_janitor? %>
<li><%= link_to "Delete", wiki_page_path(@wiki_page), :remote => true, :method => :delete, :confirm => "Do you want to delete this wiki page?" %></li>
<% end %>
<% end %>
<% end %>

View File

@@ -5,6 +5,14 @@
<section id="content">
<h1>New Wiki Page</h1>
<%= render "form" %>
<div id="wiki-page-posts">
<h2>Posts</h2>
<%= @wiki_page.post_set.presenter.post_previews_html(self) %>
</div>
<div class="clearfix"></div>
</section>
</div>
</div>

View File

@@ -4,6 +4,7 @@
<section id="content">
<h1 id="wiki-page-title">
<%= @wiki_page.pretty_title %>
<% if @wiki_page.is_locked? %>