OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openproject/app/views/boards/show.html.erb

110 lines
5.0 KiB

<%#-- copyright
OpenProject is a project management system.
Copyright (C) 2012-2015 the OpenProject Foundation (OPF)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 3.
OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
Copyright (C) 2006-2013 Jean-Philippe Lang
Copyright (C) 2010-2013 the ChiliProject Team
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<%= include_gon %>
<% content_for :action_menu_specific do %>
<%= link_to_if_authorized l(:label_message_new),
10 years ago
{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 %>
10 years ago
<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>
10 years ago
<%= labelled_tabular_form_for Message.new,
url: board_topics_path(@board),
html: { multipart: true,
id: 'message-form',
class: 'form' } do |f| %>
<%= render partial: 'messages/form', locals: {f: f} %>
<hr class="form--separator">
<%= styled_button_tag l(:button_create), class: '-highlight -with-icon icon-yes' %>
<%= preview_link preview_board_topics_path(@board), 'message-form-preview' %>
10 years ago
<%= link_to l(:button_cancel), "#", onclick: 'Element.hide("add-message")', class: 'button' %>
<% end %>
<div id="preview"></div>
<% end %>
</div>
10 years ago
<h2><%=h @board.name %></h2>
<p class="subtitle"><%=h @board.description %></p>
10 years ago
<%= render partial: 'layouts/action_menu_specific' %>
<div ng-controller="MessagesController">
<% if @topics.any? %>
<table class="list messages">
<thead>
<tr>
<th><%= Message.human_attribute_name(:subject) %></th>
<th><%= Message.human_attribute_name(:author) %></th>
<th><sort-link sort-attr="created_on" sort-func="loadMessages()"><%= Message.human_attribute_name(:created_on) %></sort-link></th>
<th><sort-link sort-attr="replies" sort-func="loadMessages()"><%= l(:label_reply_plural) %></sort-link></th>
<th><sort-link sort-attr="updated_on" sort-func="loadMessages()"><%= l(:label_message_last) %></sort-link></th>
</tr>
</thead>
<tbody>
<tr ng-repeat="message in messages">
<td class="subject">
<icon-wrapper ng-if="message.isSticky == true" icon-name="book2" icon-title="{{I18n.t('js.label_board_sticky')}}"></icon-wrapper>
<icon-wrapper ng-if="message.isLocked == true" icon-name="locked" icon-title="{{I18n.t('js.label_board_locked')}}"></icon-wrapper>
<a ng-href="{{PathHelper.messagePath(message.id)}}">{{message.subject}}</a>
</td>
<td class="author"><a ng-href="{{PathHelper.userPath(message.author.id)}}">{{message.author.name}}</a></td>
<td class="created_on" date-time date-time-value="message.created_on"></td>
<td class="replies">{{message.replies_count}}</td>
<td class="last_message">
<span ng-if="message.last_reply !== undefined">
11 years ago
<authoring created-on="message.last_reply.created_on" author="message.last_reply.author" project="projectId" activity="activityModuleEnabled"></authoring>
<br />
<a ng-href="{{PathHelper.messagePath(message.last_reply.id)}}">{{message.subject}}</a>
</span>
</td>
</tr>
</tbody>
</table>
<table-pagination total-entries="totalMessageCount" update-results="loadMessages()"></table-pagination>
<modal-loading></modal-loading>
<% else %>
<p class="nodata"><%= l(:label_no_data) %></p>
<% end %>
</div>
<%= other_formats_links do |f| %>
10 years ago
<%= f.link_to 'Atom', url: {key: User.current.rss_key} %>
<% end %>
<% html_title h(@board.name) %>
<% content_for :header_tags do %>
10 years ago
<%= auto_discovery_link_tag(:atom, {format: 'atom', key: User.current.rss_key}, title: "#{@project}: #{@board}") %>
<% end %>