use toolbar component in forum views

Signed-off-by: Florian Kraft <f.kraft@finn.de>
pull/3000/head
Florian Kraft 10 years ago
parent f78d1b6254
commit a8d15897ba
  1. 4
      app/views/boards/index.html.erb
  2. 2
      app/views/boards/new.html.erb
  3. 32
      app/views/boards/show.html.erb

@ -26,7 +26,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<h2><%= l(:label_board_plural) %></h2>
<% html_title l(:label_board_plural) %>
<%= toolbar title: l(:label_board_plural) %>
<table class="list boards">
<thead>
<tr>
@ -65,4 +66,3 @@ See doc/COPYRIGHT.rdoc for more details.
<%= auto_discovery_link_tag(:atom, {:controller => '/activities', :action => 'index', :id => @project, :format => 'atom', :show_messages => 1, :key => User.current.rss_key}) %>
<% end %>
<% html_title l(:label_board_plural) %>

@ -27,7 +27,7 @@ See doc/COPYRIGHT.rdoc for more details.
++#%>
<h2><%= l(:label_board_new) %></h2>
<%= toolbar title: l(:label_board_new) %>
<%= labelled_tabular_form_for [@project, @board] do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>

@ -29,14 +29,6 @@ See doc/COPYRIGHT.rdoc for more details.
<%= include_gon %>
<% content_for :action_menu_specific do %>
<%= link_to_if_authorized l(:label_message_new),
{controller: '/messages', action: 'new', board_id: @board},
class: 'icon icon-add',
onclick: 'Element.show("add-message"); Form.Element.focus("message_subject"); return false;' %>
<%= watcher_link(@board, User.current) %>
<% end %>
<div id="add-message" style="display:none;">
<% if authorize_for('messages', 'new') %>
<h2><%= link_to h(@board.name), project_board_path(@project, @board) %> &#187; <%= l(:label_message_new) %></h2>
@ -56,11 +48,25 @@ See doc/COPYRIGHT.rdoc for more details.
<% end %>
</div>
<h2><%=h @board.name %></h2>
<p class="subtitle"><%=h @board.description %></p>
<%= render partial: 'layouts/action_menu_specific' %>
<%= toolbar title: @board.name, subtitle: @board.description do %>
<% if authorize_for(:messages, :new) %>
<li class="toolbar-item">
<%= link_to({ controller: '/messages', action: 'new', board_id: @board},
class: 'button -alt-highlight',
onclick: 'Element.show("add-message"); Form.Element.focus("message_subject"); return false;') do %>
<i class="button--icon icon-add"></i> <%= l(:label_message_new) %>
<% end %>
</li>
<% end %>
<% unless User.current.nil? %>
<li class="toolbar-item">
<div class="button">
<%= watcher_link(@board, User.current) %>
</div>
</li>
<% end %>
<% end %>
<br>
<div ng-controller="MessagesController">
<% if @topics.any? %>
<table class="list messages">

Loading…
Cancel
Save