annotate .svn/pristine/24/243de4e756633dfdaa9bf4c362c62553c376fead.svn-base @ 1477:f2ad2199b49a bibplugin_integration

Close obsolete branch bibplugin_integration
author Chris Cannam
date Fri, 30 Nov 2012 14:41:31 +0000
parents cbb26bc654de
children
rev   line source
Chris@909 1 # encoding: utf-8
Chris@909 2 #
Chris@909 3 # Redmine - project management software
Chris@909 4 # Copyright (C) 2006-2011 Jean-Philippe Lang
Chris@909 5 #
Chris@909 6 # This program is free software; you can redistribute it and/or
Chris@909 7 # modify it under the terms of the GNU General Public License
Chris@909 8 # as published by the Free Software Foundation; either version 2
Chris@909 9 # of the License, or (at your option) any later version.
Chris@909 10 #
Chris@909 11 # This program is distributed in the hope that it will be useful,
Chris@909 12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
Chris@909 13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Chris@909 14 # GNU General Public License for more details.
Chris@909 15 #
Chris@909 16 # You should have received a copy of the GNU General Public License
Chris@909 17 # along with this program; if not, write to the Free Software
Chris@909 18 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Chris@909 19
Chris@909 20 module GanttHelper
Chris@909 21
Chris@909 22 def gantt_zoom_link(gantt, in_or_out)
Chris@909 23 case in_or_out
Chris@909 24 when :in
Chris@909 25 if gantt.zoom < 4
Chris@909 26 link_to_content_update l(:text_zoom_in),
Chris@909 27 params.merge(gantt.params.merge(:zoom => (gantt.zoom+1))),
Chris@909 28 :class => 'icon icon-zoom-in'
Chris@909 29 else
Chris@909 30 content_tag('span', l(:text_zoom_in), :class => 'icon icon-zoom-in').html_safe
Chris@909 31 end
Chris@909 32
Chris@909 33 when :out
Chris@909 34 if gantt.zoom > 1
Chris@909 35 link_to_content_update l(:text_zoom_out),
Chris@909 36 params.merge(gantt.params.merge(:zoom => (gantt.zoom-1))),
Chris@909 37 :class => 'icon icon-zoom-out'
Chris@909 38 else
Chris@909 39 content_tag('span', l(:text_zoom_out), :class => 'icon icon-zoom-out').html_safe
Chris@909 40 end
Chris@909 41 end
Chris@909 42 end
Chris@909 43 end