<% # encoding: utf-8 # # Redmine plugin for Document Management System "Features" # # Copyright (C) 2011-17 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. %> <% locked_for_user = subfolder && subfolder.locked_for_user? %> <% locked = subfolder && subfolder.locked? %> <%= check_box_tag(name, id, false, :title => l(:title_check_for_zip_download_or_email), :id => "subfolder_#{id}") %> <% if DmsfFolder.is_column_on?('id') %> <%= link_to(subfolder.id, edit_dmsf_path(:id => project, :folder_id => subfolder)) %> <% end %> <% if DmsfFolder.is_column_on?('title') %> <% if @tree_view %> > <% end %> <%= link_to(h(title), dmsf_folder_path(:id => project, :folder_id => subfolder), :class => 'icon icon-folder', :title => subfolder ? h(subfolder.description) : nil) %> <% if link %>
<%= link.path %>
<% else %>
[<%= subfolder.items %>]
<% end %> <% end %> <% if DmsfFolder.is_column_on?('extension') %> <% end %> <% if DmsfFolder.is_column_on?('size') %> <% end %> <% if DmsfFolder.is_column_on?('modified') %> <%= format_time(subfolder.modified) if subfolder %> <% if locked_for_user %> <% if subfolder.lock.reverse[0].user %> <%= link_to(image_tag(link ? 'locked_gray.png' : 'locked.png', :plugin => 'redmine_dmsf'), user_path(subfolder.lock.reverse[0].user), :title => l(:title_locked_by_user, :user => subfolder.lock.reverse[0].user)) %> <% else %> <%= content_tag(:span, image_tag(link ? 'locked_gray.png' : 'locked.png', :plugin => 'redmine_dmsf'), :title => l(:notice_account_unknown_email)) %> <% end %> <% elsif locked %> <%= content_tag(:span, image_tag(link ? 'lockedbycurrent_gray.png' : 'lockedbycurrent.png', :plugin => 'redmine_dmsf'), :title => l(:title_locked_by_you)) %> <% end %> <% end %> <% if DmsfFolder.is_column_on?('version') %> <% end %> <% if DmsfFolder.is_column_on?('workflow') %> <% end %> <% if DmsfFolder.is_column_on?('author') %> <%= h(subfolder.user) if subfolder %> <% end %> <% cfs = CustomField.where(:type => 'DmsfFileRevisionCustomField').order(:position) %> <% cfs.each do |c| %> <% if DmsfFolder.is_column_on?(c.name) %> <%= subfolder.custom_value(c) %> <% end %> <% end %> <% if @folder_manipulation_allowed %> <% unless locked_for_user %> <%= link_to(image_tag('edit.png'), edit_dmsf_path(:id => project, :folder_id => subfolder), :title => l(:link_edit, :title => subfolder ? h(subfolder.title) : project.name)) %> <% if subfolder %> <% if locked %> <% if subfolder.unlockable? %> <%= link_to(image_tag('unlock.png', :plugin => 'redmine_dmsf'), unlock_dmsf_path(:id => project, :folder_id => subfolder), :title => l(:title_unlock_file)) %> <% else %> <% end %> <% else %> <%= link_to(image_tag('lock.png', :plugin => 'redmine_dmsf'), lock_dmsf_path(:id => project, :folder_id => subfolder), :title => l(:title_lock_file)) %> <% end %> <% else %> <% end %> <% if (subfolder && subfolder.notification) || (!subfolder && project.dmsf_notification) %> <%= link_to(image_tag('notify.png', :plugin => 'redmine_dmsf'), notify_deactivate_dmsf_path(:id => project, :folder_id => subfolder), :title => l(:title_notifications_active_deactivate)) %> <% else %> <%= link_to(image_tag('notifynot.png', :plugin => 'redmine_dmsf'), notify_activate_dmsf_path(:id => project, :folder_id => subfolder), :title => l(:title_notifications_not_active_activate)) %> <% end %> <% if link %> <%= link_to(image_tag('delete.png'), dmsf_link_path(link), :data => {:confirm => l(:text_are_you_sure)}, :method => :delete, :title => l(:title_delete)) %> <% else %> <%= link_to(image_tag('delete.png'), delete_dmsf_path(:id => project, :folder_id => subfolder), :data => {:confirm => l(:text_are_you_sure)}, :title => l(:title_delete)) %> <% end %> <% else %> <% if (!locked_for_user || @force_file_unlock_allowed) && subfolder.unlockable? %> <%= link_to(image_tag('unlock.png', :plugin => 'redmine_dmsf'), unlock_dmsf_path(:id => project, :folder_id => subfolder), :title => l(:title_unlock_file)) %> <% end %> <% end %> <% end %> <%= position %> 0 <%= subfolder.modified.to_i if subfolder %> 0