#1080 Trash bin
This commit is contained in:
parent
e8560ebfca
commit
7469988dbe
@ -71,7 +71,7 @@ def dmsf_init
|
||||
{:dmsf_files => [:create_revision, :lock, :unlock, :delete_revision, :obsolete_revision,
|
||||
:notify_activate, :notify_deactivate, :restore],
|
||||
:dmsf_upload => [:upload_files, :upload_file, :upload, :commit_files, :commit,
|
||||
:delete_dmsf_attachment, :delete_dmsf_link_attachment],
|
||||
:delete_dmsf_attachment, :delete_dmsf_link_attachment, :multi_upload],
|
||||
:dmsf_links => [:new, :create, :destroy, :restore, :autocomplete_for_project,
|
||||
:autocomplete_for_folder],
|
||||
:dmsf_files_copy => [:new, :copy, :move],
|
||||
|
||||
@ -82,7 +82,7 @@ class DmsfContextMenusController < ApplicationController
|
||||
end
|
||||
|
||||
def find_dmsf_file
|
||||
if (params[:ids].size == 1) && (!@dmsf_folder)
|
||||
if (params[:ids].present? && (params[:ids].size == 1)) && (!@dmsf_folder)
|
||||
if params[:ids][0] =~ /file-(\d+)/
|
||||
@dmsf_file = DmsfFile.find_by(id: $1)
|
||||
elsif params[:ids][0] =~ /(file|url)-link-(\d+)/
|
||||
@ -93,7 +93,7 @@ class DmsfContextMenusController < ApplicationController
|
||||
end
|
||||
|
||||
def find_dmsf_folder
|
||||
if (params[:ids].size == 1) && (!@dmsf_file)
|
||||
if (params[:ids].present? && (params[:ids].size == 1)) && (!@dmsf_file)
|
||||
if params[:ids][0] =~ /folder-(\d+)/
|
||||
@dmsf_folder = DmsfFolder.find_by(id: $1)
|
||||
elsif params[:ids][0] =~ /folder-link-(\d+)/
|
||||
|
||||
@ -67,8 +67,6 @@ class DmsfController < ApplicationController
|
||||
httponly: true
|
||||
}
|
||||
cookies[:dmsf_switch_rlf] = cookie_options
|
||||
|
||||
Rails.logger.info ">>> RLF set: #{cookies[:dmsf_switch_rlf]}"
|
||||
redirect_to dmsf_folder_path(id: @project, folder_id: @folder)
|
||||
end
|
||||
|
||||
@ -77,13 +75,14 @@ class DmsfController < ApplicationController
|
||||
if @rlf
|
||||
@system_folder = @folder && @folder.system
|
||||
@locked_for_user = @folder && @folder.locked_for_user?
|
||||
#@folder_manipulation_allowed = User.current.allowed_to?(:folder_manipulation, @project)
|
||||
@folder_manipulation_allowed = User.current.allowed_to?(:folder_manipulation, @project)
|
||||
@file_manipulation_allowed = User.current.allowed_to?(:file_manipulation, @project)
|
||||
#@file_delete_allowed = User.current.allowed_to?(:file_delete, @project)
|
||||
#@file_view_allowed = User.current.allowed_to?(:view_dmsf_files, @project)
|
||||
#@force_file_unlock_allowed = User.current.allowed_to?(:force_file_unlock, @project)
|
||||
#@workflows_available = DmsfWorkflow.where(['project_id = ? OR project_id IS NULL', @project.id]).exists?
|
||||
#@file_approval_allowed = User.current.allowed_to?(:file_approval, @project)
|
||||
@trash_enabled = @folder_manipulation_allowed && @file_manipulation_allowed
|
||||
use_session = !request.format.csv?
|
||||
@query = retrieve_query(DmsfQuery, use_session)
|
||||
@query.dmsf_folder_id = @folder ? @folder.id : nil
|
||||
@ -131,6 +130,23 @@ class DmsfController < ApplicationController
|
||||
end
|
||||
|
||||
def trash
|
||||
@rlf = cookies[:dmsf_switch_rlf] == 'true'
|
||||
if @rlf
|
||||
@folder_manipulation_allowed = User.current.allowed_to? :folder_manipulation, @project
|
||||
@file_manipulation_allowed = User.current.allowed_to? :file_manipulation, @project
|
||||
@file_delete_allowed = User.current.allowed_to? :file_delete, @project
|
||||
@query = retrieve_query(DmsfQuery, true)
|
||||
@query.deleted = true
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
@dmsf_count = @query.dmsf_count
|
||||
@dmsf_pages = Paginator.new @dmsf_count, per_page_option, params['page']
|
||||
@dmsf_nodes = @query.dmsf_nodes(offset: @dmsf_pages.offset, limit: @dmsf_pages.per_page)
|
||||
render layout: !request.xhr?
|
||||
}
|
||||
end
|
||||
return
|
||||
end
|
||||
@folder_manipulation_allowed = User.current.allowed_to? :folder_manipulation, @project
|
||||
@file_manipulation_allowed = User.current.allowed_to? :file_manipulation, @project
|
||||
@file_delete_allowed = User.current.allowed_to? :file_delete, @project
|
||||
|
||||
@ -40,6 +40,10 @@ class DmsfUploadController < ApplicationController
|
||||
true
|
||||
end
|
||||
|
||||
def multi_upload
|
||||
@rlf = cookies[:dmsf_switch_rlf] == 'true'
|
||||
end
|
||||
|
||||
def upload_files
|
||||
uploaded_files = params[:dmsf_attachments]
|
||||
@uploads = []
|
||||
|
||||
@ -580,9 +580,12 @@ class DmsfFolder < ActiveRecord::Base
|
||||
classes = ['dir']
|
||||
if title =~ /^\./
|
||||
classes << 'dmsf_system'
|
||||
elsif ['DmsfFolderLink', 'DmsfFileLink'].include?(type)
|
||||
else
|
||||
classes << 'hascontextmenu'
|
||||
if ['folder-link', 'file-link'].include?(type)
|
||||
classes << 'dmsf_gray'
|
||||
end
|
||||
end
|
||||
classes.join(' ')
|
||||
end
|
||||
|
||||
|
||||
@ -168,7 +168,7 @@ class DmsfQuery < Query
|
||||
DmsfFileRevisionCustomField.visible.order(:position).pluck(:id, :name).each do |id, name|
|
||||
cf_columns << ",(SELECT value from custom_values WHERE custom_field_id = #{id} AND customized_type = 'DmsfFolder' AND customized_id = dmsf_folders.id) AS `#{name}`"
|
||||
end
|
||||
DmsfFolder.
|
||||
scope = DmsfFolder.
|
||||
select(%{
|
||||
dmsf_folders.id AS id,
|
||||
dmsf_folders.project_id AS project_id,
|
||||
@ -185,10 +185,14 @@ class DmsfQuery < Query
|
||||
users.firstname AS firstname,
|
||||
users.lastname AS lastname,
|
||||
users.id AS author,
|
||||
'DmsfFolder' AS type,
|
||||
'folder' AS type,
|
||||
0 AS sort #{cf_columns}}).
|
||||
joins('LEFT JOIN users ON dmsf_folders.user_id = users.id').
|
||||
where(dmsf_folders: { project_id: project.id, dmsf_folder_id: dmsf_folder_id, deleted: deleted })
|
||||
joins('LEFT JOIN users ON dmsf_folders.user_id = users.id')
|
||||
if deleted
|
||||
scope.where(dmsf_folders: { project_id: project.id, deleted: deleted })
|
||||
else
|
||||
scope.where(dmsf_folders: { project_id: project.id, dmsf_folder_id: dmsf_folder_id, deleted: deleted })
|
||||
end
|
||||
end
|
||||
|
||||
def dmsf_folder_links_scope
|
||||
@ -196,7 +200,7 @@ class DmsfQuery < Query
|
||||
DmsfFileRevisionCustomField.visible.order(:position).pluck(:id, :name).each do |id, name|
|
||||
cf_columns << ",(SELECT value from custom_values WHERE custom_field_id = #{id} AND customized_type = 'DmsfFolder' AND customized_id = dmsf_folders.id) AS `#{name}`"
|
||||
end
|
||||
DmsfLink.
|
||||
scope = DmsfLink.
|
||||
select(%{
|
||||
dmsf_folders.id AS id,
|
||||
COALESCE(dmsf_folders.project_id, dmsf_links.project_id) AS project_id,
|
||||
@ -213,20 +217,24 @@ class DmsfQuery < Query
|
||||
users.firstname AS firstname,
|
||||
users.lastname AS lastname,
|
||||
users.id AS author,
|
||||
'DmsfFolderLink' AS type,
|
||||
'folder-link' AS type,
|
||||
0 AS sort #{cf_columns}}).
|
||||
joins('LEFT JOIN dmsf_folders ON dmsf_links.target_id = dmsf_folders.id').
|
||||
joins('LEFT JOIN users ON users.id = COALESCE(dmsf_folders.user_id, dmsf_links.user_id)').
|
||||
where(dmsf_links: { target_type: 'DmsfFolder', project_id: project.id, dmsf_folder_id: dmsf_folder_id,
|
||||
joins('LEFT JOIN users ON users.id = COALESCE(dmsf_folders.user_id, dmsf_links.user_id)')
|
||||
if deleted
|
||||
scope.where(dmsf_links: { target_type: 'DmsfFolder', project_id: project.id, deleted: deleted })
|
||||
else
|
||||
scope.where(dmsf_links: { target_type: 'DmsfFolder', project_id: project.id, dmsf_folder_id: dmsf_folder_id,
|
||||
deleted: deleted })
|
||||
end
|
||||
end
|
||||
|
||||
def dmsf_files_scope
|
||||
cf_columns = +''
|
||||
DmsfFileRevisionCustomField.visible.order(:position).pluck(:id, :name).each do |id, name|
|
||||
cf_columns << ",(SELECT value from custom_values WHERE custom_field_id = #{id} AND customized_type = 'DmsfFolder' AND customized_id = dmsf_files.id) AS `#{name}`"
|
||||
end
|
||||
DmsfFile.
|
||||
scope = DmsfFile.
|
||||
select(%{
|
||||
dmsf_files.id AS id,
|
||||
dmsf_files.project_id AS project_id,
|
||||
@ -243,12 +251,16 @@ class DmsfQuery < Query
|
||||
users.firstname AS firstname,
|
||||
users.lastname AS lastname,
|
||||
users.id AS author,
|
||||
'DmsfFile' AS type,
|
||||
'file' AS type,
|
||||
1 AS sort #{cf_columns}}).
|
||||
joins(:dmsf_file_revisions).
|
||||
joins('LEFT JOIN users ON dmsf_file_revisions.user_id = users.id ').
|
||||
where('dmsf_file_revisions.created_at = (SELECT MAX(r.created_at) FROM dmsf_file_revisions r WHERE r.dmsf_file_id = dmsf_file_revisions.dmsf_file_id)').
|
||||
where(dmsf_files: { project_id: project.id, dmsf_folder_id: dmsf_folder_id, deleted: deleted })
|
||||
where('dmsf_file_revisions.created_at = (SELECT MAX(r.created_at) FROM dmsf_file_revisions r WHERE r.dmsf_file_id = dmsf_file_revisions.dmsf_file_id)')
|
||||
if deleted
|
||||
scope.where(dmsf_files: { project_id: project.id, deleted: deleted })
|
||||
else
|
||||
scope.where(dmsf_files: { project_id: project.id, dmsf_folder_id: dmsf_folder_id, deleted: deleted })
|
||||
end
|
||||
end
|
||||
|
||||
def dmsf_file_links_scope
|
||||
@ -256,7 +268,7 @@ class DmsfQuery < Query
|
||||
DmsfFileRevisionCustomField.visible.order(:position).pluck(:id, :name).each do |id, name|
|
||||
cf_columns << ",(SELECT value from custom_values WHERE custom_field_id = #{id} AND customized_type = 'DmsfFolder' AND customized_id = dmsf_files.id) AS `#{name}`"
|
||||
end
|
||||
DmsfLink.
|
||||
scope = DmsfLink.
|
||||
select(%{
|
||||
dmsf_files.id AS id,
|
||||
dmsf_files.project_id AS project_id,
|
||||
@ -273,13 +285,17 @@ class DmsfQuery < Query
|
||||
users.firstname AS firstname,
|
||||
users.lastname AS lastname,
|
||||
users.id AS author,
|
||||
'DmsfFileLink' AS type,
|
||||
'file-link' AS type,
|
||||
1 AS sort #{cf_columns}}).
|
||||
joins('JOIN dmsf_files ON dmsf_files.id = dmsf_links.target_id').
|
||||
joins('JOIN dmsf_file_revisions ON dmsf_file_revisions.dmsf_file_id = dmsf_files.id').
|
||||
joins('LEFT JOIN users ON dmsf_file_revisions.user_id = users.id ').
|
||||
where('dmsf_file_revisions.created_at = (SELECT MAX(r.created_at) FROM dmsf_file_revisions r WHERE r.dmsf_file_id = dmsf_file_revisions.dmsf_file_id)').
|
||||
where(dmsf_files: { project_id: project.id, dmsf_folder_id: dmsf_folder_id, deleted: deleted })
|
||||
where('dmsf_file_revisions.created_at = (SELECT MAX(r.created_at) FROM dmsf_file_revisions r WHERE r.dmsf_file_id = dmsf_file_revisions.dmsf_file_id)')
|
||||
if deleted
|
||||
scope.where(dmsf_files: { project_id: project.id, deleted: deleted })
|
||||
else
|
||||
scope.where(dmsf_files: { project_id: project.id, dmsf_folder_id: dmsf_folder_id, deleted: deleted })
|
||||
end
|
||||
end
|
||||
|
||||
def dmsf_url_links_scope
|
||||
@ -287,7 +303,7 @@ class DmsfQuery < Query
|
||||
DmsfFileRevisionCustomField.visible.order(:position).pluck(:name).each do |name|
|
||||
cf_columns << ",NULL AS `#{name}`"
|
||||
end
|
||||
DmsfLink.
|
||||
scope = DmsfLink.
|
||||
select(%{
|
||||
dmsf_links.id AS id,
|
||||
dmsf_links.project_id AS project_id,
|
||||
@ -304,10 +320,14 @@ class DmsfQuery < Query
|
||||
users.firstname AS firstname,
|
||||
users.lastname AS lastname,
|
||||
users.id AS author,
|
||||
'DmsfUrlLink' AS type,
|
||||
'url-link' AS type,
|
||||
1 AS sort #{cf_columns}}).
|
||||
joins('LEFT JOIN users ON dmsf_links.user_id = users.id ').
|
||||
where(target_type: 'DmsfUrl', project_id: project.id, dmsf_folder_id: dmsf_folder_id, deleted: deleted)
|
||||
joins('LEFT JOIN users ON dmsf_links.user_id = users.id ')
|
||||
if deleted
|
||||
scope.where(target_type: 'DmsfUrl', project_id: project.id, deleted: deleted)
|
||||
else
|
||||
scope.where(target_type: 'DmsfUrl', project_id: project.id, dmsf_folder_id: dmsf_folder_id, deleted: deleted)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
<% query_options = nil unless defined?(query_options) %>
|
||||
<% query_options ||= {} %>
|
||||
|
||||
<%= form_tag({}, data: { cm_url: dmsf_context_menu_path }) do %>
|
||||
<%= form_tag({}, data: { cm_url: query.deleted ? dmsf_trash_context_menu_path : dmsf_context_menu_path }) do %>
|
||||
<%= hidden_field_tag 'back_url', url_for(params: request.query_parameters), id: nil %>
|
||||
<%= query_columns_hidden_tags(query) %>
|
||||
<div class="autoscroll">
|
||||
@ -43,16 +43,17 @@
|
||||
<tbody>
|
||||
<% level = 0 %>
|
||||
<% query.dmsf_nodes.each do |node| %>
|
||||
<tr id="node-<%= node.id %>" class="hascontextmenu <%= cycle('odd', 'even') %> <%= node.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
|
||||
<% system = node.title =~ /^\./ %>
|
||||
<tr id="node-<%= node.id %>" class="<%= cycle('odd', 'even') %> <%= node.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
|
||||
<td class="checkbox hide-when-print">
|
||||
<% unless node.title =~ /^\./ %>
|
||||
<%= check_box_tag('ids[]', node.id, false, id: nil) %>
|
||||
<% end %>
|
||||
<%= check_box_tag('ids[]', "#{node.type}-#{node.id}", false, id: nil) unless system %>
|
||||
</td>
|
||||
<% query.inline_columns.each do |column| %>
|
||||
<%= content_tag('td', column_content(column, node), class: column.css_classes) %>
|
||||
<% end %>
|
||||
<td class="buttons"><%= link_to_context_menu %></td>
|
||||
<td class="buttons">
|
||||
<%= link_to_context_menu unless system %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
|
||||
@ -27,6 +27,10 @@
|
||||
<%= link_to(l(:button_switch), switch_rlf_dmsf_path(id: @project, rlf: @rlf),
|
||||
title: l(:label_switch_rlf),
|
||||
class: 'icon icon-plugins') %>
|
||||
<% if @rlf && @file_manipulation_allowed && !@locked_for_user && !@system_folder %>
|
||||
<%= link_to l(:label_attachment_new), multi_dmsf_upload_path(id: @project, dmsf_folder_id: @folder),
|
||||
class: 'icon icon-add' %>
|
||||
<% end %>
|
||||
<%= actions_dropdown do %>
|
||||
<% if @folder_manipulation_allowed && !@system_folder %>
|
||||
<% if @folder.nil? %>
|
||||
@ -236,7 +240,7 @@
|
||||
|
||||
<%= context_menu %>
|
||||
|
||||
<% if @file_manipulation_allowed && !@locked_for_user && !@system_folder %>
|
||||
<% if !@rlf && @file_manipulation_allowed && !@locked_for_user && !@system_folder %>
|
||||
<%= render(:partial => 'dmsf_upload/multi_upload', locals: { rlf: @rlf }) %>
|
||||
<% end %>
|
||||
|
||||
|
||||
@ -26,10 +26,17 @@
|
||||
|
||||
<div class="dmsf-header">
|
||||
<div class="wiki">
|
||||
<%= textilizable(@folder ? @folder.description : @project.dmsf_description) %>
|
||||
<%= textilizable(@project.dmsf_description) %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% if @query %>
|
||||
<%= form_tag(trash_dmsf_path(id: @project), method: :get, id: 'query_form') do %>
|
||||
<%= render partial: 'queries/query_form' %>
|
||||
<% end %>
|
||||
<%= render partial: 'query_list', locals: { query: @query } %>
|
||||
<span class="pagination"><%= pagination_links_full @dmsf_pages, @dmsf_count %></span>
|
||||
<% else %>
|
||||
<div id="dmsf_ajax_loading" class="ajax-loading"></div>
|
||||
<%= form_tag(entries_operations_dmsf_path(:id => @project, :folder_id => @folder), :method => :post,
|
||||
:class => 'dmsf_entries', :id => 'entries_form', :data => {:cm_url => dmsf_trash_context_menu_path}) do %>
|
||||
@ -166,8 +173,6 @@
|
||||
</table>
|
||||
<% end %>
|
||||
|
||||
<%= context_menu %>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= stylesheet_link_tag 'jquery.dataTables/datatables.min.css', :plugin => :redmine_dmsf %>
|
||||
<%= javascript_include_tag 'jquery.dataTables/datatables.min.js', :plugin => :redmine_dmsf, defer: true %>
|
||||
@ -236,3 +241,6 @@
|
||||
});
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<%= context_menu %>
|
||||
|
||||
@ -36,9 +36,7 @@
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% unless rlf %>
|
||||
<h3><%= l(:label_upload) %></h3>
|
||||
<% end %>
|
||||
<h3><%= l(:button_add) %></h3>
|
||||
|
||||
</div>
|
||||
<%= form_tag({ controller: 'dmsf_upload', action: 'upload_files', id: @project, folder_id: @folder },
|
||||
|
||||
34
app/views/dmsf_upload/multi_upload.html.erb
Normal file
34
app/views/dmsf_upload/multi_upload.html.erb
Normal file
@ -0,0 +1,34 @@
|
||||
<%
|
||||
# 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.
|
||||
%>
|
||||
|
||||
<%= render(partial: '/dmsf/path',
|
||||
locals: { folder: @folder, filename: nil, title: l(:label_attachment_new) }) %>
|
||||
<%= form_tag({ controller: 'dmsf_upload', action: 'upload_files', id: @project, folder_id: @folder },
|
||||
id: 'uploadform', method: :post, multipart: true) do %>
|
||||
<div>
|
||||
<span class="dmsf_uploader">
|
||||
<%= render partial: 'dmsf_upload/form',
|
||||
locals: { multiple: true, container: nil, description: true, awf: false } %>
|
||||
</span>
|
||||
<%= submit_tag l(:label_upload) %>
|
||||
</div>
|
||||
<% end %>
|
||||
@ -70,6 +70,7 @@ if Redmine::Plugin.installed? :redmine_dmsf
|
||||
# /projects/<project>/dmsf/upload - dmsf_upload controller
|
||||
##
|
||||
|
||||
get '/projects/:id/dmsf/upload/multi_upload', controller: 'dmsf_upload', action: 'multi_upload', as: 'multi_dmsf_upload'
|
||||
post '/projects/:id/dmsf/upload/files', :controller => 'dmsf_upload', :action => 'upload_files'
|
||||
post '/projects/:id/dmsf/upload/file', :controller => 'dmsf_upload', :action => 'upload_file'
|
||||
post '/projects/:id/dmsf/upload', :controller => 'dmsf_upload', :action => 'upload'
|
||||
|
||||
@ -35,9 +35,9 @@ module RedmineDmsf
|
||||
case column.name
|
||||
when :id
|
||||
case item.type
|
||||
when 'DmsfFile', 'DmsfFileLink'
|
||||
when 'file', 'file-link'
|
||||
link_to h(value), dmsf_file_path(id: item.id)
|
||||
when 'DmsfFolder', 'DmsfFolderLink'
|
||||
when 'folder', 'folder-link'
|
||||
if(item.id)
|
||||
link_to h(value), edit_dmsf_path(id: item.project_id, folder_id: item.id)
|
||||
else
|
||||
@ -50,13 +50,13 @@ module RedmineDmsf
|
||||
link_to "#{item.firstname} #{item.lastname}", user_path(id: value)
|
||||
when :title
|
||||
case item.type
|
||||
when 'DmsfFolder', 'DmsfFolderLink'
|
||||
when 'folder', 'folder-link'
|
||||
link_to(h(value),
|
||||
dmsf_folder_path(id: item.project_id, folder_id: item.id),
|
||||
class: 'icon icon-folder',
|
||||
title: h(value)) +
|
||||
content_tag('div', item.filename, class: 'dmsf_filename', title: l(:title_filename_for_download))
|
||||
when 'DmsfFile', 'DmsfFileLink'
|
||||
when 'file', 'file-link'
|
||||
file_view_url = url_for({ controller: :dmsf_files, action: 'view', id: item.id })
|
||||
content_type = Redmine::MimeType.of(value)
|
||||
content_type = 'application/octet-stream' if content_type.blank?
|
||||
@ -67,7 +67,7 @@ module RedmineDmsf
|
||||
title: h(value),
|
||||
'data-downloadurl': "#{content_type}:#{h(value)}:#{file_view_url}") +
|
||||
content_tag('div', item.filename, class: 'dmsf_filename', title: l(:title_filename_for_download))
|
||||
when 'DmsfUrlLink'
|
||||
when 'url-link'
|
||||
link_to(h(value), item.filename, target: '_blank', class: 'icon icon-link') +
|
||||
content_tag('div', item.filename, class: 'dmsf_filename', title: l(:title_filename_for_download))
|
||||
else
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user