diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-05-13 17:09:56 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-05-13 17:09:56 +0000 |
commit | b90e84b9fe252df464d084f0222c65367407a4ba (patch) | |
tree | 313fc54f0eb43ebb0d61f33b878c8b5e1af27052 /app/views/boards | |
parent | 75582f80f85528865fa86d93ac57a44337742939 (diff) | |
download | redmine-b90e84b9fe252df464d084f0222c65367407a4ba.tar.gz redmine-b90e84b9fe252df464d084f0222c65367407a4ba.zip |
Per project forums added.
Permissions for forums management can be set in "Admin -> Roles & Permissions".
Forums can be created on the project settings screen ("Forums" tab).
Once a project has a forum, a "Forums" link appears in the project menu.
For now, posting messages in forums requires to be logged in. Files can be attached to messages.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@529 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/boards')
-rw-r--r-- | app/views/boards/_form.rhtml | 8 | ||||
-rw-r--r-- | app/views/boards/edit.rhtml | 6 | ||||
-rw-r--r-- | app/views/boards/index.rhtml | 30 | ||||
-rw-r--r-- | app/views/boards/new.rhtml | 6 | ||||
-rw-r--r-- | app/views/boards/show.rhtml | 36 |
5 files changed, 86 insertions, 0 deletions
diff --git a/app/views/boards/_form.rhtml b/app/views/boards/_form.rhtml new file mode 100644 index 000000000..7ede589ab --- /dev/null +++ b/app/views/boards/_form.rhtml @@ -0,0 +1,8 @@ +<%= error_messages_for 'board' %> + +<!--[form:board]--> +<div class="box"> +<p><%= f.text_field :name, :required => true %></p> +<p><%= f.text_field :description, :required => true, :size => 80 %></p> +</div> +<!--[eoform:board]--> diff --git a/app/views/boards/edit.rhtml b/app/views/boards/edit.rhtml new file mode 100644 index 000000000..ba4c8b5ac --- /dev/null +++ b/app/views/boards/edit.rhtml @@ -0,0 +1,6 @@ +<h2><%= l(:label_board) %></h2> + +<% labelled_tabular_form_for :board, @board, :url => {:action => 'edit', :id => @board} do |f| %> + <%= render :partial => 'form', :locals => {:f => f} %> + <%= submit_tag l(:button_save) %> +<% end %> diff --git a/app/views/boards/index.rhtml b/app/views/boards/index.rhtml new file mode 100644 index 000000000..3291d0194 --- /dev/null +++ b/app/views/boards/index.rhtml @@ -0,0 +1,30 @@ +<h2><%= l(:label_board_plural) %></h2> + +<table class="list"> + <thead><tr> + <th><%= l(:label_board) %></th> + <th><%= l(:label_topic_plural) %></th> + <th><%= l(:label_message_plural) %></th> + <th><%= l(:label_message_last) %></th> + </tr></thead> + <tbody> +<% for board in @boards %> + <tr class="<%= cycle 'odd', 'even' %>"> + <td> + <%= link_to h(board.name), {:action => 'show', :id => board}, :class => "icon22 icon22-comment" %><br /> + <%=h board.description %> + </td> + <td align="center"><%= board.topics_count %></td> + <td align="center"><%= board.messages_count %></td> + <td> + <small> + <% if board.last_message %> + <%= board.last_message.author.name %>, <%= format_time(board.last_message.created_on) %><br /> + <%= link_to_message board.last_message %> + <% end %> + </small> + </td> + </tr> +<% end %> + </tbody> +</table> diff --git a/app/views/boards/new.rhtml b/app/views/boards/new.rhtml new file mode 100644 index 000000000..b89121880 --- /dev/null +++ b/app/views/boards/new.rhtml @@ -0,0 +1,6 @@ +<h2><%= l(:label_board_new) %></h2> + +<% labelled_tabular_form_for :board, @board, :url => {:action => 'new'} do |f| %> + <%= render :partial => 'form', :locals => {:f => f} %> + <%= submit_tag l(:button_create) %> +<% end %> diff --git a/app/views/boards/show.rhtml b/app/views/boards/show.rhtml new file mode 100644 index 000000000..13a056046 --- /dev/null +++ b/app/views/boards/show.rhtml @@ -0,0 +1,36 @@ +<div class="contextual"> +<%= link_to l(:label_message_new), {:controller => 'messages', :action => 'new', :board_id => @board}, :class => "icon icon-add" %> +</div> + +<h2><%=h @board.name %></h2> + +<table class="list"> + <thead><tr> + <th><%= l(:field_subject) %></th> + <th><%= l(:field_author) %></th> + <%= sort_header_tag("#{Message.table_name}.created_on", :caption => l(:field_created_on)) %> + <th><%= l(:label_reply_plural) %></th> + <%= sort_header_tag("#{Message.table_name}.updated_on", :caption => l(:label_message_last)) %> + </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> + <% if topic.last_reply %> + <%= topic.last_reply.author.name %>, <%= format_time(topic.last_reply.created_on) %><br /> + <%= link_to_message topic.last_reply %> + <% end %> + </small> + </td> + </tr> + <% end %> + </tbody> +</table> + +<p><%= pagination_links_full @topic_pages %> +[ <%= @topic_pages.current.first_item %> - <%= @topic_pages.current.last_item %> / <%= @topic_count %> ]</p> |