fixes
This commit is contained in:
@@ -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>
|
||||
|
||||
1
app/views/forum_posts/undelete.js.erb
Normal file
1
app/views/forum_posts/undelete.js.erb
Normal file
@@ -0,0 +1 @@
|
||||
location.reload();
|
||||
@@ -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">
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user