#1563 delete_link
This commit is contained in:
parent
9f4ef78452
commit
fa62c09d87
16
README.md
16
README.md
@ -228,18 +228,22 @@ instance is stopped.
|
||||
|
||||
`RAILS_ENV=production bundle exec rake redmine:plugins:migrate NAME=redmine_dmsf`
|
||||
|
||||
6. The access rights must be set for web server, e.g.:
|
||||
6. Install assets
|
||||
|
||||
`RAILS_ENV="production" bundle exec rake assets:precompile`
|
||||
|
||||
7. The access rights must be set for web server, e.g.:
|
||||
|
||||
`chown -R www-data:www-data plugins/redmine_dmsf`.
|
||||
|
||||
7. Restart the web server, e.g.:
|
||||
8. Restart the web server, e.g.:
|
||||
|
||||
`systemctl restart apache2`
|
||||
|
||||
8. You should configure the plugin via Redmine interface: Administration -> Plugins -> DMSF -> Configure. (You should check and then save the plugin's configuration after each upgrade.)
|
||||
9. Don't forget to grant permissions for DMSF in Administration -> Roles and permissions
|
||||
10. Assign DMSF permissions to appropriate roles.
|
||||
11. There are a few rake tasks:
|
||||
9. You should configure the plugin via Redmine interface: Administration -> Plugins -> DMSF -> Configure. (You should check and then save the plugin's configuration after each upgrade.)
|
||||
10. Don't forget to grant permissions for DMSF in Administration -> Roles and permissions
|
||||
11. Assign DMSF permissions to appropriate roles.
|
||||
12. There are a few rake tasks:
|
||||
|
||||
I) To convert documents from the standard Redmine document module
|
||||
|
||||
|
||||
@ -125,7 +125,7 @@
|
||||
<br>
|
||||
<% end %>
|
||||
<span class="search_for_watchers">
|
||||
<%= link_to l(:label_user_search_add),
|
||||
<%= link_to sprite_icon('add', l(:label_search_for_watchers), size: 12),
|
||||
new_dmsf_folder_permissions_path(project_id: @project, dmsf_folder_id: @folder),
|
||||
remote: true,
|
||||
method: :get %>
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
|
||||
<div class="contextual">
|
||||
<% if @file_delete_allowed %>
|
||||
<%= link_to sprite_icon('del', l(:label_empty_trash_bin)), empty_trash_path(id: @project), class: 'icon icon-del' %>
|
||||
<%= delete_link empty_trash_path(id: @project), {}, l(:label_empty_trash_bin) %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
||||
@ -30,8 +30,9 @@
|
||||
obsolete_revision_path(revision),
|
||||
data: { confirm: l(:text_are_you_sure) },
|
||||
class: 'icon icon-close dmsf-revision-action-button' if file_manipulation_allowed && (revision.workflow == DmsfWorkflow::STATE_APPROVED) %>
|
||||
<%= link_to sprite_icon('del', l(:button_delete)),
|
||||
delete_revision_path(revision),
|
||||
data: { confirm: l(:text_are_you_sure) },
|
||||
<% if file_delete_allowed && (file.dmsf_file_revisions.visible.count > 1) %>
|
||||
<%= delete_link delete_revision_path(revision),
|
||||
{ data: { confirm: l(:text_are_you_sure) },
|
||||
title: l(:title_delete_revision),
|
||||
class: 'icon icon-del dmsf-revision-action-button' if file_delete_allowed && (file.dmsf_file_revisions.visible.count > 1) %>
|
||||
class: 'icon icon-del dmsf-revision-action-button' } %>
|
||||
<% end %>
|
||||
@ -41,6 +41,6 @@
|
||||
options_for_select(DmsfUploadHelper::minor_version_select_options, minor_version),
|
||||
class: 'dmsf-select-version' %>
|
||||
<b>.</b>
|
||||
<%= select_tag select_tag_name_patch, options_for_select(DmsfUploadHelper::patch_version_select_options,
|
||||
[h(' '), '']), class: 'dmsf-select-version' %>
|
||||
<%= select_tag select_tag_name_patch, options_for_select(DmsfUploadHelper::patch_version_select_options, ' '),
|
||||
class: 'dmsf-select-version' %>
|
||||
<% end %>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 5.1 KiB |
@ -394,5 +394,5 @@ div.dmsf-scroll {
|
||||
|
||||
/* Wiki toolbar */
|
||||
.jstb_dmsf {
|
||||
background-image: url("../images/jstoolbar/bt_dmsf.png");
|
||||
background-image: url("/document.png");
|
||||
}
|
||||
@ -54,7 +54,7 @@ if Redmine::Plugin.installed? 'redmine_dmsf'
|
||||
post '/projects/dmsf/append_email', to: 'dmsf#append_email', as: 'append_email_dmsf'
|
||||
get '/projects/dmsf/autocomplete_for_user', to: 'dmsf#autocomplete_for_user'
|
||||
put '/projects/:id/dmsf', controller: 'dmsf', action: 'drop'
|
||||
get '/projects/:id/dmsf/empty_trash', to: 'dmsf#empty_trash', as: 'empty_trash'
|
||||
delete '/projects/:id/dmsf/empty_trash', to: 'dmsf#empty_trash', as: 'empty_trash'
|
||||
get '/dmsf', to: 'dmsf#index', as: 'dmsf_index'
|
||||
get '/dmsf/digest', to: 'dmsf#digest', as: 'dmsf_digest'
|
||||
post '/dmsf/digest', to: 'dmsf#reset_digest', as: 'dmsf_reset_digest'
|
||||
@ -114,7 +114,7 @@ if Redmine::Plugin.installed? 'redmine_dmsf'
|
||||
get '/dmsf/files/:id/unlock', controller: 'dmsf_files', action: 'unlock', as: 'unlock_dmsf_files'
|
||||
post '/dmsf/files/:id/delete', controller: 'dmsf_files', action: 'delete', as: 'delete_dmsf_files'
|
||||
post '/dmsf/files/:id/revision/create', controller: 'dmsf_files', action: 'create_revision'
|
||||
get '/dmsf/files/:id/revision/delete', controller: 'dmsf_files', action: 'delete_revision', as: 'delete_revision'
|
||||
delete '/dmsf/files/:id/revision/delete', controller: 'dmsf_files', action: 'delete_revision', as: 'delete_revision'
|
||||
get '/dmsf/files/:id/revision/obsolete', controller: 'dmsf_files',
|
||||
action: 'obsolete_revision',
|
||||
as: 'obsolete_revision'
|
||||
|
||||
@ -106,7 +106,7 @@ class DmsfControllerTest < RedmineDmsf::Test::TestCase
|
||||
|
||||
def test_empty_trash
|
||||
post '/login', params: { username: 'jsmith', password: 'jsmith' }
|
||||
get "/projects/#{@project1.id}/dmsf/empty_trash"
|
||||
delete "/projects/#{@project1.id}/dmsf/empty_trash"
|
||||
assert_equal 0, DmsfFolder.deleted.where(project_id: @project1.id).all.size
|
||||
assert_equal 0, DmsfFile.deleted.where(project_id: @project1.id).all.size
|
||||
assert_equal 0, DmsfLink.deleted.where(project_id: @project1.id).all.size
|
||||
@ -117,7 +117,7 @@ class DmsfControllerTest < RedmineDmsf::Test::TestCase
|
||||
# Missing permissions
|
||||
post '/login', params: { username: 'jsmith', password: 'jsmith' }
|
||||
@role_manager.remove_permission! :file_delete
|
||||
get "/projects/#{@project1.id}/dmsf/empty_trash"
|
||||
delete "/projects/#{@project1.id}/dmsf/empty_trash"
|
||||
assert_response :forbidden
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user