CCS Redmine style
This commit is contained in:
parent
de8da43bc8
commit
417e80bbcf
@ -40,15 +40,15 @@ class DmsfFilesCopyController < ApplicationController
|
|||||||
|
|
||||||
render :layout => !request.xhr?
|
render :layout => !request.xhr?
|
||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
@target_project = DmsfFile.allowed_target_projects_on_copy.detect {|p| p.id.to_s == params[:target_project_id]} if params[:target_project_id]
|
@target_project = DmsfFile.allowed_target_projects_on_copy.detect {|p| p.id.to_s == params[:target_project_id]} if params[:target_project_id]
|
||||||
unless @target_project
|
unless @target_project
|
||||||
render_403
|
render_403
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@target_folder = DmsfFolder.visible.find(params[:target_folder_id]) unless params[:target_folder_id].blank?
|
@target_folder = DmsfFolder.visible.find_by_id(params[:target_folder_id]) unless params[:target_folder_id].blank?
|
||||||
if !@target_folder.nil? && @target_folder.project != @target_project
|
if @target_folder && (@target_folder.project != @target_project)
|
||||||
raise DmsfAccessError, l(:error_entry_project_does_not_match_current_project)
|
raise DmsfAccessError, l(:error_entry_project_does_not_match_current_project)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -103,10 +103,10 @@ class DmsfFilesCopyController < ApplicationController
|
|||||||
log_activity(@file, 'was moved (is copy)')
|
log_activity(@file, 'was moved (is copy)')
|
||||||
|
|
||||||
redirect_to dmsf_file_path(@file)
|
redirect_to dmsf_file_path(@file)
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
def log_activity(file, action)
|
def log_activity(file, action)
|
||||||
Rails.logger.info "#{Time.now.strftime('%Y-%m-%d %H:%M:%S')} #{User.current.login}@#{request.remote_ip}/#{request.env['HTTP_X_FORWARDED_FOR']}: #{action} dmsf://#{file.project.identifier}/#{file.id}/#{file.last_revision.id}"
|
Rails.logger.info "#{Time.now.strftime('%Y-%m-%d %H:%M:%S')} #{User.current.login}@#{request.remote_ip}/#{request.env['HTTP_X_FORWARDED_FOR']}: #{action} dmsf://#{file.project.identifier}/#{file.id}/#{file.last_revision.id}"
|
||||||
end
|
end
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# Redmine plugin for Document Management System "Features"
|
# Redmine plugin for Document Management System "Features"
|
||||||
#
|
#
|
||||||
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
|
# Copyright (C) 2011-16 Karel Pičman <karel.picman@kontron.com>
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or
|
# This program is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
@ -31,8 +31,8 @@ class DmsfLinksController < ApplicationController
|
|||||||
@dmsf_link.project_id = params[:project_id]
|
@dmsf_link.project_id = params[:project_id]
|
||||||
|
|
||||||
if params[:dmsf_link].present?
|
if params[:dmsf_link].present?
|
||||||
# Reload
|
# Reload
|
||||||
@dmsf_link.dmsf_folder_id = params[:dmsf_link][:dmsf_folder_id] # TODO: Add stuff in here for external links so that if error occurs, repopulate the same
|
@dmsf_link.dmsf_folder_id = params[:dmsf_link][:dmsf_folder_id]
|
||||||
@dmsf_file_id = params[:dmsf_link][:dmsf_file_id]
|
@dmsf_file_id = params[:dmsf_link][:dmsf_file_id]
|
||||||
@type = params[:dmsf_link][:type]
|
@type = params[:dmsf_link][:type]
|
||||||
@link_external = (@type == 'link_from') && (params[:external_link] == 'true')
|
@link_external = (@type == 'link_from') && (params[:external_link] == 'true')
|
||||||
|
|||||||
@ -34,8 +34,12 @@ class DmsfLink < ActiveRecord::Base
|
|||||||
|
|
||||||
def validate_url
|
def validate_url
|
||||||
if self.target_type == 'DmsfUrl'
|
if self.target_type == 'DmsfUrl'
|
||||||
begin
|
begin
|
||||||
URI.parse self.external_url
|
if self.external_url.present?
|
||||||
|
URI.parse self.external_url
|
||||||
|
else
|
||||||
|
errors.add :external_url, :invalid
|
||||||
|
end
|
||||||
rescue URI::InvalidURIError
|
rescue URI::InvalidURIError
|
||||||
errors.add :external_url, :invalid
|
errors.add :external_url, :invalid
|
||||||
end
|
end
|
||||||
@ -124,7 +128,7 @@ class DmsfLink < ActiveRecord::Base
|
|||||||
else
|
else
|
||||||
self.deleted = STATUS_DELETED
|
self.deleted = STATUS_DELETED
|
||||||
self.deleted_by_user = User.current
|
self.deleted_by_user = User.current
|
||||||
save
|
save(:validate => false)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -135,7 +139,7 @@ class DmsfLink < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
self.deleted = STATUS_ACTIVE
|
self.deleted = STATUS_ACTIVE
|
||||||
self.deleted_by_user = nil
|
self.deleted_by_user = nil
|
||||||
save
|
save(:validate => false)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
@ -1,7 +1,11 @@
|
|||||||
<%# Redmine plugin for Document Management System "Features"
|
<%
|
||||||
|
# encoding: utf-8
|
||||||
#
|
#
|
||||||
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
|
# Redmine plugin for Document Management System "Features"
|
||||||
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
|
#
|
||||||
|
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
|
||||||
|
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
|
||||||
|
# Copyright (C) 2011-16 Karel Pičman <karel.picman@kontron.com>
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or
|
# This program is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
@ -18,11 +22,12 @@
|
|||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.%>
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.%>
|
||||||
|
|
||||||
<% if object %>
|
<% if object %>
|
||||||
<div class="dmsf-customfields">
|
<div>
|
||||||
<% object.show_custom_field_values.each do |custom_value| %>
|
<% object.show_custom_field_values.each do |custom_value| %>
|
||||||
<div class="dmsf-customfield-<%= custom_value.custom_field.id %> dmsf-customfield customfield">
|
<p>
|
||||||
<%= label_tag('', "#{h(custom_value.custom_field.name)}:") %> <%= show_value(custom_value) %>
|
<%= label_tag('', h(custom_value.custom_field.name)) %>
|
||||||
</div>
|
<%= show_value custom_value %>
|
||||||
|
</p>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
@ -1,4 +1,4 @@
|
|||||||
<%#=
|
<%
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
#
|
#
|
||||||
# Redmine plugin for Document Management System "Features"
|
# Redmine plugin for Document Management System "Features"
|
||||||
@ -23,9 +23,9 @@
|
|||||||
<% locked_for_user = subfolder && subfolder.locked_for_user? %>
|
<% locked_for_user = subfolder && subfolder.locked_for_user? %>
|
||||||
<% locked = subfolder && subfolder.locked? %>
|
<% locked = subfolder && subfolder.locked? %>
|
||||||
|
|
||||||
<td class="check"><%= check_box_tag(name, id, false,
|
<td class="dmsf_check"><%= check_box_tag(name, id, false,
|
||||||
:title => l(:title_check_for_zip_download_or_email), :id => "subfolder_#{id}") %></td>
|
:title => l(:title_check_for_zip_download_or_email), :id => "subfolder_#{id}") %></td>
|
||||||
<td class="title">
|
<td class="dmsf_title">
|
||||||
<%= link_to(h(title),
|
<%= link_to(h(title),
|
||||||
dmsf_folder_path(:id => project, :folder_id => subfolder),
|
dmsf_folder_path(:id => project, :folder_id => subfolder),
|
||||||
:class => 'icon icon-folder') %>
|
:class => 'icon icon-folder') %>
|
||||||
@ -36,7 +36,7 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
<td class="size"></td>
|
<td class="size"></td>
|
||||||
<td class="modified"><%= format_time(subfolder.modified) if subfolder %>
|
<td class="dmsf_modified"><%= format_time(subfolder.modified) if subfolder %>
|
||||||
<% if locked_for_user %>
|
<% if locked_for_user %>
|
||||||
<% if subfolder.lock.reverse[0].user %>
|
<% if subfolder.lock.reverse[0].user %>
|
||||||
<%= link_to(image_tag(link ? 'locked_gray.png' : 'locked.png', :plugin => 'redmine_dmsf'),
|
<%= link_to(image_tag(link ? 'locked_gray.png' : 'locked.png', :plugin => 'redmine_dmsf'),
|
||||||
@ -54,7 +54,7 @@
|
|||||||
<td class="version"></td>
|
<td class="version"></td>
|
||||||
<td class="workflow"></td>
|
<td class="workflow"></td>
|
||||||
<td class="author"><%= h(subfolder.user) if subfolder %></td>
|
<td class="author"><%= h(subfolder.user) if subfolder %></td>
|
||||||
<td class="buttons">
|
<td class="dmsf_buttons">
|
||||||
<% if @folder_manipulation_allowed %>
|
<% if @folder_manipulation_allowed %>
|
||||||
<% unless locked_for_user %>
|
<% unless locked_for_user %>
|
||||||
<%= link_to(image_tag('edit.png'),
|
<%= link_to(image_tag('edit.png'),
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<%#=
|
<%
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
#
|
#
|
||||||
# Redmine plugin for Document Management System "Features"
|
# Redmine plugin for Document Management System "Features"
|
||||||
@ -20,9 +20,9 @@
|
|||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
%>
|
%>
|
||||||
|
|
||||||
<td class="check"><%= check_box_tag(name, id, false,
|
<td class="dmsf_check"><%= check_box_tag(name, id, false,
|
||||||
:title => l(:title_check_for_restore_or_delete), :id => "subfolder_#{id}") %></td>
|
:title => l(:title_check_for_restore_or_delete), :id => "subfolder_#{id}") %></td>
|
||||||
<td class="title">
|
<td class="dmsf_title">
|
||||||
<%= content_tag(:span, h(title),
|
<%= content_tag(:span, h(title),
|
||||||
:title => h(title),
|
:title => h(title),
|
||||||
:class => 'icon icon-folder') %>
|
:class => 'icon icon-folder') %>
|
||||||
@ -33,13 +33,13 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
<td class="size"></td>
|
<td class="size"></td>
|
||||||
<td class="modified">
|
<td class="dmsf_modified">
|
||||||
<%= format_time(subfolder.modified) if subfolder %>
|
<%= format_time(subfolder.modified) if subfolder %>
|
||||||
</td>
|
</td>
|
||||||
<td class="version"></td>
|
<td class="version"></td>
|
||||||
<td class="workflow"></td>
|
<td class="workflow"></td>
|
||||||
<td class="author"><%= h(subfolder.user) %></td>
|
<td class="author"><%= h(subfolder.user) %></td>
|
||||||
<td class="buttons">
|
<td class="dmsf_buttons">
|
||||||
<% if @folder_manipulation_allowed %>
|
<% if @folder_manipulation_allowed %>
|
||||||
<%= link_to(image_tag('restore.png', :plugin => 'redmine_dmsf'),
|
<%= link_to(image_tag('restore.png', :plugin => 'redmine_dmsf'),
|
||||||
restore_dmsf_path(:id => project, :folder_id => subfolder),
|
restore_dmsf_path(:id => project, :folder_id => subfolder),
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<%#=
|
<%
|
||||||
# encode: utf-8
|
# encode: utf-8
|
||||||
#
|
#
|
||||||
# Redmine plugin for Document Management System "Features"
|
# Redmine plugin for Document Management System "Features"
|
||||||
@ -22,9 +22,9 @@
|
|||||||
|
|
||||||
<% wf = DmsfWorkflow.find_by_id(file.last_revision.dmsf_workflow_id) %>
|
<% wf = DmsfWorkflow.find_by_id(file.last_revision.dmsf_workflow_id) %>
|
||||||
|
|
||||||
<td class="check"><%= check_box_tag(name, id, false,
|
<td class="dmsf_check"><%= check_box_tag(name, id, false,
|
||||||
:title => l(:title_check_for_zip_download_or_email), :id => "file_#{id}") %></td>
|
:title => l(:title_check_for_zip_download_or_email), :id => "file_#{id}") %></td>
|
||||||
<td class="title">
|
<td class="dmsf_title">
|
||||||
<% file_view_url = url_for({:controller => :dmsf_files, :action => 'view', :id => file}) %>
|
<% file_view_url = url_for({:controller => :dmsf_files, :action => 'view', :id => file}) %>
|
||||||
<%= link_to(h(title),
|
<%= link_to(h(title),
|
||||||
file_view_url,
|
file_view_url,
|
||||||
@ -35,7 +35,7 @@
|
|||||||
<div class="filename" title="<%= l(:title_filename_for_download)%>"><%= h(link ? link.path : file.display_name) %></div>
|
<div class="filename" title="<%= l(:title_filename_for_download)%>"><%= h(link ? link.path : file.display_name) %></div>
|
||||||
</td>
|
</td>
|
||||||
<td class="size"><%= number_to_human_size(file.last_revision.size) %></td>
|
<td class="size"><%= number_to_human_size(file.last_revision.size) %></td>
|
||||||
<td class="modified">
|
<td class="dmsf_modified">
|
||||||
<%= format_time(file.last_revision.updated_at) %>
|
<%= format_time(file.last_revision.updated_at) %>
|
||||||
<% if file.locked_for_user? %>
|
<% if file.locked_for_user? %>
|
||||||
<% if file.lock.reverse[0].user %>
|
<% if file.lock.reverse[0].user %>
|
||||||
@ -67,7 +67,7 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
<td class="author"><%= h(file.last_revision.user) %></td>
|
<td class="author"><%= h(file.last_revision.user) %></td>
|
||||||
<td class="buttons">
|
<td class="dmsf_buttons">
|
||||||
<% if @file_manipulation_allowed %>
|
<% if @file_manipulation_allowed %>
|
||||||
<%= link_to(image_tag('filedetails.png', :plugin => 'redmine_dmsf'),
|
<%= link_to(image_tag('filedetails.png', :plugin => 'redmine_dmsf'),
|
||||||
dmsf_file_path(:id => file),
|
dmsf_file_path(:id => file),
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<%#=
|
<%
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
#
|
#
|
||||||
# Redmine plugin for Document Management System "Features"
|
# Redmine plugin for Document Management System "Features"
|
||||||
@ -20,16 +20,16 @@
|
|||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
%>
|
%>
|
||||||
|
|
||||||
<td class="check"><%= check_box_tag(name, id, false,
|
<td class="dmsf_check"><%= check_box_tag(name, id, false,
|
||||||
:title => l(:title_check_for_restore_or_delete), :id => "file_#{id}") %></td>
|
:title => l(:title_check_for_restore_or_delete), :id => "file_#{id}") %></td>
|
||||||
<td class="title">
|
<td class="dmsf_title">
|
||||||
<%= content_tag(:span, h(title),
|
<%= content_tag(:span, h(title),
|
||||||
:title => h(title),
|
:title => h(title),
|
||||||
:class => "icon icon-file #{DmsfHelper.filetype_css(file.name)}") %>
|
:class => "icon icon-file #{DmsfHelper.filetype_css(file.name)}") %>
|
||||||
<div class="filename" title="<%= l(:title_filename_for_download)%>"><%= h(link ? link.path : file.display_name) %></div>
|
<div class="filename" title="<%= l(:title_filename_for_download)%>"><%= h(link ? link.path : file.display_name) %></div>
|
||||||
</td>
|
</td>
|
||||||
<td class="size"><%= number_to_human_size(file.last_revision.size) %></td>
|
<td class="size"><%= number_to_human_size(file.last_revision.size) %></td>
|
||||||
<td class="modified">
|
<td class="dmsf_modified">
|
||||||
<%= format_time(file.last_revision.updated_at) %>
|
<%= format_time(file.last_revision.updated_at) %>
|
||||||
</td>
|
</td>
|
||||||
<td class="version" title="<%= file.last_revision.comment %>"><%= file.last_revision.version %></td>
|
<td class="version" title="<%= file.last_revision.comment %>"><%= file.last_revision.version %></td>
|
||||||
@ -37,7 +37,7 @@
|
|||||||
<%= file.last_revision.workflow_str(false) %>
|
<%= file.last_revision.workflow_str(false) %>
|
||||||
</td>
|
</td>
|
||||||
<td class="author"><%= h(file.last_revision.user) %></td>
|
<td class="author"><%= h(file.last_revision.user) %></td>
|
||||||
<td class="buttons">
|
<td class="dmsf_buttons">
|
||||||
<% if @file_manipulation_allowed %>
|
<% if @file_manipulation_allowed %>
|
||||||
<% if link %>
|
<% if link %>
|
||||||
<%= link_to(image_tag('restore.png', :plugin => 'redmine_dmsf'),
|
<%= link_to(image_tag('restore.png', :plugin => 'redmine_dmsf'),
|
||||||
|
|||||||
@ -17,14 +17,15 @@
|
|||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.%>
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
%>
|
||||||
|
|
||||||
<h2>
|
<h2>
|
||||||
<% if folder %>
|
<% if folder %>
|
||||||
<%= link_to l(:link_documents), dmsf_folder_path(:id => @project) %>
|
<%= link_to l(:link_documents), dmsf_folder_path(:id => @project) %>
|
||||||
<% folder.dmsf_path.each do |path_element| %>
|
<% folder.dmsf_path.each do |path_element| %>
|
||||||
/
|
/
|
||||||
<% if !filename && path_element == folder.dmsf_path.last %>
|
<% if filename.blank? && (path_element == folder.dmsf_path.last) %>
|
||||||
<%= h(path_element.title) %>
|
<%= h(path_element.title) %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to h(path_element.title), dmsf_folder_path(:id => @project, :folder_id => path_element) %>
|
<%= link_to h(path_element.title), dmsf_folder_path(:id => @project, :folder_id => path_element) %>
|
||||||
@ -37,4 +38,7 @@
|
|||||||
/
|
/
|
||||||
<%= h(filename) %>
|
<%= h(filename) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</h2>
|
<% if title %>
|
||||||
|
» <%= title %>
|
||||||
|
<% end %>
|
||||||
|
</h2>
|
||||||
@ -1,4 +1,4 @@
|
|||||||
<%#=
|
<%
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
#
|
#
|
||||||
# Redmine plugin for Document Management System "Features"
|
# Redmine plugin for Document Management System "Features"
|
||||||
@ -20,8 +20,8 @@
|
|||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
%>
|
%>
|
||||||
|
|
||||||
<td class="check"></td>
|
<td class="dmsf_check"></td>
|
||||||
<td class="title">
|
<td class="dmsf_title">
|
||||||
<%= link_to(h(title),
|
<%= link_to(h(title),
|
||||||
link.external_url,
|
link.external_url,
|
||||||
:target => '_blank',
|
:target => '_blank',
|
||||||
@ -31,11 +31,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td class="size"></td>
|
<td class="size"></td>
|
||||||
<td class="modified"><%= format_time(link.updated_at) %></td>
|
<td class="dmsf_modified"><%= format_time(link.updated_at) %></td>
|
||||||
<td class="version"></td>
|
<td class="version"></td>
|
||||||
<td class="workflow"></td>
|
<td class="workflow"></td>
|
||||||
<td class="author"><%= h(link.user) %></td>
|
<td class="author"><%= h(link.user) %></td>
|
||||||
<td class="buttons">
|
<td class="dmsf_buttons">
|
||||||
<span class="icon"></span>
|
<span class="icon"></span>
|
||||||
<span class="icon"></span>
|
<span class="icon"></span>
|
||||||
<span class="icon"></span>
|
<span class="icon"></span>
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
<%#=
|
<%
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
#
|
#
|
||||||
# Redmine plugin for Document Management System "Features"
|
# Redmine plugin for Document Management System "Features"
|
||||||
#
|
#
|
||||||
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
|
# Copyright (C) 2011-16 Karel Pičman <karel.picman@kontron.com>
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or
|
# This program is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
@ -20,9 +20,9 @@
|
|||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
%>
|
%>
|
||||||
|
|
||||||
<td class="check"><%= check_box_tag(name, id, false,
|
<td class="dmsf_check"><%= check_box_tag(name, id, false,
|
||||||
:title => l(:title_check_for_restore_or_delete)) %></td>
|
:title => l(:title_check_for_restore_or_delete)) %></td>
|
||||||
<td class="title">
|
<td class="dmsf_title">
|
||||||
<%= link_to(h(title),
|
<%= link_to(h(title),
|
||||||
link.external_url,
|
link.external_url,
|
||||||
:target => "_blank",
|
:target => "_blank",
|
||||||
@ -30,11 +30,11 @@
|
|||||||
<div class="filename" title="<%= l(:label_target_folder)%>"><%= link.external_url %></div>
|
<div class="filename" title="<%= l(:label_target_folder)%>"><%= link.external_url %></div>
|
||||||
</td>
|
</td>
|
||||||
<td class="size"></td>
|
<td class="size"></td>
|
||||||
<td class="modified"><%= format_time(link.updated_at) %></td>
|
<td class="dmsf_modified"><%= format_time(link.updated_at) %></td>
|
||||||
<td class="version"></td>
|
<td class="version"></td>
|
||||||
<td class="workflow"></td>
|
<td class="workflow"></td>
|
||||||
<td class="author"><%= h(link.user) %></td>
|
<td class="author"><%= h(link.user) %></td>
|
||||||
<td class="buttons">
|
<td class="dmsf_buttons">
|
||||||
<% if @file_manipulation_allowed %>
|
<% if @file_manipulation_allowed %>
|
||||||
<%= link_to(image_tag('restore.png', :plugin => 'redmine_dmsf'),
|
<%= link_to(image_tag('restore.png', :plugin => 'redmine_dmsf'),
|
||||||
restore_dmsf_link_path(:id => link),
|
restore_dmsf_link_path(:id => link),
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<%#
|
<%
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
#
|
#
|
||||||
# Redmine plugin for Document Management System "Features"
|
# Redmine plugin for Document Management System "Features"
|
||||||
@ -19,7 +19,8 @@
|
|||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.%>
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
%>
|
||||||
|
|
||||||
<% html_title(l(:dmsf)) %>
|
<% html_title(l(:dmsf)) %>
|
||||||
|
|
||||||
@ -64,41 +65,34 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% create = @pathfolder == @parent %>
|
<% create = @pathfolder == @parent %>
|
||||||
<%= render(:partial => 'path', :locals => {:folder => @pathfolder, :filename => create ? l(:heading_new_folder) : nil}) %>
|
<%= render(:partial => 'path',
|
||||||
|
:locals => {:folder => @pathfolder, :filename => create ? l(:heading_new_folder) : nil, :title => nil}) %>
|
||||||
|
|
||||||
<%= form_for(@folder, :url => {:action => create ? 'create' : 'save', :id => @project, :folder_id => @folder, :parent_id => @parent},
|
<%= form_for(@folder, :url => {:action => create ? 'create' : 'save', :id => @project, :folder_id => @folder, :parent_id => @parent},
|
||||||
:html => {:method=>:post}) do |f| %>
|
:html => {:method=>:post}) do |f| %>
|
||||||
<%= error_messages_for(@folder) %>
|
<%= error_messages_for(@folder) %>
|
||||||
<div class="box dmsf_detail">
|
<div class="box tabular">
|
||||||
<div class="clear">
|
<p>
|
||||||
<div class="splitcontentleft">
|
<label for="dmsf_folder_title"><%= l(:label_title) %><span class="required">*</span></label>
|
||||||
<p>
|
<%= f.text_field(:title, :size => '32', :required => true) %>
|
||||||
<%= label_tag('dmsf_folder_title', "#{l(:label_title)}:") %>
|
</p>
|
||||||
<%= f.text_field(:title, :size => '32', :required => true) %>
|
<p>
|
||||||
</p>
|
<%= label_tag('', l(:field_folder)) %>
|
||||||
</div>
|
<%= f.select(:dmsf_folder_id,
|
||||||
<div class="splitcontentright">
|
options_for_select(DmsfFolder.directory_tree(@project, @folder),
|
||||||
<p>
|
:selected => @parent? @parent.id : (@pathfolder.id if @pathfolder)))
|
||||||
<%= label_tag('', "#{l(:field_folder)}:") %>
|
%>
|
||||||
<%= f.select(:dmsf_folder_id,
|
</p>
|
||||||
options_for_select(DmsfFolder.directory_tree(@project, @folder),
|
<p>
|
||||||
:selected => @parent? @parent.id : (@pathfolder.id if @pathfolder)))
|
<%= label_tag('dmsf_folder_description', l(:label_description)) %>
|
||||||
%>
|
<%= f.text_area :description, :rows => 8, :class => 'wiki-edit' %>
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<p class="no-ident">
|
|
||||||
<%= label_tag('dmsf_folder_description', "#{l(:label_description)}:") %>
|
|
||||||
</p>
|
</p>
|
||||||
<div class="wiki data clear">
|
|
||||||
<%= f.text_area(:description, :rows => 15, :class => 'wiki-edit') %>
|
|
||||||
</div>
|
|
||||||
<% values = @folder ? @folder.custom_field_values : @parent ? @parent.custom_field_values : DmsfFolder.new(:project => @project).custom_field_values %>
|
<% values = @folder ? @folder.custom_field_values : @parent ? @parent.custom_field_values : DmsfFolder.new(:project => @project).custom_field_values %>
|
||||||
<% values.each do |value| %>
|
<% values.each do |value| %>
|
||||||
<p><%= custom_field_tag_with_label(:dmsf_folder, value) %></p>
|
<p><%= custom_field_tag_with_label(:dmsf_folder, value) %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<%= submit_tag(create ? l(:submit_create) : l(:submit_save)) %>
|
<p><%= submit_tag(create ? l(:submit_create) : l(:submit_save)) %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= wikitoolbar_for 'dmsf_folder_description' %>
|
<%= wikitoolbar_for 'dmsf_folder_description' %>
|
||||||
@ -1,7 +1,11 @@
|
|||||||
<%# Redmine plugin for Document Management System "Features"
|
<%
|
||||||
|
# encoding: utf-8
|
||||||
#
|
#
|
||||||
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
|
# Redmine plugin for Document Management System "Features"
|
||||||
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
|
#
|
||||||
|
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
|
||||||
|
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
|
||||||
|
# Copyright (C) 2011-16 Karel Pičman <karel.picman@kontron.com>
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or
|
# This program is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
@ -15,7 +19,8 @@
|
|||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.%>
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
%>
|
||||||
|
|
||||||
<% html_title(l(:dmsf)) %>
|
<% html_title(l(:dmsf)) %>
|
||||||
|
|
||||||
@ -35,17 +40,16 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%= render(:partial => 'path', :locals => {:folder => nil, :filename => nil}) %>
|
<%= render(:partial => 'path',
|
||||||
|
:locals => {:folder => nil, :filename => nil, :title => nil}) %>
|
||||||
|
|
||||||
<%= form_for(@project, :url => {:action => 'save_root', :id => @project},
|
<%= form_for(@project, :url => {:action => 'save_root', :id => @project},
|
||||||
:html => {:method=>:post}) do |f| %>
|
:html => {:method=>:post}) do |f| %>
|
||||||
<div class="box dmsf_detail">
|
<div class="box tabular">
|
||||||
<p class="no-ident">
|
<p>
|
||||||
<%= label_tag('project_dmsf_description', "#{l(:label_description)}:") %>
|
<%= label_tag('project_dmsf_description', l(:label_description)) %>
|
||||||
|
<%= f.text_area(:dmsf_description, :rows => 8, :class => 'wiki-edit') %>
|
||||||
</p>
|
</p>
|
||||||
<div class="wiki data clear">
|
|
||||||
<%= f.text_area(:dmsf_description, :rows => 15, :class => 'wiki-edit') %>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<%= submit_tag(l(:submit_save)) %>
|
<%= submit_tag(l(:submit_save)) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@ -1,8 +1,11 @@
|
|||||||
<%# Redmine plugin for Document Management System "Features"
|
<%
|
||||||
|
# encoding: utf-8
|
||||||
|
#
|
||||||
|
# Redmine plugin for Document Management System "Features"
|
||||||
#
|
#
|
||||||
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
|
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
|
||||||
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
|
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
|
||||||
# Copyright (C) 2011-14 Karel Pičman <karel.picman@kontron.com>
|
# Copyright (C) 2011-16 Karel Pičman <karel.picman@kontron.com>
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or
|
# This program is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
@ -16,50 +19,50 @@
|
|||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.%>
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
%>
|
||||||
|
|
||||||
<% html_title(l(:dmsf)) %>
|
<% html_title(l(:dmsf)) %>
|
||||||
|
|
||||||
<div class="contextual">
|
<%= render(:partial => 'path',
|
||||||
</div>
|
:locals => {:folder => @folder, :filename => nil, :title => l(:heading_send_documents_by_email)}) %>
|
||||||
|
|
||||||
<%= render(:partial => 'path', :locals => {:folder => @folder, :filename => nil}) %>
|
<%= form_tag({ :action => 'entries_email', :id => @project, :folder_id => @folder },
|
||||||
|
{ :method => :post }) do %>
|
||||||
<h3><%= l(:heading_send_documents_by_email) %></h3>
|
|
||||||
|
|
||||||
<%= form_tag({:action => 'entries_email', :id => @project, :folder_id => @folder},
|
|
||||||
{ :method=>:post, :class => 'tabular'}) do %>
|
|
||||||
<%= hidden_field_tag('email[zipped_content]', @email_params[:zipped_content]) %>
|
<%= hidden_field_tag('email[zipped_content]', @email_params[:zipped_content]) %>
|
||||||
<%= hidden_field_tag('email[folders]', @email_params[:folders].to_json) %>
|
<%= hidden_field_tag('email[folders]', @email_params[:folders].to_json) %>
|
||||||
<%= hidden_field_tag('email[files]', @email_params[:files].to_json) %>
|
<%= hidden_field_tag('email[files]', @email_params[:files].to_json) %>
|
||||||
<div class="box">
|
<div class="box tabular">
|
||||||
<p>
|
<p>
|
||||||
<%= label_tag('', "#{l(:label_email_from)}:") %>
|
<%= label_tag('', l(:label_email_from)) %>
|
||||||
<i><%= h(Setting.mail_from) %></i>
|
<%= text_field_tag('email[from]', h(Setting.mail_from), :style => 'width: 90%;', :disabled => true) %>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<%= label_tag('email[to]', "#{l(:label_email_to)}:") %>
|
<%= label_tag('email[to]', l(:label_email_to)) %>
|
||||||
<%= text_field_tag('email[to]', @email_params['to'], :style => 'width: 90%;') %>
|
<%= text_field_tag('email[to]', @email_params['to'], :style => 'width: 90%;') %>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<%= label_tag('email[cc]', "#{l(:label_email_cc)}:") %>
|
<%= label_tag('email[cc]', l(:label_email_cc)) %>
|
||||||
<%= text_field_tag('email[cc]', @email_params['cc'], :style => 'width: 90%;') %>
|
<%= text_field_tag('email[cc]', @email_params['cc'], :style => 'width: 90%;') %>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<%= label_tag('email[subject]', "#{l(:label_email_subject)}:") %>
|
<%= label_tag('email[subject]', l(:label_email_subject)) %>
|
||||||
<%= text_field_tag('email[subject]', @email_params['subject'], :style => 'width: 90%;') %>
|
<%= text_field_tag('email[subject]', @email_params['subject'], :style => 'width: 90%;') %>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<%= label_tag('', "#{l(:label_email_documents)}:") %>
|
<%= label_tag('', l(:label_email_documents)) %>
|
||||||
<%= link_to 'Documents.zip', download_email_entries_path(:id => @project, :folder_id => @folder, :path => @email_params[:zipped_content]) %>
|
<span>
|
||||||
<%= l(:label_or) %> <%= check_box_tag('email[links_only]') %> <%= l(:label_links_only) %>
|
<%= link_to 'Documents.zip', download_email_entries_path(:id => @project, :folder_id => @folder, :path => @email_params[:zipped_content]) %>
|
||||||
|
<%= l(:label_or) %>
|
||||||
|
<%= check_box_tag('email[links_only]') %> <%= l(:label_links_only) %>
|
||||||
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<%= label_tag('email[body]', "#{l(:label_email_body)}:") %>
|
<%= label_tag('email[body]', l(:label_email_body)) %>
|
||||||
<%= text_area_tag('email[body]', @email_params['body'], :rows=> '20', :style => 'width: 90%;') %>
|
<%= text_area_tag('email[body]', @email_params['body'], :rows => '20', :style => 'width: 90%;') %>
|
||||||
</p>
|
</p>
|
||||||
<p><%= submit_tag(l(:label_email_send)) %></p>
|
|
||||||
</div>
|
</div>
|
||||||
|
<p><%= submit_tag(l(:label_email_send)) %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= wikitoolbar_for 'email_body' %>
|
<%= wikitoolbar_for 'email_body' %>
|
||||||
@ -1,4 +1,4 @@
|
|||||||
<%#=
|
<%
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
#
|
#
|
||||||
# Redmine plugin for Document Management System "Features"
|
# Redmine plugin for Document Management System "Features"
|
||||||
@ -71,7 +71,8 @@
|
|||||||
:title => l(:link_trash_bin), :class => 'icon icon-del') if @trash_visible %>
|
:title => l(:link_trash_bin), :class => 'icon icon-del') if @trash_visible %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%= render(:partial => 'path', :locals => {:folder => @folder, :filename => nil}) %>
|
<%= render(:partial => 'path',
|
||||||
|
:locals => {:folder => @folder, :filename => nil, :title => nil}) %>
|
||||||
|
|
||||||
<div class="dmsf-header">
|
<div class="dmsf-header">
|
||||||
<div class="wiki">
|
<div class="wiki">
|
||||||
@ -98,11 +99,12 @@
|
|||||||
:dmsf_folder,
|
:dmsf_folder,
|
||||||
CustomValue.new(:custom_field_id => params[:custom_field_id].present? ? params[:custom_field_id] : values.first.custom_field_id, :value => params[:custom_value])) %>
|
CustomValue.new(:custom_field_id => params[:custom_field_id].present? ? params[:custom_field_id] : values.first.custom_field_id, :value => params[:custom_value])) %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<table class="display entries" id="browser">
|
<div class="autoscroll">
|
||||||
|
<table class="display list" id="browser">
|
||||||
<thead>
|
<thead>
|
||||||
<tr id="root">
|
<tr id="root">
|
||||||
<th class="check">
|
<th class="dmsf_check">
|
||||||
<input id="check_all_entries" title="<%= l(:title_check_uncheck_all_for_zip_download_or_email) %>" type="checkbox" />
|
<input id="check_all_entries" title="<%= l(:title_check_uncheck_all_for_zip_download_or_email) %>" type="checkbox" />
|
||||||
</th>
|
</th>
|
||||||
<th><%= l(:link_title) %></th>
|
<th><%= l(:link_title) %></th>
|
||||||
@ -189,7 +191,8 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
<%#=
|
<%
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
#
|
#
|
||||||
# Redmine plugin for Document Management System "Features"
|
# Redmine plugin for Document Management System "Features"
|
||||||
#
|
#
|
||||||
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
|
# Copyright (C) 2011-16 Karel Pičman <karel.picman@kontron.com>
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or
|
# This program is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
@ -21,10 +21,8 @@
|
|||||||
%>
|
%>
|
||||||
|
|
||||||
<% html_title(l(:dmsf)) %>
|
<% html_title(l(:dmsf)) %>
|
||||||
<div class="contextual">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<h2><%= l(:link_trash_bin) %></h2>
|
<h2><%= l(:link_trash_bin) %></h2>
|
||||||
|
|
||||||
<div class="dmsf-header">
|
<div class="dmsf-header">
|
||||||
<div class="wiki">
|
<div class="wiki">
|
||||||
@ -44,11 +42,12 @@
|
|||||||
<%= submit_tag(l(:button_delete), :title => l(:title_delete_checked), :name => 'destroy_entries') %>
|
<%= submit_tag(l(:button_delete), :title => l(:title_delete_checked), :name => 'destroy_entries') %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<table class="display entries" id="browser">
|
<div class="autoscroll">
|
||||||
|
<table class="display list" id="browser">
|
||||||
<thead>
|
<thead>
|
||||||
<tr id="root">
|
<tr id="root">
|
||||||
<th class="check">
|
<th class="dmsf_check">
|
||||||
<input id="check_all_entries" title="<%= l(:title_check_uncheck_all_for_restore_or_delete) %>" type="checkbox" />
|
<input id="check_all_entries" title="<%= l(:title_check_uncheck_all_for_restore_or_delete) %>" type="checkbox" />
|
||||||
</th>
|
</th>
|
||||||
<th><%= l(:link_title) %></th>
|
<th><%= l(:link_title) %></th>
|
||||||
@ -131,7 +130,8 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<%#=
|
<%
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
#
|
#
|
||||||
# Redmine plugin for Document Management System "Features"
|
# Redmine plugin for Document Management System "Features"
|
||||||
@ -22,7 +22,7 @@
|
|||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
%>
|
%>
|
||||||
|
|
||||||
<div class="box dmsf_detail">
|
<div class="box tabular">
|
||||||
<strong><%= l(:heading_new_revision) %> <a href="#" id="newRevisionFormContentToggle">[-]</a></strong>
|
<strong><%= l(:heading_new_revision) %> <a href="#" id="newRevisionFormContentToggle">[-]</a></strong>
|
||||||
<div id="newRevisionFormContent">
|
<div id="newRevisionFormContent">
|
||||||
<% if @file.locked_for_user? %>
|
<% if @file.locked_for_user? %>
|
||||||
@ -30,93 +30,77 @@
|
|||||||
<% else %>
|
<% else %>
|
||||||
<%= form_for(@revision, :url => { :action => 'create_revision', :id => @file },
|
<%= form_for(@revision, :url => { :action => 'create_revision', :id => @file },
|
||||||
:html => { :method => :post, :multipart => true, :id => 'new_revision_form' }) do |f| %>
|
:html => { :method => :post, :multipart => true, :id => 'new_revision_form' }) do |f| %>
|
||||||
<div class="clear">
|
<div class="clear">
|
||||||
<div class="splitcontentleft">
|
<div class="splitcontentleft">
|
||||||
<p>
|
<p>
|
||||||
<%= label_tag('dmsf_file_revision_title', "#{l(:label_title)}:") %>
|
<%= label_tag('dmsf_file_revision_title', l(:label_title)) %>
|
||||||
<%= f.text_field(:title, :size => 32) %>
|
<%= f.text_field(:title, :size => 32) %>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="splitcontentright">
|
<div class="splitcontentright">
|
||||||
<p style="white-space: nowrap;">
|
<p>
|
||||||
<%= label_tag('', "#{l(:label_file)}:") %>
|
<%= label_tag('', l(:label_file)) %>
|
||||||
<%= f.text_field(:name, :size => 22) %>
|
<%= f.text_field(:name, :size => 22) %>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p class="no-ident">
|
|
||||||
<%= label_tag('dmsf_file_revision_description', "#{l(:label_description)}:") %>
|
|
||||||
</p>
|
|
||||||
<div class="wiki data clear">
|
|
||||||
<%= f.text_area(:description, :rows => 6, :class => 'wiki-edit') %>
|
|
||||||
</div>
|
|
||||||
<div class="splitcontentleft">
|
|
||||||
<p>
|
<p>
|
||||||
<%= label_tag('version_0', "#{l(:label_version)}:") %>
|
<%= label_tag('dmsf_file_revision_description', l(:label_description)) %>
|
||||||
</p>
|
<%= f.text_area(:description, :rows => 6, :class => 'wiki-edit') %>
|
||||||
<div class="data clear">
|
</p>
|
||||||
<%= radio_button_tag('version', 0,
|
<div class="clear">
|
||||||
@revision.version == @file.last_revision.version) %>
|
<div class="splitcontentleft">
|
||||||
<%= @file.last_revision.major_version %>.<%= @file.last_revision.minor_version %>
|
<p>
|
||||||
<%= l(:option_version_same) %><br/>
|
<%= label_tag('version_0', l(:label_version)) %>
|
||||||
<%= radio_button_tag('version', 1,
|
<%= radio_button_tag('version', 0, @revision.version == @file.last_revision.version) %>
|
||||||
@revision.major_version == @file.last_revision.major_version &&
|
<%= @file.last_revision.major_version %>.<%= @file.last_revision.minor_version %>
|
||||||
@revision.minor_version != @file.last_revision.minor_version) %>
|
<%= l(:option_version_same) %><br/>
|
||||||
<%= @file.last_revision.major_version %>.<%= @file.last_revision.minor_version + 1 %>
|
<%= radio_button_tag('version', 1, @revision.major_version == @file.last_revision.major_version && @revision.minor_version != @file.last_revision.minor_version) %>
|
||||||
<%= l(:option_version_minor) %><br/>
|
<%= @file.last_revision.major_version %>.<%= @file.last_revision.minor_version + 1 %>
|
||||||
<%= radio_button_tag('version', 2,
|
<%= l(:option_version_minor) %><br/>
|
||||||
@revision.major_version != @file.last_revision.major_version) %>
|
<%= radio_button_tag('version', 2, @revision.major_version != @file.last_revision.major_version) %>
|
||||||
<%= @file.last_revision.major_version + 1 %>.0
|
<%= @file.last_revision.major_version + 1 %>.0
|
||||||
<%= l(:option_version_major) %><br/>
|
<%= l(:option_version_major) %><br/>
|
||||||
<%= radio_button_tag('version', 3) %>
|
<%= radio_button_tag('version', 3) %>
|
||||||
<%= select_tag 'custom_version_major',
|
<%= select_tag 'custom_version_major', options_for_select(0..99, @file.last_revision.major_version + 2), :onchange => '$("#version_3").prop("checked", true)' %>.
|
||||||
options_for_select(0..99, @file.last_revision.major_version + 2),
|
<%= select_tag 'custom_version_minor', options_for_select(0..99, @file.last_revision.minor_version + 1), :onchange => '$("#version_3").prop("checked", true)' %>
|
||||||
:onchange => '$("#version_3").prop("checked", true)'%>.
|
<%= l(:option_version_custom) %>
|
||||||
<%= select_tag 'custom_version_minor',
|
</p>
|
||||||
options_for_select(0..99, @file.last_revision.minor_version + 1),
|
</div>
|
||||||
:onchange => '$("#version_3").prop("checked", true)'%>
|
<div class="splitcontentright">
|
||||||
<%= l(:option_version_custom) %>
|
<p>
|
||||||
</div>
|
<%= label_tag('file_upload', l(:label_new_content)) %>
|
||||||
</div>
|
<span class="add_attachment">
|
||||||
<div class="splitcontentright clear">
|
<%= file_field_tag 'file_upload',
|
||||||
<p>
|
:id => 'file_upload',
|
||||||
<%= label_tag('file_upload', "#{l(:label_new_content)}:") %>
|
:class => 'file_selector',
|
||||||
</p>
|
:multiple => false,
|
||||||
<span class="add_attachment">
|
:onchange => "$('#dmsf_file_revision_name').val(this.files[0].name)",
|
||||||
<%= file_field_tag 'file_upload',
|
:data => {
|
||||||
:id => 'file_upload',
|
:max_file_size => Setting.attachment_max_size.to_i.kilobytes,
|
||||||
:class => 'file_selector',
|
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
|
||||||
:multiple => false,
|
:max_concurrent_uploads => 1,
|
||||||
:onchange => "$('#dmsf_file_revision_name').val(this.files[0].name)",
|
:upload_path => uploads_path(:format => 'js')
|
||||||
:data => {
|
}
|
||||||
:max_file_size => Setting.attachment_max_size.to_i.kilobytes,
|
%>
|
||||||
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
|
(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)
|
||||||
:max_concurrent_uploads => 1,
|
</span>
|
||||||
:upload_path => uploads_path(:format => 'js')
|
</p>
|
||||||
}
|
</div>
|
||||||
%>
|
</div>
|
||||||
(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<br style="clear: both"/>
|
|
||||||
<div class="custom_fields">
|
<div class="custom_fields">
|
||||||
<% @revision.custom_field_values.each do |value| %>
|
<% @revision.custom_field_values.each do |value| %>
|
||||||
<p><%= custom_field_tag_with_label(:dmsf_file_revision, value) %></p>
|
<p><%= custom_field_tag_with_label(:dmsf_file_revision, value) %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="comment">
|
<p>
|
||||||
<p>
|
<%= label_tag('dmsf_file_revision_comment', l(:label_comment)) %>
|
||||||
<%= label_tag('dmsf_file_revision_comment', "#{l(:label_comment)}:") %>
|
<%= f.text_area(:comment, :rows => 2) %>
|
||||||
</p>
|
</p>
|
||||||
<div class="data">
|
<%= submit_tag(l(:submit_create)) %>
|
||||||
<%= f.text_area(:comment, :rows=> 2, :style => 'width: 99%;') %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<br/>
|
|
||||||
<%= submit_tag(l(:submit_create)) %>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%= wikitoolbar_for 'dmsf_file_revision_description' %>
|
<%= wikitoolbar_for 'dmsf_file_revision_description' %>
|
||||||
@ -1,9 +1,11 @@
|
|||||||
<%#=
|
<%
|
||||||
|
# encoding: utf-8
|
||||||
|
#
|
||||||
# Redmine plugin for Document Management System "Features"
|
# Redmine plugin for Document Management System "Features"
|
||||||
#
|
#
|
||||||
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
|
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
|
||||||
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
|
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
|
||||||
# Copyright (C) 2013 Karel Pičman <karel.picman@kontron.com>
|
# Copyright (C) 2011-16 Karel Pičman <karel.picman@kontron.com>
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or
|
# This program is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
@ -19,7 +21,7 @@
|
|||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
%>
|
%>
|
||||||
<br/>
|
|
||||||
<table class="display access-table list">
|
<table class="display access-table list">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@ -33,9 +35,9 @@
|
|||||||
<% revision.access_grouped.each do |access| %>
|
<% revision.access_grouped.each do |access| %>
|
||||||
<tr>
|
<tr>
|
||||||
<td><%= link_to_user(access.user) %></td>
|
<td><%= link_to_user(access.user) %></td>
|
||||||
<td><%= access['count'] %></td>
|
<td class="version"><%= access['count'] %></td>
|
||||||
<td><%= format_time(DmsfHelper::to_time(access.first_at)) %></td>
|
<td class="dmsf_modified"><%= format_time(DmsfHelper::to_time(access.first_at)) %></td>
|
||||||
<td><%= format_time(DmsfHelper::to_time(access.last_at)) %></td>
|
<td class="dmsf_modified"><%= format_time(DmsfHelper::to_time(access.last_at)) %></td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<%#=
|
<%
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
#
|
#
|
||||||
# Redmine plugin for Document Management System "Features"
|
# Redmine plugin for Document Management System "Features"
|
||||||
@ -61,7 +61,8 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%= render(:partial => '/dmsf/path', :locals => {:folder => @file.folder, :filename => @file.title}) %>
|
<%= render(:partial => '/dmsf/path',
|
||||||
|
:locals => {:folder => @file.folder, :filename => @file.title, :title => nil}) %>
|
||||||
|
|
||||||
<% if User.current.allowed_to?(:file_manipulation, @file.project) && !@file.locked_for_user? %>
|
<% if User.current.allowed_to?(:file_manipulation, @file.project) && !@file.locked_for_user? %>
|
||||||
<%= error_messages_for('file') %>
|
<%= error_messages_for('file') %>
|
||||||
@ -69,14 +70,14 @@
|
|||||||
<%= render(:partial => 'file_new_revision') %>
|
<%= render(:partial => 'file_new_revision') %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div class="dmsf_id_box dmsf_detail">
|
<div class="dmsf_id_box tabular">
|
||||||
<%= label_tag('', "#{l(:label_document)}:") %>
|
<%= label_tag('', l(:label_document)) %>
|
||||||
<%= "##{@file.id}" %>
|
<%= "##{@file.id}" %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h3><%= l(:heading_revisions) %></h3>
|
<h3><%= l(:heading_revisions) %></h3>
|
||||||
<% @file.revisions.visible[@revision_pages.offset,@revision_pages.per_page].each do |revision| %>
|
<% @file.revisions.visible[@revision_pages.offset, @revision_pages.per_page].each do |revision| %>
|
||||||
<div class="revision_box dmsf_detail dataTables_wrapper">
|
<div class="revision_box tabular dataTables_wrapper">
|
||||||
<div class="fg-toolbar ui-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix">
|
<div class="fg-toolbar ui-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix">
|
||||||
<div class="dataTables_lenght">
|
<div class="dataTables_lenght">
|
||||||
<div class="controls" style="float: right">
|
<div class="controls" style="float: right">
|
||||||
@ -99,54 +100,68 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="dmsf_revision_inner_box">
|
<div class="dmsf_revision_inner_box">
|
||||||
<div class="clear">
|
<div class="clear">
|
||||||
<div class="splitcontentleft">
|
<div class="splitcontentleft">
|
||||||
<%= label_tag('', "#{l(:label_title)}:") %>
|
<p>
|
||||||
<%= h(revision.title) %>
|
<%= label_tag('', l(:label_title)) %>
|
||||||
|
<%= h(revision.title) %>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="splitcontentright">
|
<div class="splitcontentright">
|
||||||
<%= label_tag('', "#{l(:label_file)}:") %>
|
<p>
|
||||||
<%= ("#{h(revision.file.folder.dmsf_path_str)}/") if revision.file.folder %><%= h(revision.name) %>
|
<%= label_tag('', l(:label_file)) %>
|
||||||
|
<%= ("#{h(revision.file.folder.dmsf_path_str)}/") if revision.file.folder %><%= h(revision.name) %>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p class="no-ident">
|
<% if revision.description.present? %>
|
||||||
<%= label_tag('', "#{l(:label_description)}:") %>
|
<p>
|
||||||
</p>
|
<%= label_tag('', l(:label_description)) %>
|
||||||
<div class="wiki clear" style="margin-left: 110px">
|
<div class="wiki">
|
||||||
<%= textilizable(revision.description) %>
|
<%= textilizable(revision.description) %>
|
||||||
</div>
|
</div>
|
||||||
<div class="splitcontentleft">
|
</p>
|
||||||
<%= label_tag('', "#{l(:label_version)}:") %>
|
<% end %>
|
||||||
<%= revision.major_version %>.<%= revision.minor_version %>
|
<div class="clear">
|
||||||
<br/>
|
<div class="splitcontentleft">
|
||||||
<%= label_tag('', "#{l(:link_workflow)}:") %>
|
<p>
|
||||||
<% wf = DmsfWorkflow.find_by_id(revision.dmsf_workflow_id) %>
|
<%= label_tag('', l(:label_version)) %>
|
||||||
<% if wf %>
|
<%= revision.major_version %>.<%= revision.minor_version %>
|
||||||
<%= "#{wf.name} - " %>
|
</p>
|
||||||
<%= link_to(revision.workflow_str(false),
|
<p>
|
||||||
log_dmsf_workflow_path(:project_id => @project.id,
|
<%= label_tag('', l(:link_workflow)) %>
|
||||||
:id => wf.id, :dmsf_file_revision_id => revision.id),
|
<% wf = DmsfWorkflow.find_by_id(revision.dmsf_workflow_id) %>
|
||||||
:title => DmsfWorkflow.assignments_to_users_str(wf.next_assignments(revision.id)),
|
<% if wf %>
|
||||||
:remote => true) %>
|
<%= "#{wf.name} - " %>
|
||||||
<% else %>
|
<%= link_to(revision.workflow_str(false),
|
||||||
<%= revision.workflow_str(true) %>
|
log_dmsf_workflow_path(:project_id => @project.id,
|
||||||
<% end %>
|
:id => wf.id, :dmsf_file_revision_id => revision.id),
|
||||||
</div>
|
:title => DmsfWorkflow.assignments_to_users_str(wf.next_assignments(revision.id)),
|
||||||
<div class="splitcontentright clear">
|
:remote => true) %>
|
||||||
<%= label_tag('', "#{l(:label_mime)}:") %>
|
<% else %>
|
||||||
<%= h(revision.mime_type) %>
|
<%= revision.workflow_str(true) %>
|
||||||
<br/>
|
<% end %>
|
||||||
<%= label_tag('', "#{l(:label_size)}:") %>
|
</p>
|
||||||
<%= number_to_human_size(revision.size) %>
|
</div>
|
||||||
</div>
|
<div class="splitcontentright">
|
||||||
<div class="no-ident clear">
|
<p>
|
||||||
<%= render 'dmsf/custom_fields', :object => revision %>
|
<%= label_tag('', l(:label_mime)) %>
|
||||||
</div>
|
<%= h(revision.mime_type) %>
|
||||||
<p class="no-ident">
|
</p>
|
||||||
<%= label_tag('', "#{l(:label_comment)}:") %>
|
<p>
|
||||||
</p>
|
<%= label_tag('', l(:label_size)) %>
|
||||||
<div class="wiki clear" style="margin-left: 110px">
|
<%= number_to_human_size(revision.size) %>
|
||||||
<%= textilizable(revision.comment) %>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<%= render 'dmsf/custom_fields', :object => revision %>
|
||||||
|
<% if revision.comment.present? %>
|
||||||
|
<p>
|
||||||
|
<%= label_tag('', l(:label_comment)) %>
|
||||||
|
<div class="wiki">
|
||||||
|
<%= textilizable(revision.comment) %>
|
||||||
|
</div>
|
||||||
|
</p>
|
||||||
|
<% end %>
|
||||||
<div id="<%= "revision_access-#{revision.id}" %>" style="display:none">
|
<div id="<%= "revision_access-#{revision.id}" %>" style="display:none">
|
||||||
<%= render(:partial => 'revision_access', :locals => {:revision => revision}) if User.current.allowed_to?(:file_manipulation, @file.project) %>
|
<%= render(:partial => 'revision_access', :locals => {:revision => revision}) if User.current.allowed_to?(:file_manipulation, @file.project) %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,7 +1,11 @@
|
|||||||
<%# Redmine plugin for Document Management System "Features"
|
<%
|
||||||
|
# encoding: utf-8
|
||||||
#
|
#
|
||||||
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
|
# Redmine plugin for Document Management System "Features"
|
||||||
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
|
#
|
||||||
|
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
|
||||||
|
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
|
||||||
|
# Copyright (C) 2011-16 Karel Pičman <karel.picman@kontron.com>
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or
|
# This program is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
@ -15,8 +19,8 @@
|
|||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.%>
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
%>
|
||||||
|
|
||||||
<!--Select2 Files-->
|
<!--Select2 Files-->
|
||||||
<%= stylesheet_link_tag 'select2.min.css', :plugin => 'redmine_dmsf' %>
|
<%= stylesheet_link_tag 'select2.min.css', :plugin => 'redmine_dmsf' %>
|
||||||
@ -24,30 +28,32 @@
|
|||||||
|
|
||||||
<% html_title(l(:dmsf)) %>
|
<% html_title(l(:dmsf)) %>
|
||||||
|
|
||||||
<div class="contextual">
|
<%= render(:partial => '/dmsf/path',
|
||||||
</div>
|
:locals => {:folder => @file.folder, :filename => @file.title,
|
||||||
|
:title => "#{l(:button_copy)}/#{l(:button_move)}"}) %>
|
||||||
<%= render(:partial => '/dmsf/path', :locals => {:folder => @file.folder, :filename => @file.title}) %>
|
|
||||||
|
|
||||||
<% if DmsfFile.allowed_target_projects_on_copy.present? %>
|
<% if DmsfFile.allowed_target_projects_on_copy.present? %>
|
||||||
<%= form_tag({:action => 'create', :id => @file}, :id => 'copyForm') do |f| %>
|
<%= form_tag({:action => 'create', :id => @file}, :id => 'copyForm') do |f| %>
|
||||||
<div class="box dmsf_detail">
|
<div class="box tabular">
|
||||||
<p>
|
<p>
|
||||||
<label for="target_project_id"><%=l(:field_target_project)%>:</label>
|
<%= label_tag('target_project_id', l(:field_target_project)) %>
|
||||||
<%= select_tag('target_project_id',
|
<%= select_tag('target_project_id',
|
||||||
project_tree_options_for_select(DmsfFile.allowed_target_projects_on_copy, :selected => @target_project)) %>
|
project_tree_options_for_select(DmsfFile.allowed_target_projects_on_copy,
|
||||||
|
:selected => @target_project)) %>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<%= label_tag('target_folder_id', "#{l(:field_target_folder)}:") %>
|
<%= label_tag('target_folder_id', l(:field_target_folder)) %>
|
||||||
<%= select_tag('target_folder_id',
|
<%= select_tag('target_folder_id',
|
||||||
options_for_select(DmsfFolder.directory_tree(@target_project),
|
options_for_select(DmsfFolder.directory_tree(@target_project),
|
||||||
:selected => (@target_folder.id if @target_folder))) %>
|
:selected => (@target_folder.id if @target_folder))) %>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<%= submit_tag(l(:button_copy)) %>
|
<p>
|
||||||
<% if User.current.allowed_to?(:file_manipulation, @project) %>
|
<%= submit_tag(l(:button_copy)) %>
|
||||||
<button type="button" id="move_button" title="<%= l(:button_move) %>"><%= l(:button_move) %></button>
|
<% if User.current.allowed_to?(:file_manipulation, @project) %>
|
||||||
<% end %>
|
<%= submit_tag(l(:button_move), :id => 'move_button') %>
|
||||||
|
<% end %>
|
||||||
|
</p>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,11 @@
|
|||||||
<%# Redmine plugin for Document Management System "Features"
|
<%
|
||||||
|
# encoding: utf-8
|
||||||
#
|
#
|
||||||
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
|
# Redmine plugin for Document Management System "Features"
|
||||||
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
|
#
|
||||||
|
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
|
||||||
|
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
|
||||||
|
# Copyright (C) 2011-16 Karel Pičman <karel.picman@kontron.com>
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or
|
# This program is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
@ -15,8 +19,8 @@
|
|||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.%>
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
%>
|
||||||
|
|
||||||
<!--Select2 Files-->
|
<!--Select2 Files-->
|
||||||
<%= stylesheet_link_tag 'select2.min.css', :plugin => 'redmine_dmsf' %>
|
<%= stylesheet_link_tag 'select2.min.css', :plugin => 'redmine_dmsf' %>
|
||||||
@ -24,20 +28,19 @@
|
|||||||
|
|
||||||
<% html_title(l(:dmsf)) %>
|
<% html_title(l(:dmsf)) %>
|
||||||
|
|
||||||
<div class="contextual"></div>
|
<%= render(:partial => '/dmsf/path',
|
||||||
|
:locals => {:folder => @folder, :filename => nil, :title => l(:button_copy)}) %>
|
||||||
<%= render(:partial => '/dmsf/path', :locals => {:folder => @folder, :filename => nil}) %>
|
|
||||||
|
|
||||||
<% unless DmsfFolder.allowed_target_projects_on_copy.blank? %>
|
<% unless DmsfFolder.allowed_target_projects_on_copy.blank? %>
|
||||||
<%= form_tag({:action => 'copy_to', :id => @folder}, :id => 'copyForm') do |f| %>
|
<%= form_tag({:action => 'copy_to', :id => @folder}, :id => 'copyForm') do |f| %>
|
||||||
<div class="box dmsf_detail">
|
<div class="box tabular">
|
||||||
<p>
|
<p>
|
||||||
<label for="target_project_id"><%= l(:field_target_project) %>:</label>
|
<label for="target_project_id"><%= l(:field_target_project) %>:</label>
|
||||||
<%= select_tag('target_project_id',
|
<%= select_tag('target_project_id',
|
||||||
project_tree_options_for_select(DmsfFolder.allowed_target_projects_on_copy, :selected => @target_project)) %>
|
project_tree_options_for_select(DmsfFolder.allowed_target_projects_on_copy, :selected => @target_project)) %>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<%= label_tag('target_folder_id', "#{l(:field_target_folder)}:") %>
|
<%= label_tag('target_folder_id', l(:field_target_folder)) %>
|
||||||
<%= select_tag('target_folder_id',
|
<%= select_tag('target_folder_id',
|
||||||
options_for_select(DmsfFolder.directory_tree(@target_project, @folder),
|
options_for_select(DmsfFolder.directory_tree(@target_project, @folder),
|
||||||
:selected => (@target_folder.id if @target_folder))) %>
|
:selected => (@target_folder.id if @target_folder))) %>
|
||||||
|
|||||||
@ -1,6 +1,9 @@
|
|||||||
<%# Redmine plugin for Document Management System "Features"
|
<%
|
||||||
|
# encoding: utf-8
|
||||||
#
|
#
|
||||||
# Copyright (C) 2011-15 Karel Pičman <karel.picman@lbcfree.net>
|
# Redmine plugin for Document Management System "Features"
|
||||||
|
#
|
||||||
|
# Copyright (C) 2011-16 Karel Pičman <karel.picman@kontron.com>
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or
|
# This program is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
@ -18,15 +21,14 @@
|
|||||||
|
|
||||||
<% html_title l(:dmsf) %>
|
<% html_title l(:dmsf) %>
|
||||||
|
|
||||||
<div class="contextual">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<% if @dmsf_file_id %>
|
<% if @dmsf_file_id %>
|
||||||
<% file = DmsfFile.find_by_id @dmsf_file_id%>
|
<% file = DmsfFile.find_by_id @dmsf_file_id%>
|
||||||
<% title = file.title if file %>
|
<% title = file.title if file %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= render(:partial => '/dmsf/path', :locals => {:folder => @dmsf_link.folder, :filename => title}) %>
|
<%= render(:partial => '/dmsf/path',
|
||||||
|
:locals => {:folder => @dmsf_link.folder, :filename => nil,
|
||||||
|
:title => (@type == 'link_from') ? l(:label_link_from) : l(:label_link_to) }) %>
|
||||||
|
|
||||||
<%= labelled_form_for @dmsf_link do |f| %>
|
<%= labelled_form_for @dmsf_link do |f| %>
|
||||||
<%= error_messages_for @dmsf_link %>
|
<%= error_messages_for @dmsf_link %>
|
||||||
@ -34,7 +36,7 @@
|
|||||||
<%= f.hidden_field :dmsf_folder_id, :value => @dmsf_link.dmsf_folder_id if @dmsf_link.dmsf_folder_id %>
|
<%= f.hidden_field :dmsf_folder_id, :value => @dmsf_link.dmsf_folder_id if @dmsf_link.dmsf_folder_id %>
|
||||||
<%= f.hidden_field :type, :value => @type %>
|
<%= f.hidden_field :type, :value => @type %>
|
||||||
<%= f.hidden_field :dmsf_file_id, :value => @dmsf_file_id %>
|
<%= f.hidden_field :dmsf_file_id, :value => @dmsf_file_id %>
|
||||||
<div class="box dmsf_detail">
|
<div class="box tabular">
|
||||||
<% if @type == 'link_from' %>
|
<% if @type == 'link_from' %>
|
||||||
<p>
|
<p>
|
||||||
<%= radio_button_tag(:external_link, 'false', @link_external == false) %> <%= l(:label_internal) %><br/>
|
<%= radio_button_tag(:external_link, 'false', @link_external == false) %> <%= l(:label_internal) %><br/>
|
||||||
@ -43,10 +45,10 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
<div id="link_internal" style="<%= @link_external ? 'display:none' : '' %>">
|
<div id="link_internal" style="<%= @link_external ? 'display:none' : '' %>">
|
||||||
<p>
|
<p>
|
||||||
<% if @type == 'link_from' %>
|
<% if @type == 'link_from' %>
|
||||||
<%= label_tag('dmsf_link[target_project_id]', l(:label_source_project), :class => 'required') %>
|
<label for="dmsf_link[target_project_id]"><%= l(:label_source_project) %><span class="required">*</span></label>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= label_tag('dmsf_link[target_project_id]', l(:label_target_project), :class => 'required') %>
|
<label for="dmsf_link[target_project_id]"><%= l(:label_target_project) %><span class="required">*</span></label>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= select_tag('dmsf_link[target_project_id]',
|
<%= select_tag('dmsf_link[target_project_id]',
|
||||||
project_tree_options_for_select(DmsfFile.allowed_target_projects_on_copy,
|
project_tree_options_for_select(DmsfFile.allowed_target_projects_on_copy,
|
||||||
@ -62,29 +64,31 @@
|
|||||||
folder_tree_options_for_select(DmsfFolder.directory_tree(@dmsf_link.target_project),
|
folder_tree_options_for_select(DmsfFolder.directory_tree(@dmsf_link.target_project),
|
||||||
:selected => @target_folder_id)) %>
|
:selected => @target_folder_id)) %>
|
||||||
</p>
|
</p>
|
||||||
<% if @type == 'link_from' %>
|
<% if @type == 'link_from' %>
|
||||||
<p>
|
|
||||||
<% if @target_folder_id %>
|
|
||||||
<% folder = DmsfFolder.find_by_id @target_folder_id %>
|
|
||||||
<% files = folder.files.visible if folder %>
|
|
||||||
<% else %>
|
|
||||||
<% files = @dmsf_link.target_project.dmsf_files.visible if @dmsf_link.target_project %>
|
|
||||||
<% end %>
|
|
||||||
<%= f.select(:target_file_id,
|
|
||||||
options_for_select(DmsfFolder.file_list(files), @target_file_id)) %>
|
|
||||||
</p>
|
|
||||||
<% end %>
|
|
||||||
<p>
|
<p>
|
||||||
</div>
|
<% if @target_folder_id %>
|
||||||
<div id="link_external" style="<%= @link_external ? '' : 'display:none' %>">
|
<% folder = DmsfFolder.find_by_id @target_folder_id %>
|
||||||
<%= label_tag('dmsf_link[external_url]', l(:label_link_external_url), :class => 'required') %>
|
<% files = folder.files.visible if folder %>
|
||||||
<%= text_field_tag 'dmsf_link[external_url]', @dmsf_link.external_url, :size => 40, :maxlength => 255 %>
|
<% else %>
|
||||||
</div>
|
<% files = @dmsf_link.target_project.dmsf_files.visible if @dmsf_link.target_project %>
|
||||||
<%= label_tag('dmsf_link[name]', l(:label_link_name), :class => 'required') %>
|
<% end %>
|
||||||
<%= text_field_tag 'dmsf_link[name]', @dmsf_link.name, :size => 40, :maxlength => 255 %>
|
<%= f.select(:target_file_id,
|
||||||
<!--</p>-->
|
options_for_select(DmsfFolder.file_list(files), @target_file_id)) %>
|
||||||
|
</p>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<div id="link_external" style="<%= @link_external ? '' : 'display:none' %>">
|
||||||
|
<p>
|
||||||
|
<label for="dmsf_link[external_url]"><%= l(:label_link_external_url) %><span class="required">*</span></label>
|
||||||
|
<%= text_field_tag 'dmsf_link[external_url]', @dmsf_link.external_url, :size => 40, :maxlength => 255 %>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<p>
|
||||||
|
<label for="dmsf_link[name]"><%= l(:label_link_name) %><span class="required">*</span></label>
|
||||||
|
<%= text_field_tag 'dmsf_link[name]', @dmsf_link.name, :size => 40, :maxlength => 255 %>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<%= f.submit l(:button_create) %>
|
<p><%= f.submit l(:button_create) %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
<%#=
|
<%
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
#
|
#
|
||||||
# Redmine plugin for Document Management System "Features"
|
# Redmine plugin for Document Management System "Features"
|
||||||
#
|
#
|
||||||
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
|
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
|
||||||
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
|
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
|
||||||
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
|
# Copyright (C) 2011-16 Karel Pičman <karel.picman@kontron.com>
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or
|
# This program is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
@ -21,65 +21,62 @@
|
|||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
%>
|
%>
|
||||||
<div class="box dmsf_detail">
|
|
||||||
|
<div class="box tabular">
|
||||||
<%= hidden_field_tag("commited_files[#{i}][disk_filename]", upload.disk_filename) %>
|
<%= hidden_field_tag("commited_files[#{i}][disk_filename]", upload.disk_filename) %>
|
||||||
<div class="clear">
|
<div class="clear">
|
||||||
<div class="splitcontentleft">
|
<div class="splitcontentleft">
|
||||||
<p>
|
<p>
|
||||||
<%= label_tag("commited_files[#{i}][title]", "#{l(:label_title)}:") %>
|
<%= label_tag("commited_files[#{i}][title]", l(:label_title)) %>
|
||||||
<%= text_field_tag("commited_files[#{i}][title]", upload.title, :size => 32) %>
|
<%= text_field_tag("commited_files[#{i}][title]", upload.title, :size => 32) %>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="splitcontentright">
|
<div class="splitcontentright">
|
||||||
<p>
|
<p>
|
||||||
<%= label_tag('', "#{l(:label_filename)}:") %>
|
<%= label_tag('', l(:label_filename)) %>
|
||||||
<%= h(upload.name) %>
|
<%= h(upload.name) %>
|
||||||
<%= hidden_field_tag("commited_files[#{i}][name]", upload.name) %>
|
<%= hidden_field_tag("commited_files[#{i}][name]", upload.name) %>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p class="no-ident">
|
<p>
|
||||||
<%= label_tag("commited_files[#{i}][description]", "#{l(:label_description)}:") %>
|
<%= label_tag("commited_files[#{i}][description]", l(:label_description)) %>
|
||||||
|
<%= text_area_tag("commited_files[#{i}][description]", upload.description, :rows => 6, :class => 'wiki-edit') %>
|
||||||
</p>
|
</p>
|
||||||
<div class="wiki data clear">
|
<div class="clear">
|
||||||
<%= text_area_tag("commited_files[#{i}][description]", upload.description, :rows=> 6, :class => 'wiki-edit') %>
|
<div class="splitcontentleft">
|
||||||
|
<p>
|
||||||
|
<%= label_tag("commited_files[#{i}][version]_minor", l(:label_version)) %>
|
||||||
|
<%= radio_button_tag("commited_files[#{i}][version]", 1, true) %>
|
||||||
|
<%= upload.major_version %>.<%= upload.minor_version + 1 %>
|
||||||
|
<%= l(:option_version_minor) %><br/>
|
||||||
|
<%= radio_button_tag("commited_files[#{i}][version]", 2) %>
|
||||||
|
<%= upload.major_version + 1 %>.0
|
||||||
|
<%= l(:option_version_major) %><br/>
|
||||||
|
<%= radio_button_tag("commited_files[#{i}][version]", 3) %>
|
||||||
|
<%= select_tag "commited_files[#{i}][custom_version_major]", options_for_select(0..99, upload.major_version + 2), :onchange => "$('#commited_files_#{i}_version_3').prop('checked', true)" %>.
|
||||||
|
<%= select_tag "commited_files[#{i}][custom_version_minor]", options_for_select(0..99, upload.minor_version + 1), :onchange => "$('#commited_files_#{i}_version_3').prop('checked', true)" %>
|
||||||
|
<%= l(:option_version_custom) %>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="splitcontentright">
|
||||||
|
<p>
|
||||||
|
<%= label_tag('', l(:label_mime)) %>
|
||||||
|
<%= h(upload.mime_type) %>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<%= label_tag('', l(:label_size)) %>
|
||||||
|
<%= number_to_human_size(upload.size) %>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="splitcontentleft">
|
|
||||||
<p>
|
|
||||||
<%= label_tag("commited_files[#{i}][version]_minor", "#{l(:label_version)}:") %>
|
|
||||||
</p>
|
|
||||||
<div class="data clear">
|
|
||||||
<%= radio_button_tag("commited_files[#{i}][version]", 1, true) %>
|
|
||||||
<%= upload.major_version %>.<%= upload.minor_version + 1 %>
|
|
||||||
<%= l(:option_version_minor) %><br/>
|
|
||||||
<%= radio_button_tag("commited_files[#{i}][version]", 2) %>
|
|
||||||
<%= upload.major_version + 1 %>.0
|
|
||||||
<%= l(:option_version_major) %><br/>
|
|
||||||
<%= radio_button_tag("commited_files[#{i}][version]", 3) %>
|
|
||||||
<%= select_tag "commited_files[#{i}][custom_version_major]", options_for_select(0..99, upload.major_version + 2) %>.<%= select_tag "commited_files[#{i}][custom_version_minor]", options_for_select(0..99, upload.minor_version + 1) %>
|
|
||||||
<%= l(:option_version_custom) %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="splitcontentright clear">
|
|
||||||
<p>
|
|
||||||
<%= label_tag('', "#{l(:label_mime)}:") %>
|
|
||||||
<%= h(upload.mime_type) %>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<%= label_tag('', "#{l(:label_size)}:") %>
|
|
||||||
<%= number_to_human_size(upload.size) %>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<br style="clear: both"/>
|
|
||||||
<% upload.custom_values.each do |value| %>
|
<% upload.custom_values.each do |value| %>
|
||||||
<p><%= custom_field_tag_with_label("commited_files[#{i}][dmsf_file_revision]", value) %></p>
|
<p><%= custom_field_tag_with_label("commited_files[#{i}][dmsf_file_revision]", value) %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
<p>
|
<p>
|
||||||
<%= label_tag("commited_files[#{i}][comment]", "#{l(:label_comment)}:") %>
|
<%= label_tag("commited_files[#{i}][comment]", l(:label_comment)) %>
|
||||||
|
<%= text_area_tag("commited_files[#{i}][comment]", upload.comment, :rows => 2) %>
|
||||||
</p>
|
</p>
|
||||||
<div class="data">
|
|
||||||
<%= text_area_tag("commited_files[#{i}][comment]", upload.comment, :rows => 2, :style => 'width: 99%;') %>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%= wikitoolbar_for "commited_files_#{i}_description" %>
|
<%= wikitoolbar_for "commited_files_#{i}_description" %>
|
||||||
@ -1,7 +1,11 @@
|
|||||||
<%# Redmine plugin for Document Management System "Features"
|
<%
|
||||||
|
# encoding: utf-8
|
||||||
|
#
|
||||||
|
# Redmine plugin for Document Management System "Features"
|
||||||
#
|
#
|
||||||
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
|
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
|
||||||
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
|
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
|
||||||
|
# Copyright (C) 2011-16 Karel Pičman <karel.picman@kontron.com>
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or
|
# This program is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
@ -15,48 +19,57 @@
|
|||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.%>
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
%>
|
||||||
|
|
||||||
<div class="box dmsf_detail">
|
<div class="box tabular">
|
||||||
<%= hidden_field_tag("commited_files[#{i}][disk_filename]", upload.disk_filename) %>
|
<%= hidden_field_tag("commited_files[#{i}][disk_filename]", upload.disk_filename) %>
|
||||||
<%= hidden_field_tag("commited_files[#{i}][name]", upload.name) %>
|
<%= hidden_field_tag("commited_files[#{i}][name]", upload.name) %>
|
||||||
<p class="warning"><%= l(:info_file_locked) %></p>
|
<p class="warning"><%= l(:info_file_locked) %></p>
|
||||||
|
|
||||||
<div class="clear">
|
<div class="clear">
|
||||||
<div class="splitcontentleft">
|
<div class="splitcontentleft">
|
||||||
<p>
|
<p>
|
||||||
<%= label_tag('', "#{l(:label_title)}:") %>
|
<%= label_tag('', l(:label_title)) %>
|
||||||
<%= h(upload.title) %>
|
<%= h(upload.title) %>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="splitcontentright">
|
<div class="splitcontentright">
|
||||||
<p>
|
<p>
|
||||||
<%= label_tag('', "#{l(:label_filename)}:") %>
|
<%= label_tag('', l(:label_filename)) %>
|
||||||
<%= h(upload.name) %>
|
<%= h(upload.name) %>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p class="no-ident">
|
<% if upload.description.present? %>
|
||||||
<%= label_tag('', "#{l(:label_description)}:") %>
|
|
||||||
</p>
|
|
||||||
<div class="wiki data clear">
|
|
||||||
<%= textilizable(upload.description) %>
|
|
||||||
</div>
|
|
||||||
<div class="splitcontentleft">
|
|
||||||
<p>
|
<p>
|
||||||
<%= label_tag('', "#{l(:label_version)}:") %>
|
<%= label_tag('', l(:label_description)) %>
|
||||||
<%= upload.major_version %>.<%= upload.minor_version %>
|
<div class="wiki">
|
||||||
</p>
|
<%= textilizable(upload.description) %>
|
||||||
</div>
|
</div>
|
||||||
<div class="splitcontentright clear">
|
|
||||||
<p>
|
|
||||||
<%= label_tag('', "#{l(:label_mime)}:") %>
|
|
||||||
<%= h(upload.mime_type) %>
|
|
||||||
</p>
|
</p>
|
||||||
|
<% end %>
|
||||||
|
<div class="clear">
|
||||||
|
<div class="splitcontentleft">
|
||||||
|
<p>
|
||||||
|
<%= label_tag('', l(:label_version)) %>
|
||||||
|
<%= upload.major_version %>.<%= upload.minor_version %>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="splitcontentright">
|
||||||
|
<p>
|
||||||
|
<%= label_tag('', l(:label_mime)) %>
|
||||||
|
<%= h(upload.mime_type) %>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<%= label_tag('', l(:label_size)) %>
|
||||||
|
<%= number_to_human_size(upload.size) %>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% if upload.comment.present? %>
|
||||||
<p>
|
<p>
|
||||||
<%= label_tag('', "#{l(:label_size)}:") %>
|
<%= label_tag('', l(:label_comment)) %>
|
||||||
<%= number_to_human_size(upload.size) %>
|
<div class="wiki"><%= textilizable(upload.comment) %></div>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
<% end %>
|
||||||
<br style="clear: both"/>
|
</div>
|
||||||
</div>
|
|
||||||
@ -1,7 +1,11 @@
|
|||||||
<%# Redmine plugin for Document Management System "Features"
|
<%
|
||||||
|
# encoding: utf-8
|
||||||
#
|
#
|
||||||
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
|
# Redmine plugin for Document Management System "Features"
|
||||||
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
|
#
|
||||||
|
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
|
||||||
|
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
|
||||||
|
# Copyright (C) 2011-16 Karel Pičman <karel.picman@kontron.com>
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or
|
# This program is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
@ -19,9 +23,6 @@
|
|||||||
|
|
||||||
<% html_title(l(:dmsf)) %>
|
<% html_title(l(:dmsf)) %>
|
||||||
|
|
||||||
<div class="contextual">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<%= render(:partial => '/dmsf/path', :locals => {:folder => @folder, :filename => nil}) %>
|
<%= render(:partial => '/dmsf/path', :locals => {:folder => @folder, :filename => nil}) %>
|
||||||
|
|
||||||
<div class="wiki">
|
<div class="wiki">
|
||||||
|
|||||||
@ -1,4 +1,7 @@
|
|||||||
<%# Redmine plugin for Document Management System "Features"
|
<%
|
||||||
|
# encoding: utf-8
|
||||||
|
#
|
||||||
|
# Redmine plugin for Document Management System "Features"
|
||||||
#
|
#
|
||||||
# Copyright (C) 2011-16 Karel Pičman <karel.picman@kontron.com>
|
# Copyright (C) 2011-16 Karel Pičman <karel.picman@kontron.com>
|
||||||
#
|
#
|
||||||
@ -29,7 +32,7 @@
|
|||||||
<fieldset>
|
<fieldset>
|
||||||
<legend><%= l(:label_filter_plural) %></legend>
|
<legend><%= l(:label_filter_plural) %></legend>
|
||||||
<label for='status'><%= l(:field_status) %>:</label>
|
<label for='status'><%= l(:field_status) %>:</label>
|
||||||
<%= select_tag 'status', workflows_status_options_for_select(@status), :class => 'small', :onchange => "this.form.submit(); return false;" %>
|
<%= select_tag 'status', workflows_status_options_for_select(@status), :class => 'small', :onchange => 'this.form.submit(); return false;' %>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
|||||||
@ -18,9 +18,9 @@
|
|||||||
|
|
||||||
<% project = Project.find_by_id params[:project_id] if params[:project_id] %>
|
<% project = Project.find_by_id params[:project_id] if params[:project_id] %>
|
||||||
<% if project %>
|
<% if project %>
|
||||||
<h2><%= link_to l(:label_dmsf_workflow_plural), settings_project_path(project, :tab => 'dmsf_workflow') %> » <%=l(:label_dmsf_workflow_new)%></h2>
|
<h2><%= link_to l(:label_dmsf_workflow_plural), settings_project_path(project, :tab => 'dmsf_workflow') %> » <%= l(:label_dmsf_workflow_new) %></h2>
|
||||||
<% else %>
|
<% else %>
|
||||||
<h2><%= link_to l(:label_dmsf_workflow_plural), dmsf_workflows_path %> » <%=l(:label_dmsf_workflow_new)%></h2>
|
<h2><%= link_to l(:label_dmsf_workflow_plural), dmsf_workflows_path %> » <%= l(:label_dmsf_workflow_new) %></h2>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= labelled_form_for @dmsf_workflow do |f| %>
|
<%= labelled_form_for @dmsf_workflow do |f| %>
|
||||||
|
|||||||
@ -25,50 +25,49 @@ button {
|
|||||||
margin-bottom: 1px;
|
margin-bottom: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* DMSF entries list */
|
/* DMSF table.list modifications */
|
||||||
table.entries tbody td, table.entries tbody tr:hover td {
|
table.list th.ui-state-default {
|
||||||
border-left: solid 1px #D7D7D7;
|
border: none;
|
||||||
border-right: solid 1px #D7D7D7;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
table.entries td.modified {
|
table.list td.dmsf_modified {
|
||||||
min-width: 127px;
|
min-width: 127px;
|
||||||
width: 127px;
|
width: 127px;
|
||||||
|
font-size: 0.8em;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.entries td.actions {
|
table.list td.dmsf_title {
|
||||||
|
width: 40%;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.list td.dmsf_buttons {
|
||||||
min-width: 96px;
|
min-width: 96px;
|
||||||
width: 96px;
|
width: 96px;
|
||||||
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.entries td.title {
|
table.list th.dmsf_check, table.list td.dmsf_check {
|
||||||
width: 40%;
|
|
||||||
}
|
|
||||||
|
|
||||||
table.entries th.check, table.entries td.check {
|
|
||||||
width: 17px;
|
width: 17px;
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.entries th.check div.DataTables_sort_wrapper {
|
table.list th.dmsf_check div.DataTables_sort_wrapper {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.display th {
|
table.list td.note {
|
||||||
font-weight: bold;
|
width: 20%;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.display tbody tr.even {
|
table.list td.reorder {
|
||||||
background-color: #F8F8F8;
|
width: 15%;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.display tbody tr.odd {
|
table.list td.step {
|
||||||
background-color: #FFFFFF;
|
text-align: center;
|
||||||
}
|
width: 16px;
|
||||||
|
|
||||||
table.display tbody tr:hover {
|
|
||||||
background-color:#ffffdd;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
form.dmfs_entries {
|
form.dmfs_entries {
|
||||||
@ -76,12 +75,8 @@ form.dmfs_entries {
|
|||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.dataTables_wrapper div.fg-toolbar {
|
|
||||||
font-size: 0.9em;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.dataTables_wrapper div.fg-toolbar input, div.dataTables_wrapper div.fg-toolbar button,
|
div.dataTables_wrapper div.fg-toolbar input, div.dataTables_wrapper div.fg-toolbar button,
|
||||||
div.dataTables_wrapper div.fg-toolbar select {
|
div.dataTables_wrapper div.fg-toolbar select, div.dataTables_wrapper div.fg-toolbar {
|
||||||
font-size: 0.9em;
|
font-size: 0.9em;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,10 +94,6 @@ td.size {
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
td.modified {
|
|
||||||
font-size: 0.8em;
|
|
||||||
}
|
|
||||||
|
|
||||||
td.modified img {
|
td.modified img {
|
||||||
vertical-align:text-top;
|
vertical-align:text-top;
|
||||||
}
|
}
|
||||||
@ -126,7 +117,6 @@ td.workflow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* DMSF entries upload control */
|
/* DMSF entries upload control */
|
||||||
|
|
||||||
.dmsf_upload textarea {
|
.dmsf_upload textarea {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
}
|
}
|
||||||
@ -148,10 +138,7 @@ td.workflow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
div.upload_select {
|
div.upload_select {
|
||||||
float: right;
|
float: right;
|
||||||
white-space: nowrap;
|
|
||||||
line-height: 1.4em;
|
|
||||||
padding-left: 10px;
|
|
||||||
font-size: 0.9em;
|
font-size: 0.9em;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -168,45 +155,6 @@ div.upload_select input, div.upload_select select {
|
|||||||
bottom: 0px;
|
bottom: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* DMSF detail/commit page */
|
|
||||||
|
|
||||||
.dmsf_detail .warning {
|
|
||||||
padding: 4px 4px 4px 30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dmsf_detail div.data {
|
|
||||||
margin-left: 110px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dmsf_detail label {
|
|
||||||
font-weight: bold;
|
|
||||||
width: 100px;
|
|
||||||
float: left;
|
|
||||||
text-align: right;
|
|
||||||
padding-right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
p.no-ident {
|
|
||||||
margin-bottom: 0;
|
|
||||||
margin-top: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
table.access-table tbody td, table.access-table tbody tr:hover td {
|
|
||||||
border: solid 1px #D7D7D7;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Custom field */
|
|
||||||
.dmsf-customfields {
|
|
||||||
margin: 5px 0px 5px 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dmsf-customfields .customfield label {
|
|
||||||
font-weight: bold;
|
|
||||||
width: 100px;
|
|
||||||
display: block;
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Approval workflow */
|
/* Approval workflow */
|
||||||
#admin-menu a.approvalworkflows { background-image: url(../../../images/ticket_go.png); }
|
#admin-menu a.approvalworkflows { background-image: url(../../../images/ticket_go.png); }
|
||||||
#users_for_delegate { height: 200px; overflow:auto; }
|
#users_for_delegate { height: 200px; overflow:auto; }
|
||||||
@ -238,23 +186,6 @@ div.revision_box .ui-widget-header {
|
|||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.list th {
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
table.list td.note {
|
|
||||||
width: 20%;
|
|
||||||
}
|
|
||||||
|
|
||||||
table.list td.reorder {
|
|
||||||
width: 15%;
|
|
||||||
}
|
|
||||||
|
|
||||||
table.list td.step {
|
|
||||||
text-align: center;
|
|
||||||
width: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.log_header_box{
|
.log_header_box{
|
||||||
padding:6px;
|
padding:6px;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
@ -331,11 +262,6 @@ tr.gray .icon-file.application-x-gzip { background-image: url(../images/filetype
|
|||||||
.gray { color: #AAA }
|
.gray { color: #AAA }
|
||||||
.gray a, .gray a:link, .gray a:visited{ color: #484848; text-decoration: none; }
|
.gray a, .gray a:link, .gray a:visited{ color: #484848; text-decoration: none; }
|
||||||
|
|
||||||
label.required:after {
|
|
||||||
content: " *";
|
|
||||||
color: #bb0000;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Search results */
|
/* Search results */
|
||||||
dt.dmsf-file { background-image: url(../../../images/document.png); }
|
dt.dmsf-file { background-image: url(../../../images/document.png); }
|
||||||
dt.dmsf-folder { background-image: url(../../../images/folder.png); }
|
dt.dmsf-folder { background-image: url(../../../images/folder.png); }
|
||||||
|
|||||||
@ -94,11 +94,28 @@ class DmsfLinksTest < RedmineDmsf::Test::UnitTest
|
|||||||
"Folder link #{@folder_link.name} should have not been saved"
|
"Folder link #{@folder_link.name} should have not been saved"
|
||||||
assert_equal 1, @folder_link.errors.count
|
assert_equal 1, @folder_link.errors.count
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_validate_external_url_length
|
||||||
|
@file_link.target_type = 'DmsfUrl'
|
||||||
|
@file_link.external_url = 'https://localhost/' + 'a' * 256
|
||||||
|
assert !@file_link.save,
|
||||||
|
"External URL link #{@file_link.name} should have not been saved"
|
||||||
|
assert_equal 1, @file_link.errors.count
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_validate_external_url_presence
|
||||||
|
@file_link.target_type = 'DmsfUrl'
|
||||||
|
@file_link.external_url = ''
|
||||||
|
assert !@file_link.save,
|
||||||
|
"External URL link #{@file_link.name} should have not been saved"
|
||||||
|
assert_equal 1, @file_link.errors.count
|
||||||
|
end
|
||||||
|
|
||||||
def test_validate_external_url
|
def test_validate_external_url
|
||||||
@file_link.target_type = 'DmsfUrl'
|
@file_link.target_type = 'DmsfUrl'
|
||||||
@file_link.external_url = nil
|
@file_link.external_url = 'htt ps://abc.xyz'
|
||||||
assert !@file_link.save, 'External link should have not been saved'
|
assert !@file_link.save,
|
||||||
|
"External URL link #{@file_link.name} should have not been saved"
|
||||||
assert_equal 1, @file_link.errors.count
|
assert_equal 1, @file_link.errors.count
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user