Merge branch 'master' into devel-2.4.4
This commit is contained in:
commit
f3f9454e27
@ -49,6 +49,9 @@ after_script:
|
|||||||
- bash -x ./test/ci/redmine_install.sh -u
|
- bash -x ./test/ci/redmine_install.sh -u
|
||||||
|
|
||||||
env:
|
env:
|
||||||
|
- DB=sqlite REDMINE_GIT_TAG=4.0-stable
|
||||||
|
- DB=mysql REDMINE_GIT_TAG=4.0-stable
|
||||||
|
- DB=postgres REDMINE_GIT_TAG=4.0-stable
|
||||||
- DB=sqlite REDMINE_GIT_TAG=4.1-stable
|
- DB=sqlite REDMINE_GIT_TAG=4.1-stable
|
||||||
- DB=mysql REDMINE_GIT_TAG=4.1-stable
|
- DB=mysql REDMINE_GIT_TAG=4.1-stable
|
||||||
- DB=postgres REDMINE_GIT_TAG=4.1-stable
|
- DB=postgres REDMINE_GIT_TAG=4.1-stable
|
||||||
|
|||||||
@ -36,12 +36,12 @@ Features
|
|||||||
* Documents and folders symbolic links
|
* Documents and folders symbolic links
|
||||||
* Trash bin
|
* Trash bin
|
||||||
* Documents attachable to issues
|
* Documents attachable to issues
|
||||||
* Compatible with Redmine 4.1.x
|
* Compatible with Redmine 4.0.x and 4.1.x
|
||||||
|
|
||||||
Dependencies
|
Dependencies
|
||||||
------------
|
------------
|
||||||
|
|
||||||
* Redmine 4.1.0 or higher
|
* Redmine 4.0.0 or higher
|
||||||
|
|
||||||
### Full-text search (optional)
|
### Full-text search (optional)
|
||||||
|
|
||||||
@ -224,7 +224,7 @@ You can either clone the master branch or download the latest zipped version. Be
|
|||||||
|
|
||||||
`RAILS_ENV=production bundle exec rake db:migrate`
|
`RAILS_ENV=production bundle exec rake db:migrate`
|
||||||
|
|
||||||
`RAILS_ENV=production bundle exec rake plugins:migrate NAME=redmine_dmsf`
|
`RAILS_ENV=production bundle exec rake redmine:plugins:migrate NAME=redmine_dmsf`
|
||||||
5. The access rights must be set for web server, example: `chown -R www-data:www-data plugins/redmine_dmsf`.
|
5. The access rights must be set for web server, example: `chown -R www-data:www-data plugins/redmine_dmsf`.
|
||||||
6. Restart the web server, e.g. `systemctl apache2 restart`
|
6. Restart the web server, e.g. `systemctl apache2 restart`
|
||||||
7. You should configure the plugin via Redmine interface: Administration -> Plugins -> DMSF -> Configure.
|
7. You should configure the plugin via Redmine interface: Administration -> Plugins -> DMSF -> Configure.
|
||||||
|
|||||||
@ -85,7 +85,8 @@ class DmsfFilesController < ApplicationController
|
|||||||
@revision = @file.last_revision
|
@revision = @file.last_revision
|
||||||
@file_delete_allowed = User.current.allowed_to?(:file_delete, @project)
|
@file_delete_allowed = User.current.allowed_to?(:file_delete, @project)
|
||||||
@file_manipulation_allowed = User.current.allowed_to?(:file_manipulation, @project)
|
@file_manipulation_allowed = User.current.allowed_to?(:file_manipulation, @project)
|
||||||
@revision_pages = Paginator.new @file.dmsf_file_revisions.visible.count, params['per_page'] ? params['per_page'].to_i : 25, params['page']
|
@revision_count = @file.dmsf_file_revisions.visible.all.size
|
||||||
|
@revision_pages = Paginator.new @revision_count, params['per_page'] ? params['per_page'].to_i : 25, params['page']
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html {
|
format.html {
|
||||||
|
|||||||
@ -35,7 +35,7 @@ class DmsfFileRevisionAccessQuery < Query
|
|||||||
QueryColumn.new(:last_at, frozen: true)
|
QueryColumn.new(:last_at, frozen: true)
|
||||||
]
|
]
|
||||||
|
|
||||||
def initialize(attributes)
|
def initialize(attributes=nil, *args)
|
||||||
super attributes
|
super attributes
|
||||||
self.sort_criteria = []
|
self.sort_criteria = []
|
||||||
self.filters = {}
|
self.filters = {}
|
||||||
@ -73,8 +73,6 @@ class DmsfFileRevisionAccessQuery < Query
|
|||||||
@available_columns
|
@available_columns
|
||||||
end
|
end
|
||||||
|
|
||||||
#alias default_columns_names available_columns
|
|
||||||
|
|
||||||
######################################################################################################################
|
######################################################################################################################
|
||||||
# New
|
# New
|
||||||
|
|
||||||
@ -82,7 +80,7 @@ class DmsfFileRevisionAccessQuery < Query
|
|||||||
base_scope.
|
base_scope.
|
||||||
access_grouped.
|
access_grouped.
|
||||||
joins(:user).
|
joins(:user).
|
||||||
order('`count` DESC').
|
order(Arel.sql('COUNT(*) DESC')).
|
||||||
limit(options[:limit]).
|
limit(options[:limit]).
|
||||||
offset(options[:offset])
|
offset(options[:offset])
|
||||||
end
|
end
|
||||||
|
|||||||
@ -135,7 +135,7 @@ class DmsfQuery < Query
|
|||||||
# New
|
# New
|
||||||
|
|
||||||
def dmsf_nodes(options={})
|
def dmsf_nodes(options={})
|
||||||
order_option = ['sort', group_by_sort_order, (options[:order] || sort_clause[0]), 'title'].flatten.reject(&:blank?)
|
order_option = ['sort', group_by_sort_order, (options[:order] || sort_clause[0])].flatten.reject(&:blank?)
|
||||||
if order_option.size > 2
|
if order_option.size > 2
|
||||||
DmsfFileRevisionCustomField.visible.pluck(:id, :name).each do |id, name|
|
DmsfFileRevisionCustomField.visible.pluck(:id, :name).each do |id, name|
|
||||||
order_option[1].gsub!("COALESCE(cf_#{id}.value, '')", "\"#{name}\"")
|
order_option[1].gsub!("COALESCE(cf_#{id}.value, '')", "\"#{name}\"")
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
<li>
|
<li>
|
||||||
<%= context_menu_link l(:button_edit), dmsf_file_path(id: dmsf_file), class: 'icon icon-edit',
|
<%= context_menu_link l(:button_edit), dmsf_file_path(id: dmsf_file), class: 'icon icon-edit',
|
||||||
disabled: !allowed || locked %>
|
disabled: !allowed || (locked && !unlockable) %>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<%= link_to "#{l(:button_copy)}/#{l(:button_move)}", copy_file_path(id: dmsf_file),
|
<%= link_to "#{l(:button_copy)}/#{l(:button_move)}", copy_file_path(id: dmsf_file),
|
||||||
|
|||||||
@ -44,4 +44,3 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<span class="pagination"><%= pagination_links_full revision_access_pages, revision_access_count %></span>
|
|
||||||
|
|||||||
@ -158,20 +158,14 @@
|
|||||||
<% if @file_manipulation_allowed %>
|
<% if @file_manipulation_allowed %>
|
||||||
<% revision_access_query = DmsfFileRevisionAccessQuery.new %>
|
<% revision_access_query = DmsfFileRevisionAccessQuery.new %>
|
||||||
<% revision_access_query.revision_id = revision.id %>
|
<% revision_access_query.revision_id = revision.id %>
|
||||||
<% revision_access_count = revision_access_query.access_count %>
|
<%= render partial: 'revision_access', locals: { revision: revision, query: revision_access_query } %>
|
||||||
<% revision_access_pages = Redmine::Pagination::Paginator.new revision_access_count,
|
|
||||||
Setting.per_page_options_array.first || 25, params['page'] %>
|
|
||||||
<%= render partial: 'revision_access', locals: { revision: revision, query: revision_access_query,
|
|
||||||
revision_access_count: revision_access_count,
|
|
||||||
revision_access_pages: revision_access_pages } %>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br/>
|
<br/>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<span class="pagination"><%= pagination_links_full @revision_pages, @revision_count %></span>
|
||||||
<span class="pagination"><%= pagination_links_full @revision_pages, @file.dmsf_file_revisions.visible.count %></span>
|
|
||||||
|
|
||||||
<%= late_javascript_tag do %>
|
<%= late_javascript_tag do %>
|
||||||
$('a.delete-revision').click(function(event) {
|
$('a.delete-revision').click(function(event) {
|
||||||
|
|||||||
2
init.rb
2
init.rb
@ -35,7 +35,7 @@ Redmine::Plugin.register :redmine_dmsf do
|
|||||||
description 'Document Management System Features'
|
description 'Document Management System Features'
|
||||||
version '2.4.4 devel'
|
version '2.4.4 devel'
|
||||||
|
|
||||||
requires_redmine version_or_higher: '4.1.0'
|
requires_redmine version_or_higher: '4.0.0'
|
||||||
|
|
||||||
settings partial: 'settings/dmsf_settings',
|
settings partial: 'settings/dmsf_settings',
|
||||||
default: {
|
default: {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user