summaryrefslogtreecommitdiffstats
path: root/app/helpers
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2018-10-04 13:20:11 +0000
committerGo MAEDA <maeda@farend.jp>2018-10-04 13:20:11 +0000
commitdcc7ecb34a61d55193572ca8bc66c9859f3d6e49 (patch)
tree8f6e5c9e422a9c4fc2e2a7c46bfd054e54e2441c /app/helpers
parent28c231473f98a4b184204dd53cbeee1e0d655853 (diff)
downloadredmine-dcc7ecb34a61d55193572ca8bc66c9859f3d6e49.tar.gz
redmine-dcc7ecb34a61d55193572ca8bc66c9859f3d6e49.zip
Attachments prev/next navigation (#29395).
Patch by Jens Krämer. git-svn-id: http://svn.redmine.org/redmine/trunk@17567 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/attachments_helper.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/helpers/attachments_helper.rb b/app/helpers/attachments_helper.rb
index 36cf0d4fe..385f3b8a4 100644
--- a/app/helpers/attachments_helper.rb
+++ b/app/helpers/attachments_helper.rb
@@ -56,6 +56,14 @@ module AttachmentsHelper
end
end
+ def render_pagination
+ pagination_links_each @paginator do |text, parameters, options|
+ if att = @attachments[parameters[:page] - 1]
+ link_to text, named_attachment_path(att, att.filename)
+ end
+ end if @paginator
+ end
+
def render_api_attachment(attachment, api, options={})
api.attachment do
render_api_attachment_attributes(attachment, api)