2020-06-08 14:19:57 +02:00

70 lines
3.2 KiB
Plaintext

<%
# encoding: utf-8
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
#
# 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.
%>
<li>
<%= context_menu_link l(:button_edit), edit_dmsf_path(id: project, folder_id: dmsf_folder),
class: 'icon icon-edit', disabled: !allowed || locked %>
</li>
<li>
<%= context_menu_link "#{l(:button_copy)}/#{l(:button_move)}", copy_folder_path(id: dmsf_folder),
class: 'icon icon-copy', disabled: !allowed || locked %>
</li>
<li>
<%= context_menu_link l(:label_link_to),
new_dmsf_link_path(project_id: project.id, dmsf_folder_id: dmsf_folder.id, type: 'link_to'),
class: 'icon icon-link', disabled: !allowed || locked %>
</li>
<li>
<% if locked %>
<%= context_menu_link l(:button_unlock), unlock_dmsf_path(id: project, folder_id: dmsf_folder),
class: 'icon icon-unlock', disabled: !allowed || !unlockable %>
<% else %>
<%= context_menu_link l(:button_lock), lock_dmsf_path(id: project, folder_id: dmsf_folder),
class: 'icon icon-lock', disabled: !allowed %>
<% end %>
</li>
<li>
<% if dmsf_folder.notification %>
<%= context_menu_link l(:label_notifications_off), notify_deactivate_dmsf_path(id: project, folder_id: dmsf_folder),
class: 'icon icon-email', disabled: !allowed || locked || !dmsf_folder.notification? %>
<% else %>
<%= context_menu_link l(:label_notifications_on), notify_activate_dmsf_path(id: project, folder_id: dmsf_folder),
class: 'icon icon-email-add', disabled: !allowed || locked || dmsf_folder.notification? %>
<% end %>
</li>
<li>
<%= context_menu_link l(:button_download), entries_operations_dmsf_path(id: project, folder_id: folder,
ids: params[:ids], download_entries: true), method: :post, class: 'icon icon-download',
id: 'dmsf-cm-download', disabled: false %>
</li>
<li>
<%= context_menu_link l(:field_mail), entries_operations_dmsf_path(id: @project, folder_id: folder,
ids: params[:ids], email_entries: true), method: :post, class: 'icon icon-email',
disabled: !email_allowed %>
</li>
<li>
<%= context_menu_link l(:button_delete),
dmsf_link ? dmsf_link_path(dmsf_link) : delete_dmsf_path(id: project, folder_id: dmsf_folder),
data: { confirm: l(:text_are_you_sure) }, method: :delete, class: 'icon icon-del', id: 'dmsf-cm-delete',
disabled: !allowed || locked || (dmsf_link ? false : !dmsf_folder.empty?) %>
</li>