<%#= # Redmine plugin for Document Management System "Features" # # Copyright (C) 2011 Vít Jonáš # Copyright (C) 2012 Daniel Munn # Copyright (C) 2014 Karel Pičman # # 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. %> <% html_title(l(:dmsf)) %>
<% if @folder_manipulation_allowed %> <% if @folder.nil? %> <%= link_to(l(:button_edit), edit_root_dmsf_path(:id => @project), :title => l(:link_edit, :title => l(:link_documents)), :class => 'icon icon-edit') %> <% elsif !@locked_for_user %> <%= link_to(l(:button_edit), edit_dmsf_path(:id => @project, :folder_id => @folder), :title => l(:link_edit, :title => h(@folder.title)), :class => 'icon icon-edit') %> <% end %> <% if @folder && (!@locked_for_user || User.current.allowed_to?(:force_file_unlock, @project)) %> <% if @folder.locked? %> <% unless @folder.unlockable? %> <%= link_to(l(:button_unlock), :title => l(:title_folder_parent_locked, :name => @folder.folder.lock.reverse[0].folder.title), :class => 'icon icon-dmsf-unlock') if @folder %> <% else %> <%= link_to(l(:button_unlock), unlock_dmsf_path(:id => @project, :folder_id => @folder, :current => request.url), :title => l(:title_unlock_folder), :class => 'icon icon-dmsf-unlock') if @folder %> <% end %> <% else %> <%= link_to(l(:button_lock), lock_dmsf_path(:id => @project, :folder_id => @folder, :current => request.url), :title => l(:title_lock_folder), :class => 'icon icon-dmsf-lock') if @folder %> <% end %> <% end %> <% unless @folder %> <% if @project.dmsf_notification %> <%= link_to(l(:label_notifications_off), notify_deactivate_dmsf_path(:id => @project), :title => l(:title_notifications_active_deactivate), :class => 'icon icon-notification-on') %> <% else %> <%= link_to(l(:label_notifications_on), notify_activate_dmsf_path(:id => @project), :title => l(:title_notifications_active_deactivate), :class => 'icon icon-notification-off') %> <% end %> <% else %> <% if @folder.notification %> <%= link_to(l(:label_notifications_off), notify_deactivate_dmsf_path(:id => @project, :folder_id => @folder), :title => l(:title_notifications_active_deactivate), :class => 'icon icon-notification-on') %> <% else %> <%= link_to(l(:label_notifications_on), notify_activate_dmsf_path(:id => @project, :folder_id => @folder), :title => l(:title_notifications_not_active_activate), :class => 'icon icon-notification-off') %> <% end %> <% end %> <% if @file_manipulation_allowed %> <%= link_to(l(:label_link_from), new_dmsf_link_path(:project_id => @project.id, :dmsf_folder_id => @folder ? @folder.id : @folder, :type => 'link_from'), :title => l(:link_create_link), :class => 'icon icon-link') unless @locked_for_user %> <% end %> <%= link_to(l(:link_create_folder), new_dmsf_path(:id => @project, :parent_id => @folder), :title => l(:link_create_folder), :class => 'icon icon-add') unless @locked_for_user %> <% end %>
<%= render(:partial => 'path', :locals => {:folder => @folder, :filename => nil}) %>
<%= textilizable(@folder ? @folder.description : @project.dmsf_description) %>
<%= error_messages_for('dmsf_workflow') %> <%= form_tag({:action => :entries_operation, :id => @project, :folder_id => @folder}, :method => :post, :class => 'dmfs_entries', :id => 'entries_form') do %> <%= hidden_field_tag('action') %>
<%= submit_tag(l(:submit_download), :title => l(:title_download_checked), :name => 'download_entries') %> <%= submit_tag(l(:submit_email), :title => l(:title_send_checked_by_email), :name => 'email_entries') %> <% if @file_manipulation_allowed && @folder_manipulation_allowed && !@locked_for_user %> <% end %>
<% @subfolders.each do |subfolder| %> <%= render(:partial => 'dir', :locals => { :project => @project, :subfolder => subfolder, :link => nil, :id => subfolder.id, :name => 'subfolders[]', :title => subfolder.title }) %> <% end %> <% @dir_links.each do |link| %> <%= render(:partial => 'dir', :locals => { :project => link.target_project, :subfolder => link.target_folder, :link => link, :id => link.id, :name => 'dir_links[]', :title => link.name }) %> <% end %> <% @files.each do |file| %> <% unless file.last_revision %> <% Rails.logger.error "Error: dmsf_file id #{file.id} has no revision!" %> <% next %> <% end %> <%= render(:partial => 'file', :locals => { :project => @project, :file => file, :link => nil, :id => file.id, :name => 'files[]', :title => file.title }) %> <% end %> <% @file_links.each do |link| %> <% unless link.target_file.last_revision %> <% Rails.logger.error "Error: dmsf_file id #{link.target_id} has no revision!" %> <% next %> <% end %> <%= render(:partial => 'file', :locals => { :project => link.target_project, :file => link.target_file, :link => link, :id => link.id, :name => 'file_links[]', :title => link.name }) %> <% end %>
<%= l(:link_title) %> <%= l(:link_size) %> <%= l(:link_modified) %> <%= l(:link_ver) %> <%= l(:link_workflow) %> <%= l(:link_author) %>
<% end %> <% if I18n.locale && !I18n.locale.to_s.match(/^en.*/) sUrl = "jquery.dataTables/#{I18n.locale.to_s.downcase}.json" else sUrl = 'jquery.dataTables/en.json' end %> <% content_for :header_tags do %> <%= stylesheet_link_tag 'plupload/jquery.ui.plupload.css', :plugin => 'redmine_dmsf' %> <%= stylesheet_link_tag 'jquery.dataTables/jquery-ui.dataTables.css', :plugin => 'redmine_dmsf' %> <%= javascript_include_tag 'jquery-1.6.1.min.js', :plugin => 'redmine_dmsf' %> <%= javascript_include_tag 'jquery-ui-1.8.13.min.js', :plugin => 'redmine_dmsf' %> <%= javascript_include_tag 'jquery.dataTables/jquery.dataTables.min.js', :plugin => 'redmine_dmsf' %> <% end %> <%= render(:partial => 'multi_upload') if (@file_manipulation_allowed && !@locked_for_user) %>