<% # encode: utf-8 # # Redmine plugin for Document Management System "Features" # # Copyright © 2011-20 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. %> <% wf = DmsfWorkflow.find_by(id: file.last_revision.dmsf_workflow_id) if file.last_revision.dmsf_workflow_id %> <%= check_box_tag('ids[]', "#{name}-#{id}", false, :id => "file_#{id}") %> <% if DmsfFolder.is_column_on?('id') %> <%= link_to(file.id, dmsf_file_path(:id => file)) %> <% end %> <% if DmsfFolder.is_column_on?('title') %> <% if @tree_view %> <% end %> <% file_view_url = url_for({:controller => :dmsf_files, :action => 'view', :id => file}) %> <%= link_to(h(title), file_view_url, :target => '_blank', :class => "icon icon-file #{DmsfHelper.filetype_css(file.name)}", :title => h(file.last_revision.try(:tooltip)), 'data-downloadurl' => "#{file.last_revision.detect_content_type}:#{h(file.name)}:#{file_view_url}") %>
<%= h(link ? link.path : file.display_name) %>
<% end %> <% if DmsfFolder.is_column_on?('extension') %> <%= file.extension %> <% end %> <% if DmsfFolder.is_column_on?('size') %> <%= number_to_human_size(file.last_revision.size) %> <% end %> <% if DmsfFolder.is_column_on?('modified') %> <%= format_time(file.last_revision.updated_at) %> <% end %> <% if DmsfFolder.is_column_on?('version') %> <%= file.last_revision.version %> <% end %> <% if DmsfFolder.is_column_on?('workflow') %> <% if wf && @file_approval_allowed %> <%= link_to( file.last_revision.workflow_str(false), log_dmsf_workflow_path( :project_id => project.id, :id => wf.id, :dmsf_file_revision_id => file.last_revision.id), :title => file.last_revision.workflow_tooltip, :remote => true) %> <% else %> <%= file.last_revision.workflow_str(false) %> <% end %> <% end %> <% if DmsfFolder.is_column_on?('author') %> <%= h(file.last_revision.user) %> <% end %> <% CustomField.where(type: 'DmsfFileRevisionCustomField').order(:position).each do |c| %> <% if DmsfFolder.is_column_on?(c.name) %> <%= show_value file.custom_value(c) %> <% end %> <% end %> <%= link_to_context_menu %> <%= position %> <%= file.last_revision.size %> <%= file.last_revision.updated_at.to_i %> <%= file.last_revision.iversion %> <%= clear_title(title) %>