This commit is contained in:
albert
2012-03-12 17:50:45 -04:00
parent d5569bed5b
commit dd5a965884
17 changed files with 118 additions and 63 deletions

View File

@@ -1,6 +1,11 @@
<article data-forum-post-id="<%= forum_post.id %>">
<div class="author">
<h4><%= link_to forum_post.creator.name, user_path(forum_post.creator_id) %></h4>
<h4>
<%= link_to forum_post.creator.name, user_path(forum_post.creator_id) %>
<% if forum_post.is_deleted? %>
(deleted)
<% end %>
</h4>
<p>
<%= time_ago_in_words(forum_post.created_at) %> ago
</p>
@@ -12,7 +17,11 @@
<menu>
<li><%= link_to "Quote", new_forum_post_path(:post_id => forum_post.id) %></li>
<% if CurrentUser.user.is_janitor? || CurrentUser.user.id == forum_post.creator_id %>
<li><%= link_to "Delete", forum_post_path(forum_post.id), :confirm => "Do you really want to delete this post?", :method => :delete, :remote => true %></li>
<% if forum_post.is_deleted %>
<li><%= link_to "Undelete", undelete_forum_post_path(forum_post.id), :method => :post, :remote => true %></li>
<% else %>
<li><%= link_to "Delete", forum_post_path(forum_post.id), :confirm => "Do you really want to delete this post?", :method => :delete, :remote => true %></li>
<% end %>
<li><%= link_to "Edit", edit_forum_post_path(forum_post.id) %></li>
<% end %>
</menu>

View File

@@ -0,0 +1 @@
location.reload();

View File

@@ -1,6 +1,11 @@
<div id="c-forum-topics">
<div id="a-show">
<h1>Topic: <%= @forum_topic.title %></h1>
<h1>
Topic: <%= @forum_topic.title %>
<% if @forum_topic.is_deleted? %>
(deleted)
<% end %>
</h1>
<% if @forum_topic.is_locked? %>
<div class="notice">

View File

@@ -5,6 +5,7 @@
<%= f.input :name %>
<%= f.input :description %>
<%= f.input :post_ids, :label => "Posts" %>
<%= f.input :is_active %>
<%= f.button :submit %>
<% end %>
</div>