summaryrefslogtreecommitdiffstats
path: root/app/views/boards
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-11-24 12:25:07 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-11-24 12:25:07 +0000
commit29b3614bcb759214bb1aba77c27ac11c8ef6b15b (patch)
tree1783bd1f65552a4e2cea332bda9f42b1831d4e78 /app/views/boards
parent866e9e2503713c67fd33b389d4e840c04ce1562d (diff)
downloadredmine-29b3614bcb759214bb1aba77c27ac11c8ef6b15b.tar.gz
redmine-29b3614bcb759214bb1aba77c27ac11c8ef6b15b.zip
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
Diffstat (limited to 'app/views/boards')
-rw-r--r--app/views/boards/index.rhtml2
-rw-r--r--app/views/boards/show.rhtml18
2 files changed, 9 insertions, 11 deletions
diff --git a/app/views/boards/index.rhtml b/app/views/boards/index.rhtml
index 3291d0194..cd4e85e9a 100644
--- a/app/views/boards/index.rhtml
+++ b/app/views/boards/index.rhtml
@@ -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>
diff --git a/app/views/boards/show.rhtml b/app/views/boards/show.rhtml
index 0af89fdb7..8bcf960b2 100644
--- a/app/views/boards/show.rhtml
+++ b/app/views/boards/show.rhtml
@@ -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 %>