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/queries/_columns.html.erb

71 lines
3.3 KiB

<%#-- copyright
OpenProject is a project management system.
Copyright (C) 2012-2014 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.
++#%>
<table style="border-collapse: collapse; border:0;">
<tr>
<td style="padding-left:3px">
<%= label_tag "available_columns", l(:description_available_columns) %>
<br \>
<%= select_tag 'available_columns',
options_for_select((query.available_columns - query.columns).collect {|column| [column.caption, column.name]}),
:multiple => true, :size => 10, :style => "width:150px" %>
</td>
<td class="table-buttons" align="center" valign="middle">
<%= link_to icon_wrapper('icon icon-arrow-right5', l(:label_add_columns)), {},
{ title: l(:label_add_columns),
onclick: "moveOptions('available_columns', 'selected_columns'); return false;" } %>
<br />
<%= link_to icon_wrapper('icon icon-arrow-right5-1', l(:label_remove_columns)), {},
{ title: l(:label_remove_columns),
style: "margin-right: 5px",
onclick: "moveOptions('selected_columns', 'available_columns'); return false;" } %>
</td>
<td>
<%= label_tag "selected_columns", l(:description_selected_columns) %>
<br \>
<%= select_tag 'c[]',
options_for_select(query.columns.collect {|column| [column.caption, column.name]}),
:id => 'selected_columns', :multiple => true, :size => 10, :style => "width:150px" %>
</td>
<td class="table-buttons" align="center" valign="middle">
<%= link_to icon_wrapper('icon icon-arrow-right5-3', l(:label_sort_higher)), {},
{ title: l(:label_sort_higher),
onclick: "moveOptionUp('selected_columns'); return false;" } %>
<br />
<%= link_to icon_wrapper('icon icon-arrow-right5-2', l(:label_sort_lower)), {},
{ title: l(:label_sort_lower),
style: "margin-right: 3px",
onclick: "moveOptionDown('selected_columns'); return false;" } %>
</td>
</tr>
</table>
<% content_for :header_tags do %>
<%= javascript_include_tag 'select_list_move' %>
<% end %>