diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-11-29 13:41:53 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-11-29 13:41:53 +0000 |
commit | 288c014aa7aa608751dbafeb2c8b358f2fec5c22 (patch) | |
tree | 68a5705092edc501641630fa960cee368d27ca88 /app/helpers/attachments_helper.rb | |
parent | 3c7f638a834d6d9717e3d8babe3bab6af5100994 (diff) | |
download | redmine-288c014aa7aa608751dbafeb2c8b358f2fec5c22.tar.gz redmine-288c014aa7aa608751dbafeb2c8b358f2fec5c22.zip |
Edit attachments after upload (#1326).
git-svn-id: http://svn.redmine.org/redmine/trunk@13665 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers/attachments_helper.rb')
-rw-r--r-- | app/helpers/attachments_helper.rb | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/app/helpers/attachments_helper.rb b/app/helpers/attachments_helper.rb index d86fe0dbe..387ed99d7 100644 --- a/app/helpers/attachments_helper.rb +++ b/app/helpers/attachments_helper.rb @@ -18,6 +18,15 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. module AttachmentsHelper + + def container_attachments_edit_path(container) + object_attachments_edit_path container.class.name.underscore.pluralize, container.id + end + + def container_attachments_path(container) + object_attachments_path container.class.name.underscore.pluralize, container.id + end + # Displays view/delete links to the attachments of the given object # Options: # :author -- author names are not displayed if set to false @@ -28,7 +37,12 @@ module AttachmentsHelper if container.attachments.any? options = {:deletable => container.attachments_deletable?, :author => true}.merge(options) render :partial => 'attachments/links', - :locals => {:attachments => container.attachments, :options => options, :thumbnails => (options[:thumbnails] && Setting.thumbnails_enabled?)} + :locals => { + :container => container, + :attachments => container.attachments, + :options => options, + :thumbnails => (options[:thumbnails] && Setting.thumbnails_enabled?) + } end end |