Forums enhancements:

* messages can now be edited/deleted (explicit permissions need to be given)
* topics can be locked so that no reply can be added (only by users allowed to edit messages)
* topics can be marked as sticky so that they always appear at the top of the list (only by users allowed to edit messages)

git-svn-id: http://redmine.rubyforge.org/svn/trunk@926 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang committed 2007-11-24 12:25:07 +00:00
1 parent 866e9e2503
commit 29b3614bcb
19 files changed
+294 -36

No files matched your search

+1 -1
View File
@@ -19,7 +19,7 @@
<td>
<small>
<% if board.last_message %>
<%= board.last_message.author.name %>, <%= format_time(board.last_message.created_on) %><br />
<%= authoring board.last_message.created_on, board.last_message.author %><br />
<%= link_to_message board.last_message %>
<% end %>
</small>
+8 -10
View File
@@ -18,7 +18,7 @@
<h2><%=h @board.name %></h2>
<% if @topics.any? %>
<table class="list">
<table class="list messages">
<thead><tr>
<th><%= l(:field_subject) %></th>
<th><%= l(:field_author) %></th>
@@ -28,18 +28,16 @@
</tr></thead>
<tbody>
<% @topics.each do |topic| %>
<tr class="<%= cycle 'odd', 'even' %>">
<td><%= link_to h(topic.subject), :controller => 'messages', :action => 'show', :board_id => @board, :id => topic %></td>
<td align="center"><%= link_to_user topic.author %></td>
<td align="center"><%= format_time(topic.created_on) %></td>
<td align="center"><%= topic.replies_count %></td>
<td>
<small>
<tr class="message <%= cycle 'odd', 'even' %> <%= topic.sticky? ? 'sticky' : '' %> <%= topic.locked? ? 'locked' : '' %>">
<td class="subject"><%= link_to h(topic.subject), { :controller => 'messages', :action => 'show', :board_id => @board, :id => topic }, :class => 'icon' %></td>
<td class="author" align="center"><%= topic.author %></td>
<td class="created_on" align="center"><%= format_time(topic.created_on) %></td>
<td class="replies" align="center"><%= topic.replies_count %></td>
<td class="last_message">
<% if topic.last_reply %>
<%= topic.last_reply.author.name %>, <%= format_time(topic.last_reply.created_on) %><br />
<%= authoring topic.last_reply.created_on, topic.last_reply.author %><br />
<%= link_to_message topic.last_reply %>
<% end %>
</small>
</td>
</tr>
<% end %>