diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-05-26 15:42:37 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-05-26 15:42:37 +0000 |
commit | f8ef65e8f64111b5bfa45abd42e0e684afd61f07 (patch) | |
tree | f38d893e289b9eb42f7732eeb33c225b8379ad41 /app/helpers/attachments_helper.rb | |
parent | 6446c312beab7e23162827a79bd9ab6f9e4d7958 (diff) | |
download | redmine-f8ef65e8f64111b5bfa45abd42e0e684afd61f07.tar.gz redmine-f8ef65e8f64111b5bfa45abd42e0e684afd61f07.zip |
Attachments can now be added to wiki pages (original patch by Pavol Murin). Only authorized users can add/delete attachments.
Attached images can be displayed inline, using textile image tag (for wiki pages, issue descriptions and forum messages).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@541 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers/attachments_helper.rb')
-rw-r--r-- | app/helpers/attachments_helper.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/app/helpers/attachments_helper.rb b/app/helpers/attachments_helper.rb new file mode 100644 index 000000000..989cd3e66 --- /dev/null +++ b/app/helpers/attachments_helper.rb @@ -0,0 +1,25 @@ +# redMine - project management software +# Copyright (C) 2006-2007 Jean-Philippe Lang +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +module AttachmentsHelper + # displays the links to a collection of attachments + def link_to_attachments(attachments, options = {}) + if attachments.any? + render :partial => 'attachments/links', :locals => {:attachments => attachments, :options => options} + end + end +end |