annotate app/views/projects/settings/_boards.rhtml @ 350:a1e6dc0e204b feature_123

Show Overview wiki page, if it exists, instead of (almost) entire overview page
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Thu, 31 Mar 2011 16:14:38 +0100
parents 513646585e45
children
rev   line source
Chris@0 1 <% if @project.boards.any? %>
Chris@0 2 <table class="list">
Chris@0 3 <thead><tr>
Chris@0 4 <th><%= l(:label_board) %></th>
Chris@0 5 <th><%= l(:field_description) %></th>
Chris@0 6 <th></th>
Chris@0 7 <th></th>
Chris@0 8 </tr></thead>
Chris@0 9 <tbody>
Chris@0 10 <% @project.boards.each do |board|
Chris@0 11 next if board.new_record? %>
Chris@0 12 <tr class="<%= cycle 'odd', 'even' %>">
Chris@0 13 <td><%=h board.name %></td>
Chris@0 14 <td><%=h board.description %></td>
Chris@0 15 <td align="center">
Chris@0 16 <% if authorize_for("boards", "edit") %>
Chris@0 17 <%= reorder_links('board', {:controller => 'boards', :action => 'edit', :project_id => @project, :id => board}) %>
Chris@0 18 <% end %>
Chris@0 19 </td>
Chris@0 20 <td class="buttons">
Chris@0 21 <%= link_to_if_authorized l(:button_edit), {:controller => 'boards', :action => 'edit', :project_id => @project, :id => board}, :class => 'icon icon-edit' %>
Chris@0 22 <%= link_to_if_authorized l(:button_delete), {:controller => 'boards', :action => 'destroy', :project_id => @project, :id => board}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
Chris@0 23 </td>
Chris@0 24 </tr>
Chris@0 25 <% end %>
Chris@0 26 </tbody>
Chris@0 27 </table>
Chris@0 28 <% else %>
Chris@0 29 <p class="nodata"><%= l(:label_no_data) %></p>
Chris@0 30 <% end %>
Chris@0 31
Chris@0 32 <p><%= link_to_if_authorized l(:label_board_new), {:controller => 'boards', :action => 'new', :project_id => @project} %></p>