Revision 912:5e80956cc792 app/views/boards
| app/views/boards/_form.html.erb | ||
|---|---|---|
| 1 |
<%= error_messages_for 'board' %> |
|
| 2 |
|
|
| 3 |
<!--[form:board]--> |
|
| 4 |
<div class="box"> |
|
| 5 |
<p><%= f.text_field :name, :required => true %></p> |
|
| 6 |
<p><%= f.text_field :description, :required => true, :size => 80 %></p> |
|
| 7 |
</div> |
|
| 8 |
<!--[eoform:board]--> |
|
| app/views/boards/_form.rhtml | ||
|---|---|---|
| 1 |
<%= error_messages_for 'board' %> |
|
| 2 |
|
|
| 3 |
<!--[form:board]--> |
|
| 4 |
<div class="box"> |
|
| 5 |
<p><%= f.text_field :name, :required => true %></p> |
|
| 6 |
<p><%= f.text_field :description, :required => true, :size => 80 %></p> |
|
| 7 |
</div> |
|
| 8 |
<!--[eoform:board]--> |
|
| app/views/boards/edit.html.erb | ||
|---|---|---|
| 1 |
<h2><%= l(:label_board) %></h2> |
|
| 2 |
|
|
| 3 |
<% labelled_tabular_form_for :board, @board, :url => {:action => 'edit', :id => @board} do |f| %>
|
|
| 4 |
<%= render :partial => 'form', :locals => {:f => f} %>
|
|
| 5 |
<%= submit_tag l(:button_save) %> |
|
| 6 |
<% end %> |
|
| app/views/boards/edit.rhtml | ||
|---|---|---|
| 1 |
<h2><%= l(:label_board) %></h2> |
|
| 2 |
|
|
| 3 |
<% labelled_tabular_form_for :board, @board, :url => {:action => 'edit', :id => @board} do |f| %>
|
|
| 4 |
<%= render :partial => 'form', :locals => {:f => f} %>
|
|
| 5 |
<%= submit_tag l(:button_save) %> |
|
| 6 |
<% end %> |
|
| app/views/boards/index.html.erb | ||
|---|---|---|
| 1 |
<h2><%= l(:label_board_plural) %></h2> |
|
| 2 |
|
|
| 3 |
<table class="list boards"> |
|
| 4 |
<thead><tr> |
|
| 5 |
<th><%= l(:label_board) %></th> |
|
| 6 |
<th><%= l(:label_topic_plural) %></th> |
|
| 7 |
<th><%= l(:label_message_plural) %></th> |
|
| 8 |
<th><%= l(:label_message_last) %></th> |
|
| 9 |
</tr></thead> |
|
| 10 |
<tbody> |
|
| 11 |
<% for board in @boards %> |
|
| 12 |
<tr class="<%= cycle 'odd', 'even' %>"> |
|
| 13 |
<td> |
|
| 14 |
<%= link_to h(board.name), {:action => 'show', :id => board}, :class => "board" %><br />
|
|
| 15 |
<%=h board.description %> |
|
| 16 |
</td> |
|
| 17 |
<td align="center"><%= board.topics_count %></td> |
|
| 18 |
<td align="center"><%= board.messages_count %></td> |
|
| 19 |
<td> |
|
| 20 |
<small> |
|
| 21 |
<% if board.last_message %> |
|
| 22 |
<%= authoring board.last_message.created_on, board.last_message.author %><br /> |
|
| 23 |
<%= link_to_message board.last_message %> |
|
| 24 |
<% end %> |
|
| 25 |
</small> |
|
| 26 |
</td> |
|
| 27 |
</tr> |
|
| 28 |
<% end %> |
|
| 29 |
</tbody> |
|
| 30 |
</table> |
|
| 31 |
|
|
| 32 |
<% other_formats_links do |f| %> |
|
| 33 |
<%= f.link_to 'Atom', :url => {:controller => 'activities', :action => 'index', :id => @project, :show_messages => 1, :key => User.current.rss_key} %>
|
|
| 34 |
<% end %> |
|
| 35 |
|
|
| 36 |
<% content_for :header_tags do %> |
|
| 37 |
<%= auto_discovery_link_tag(:atom, {:controller => 'activities', :action => 'index', :id => @project, :format => 'atom', :show_messages => 1, :key => User.current.rss_key}) %>
|
|
| 38 |
<% end %> |
|
| 39 |
|
|
| 40 |
<% html_title l(:label_board_plural) %> |
|
| app/views/boards/index.rhtml | ||
|---|---|---|
| 1 |
<h2><%= l(:label_board_plural) %></h2> |
|
| 2 |
|
|
| 3 |
<table class="list boards"> |
|
| 4 |
<thead><tr> |
|
| 5 |
<th><%= l(:label_board) %></th> |
|
| 6 |
<th><%= l(:label_topic_plural) %></th> |
|
| 7 |
<th><%= l(:label_message_plural) %></th> |
|
| 8 |
<th><%= l(:label_message_last) %></th> |
|
| 9 |
</tr></thead> |
|
| 10 |
<tbody> |
|
| 11 |
<% for board in @boards %> |
|
| 12 |
<tr class="<%= cycle 'odd', 'even' %>"> |
|
| 13 |
<td> |
|
| 14 |
<%= link_to h(board.name), {:action => 'show', :id => board}, :class => "board" %><br />
|
|
| 15 |
<%=h board.description %> |
|
| 16 |
</td> |
|
| 17 |
<td align="center"><%= board.topics_count %></td> |
|
| 18 |
<td align="center"><%= board.messages_count %></td> |
|
| 19 |
<td> |
|
| 20 |
<small> |
|
| 21 |
<% if board.last_message %> |
|
| 22 |
<%= authoring board.last_message.created_on, board.last_message.author %><br /> |
|
| 23 |
<%= link_to_message board.last_message %> |
|
| 24 |
<% end %> |
|
| 25 |
</small> |
|
| 26 |
</td> |
|
| 27 |
</tr> |
|
| 28 |
<% end %> |
|
| 29 |
</tbody> |
|
| 30 |
</table> |
|
| 31 |
|
|
| 32 |
<% other_formats_links do |f| %> |
|
| 33 |
<%= f.link_to 'Atom', :url => {:controller => 'activities', :action => 'index', :id => @project, :show_messages => 1, :key => User.current.rss_key} %>
|
|
| 34 |
<% end %> |
|
| 35 |
|
|
| 36 |
<% content_for :header_tags do %> |
|
| 37 |
<%= auto_discovery_link_tag(:atom, {:controller => 'activities', :action => 'index', :id => @project, :format => 'atom', :show_messages => 1, :key => User.current.rss_key}) %>
|
|
| 38 |
<% end %> |
|
| 39 |
|
|
| 40 |
<% html_title l(:label_board_plural) %> |
|
| app/views/boards/new.html.erb | ||
|---|---|---|
| 1 |
<h2><%= l(:label_board_new) %></h2> |
|
| 2 |
|
|
| 3 |
<% labelled_tabular_form_for :board, @board, :url => {:action => 'new'} do |f| %>
|
|
| 4 |
<%= render :partial => 'form', :locals => {:f => f} %>
|
|
| 5 |
<%= submit_tag l(:button_create) %> |
|
| 6 |
<% end %> |
|
| app/views/boards/new.rhtml | ||
|---|---|---|
| 1 |
<h2><%= l(:label_board_new) %></h2> |
|
| 2 |
|
|
| 3 |
<% labelled_tabular_form_for :board, @board, :url => {:action => 'new'} do |f| %>
|
|
| 4 |
<%= render :partial => 'form', :locals => {:f => f} %>
|
|
| 5 |
<%= submit_tag l(:button_create) %> |
|
| 6 |
<% end %> |
|
| app/views/boards/show.html.erb | ||
|---|---|---|
| 1 |
<%= breadcrumb link_to(l(:label_board_plural), {:controller => 'boards', :action => 'index', :project_id => @project}) %>
|
|
| 2 |
|
|
| 3 |
<div class="contextual"> |
|
| 4 |
<%= link_to_if_authorized l(:label_message_new), |
|
| 5 |
{:controller => 'messages', :action => 'new', :board_id => @board},
|
|
| 6 |
:class => 'icon icon-add', |
|
| 7 |
:onclick => 'Element.show("add-message"); Form.Element.focus("message_subject"); return false;' %>
|
|
| 8 |
<%= watcher_tag(@board, User.current) %> |
|
| 9 |
</div> |
|
| 10 |
|
|
| 11 |
<div id="add-message" style="display:none;"> |
|
| 12 |
<% if authorize_for('messages', 'new') %>
|
|
| 13 |
<h2><%= link_to h(@board.name), :controller => 'boards', :action => 'show', :project_id => @project, :id => @board %> » <%= l(:label_message_new) %></h2> |
|
| 14 |
<% form_for :message, @message, :url => {:controller => 'messages', :action => 'new', :board_id => @board}, :html => {:multipart => true, :id => 'message-form'} do |f| %>
|
|
| 15 |
<%= render :partial => 'messages/form', :locals => {:f => f} %>
|
|
| 16 |
<p><%= submit_tag l(:button_create) %> |
|
| 17 |
<%= link_to_remote l(:label_preview), |
|
| 18 |
{ :url => { :controller => 'messages', :action => 'preview', :board_id => @board },
|
|
| 19 |
:method => 'post', |
|
| 20 |
:update => 'preview', |
|
| 21 |
:with => "Form.serialize('message-form')",
|
|
| 22 |
:complete => "Element.scrollTo('preview')"
|
|
| 23 |
}, :accesskey => accesskey(:preview) %> | |
|
| 24 |
<%= link_to l(:button_cancel), "#", :onclick => 'Element.hide("add-message")' %></p>
|
|
| 25 |
<% end %> |
|
| 26 |
<div id="preview" class="wiki"></div> |
|
| 27 |
<% end %> |
|
| 28 |
</div> |
|
| 29 |
|
|
| 30 |
<h2><%=h @board.name %></h2> |
|
| 31 |
<p class="subtitle"><%=h @board.description %></p> |
|
| 32 |
|
|
| 33 |
<% if @topics.any? %> |
|
| 34 |
<table class="list messages"> |
|
| 35 |
<thead><tr> |
|
| 36 |
<th><%= l(:field_subject) %></th> |
|
| 37 |
<th><%= l(:field_author) %></th> |
|
| 38 |
<%= sort_header_tag('created_on', :caption => l(:field_created_on)) %>
|
|
| 39 |
<%= sort_header_tag('replies', :caption => l(:label_reply_plural)) %>
|
|
| 40 |
<%= sort_header_tag('updated_on', :caption => l(:label_message_last)) %>
|
|
| 41 |
</tr></thead> |
|
| 42 |
<tbody> |
|
| 43 |
<% @topics.each do |topic| %> |
|
| 44 |
<tr class="message <%= cycle 'odd', 'even' %> <%= topic.sticky? ? 'sticky' : '' %> <%= topic.locked? ? 'locked' : '' %>"> |
|
| 45 |
<td class="subject"><%= link_to h(topic.subject), { :controller => 'messages', :action => 'show', :board_id => @board, :id => topic } %></td>
|
|
| 46 |
<td class="author" align="center"><%= link_to_user(topic.author) %></td> |
|
| 47 |
<td class="created_on" align="center"><%= format_time(topic.created_on) %></td> |
|
| 48 |
<td class="replies" align="center"><%= topic.replies_count %></td> |
|
| 49 |
<td class="last_message"> |
|
| 50 |
<% if topic.last_reply %> |
|
| 51 |
<%= authoring topic.last_reply.created_on, topic.last_reply.author %><br /> |
|
| 52 |
<%= link_to_message topic.last_reply %> |
|
| 53 |
<% end %> |
|
| 54 |
</td> |
|
| 55 |
</tr> |
|
| 56 |
<% end %> |
|
| 57 |
</tbody> |
|
| 58 |
</table> |
|
| 59 |
<p class="pagination"><%= pagination_links_full @topic_pages, @topic_count %></p> |
|
| 60 |
<% else %> |
|
| 61 |
<p class="nodata"><%= l(:label_no_data) %></p> |
|
| 62 |
<% end %> |
|
| 63 |
|
|
| 64 |
<% other_formats_links do |f| %> |
|
| 65 |
<%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
|
|
| 66 |
<% end %> |
|
| 67 |
|
|
| 68 |
<% html_title @board.name %> |
|
| 69 |
|
|
| 70 |
<% content_for :header_tags do %> |
|
| 71 |
<%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@project}: #{@board}") %>
|
|
| 72 |
<%= stylesheet_link_tag 'scm' %> |
|
| 73 |
<% end %> |
|
| app/views/boards/show.rhtml | ||
|---|---|---|
| 1 |
<%= breadcrumb link_to(l(:label_board_plural), {:controller => 'boards', :action => 'index', :project_id => @project}) %>
|
|
| 2 |
|
|
| 3 |
<div class="contextual"> |
|
| 4 |
<%= link_to_if_authorized l(:label_message_new), |
|
| 5 |
{:controller => 'messages', :action => 'new', :board_id => @board},
|
|
| 6 |
:class => 'icon icon-add', |
|
| 7 |
:onclick => 'Element.show("add-message"); Form.Element.focus("message_subject"); return false;' %>
|
|
| 8 |
<%= watcher_tag(@board, User.current) %> |
|
| 9 |
</div> |
|
| 10 |
|
|
| 11 |
<div id="add-message" style="display:none;"> |
|
| 12 |
<% if authorize_for('messages', 'new') %>
|
|
| 13 |
<h2><%= link_to h(@board.name), :controller => 'boards', :action => 'show', :project_id => @project, :id => @board %> » <%= l(:label_message_new) %></h2> |
|
| 14 |
<% form_for :message, @message, :url => {:controller => 'messages', :action => 'new', :board_id => @board}, :html => {:multipart => true, :id => 'message-form'} do |f| %>
|
|
| 15 |
<%= render :partial => 'messages/form', :locals => {:f => f} %>
|
|
| 16 |
<p><%= submit_tag l(:button_create) %> |
|
| 17 |
<%= link_to_remote l(:label_preview), |
|
| 18 |
{ :url => { :controller => 'messages', :action => 'preview', :board_id => @board },
|
|
| 19 |
:method => 'post', |
|
| 20 |
:update => 'preview', |
|
| 21 |
:with => "Form.serialize('message-form')",
|
|
| 22 |
:complete => "Element.scrollTo('preview')"
|
|
| 23 |
}, :accesskey => accesskey(:preview) %> | |
|
| 24 |
<%= link_to l(:button_cancel), "#", :onclick => 'Element.hide("add-message")' %></p>
|
|
| 25 |
<% end %> |
|
| 26 |
<div id="preview" class="wiki"></div> |
|
| 27 |
<% end %> |
|
| 28 |
</div> |
|
| 29 |
|
|
| 30 |
<h2><%=h @board.name %></h2> |
|
| 31 |
<p class="subtitle"><%=h @board.description %></p> |
|
| 32 |
|
|
| 33 |
<% if @topics.any? %> |
|
| 34 |
<table class="list messages"> |
|
| 35 |
<thead><tr> |
|
| 36 |
<th><%= l(:field_subject) %></th> |
|
| 37 |
<th><%= l(:field_author) %></th> |
|
| 38 |
<%= sort_header_tag('created_on', :caption => l(:field_created_on)) %>
|
|
| 39 |
<%= sort_header_tag('replies', :caption => l(:label_reply_plural)) %>
|
|
| 40 |
<%= sort_header_tag('updated_on', :caption => l(:label_message_last)) %>
|
|
| 41 |
</tr></thead> |
|
| 42 |
<tbody> |
|
| 43 |
<% @topics.each do |topic| %> |
|
| 44 |
<tr class="message <%= cycle 'odd', 'even' %> <%= topic.sticky? ? 'sticky' : '' %> <%= topic.locked? ? 'locked' : '' %>"> |
|
| 45 |
<td class="subject"><%= link_to h(topic.subject), { :controller => 'messages', :action => 'show', :board_id => @board, :id => topic } %></td>
|
|
| 46 |
<td class="author" align="center"><%= topic.author %></td> |
|
| 47 |
<td class="created_on" align="center"><%= format_time(topic.created_on) %></td> |
|
| 48 |
<td class="replies" align="center"><%= topic.replies_count %></td> |
|
| 49 |
<td class="last_message"> |
|
| 50 |
<% if topic.last_reply %> |
|
| 51 |
<%= authoring topic.last_reply.created_on, topic.last_reply.author %><br /> |
|
| 52 |
<%= link_to_message topic.last_reply %> |
|
| 53 |
<% end %> |
|
| 54 |
</td> |
|
| 55 |
</tr> |
|
| 56 |
<% end %> |
|
| 57 |
</tbody> |
|
| 58 |
</table> |
|
| 59 |
<p class="pagination"><%= pagination_links_full @topic_pages, @topic_count %></p> |
|
| 60 |
<% else %> |
|
| 61 |
<p class="nodata"><%= l(:label_no_data) %></p> |
|
| 62 |
<% end %> |
|
| 63 |
|
|
| 64 |
<% other_formats_links do |f| %> |
|
| 65 |
<%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
|
|
| 66 |
<% end %> |
|
| 67 |
|
|
| 68 |
<% html_title h(@board.name) %> |
|
| 69 |
|
|
| 70 |
<% content_for :header_tags do %> |
|
| 71 |
<%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@project}: #{@board}") %>
|
|
| 72 |
<%= stylesheet_link_tag 'scm' %> |
|
| 73 |
<% end %> |
|
Also available in: Unified diff