@@ -18,27 +18,25 | |||
|
18 | 18 | module GanttHelper |
|
19 | 19 | |
|
20 | 20 | def gantt_zoom_link(gantt, in_or_out) |
|
21 | img_attributes = {:style => 'height:1.4em; width:1.4em; margin-left: 3px;'} # em for accessibility | |
|
22 | ||
|
23 | 21 | case in_or_out |
|
24 | 22 | when :in |
|
25 | 23 | if gantt.zoom < 4 |
|
26 | link_to_remote(l(:text_zoom_in) + image_tag('zoom_in.png', img_attributes.merge(:alt => l(:text_zoom_in))), | |
|
24 | link_to_remote(l(:text_zoom_in), | |
|
27 | 25 | {:url => gantt.params.merge(:zoom => (gantt.zoom+1)), :method => :get, :update => 'content'}, |
|
28 |
{:href => url_for(gantt.params.merge(:zoom => (gantt.zoom+1))) |
|
|
26 | {:href => url_for(gantt.params.merge(:zoom => (gantt.zoom+1))), | |
|
27 | :class => 'icon icon-zoom-in'}) | |
|
29 | 28 | else |
|
30 | l(:text_zoom_in) + | |
|
31 | image_tag('zoom_in_g.png', img_attributes.merge(:alt => l(:text_zoom_in))) | |
|
29 | content_tag('span', l(:text_zoom_in), :class => 'icon icon-zoom-in') | |
|
32 | 30 | end |
|
33 | 31 | |
|
34 | 32 | when :out |
|
35 | 33 | if gantt.zoom > 1 |
|
36 | link_to_remote(l(:text_zoom_out) + image_tag('zoom_out.png', img_attributes.merge(:alt => l(:text_zoom_out))), | |
|
34 | link_to_remote(l(:text_zoom_out), | |
|
37 | 35 | {:url => gantt.params.merge(:zoom => (gantt.zoom-1)), :method => :get, :update => 'content'}, |
|
38 |
{:href => url_for(gantt.params.merge(:zoom => (gantt.zoom-1))) |
|
|
36 | {:href => url_for(gantt.params.merge(:zoom => (gantt.zoom-1))), | |
|
37 | :class => 'icon icon-zoom-out'}) | |
|
39 | 38 | else |
|
40 | l(:text_zoom_out) + | |
|
41 | image_tag('zoom_out_g.png', img_attributes.merge(:alt => l(:text_zoom_out))) | |
|
39 | content_tag('span', l(:text_zoom_out), :class => 'icon icon-zoom-out') | |
|
42 | 40 | end |
|
43 | 41 | end |
|
44 | 42 | end |
@@ -10,7 +10,7 | |||
|
10 | 10 | </div> |
|
11 | 11 | </fieldset> |
|
12 | 12 | |
|
13 | <p style="float:right;"> | |
|
13 | <p class="contextual"> | |
|
14 | 14 | <%= gantt_zoom_link(@gantt, :in) %> |
|
15 | 15 | <%= gantt_zoom_link(@gantt, :out) %> |
|
16 | 16 | </p> |
@@ -854,6 +854,8 padding-bottom: 3px; | |||
|
854 | 854 | .icon-summary { background-image: url(../images/lightning.png); } |
|
855 | 855 | .icon-server-authentication { background-image: url(../images/server_key.png); } |
|
856 | 856 | .icon-issue { background-image: url(../images/ticket.png); } |
|
857 | .icon-zoom-in { background-image: url(../images/zoom_in.png); } | |
|
858 | .icon-zoom-out { background-image: url(../images/zoom_out.png); } | |
|
857 | 859 | |
|
858 | 860 | .icon-file { background-image: url(../images/files/default.png); } |
|
859 | 861 | .icon-file.text-plain { background-image: url(../images/files/text.png); } |
General Comments 0
You need to be logged in to leave comments.
Login now