@@ -1,187 +1,187 | |||||
1 | <% @gantt.view = self %> |
|
1 | <% @gantt.view = self %> | |
2 | <h2><%= @query.new_record? ? l(:label_gantt) : h(@query.name) %></h2> |
|
2 | <h2><%= @query.new_record? ? l(:label_gantt) : h(@query.name) %></h2> | |
3 |
|
3 | |||
4 | <% form_tag({:controller => 'gantts', :action => 'show', :project_id => @project, :month => params[:month], :year => params[:year], :months => params[:months]}, :method => :get, :id => 'query_form') do %> |
|
4 | <% form_tag({:controller => 'gantts', :action => 'show', :project_id => @project, :month => params[:month], :year => params[:year], :months => params[:months]}, :method => :get, :id => 'query_form') do %> | |
5 | <%= hidden_field_tag 'set_filter', '1' %> |
|
5 | <%= hidden_field_tag 'set_filter', '1' %> | |
6 | <fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>"> |
|
6 | <fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>"> | |
7 | <legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend> |
|
7 | <legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend> | |
8 | <div style="<%= @query.new_record? ? "" : "display: none;" %>"> |
|
8 | <div style="<%= @query.new_record? ? "" : "display: none;" %>"> | |
9 | <%= render :partial => 'queries/filters', :locals => {:query => @query} %> |
|
9 | <%= render :partial => 'queries/filters', :locals => {:query => @query} %> | |
10 | </div> |
|
10 | </div> | |
11 | </fieldset> |
|
11 | </fieldset> | |
12 |
|
12 | |||
13 | <p class="contextual"> |
|
13 | <p class="contextual"> | |
14 | <%= gantt_zoom_link(@gantt, :in) %> |
|
14 | <%= gantt_zoom_link(@gantt, :in) %> | |
15 | <%= gantt_zoom_link(@gantt, :out) %> |
|
15 | <%= gantt_zoom_link(@gantt, :out) %> | |
16 | </p> |
|
16 | </p> | |
17 |
|
17 | |||
18 | <p class="buttons"> |
|
18 | <p class="buttons"> | |
19 | <%= text_field_tag 'months', @gantt.months, :size => 2 %> |
|
19 | <%= text_field_tag 'months', @gantt.months, :size => 2 %> | |
20 | <%= l(:label_months_from) %> |
|
20 | <%= l(:label_months_from) %> | |
21 | <%= select_month(@gantt.month_from, :prefix => "month", :discard_type => true) %> |
|
21 | <%= select_month(@gantt.month_from, :prefix => "month", :discard_type => true) %> | |
22 | <%= select_year(@gantt.year_from, :prefix => "year", :discard_type => true) %> |
|
22 | <%= select_year(@gantt.year_from, :prefix => "year", :discard_type => true) %> | |
23 | <%= hidden_field_tag 'zoom', @gantt.zoom %> |
|
23 | <%= hidden_field_tag 'zoom', @gantt.zoom %> | |
24 |
|
24 | |||
25 | <%= link_to_function l(:button_apply), '$("query_form").submit()', :class => 'icon icon-checked' %> |
|
25 | <%= link_to_function l(:button_apply), '$("query_form").submit()', :class => 'icon icon-checked' %> | |
26 | <%= link_to l(:button_clear), { :project_id => @project, :set_filter => 1 }, :class => 'icon icon-reload' %> |
|
26 | <%= link_to l(:button_clear), { :project_id => @project, :set_filter => 1 }, :class => 'icon icon-reload' %> | |
27 | </p> |
|
27 | </p> | |
28 | <% end %> |
|
28 | <% end %> | |
29 |
|
29 | |||
30 | <%= error_messages_for 'query' %> |
|
30 | <%= error_messages_for 'query' %> | |
31 | <% if @query.valid? %> |
|
31 | <% if @query.valid? %> | |
32 | <% zoom = 1 |
|
32 | <% zoom = 1 | |
33 | @gantt.zoom.times { zoom = zoom * 2 } |
|
33 | @gantt.zoom.times { zoom = zoom * 2 } | |
34 |
|
34 | |||
35 | subject_width = 330 |
|
35 | subject_width = 330 | |
36 | header_heigth = 18 |
|
36 | header_heigth = 18 | |
37 |
|
37 | |||
38 | headers_height = header_heigth |
|
38 | headers_height = header_heigth | |
39 | show_weeks = false |
|
39 | show_weeks = false | |
40 | show_days = false |
|
40 | show_days = false | |
41 |
|
41 | |||
42 | if @gantt.zoom > 1 |
|
42 | if @gantt.zoom > 1 | |
43 | show_weeks = true |
|
43 | show_weeks = true | |
44 | headers_height = 2 * header_heigth |
|
44 | headers_height = 2 * header_heigth | |
45 | if @gantt.zoom > 2 |
|
45 | if @gantt.zoom > 2 | |
46 | show_days = true |
|
46 | show_days = true | |
47 | headers_height = 3 * header_heigth |
|
47 | headers_height = 3 * header_heigth | |
48 | end |
|
48 | end | |
49 | end |
|
49 | end | |
50 |
|
50 | |||
51 | # Width of the entire chart |
|
51 | # Width of the entire chart | |
52 | g_width = ((@gantt.date_to - @gantt.date_from + 1) * zoom).to_i |
|
52 | g_width = ((@gantt.date_to - @gantt.date_from + 1) * zoom).to_i | |
53 |
|
53 | |||
54 | @gantt.render(:top => headers_height + 8, :zoom => zoom, :g_width => g_width, :subject_width => subject_width) |
|
54 | @gantt.render(:top => headers_height + 8, :zoom => zoom, :g_width => g_width, :subject_width => subject_width) | |
55 |
|
55 | |||
56 | g_height = [(20 * (@gantt.number_of_rows + 6)) + 150, 206].max |
|
56 | g_height = [(20 * (@gantt.number_of_rows + 6)) + 150, 206].max | |
57 | t_height = g_height + headers_height |
|
57 | t_height = g_height + headers_height | |
58 |
|
58 | |||
59 |
|
59 | |||
60 | %> |
|
60 | %> | |
61 |
|
61 | |||
62 | <% if @gantt.truncated %> |
|
62 | <% if @gantt.truncated %> | |
63 | <p class="warning"><%= l(:notice_gantt_chart_truncated, :max => @gantt.max_rows) %></p> |
|
63 | <p class="warning"><%= l(:notice_gantt_chart_truncated, :max => @gantt.max_rows) %></p> | |
64 | <% end %> |
|
64 | <% end %> | |
65 |
|
65 | |||
66 |
<table |
|
66 | <table style="width:100%; border:0; border-collapse: collapse;"> | |
67 | <tr> |
|
67 | <tr> | |
68 | <td style="width:<%= subject_width %>px; padding:0px;"> |
|
68 | <td style="width:<%= subject_width %>px; padding:0px;"> | |
69 |
|
69 | |||
70 | <div style="position:relative;height:<%= t_height + 24 %>px;width:<%= subject_width + 1 %>px;"> |
|
70 | <div style="position:relative;height:<%= t_height + 24 %>px;width:<%= subject_width + 1 %>px;"> | |
71 | <div style="right:-2px;width:<%= subject_width %>px;height:<%= headers_height %>px;background: #eee;" class="gantt_hdr"></div> |
|
71 | <div style="right:-2px;width:<%= subject_width %>px;height:<%= headers_height %>px;background: #eee;" class="gantt_hdr"></div> | |
72 | <div style="right:-2px;width:<%= subject_width %>px;height:<%= t_height %>px;border-left: 1px solid #c0c0c0;overflow:hidden;" class="gantt_hdr"></div> |
|
72 | <div style="right:-2px;width:<%= subject_width %>px;height:<%= t_height %>px;border-left: 1px solid #c0c0c0;overflow:hidden;" class="gantt_hdr"></div> | |
73 |
|
73 | |||
74 | <div class="gantt_subjects"> |
|
74 | <div class="gantt_subjects"> | |
75 | <%= @gantt.subjects.html_safe %> |
|
75 | <%= @gantt.subjects.html_safe %> | |
76 | </div> |
|
76 | </div> | |
77 |
|
77 | |||
78 | </div> |
|
78 | </div> | |
79 | </td> |
|
79 | </td> | |
80 | <td> |
|
80 | <td> | |
81 |
|
81 | |||
82 | <div style="position:relative;height:<%= t_height + 24 %>px;overflow:auto;"> |
|
82 | <div style="position:relative;height:<%= t_height + 24 %>px;overflow:auto;"> | |
83 | <div style="width:<%= g_width - 1 %>px;height:<%= headers_height %>px;background: #eee;" class="gantt_hdr"> </div> |
|
83 | <div style="width:<%= g_width - 1 %>px;height:<%= headers_height %>px;background: #eee;" class="gantt_hdr"> </div> | |
84 | <% |
|
84 | <% | |
85 | # |
|
85 | # | |
86 | # Months headers |
|
86 | # Months headers | |
87 | # |
|
87 | # | |
88 | month_f = @gantt.date_from |
|
88 | month_f = @gantt.date_from | |
89 | left = 0 |
|
89 | left = 0 | |
90 | height = (show_weeks ? header_heigth : header_heigth + g_height) |
|
90 | height = (show_weeks ? header_heigth : header_heigth + g_height) | |
91 | @gantt.months.times do |
|
91 | @gantt.months.times do | |
92 | width = (((month_f >> 1) - month_f) * zoom - 1).to_i |
|
92 | width = (((month_f >> 1) - month_f) * zoom - 1).to_i | |
93 | %> |
|
93 | %> | |
94 | <div style="left:<%= left %>px;width:<%= width %>px;height:<%= height %>px;" class="gantt_hdr"> |
|
94 | <div style="left:<%= left %>px;width:<%= width %>px;height:<%= height %>px;" class="gantt_hdr"> | |
95 | <%= link_to h("#{month_f.year}-#{month_f.month}"), @gantt.params.merge(:year => month_f.year, :month => month_f.month), :title => "#{month_name(month_f.month)} #{month_f.year}"%> |
|
95 | <%= link_to h("#{month_f.year}-#{month_f.month}"), @gantt.params.merge(:year => month_f.year, :month => month_f.month), :title => "#{month_name(month_f.month)} #{month_f.year}"%> | |
96 | </div> |
|
96 | </div> | |
97 | <% |
|
97 | <% | |
98 | left = left + width + 1 |
|
98 | left = left + width + 1 | |
99 | month_f = month_f >> 1 |
|
99 | month_f = month_f >> 1 | |
100 | end %> |
|
100 | end %> | |
101 |
|
101 | |||
102 | <% |
|
102 | <% | |
103 | # |
|
103 | # | |
104 | # Weeks headers |
|
104 | # Weeks headers | |
105 | # |
|
105 | # | |
106 | if show_weeks |
|
106 | if show_weeks | |
107 | left = 0 |
|
107 | left = 0 | |
108 | height = (show_days ? header_heigth - 1 : header_heigth - 1 + g_height) |
|
108 | height = (show_days ? header_heigth - 1 : header_heigth - 1 + g_height) | |
109 | if @gantt.date_from.cwday == 1 |
|
109 | if @gantt.date_from.cwday == 1 | |
110 | # @date_from is monday |
|
110 | # @date_from is monday | |
111 | week_f = @gantt.date_from |
|
111 | week_f = @gantt.date_from | |
112 | else |
|
112 | else | |
113 | # find next monday after @date_from |
|
113 | # find next monday after @date_from | |
114 | week_f = @gantt.date_from + (7 - @gantt.date_from.cwday + 1) |
|
114 | week_f = @gantt.date_from + (7 - @gantt.date_from.cwday + 1) | |
115 | width = (7 - @gantt.date_from.cwday + 1) * zoom - 1 |
|
115 | width = (7 - @gantt.date_from.cwday + 1) * zoom - 1 | |
116 | %> |
|
116 | %> | |
117 | <div style="left:<%= left %>px;top:19px;width:<%= width %>px;height:<%= height %>px;" class="gantt_hdr"> </div> |
|
117 | <div style="left:<%= left %>px;top:19px;width:<%= width %>px;height:<%= height %>px;" class="gantt_hdr"> </div> | |
118 | <% |
|
118 | <% | |
119 | left = left + width + 1 |
|
119 | left = left + width + 1 | |
120 | end %> |
|
120 | end %> | |
121 | <% |
|
121 | <% | |
122 | while week_f <= @gantt.date_to |
|
122 | while week_f <= @gantt.date_to | |
123 | width = ((week_f + 6 <= @gantt.date_to) ? 7 * zoom - 1 : (@gantt.date_to - week_f + 1) * zoom - 1).to_i |
|
123 | width = ((week_f + 6 <= @gantt.date_to) ? 7 * zoom - 1 : (@gantt.date_to - week_f + 1) * zoom - 1).to_i | |
124 | %> |
|
124 | %> | |
125 | <div style="left:<%= left %>px;top:19px;width:<%= width %>px;height:<%= height %>px;" class="gantt_hdr"> |
|
125 | <div style="left:<%= left %>px;top:19px;width:<%= width %>px;height:<%= height %>px;" class="gantt_hdr"> | |
126 | <small><%= week_f.cweek if width >= 16 %></small> |
|
126 | <small><%= week_f.cweek if width >= 16 %></small> | |
127 | </div> |
|
127 | </div> | |
128 | <% |
|
128 | <% | |
129 | left = left + width + 1 |
|
129 | left = left + width + 1 | |
130 | week_f = week_f + 7 |
|
130 | week_f = week_f + 7 | |
131 | end |
|
131 | end | |
132 | end %> |
|
132 | end %> | |
133 |
|
133 | |||
134 | <% |
|
134 | <% | |
135 | # |
|
135 | # | |
136 | # Days headers |
|
136 | # Days headers | |
137 | # |
|
137 | # | |
138 | if show_days |
|
138 | if show_days | |
139 | left = 0 |
|
139 | left = 0 | |
140 | height = g_height + header_heigth - 1 |
|
140 | height = g_height + header_heigth - 1 | |
141 | wday = @gantt.date_from.cwday |
|
141 | wday = @gantt.date_from.cwday | |
142 | (@gantt.date_to - @gantt.date_from + 1).to_i.times do |
|
142 | (@gantt.date_to - @gantt.date_from + 1).to_i.times do | |
143 | width = zoom - 1 |
|
143 | width = zoom - 1 | |
144 | %> |
|
144 | %> | |
145 | <div style="left:<%= left %>px;top:37px;width:<%= width %>px;height:<%= height %>px;font-size:0.7em;<%= "background:#f1f1f1;" if wday > 5 %>" class="gantt_hdr"> |
|
145 | <div style="left:<%= left %>px;top:37px;width:<%= width %>px;height:<%= height %>px;font-size:0.7em;<%= "background:#f1f1f1;" if wday > 5 %>" class="gantt_hdr"> | |
146 | <%= day_name(wday).first %> |
|
146 | <%= day_name(wday).first %> | |
147 | </div> |
|
147 | </div> | |
148 | <% |
|
148 | <% | |
149 | left = left + width + 1 |
|
149 | left = left + width + 1 | |
150 | wday = wday + 1 |
|
150 | wday = wday + 1 | |
151 | wday = 1 if wday > 7 |
|
151 | wday = 1 if wday > 7 | |
152 | end |
|
152 | end | |
153 | end %> |
|
153 | end %> | |
154 |
|
154 | |||
155 | <%= @gantt.lines.html_safe %> |
|
155 | <%= @gantt.lines.html_safe %> | |
156 |
|
156 | |||
157 | <% |
|
157 | <% | |
158 | # |
|
158 | # | |
159 | # Today red line (excluded from cache) |
|
159 | # Today red line (excluded from cache) | |
160 | # |
|
160 | # | |
161 | if Date.today >= @gantt.date_from and Date.today <= @gantt.date_to %> |
|
161 | if Date.today >= @gantt.date_from and Date.today <= @gantt.date_to %> | |
162 | <div style="position: absolute;height:<%= g_height %>px;top:<%= headers_height + 1 %>px;left:<%= (((Date.today - @gantt.date_from + 1) * zoom).floor() - 1).to_i %>px;width:10px;border-left: 1px dashed red;"> </div> |
|
162 | <div style="position: absolute;height:<%= g_height %>px;top:<%= headers_height + 1 %>px;left:<%= (((Date.today - @gantt.date_from + 1) * zoom).floor() - 1).to_i %>px;width:10px;border-left: 1px dashed red;"> </div> | |
163 | <% end %> |
|
163 | <% end %> | |
164 |
|
164 | |||
165 | </div> |
|
165 | </div> | |
166 | </td> |
|
166 | </td> | |
167 | </tr> |
|
167 | </tr> | |
168 | </table> |
|
168 | </table> | |
169 |
|
169 | |||
170 |
<table |
|
170 | <table style="width:100%"> | |
171 | <tr> |
|
171 | <tr> | |
172 | <td align="left"><%= link_to_content_update("\xc2\xab " + l(:label_previous), params.merge(@gantt.params_previous)) %></td> |
|
172 | <td align="left"><%= link_to_content_update("\xc2\xab " + l(:label_previous), params.merge(@gantt.params_previous)) %></td> | |
173 | <td align="right"><%= link_to_content_update(l(:label_next) + " \xc2\xbb", params.merge(@gantt.params_next)) %></td> |
|
173 | <td align="right"><%= link_to_content_update(l(:label_next) + " \xc2\xbb", params.merge(@gantt.params_next)) %></td> | |
174 | </tr> |
|
174 | </tr> | |
175 | </table> |
|
175 | </table> | |
176 |
|
176 | |||
177 | <% other_formats_links do |f| %> |
|
177 | <% other_formats_links do |f| %> | |
178 | <%= f.link_to 'PDF', :url => params.merge(@gantt.params) %> |
|
178 | <%= f.link_to 'PDF', :url => params.merge(@gantt.params) %> | |
179 | <%= f.link_to('PNG', :url => params.merge(@gantt.params)) if @gantt.respond_to?('to_image') %> |
|
179 | <%= f.link_to('PNG', :url => params.merge(@gantt.params)) if @gantt.respond_to?('to_image') %> | |
180 | <% end %> |
|
180 | <% end %> | |
181 | <% end # query.valid? %> |
|
181 | <% end # query.valid? %> | |
182 |
|
182 | |||
183 | <% content_for :sidebar do %> |
|
183 | <% content_for :sidebar do %> | |
184 | <%= render :partial => 'issues/sidebar' %> |
|
184 | <%= render :partial => 'issues/sidebar' %> | |
185 | <% end %> |
|
185 | <% end %> | |
186 |
|
186 | |||
187 | <% html_title(l(:label_gantt)) -%> |
|
187 | <% html_title(l(:label_gantt)) -%> |
@@ -1,53 +1,53 | |||||
1 |
<table |
|
1 | <table style="width:100%"> | |
2 | <tr> |
|
2 | <tr> | |
3 | <td> |
|
3 | <td> | |
4 | <table> |
|
4 | <table> | |
5 | <% query.available_filters.sort{|a,b| a[1][:order]<=>b[1][:order]}.each do |filter| %> |
|
5 | <% query.available_filters.sort{|a,b| a[1][:order]<=>b[1][:order]}.each do |filter| %> | |
6 | <% field = filter[0] |
|
6 | <% field = filter[0] | |
7 | options = filter[1] %> |
|
7 | options = filter[1] %> | |
8 | <tr <%= 'style="display:none;"' unless query.has_filter?(field) %> id="tr_<%= field %>" class="filter"> |
|
8 | <tr <%= 'style="display:none;"' unless query.has_filter?(field) %> id="tr_<%= field %>" class="filter"> | |
9 | <td class="field"> |
|
9 | <td class="field"> | |
10 | <%= check_box_tag 'f[]', field, query.has_filter?(field), :onclick => "toggle_filter('#{field}');", :id => "cb_#{field}" %> |
|
10 | <%= check_box_tag 'f[]', field, query.has_filter?(field), :onclick => "toggle_filter('#{field}');", :id => "cb_#{field}" %> | |
11 | <label for="cb_<%= field %>"><%= filter[1][:name] || l(("field_"+field.to_s.gsub(/\_id$/, "")).to_sym) %></label> |
|
11 | <label for="cb_<%= field %>"><%= filter[1][:name] || l(("field_"+field.to_s.gsub(/\_id$/, "")).to_sym) %></label> | |
12 | </td> |
|
12 | </td> | |
13 | <td class="operator"> |
|
13 | <td class="operator"> | |
14 | <%= label_tag "operators_#{field}", l(:description_filter), :class => "hidden-for-sighted" %> |
|
14 | <%= label_tag "operators_#{field}", l(:description_filter), :class => "hidden-for-sighted" %> | |
15 | <%= select_tag "op[#{field}]", options_for_select(operators_for_select(options[:type]), |
|
15 | <%= select_tag "op[#{field}]", options_for_select(operators_for_select(options[:type]), | |
16 | query.operator_for(field)), :id => "operators_#{field}", |
|
16 | query.operator_for(field)), :id => "operators_#{field}", | |
17 | :onchange => "toggle_operator('#{field}');" %> |
|
17 | :onchange => "toggle_operator('#{field}');" %> | |
18 | </td> |
|
18 | </td> | |
19 | <td class="values"> |
|
19 | <td class="values"> | |
20 | <div id="div_values_<%= field %>" style="display:none;"> |
|
20 | <div id="div_values_<%= field %>" style="display:none;"> | |
21 | <% case options[:type] |
|
21 | <% case options[:type] | |
22 | when :list, :list_optional, :list_status, :list_subprojects %> |
|
22 | when :list, :list_optional, :list_status, :list_subprojects %> | |
23 | <span class="span_values_<%= field %>"> |
|
23 | <span class="span_values_<%= field %>"> | |
24 | <%= select_tag "v[#{field}][]", options_for_select(options[:values], query.values_for(field)), :class => "values_#{field}", :id => "values_#{field}_1", :multiple => (query.values_for(field) && query.values_for(field).length > 1) %> |
|
24 | <%= select_tag "v[#{field}][]", options_for_select(options[:values], query.values_for(field)), :class => "values_#{field}", :id => "values_#{field}_1", :multiple => (query.values_for(field) && query.values_for(field).length > 1) %> | |
25 | <%= link_to_function image_tag('bullet_toggle_plus.png'), "toggle_multi_select('values_#{field}_1');" %> |
|
25 | <%= link_to_function image_tag('bullet_toggle_plus.png'), "toggle_multi_select('values_#{field}_1');" %> | |
26 | </span> |
|
26 | </span> | |
27 | <% when :date, :date_past %> |
|
27 | <% when :date, :date_past %> | |
28 | <span class="span_values_<%= field %>"><%= text_field_tag "v[#{field}][]", query.value_for(field), :size => 10, :class => "values_#{field}", :id => "values_#{field}_1" %> <%= calendar_for "values_#{field}_1" %></span> |
|
28 | <span class="span_values_<%= field %>"><%= text_field_tag "v[#{field}][]", query.value_for(field), :size => 10, :class => "values_#{field}", :id => "values_#{field}_1" %> <%= calendar_for "values_#{field}_1" %></span> | |
29 | <span class="span_values_<%= field %>"><%= text_field_tag "v[#{field}][]", query.value_for(field, 1), :size => 10, :class => "values_#{field}", :id => "values_#{field}_2" %> <%= calendar_for "values_#{field}_2" %></span> |
|
29 | <span class="span_values_<%= field %>"><%= text_field_tag "v[#{field}][]", query.value_for(field, 1), :size => 10, :class => "values_#{field}", :id => "values_#{field}_2" %> <%= calendar_for "values_#{field}_2" %></span> | |
30 | <span class="span_values_<%= field %>"><%= text_field_tag "v[#{field}][]", query.value_for(field), :size => 3, :class => "values_#{field}" %> <%= l(:label_day_plural) %></span> |
|
30 | <span class="span_values_<%= field %>"><%= text_field_tag "v[#{field}][]", query.value_for(field), :size => 3, :class => "values_#{field}" %> <%= l(:label_day_plural) %></span> | |
31 | <% when :string, :text %> |
|
31 | <% when :string, :text %> | |
32 | <span class="span_values_<%= field %>"><%= text_field_tag "v[#{field}][]", query.value_for(field), :class => "values_#{field}", :id => "values_#{field}", :size => 30 %></span> |
|
32 | <span class="span_values_<%= field %>"><%= text_field_tag "v[#{field}][]", query.value_for(field), :class => "values_#{field}", :id => "values_#{field}", :size => 30 %></span> | |
33 | <% when :integer, :float %> |
|
33 | <% when :integer, :float %> | |
34 | <span class="span_values_<%= field %>"><%= text_field_tag "v[#{field}][]", query.value_for(field), :class => "values_#{field}", :id => "values_#{field}_1", :size => 6 %></span> |
|
34 | <span class="span_values_<%= field %>"><%= text_field_tag "v[#{field}][]", query.value_for(field), :class => "values_#{field}", :id => "values_#{field}_1", :size => 6 %></span> | |
35 | <span class="span_values_<%= field %>"><%= text_field_tag "v[#{field}][]", query.value_for(field, 1), :class => "values_#{field}", :id => "values_#{field}_2", :size => 6 %></span> |
|
35 | <span class="span_values_<%= field %>"><%= text_field_tag "v[#{field}][]", query.value_for(field, 1), :class => "values_#{field}", :id => "values_#{field}_2", :size => 6 %></span> | |
36 | <% end %> |
|
36 | <% end %> | |
37 | </div> |
|
37 | </div> | |
38 | <script type="text/javascript">toggle_filter('<%= field %>');</script> |
|
38 | <script type="text/javascript">toggle_filter('<%= field %>');</script> | |
39 | </td> |
|
39 | </td> | |
40 | </tr> |
|
40 | </tr> | |
41 | <% end %> |
|
41 | <% end %> | |
42 | </table> |
|
42 | </table> | |
43 | </td> |
|
43 | </td> | |
44 | <td class="add-filter"> |
|
44 | <td class="add-filter"> | |
45 | <%= label_tag('add_filter_select', l(:label_filter_add)) %> |
|
45 | <%= label_tag('add_filter_select', l(:label_filter_add)) %> | |
46 | <%= select_tag 'add_filter_select', options_for_select([["",""]] + query.available_filters.sort{|a,b| a[1][:order]<=>b[1][:order]}.collect{|field| [ field[1][:name] || l(("field_"+field[0].to_s.gsub(/_id$/, "")).to_sym), field[0]] unless query.has_filter?(field[0])}.compact), |
|
46 | <%= select_tag 'add_filter_select', options_for_select([["",""]] + query.available_filters.sort{|a,b| a[1][:order]<=>b[1][:order]}.collect{|field| [ field[1][:name] || l(("field_"+field[0].to_s.gsub(/_id$/, "")).to_sym), field[0]] unless query.has_filter?(field[0])}.compact), | |
47 | :onchange => "add_filter();", |
|
47 | :onchange => "add_filter();", | |
48 | :name => nil %> |
|
48 | :name => nil %> | |
49 | </td> |
|
49 | </td> | |
50 | </tr> |
|
50 | </tr> | |
51 | </table> |
|
51 | </table> | |
52 | <%= hidden_field_tag 'f[]', '' %> |
|
52 | <%= hidden_field_tag 'f[]', '' %> | |
53 | <%= javascript_tag 'Event.observe(window,"load",apply_filters_observer);' %> |
|
53 | <%= javascript_tag 'Event.observe(window,"load",apply_filters_observer);' %> |
@@ -1,66 +1,66 | |||||
1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|
1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
2 | <html xmlns="http://www.w3.org/1999/xhtml"> |
|
2 | <html xmlns="http://www.w3.org/1999/xhtml"> | |
3 | <head> |
|
3 | <head> | |
4 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
|
4 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
5 | <meta http-equiv="Content-Style-Type" content="text/css" /> |
|
5 | <meta http-equiv="Content-Style-Type" content="text/css" /> | |
6 | <title>Wiki formatting</title> |
|
6 | <title>Wiki formatting</title> | |
7 | <style type="text/css"> |
|
7 | <style type="text/css"> | |
8 | h1 { font-family: Verdana, sans-serif; font-size: 14px; text-align: center; color: #444; } |
|
8 | h1 { font-family: Verdana, sans-serif; font-size: 14px; text-align: center; color: #444; } | |
9 | body { font-family: Verdana, sans-serif; font-size: 12px; color: #444; } |
|
9 | body { font-family: Verdana, sans-serif; font-size: 12px; color: #444; } | |
10 | table th { padding-top: 1em; } |
|
10 | table th { padding-top: 1em; } | |
11 | table td { vertical-align: top; background-color: #f5f5f5; height: 2em; vertical-align: middle;} |
|
11 | table td { vertical-align: top; background-color: #f5f5f5; height: 2em; vertical-align: middle;} | |
12 | table td code { font-size: 1.2em; } |
|
12 | table td code { font-size: 1.2em; } | |
13 | table td h1 { font-size: 1.8em; text-align: left; } |
|
13 | table td h1 { font-size: 1.8em; text-align: left; } | |
14 | table td h2 { font-size: 1.4em; text-align: left; } |
|
14 | table td h2 { font-size: 1.4em; text-align: left; } | |
15 | table td h3 { font-size: 1.2em; text-align: left; } |
|
15 | table td h3 { font-size: 1.2em; text-align: left; } | |
16 |
|
16 | |||
17 | </style> |
|
17 | </style> | |
18 | </head> |
|
18 | </head> | |
19 | <body> |
|
19 | <body> | |
20 |
|
20 | |||
21 | <h1>Wiki Syntax Quick Reference</h1> |
|
21 | <h1>Wiki Syntax Quick Reference</h1> | |
22 |
|
22 | |||
23 |
<table |
|
23 | <table style="width:100%"> | |
24 | <tr><th colspan="3">Font Styles</th></tr> |
|
24 | <tr><th colspan="3">Font Styles</th></tr> | |
25 | <tr><th><img src="../images/jstoolbar/bt_strong.png" style="border: 1px solid #bbb;" alt="Strong" /></th><td width="50%">*Strong*</td><td width="50%"><strong>Strong</strong></td></tr> |
|
25 | <tr><th><img src="../images/jstoolbar/bt_strong.png" style="border: 1px solid #bbb;" alt="Strong" /></th><td width="50%">*Strong*</td><td width="50%"><strong>Strong</strong></td></tr> | |
26 | <tr><th><img src="../images/jstoolbar/bt_em.png" style="border: 1px solid #bbb;" alt="Italic" /></th><td>_Italic_</td><td><em>Italic</em></td></tr> |
|
26 | <tr><th><img src="../images/jstoolbar/bt_em.png" style="border: 1px solid #bbb;" alt="Italic" /></th><td>_Italic_</td><td><em>Italic</em></td></tr> | |
27 | <tr><th><img src="../images/jstoolbar/bt_ins.png" style="border: 1px solid #bbb;" alt="Underline" /></th><td>+Underline+</td><td><ins>Underline</ins></td></tr> |
|
27 | <tr><th><img src="../images/jstoolbar/bt_ins.png" style="border: 1px solid #bbb;" alt="Underline" /></th><td>+Underline+</td><td><ins>Underline</ins></td></tr> | |
28 | <tr><th><img src="../images/jstoolbar/bt_del.png" style="border: 1px solid #bbb;" alt="Deleted" /></th><td>-Deleted-</td><td><del>Deleted</del></td></tr> |
|
28 | <tr><th><img src="../images/jstoolbar/bt_del.png" style="border: 1px solid #bbb;" alt="Deleted" /></th><td>-Deleted-</td><td><del>Deleted</del></td></tr> | |
29 | <tr><th></th><td>??Quote??</td><td><cite>Quote</cite></td></tr> |
|
29 | <tr><th></th><td>??Quote??</td><td><cite>Quote</cite></td></tr> | |
30 | <tr><th><img src="../images/jstoolbar/bt_code.png" style="border: 1px solid #bbb;" alt="Inline Code" /></th><td>@Inline Code@</td><td><code>Inline Code</code></td></tr> |
|
30 | <tr><th><img src="../images/jstoolbar/bt_code.png" style="border: 1px solid #bbb;" alt="Inline Code" /></th><td>@Inline Code@</td><td><code>Inline Code</code></td></tr> | |
31 | <tr><th><img src="../images/jstoolbar/bt_pre.png" style="border: 1px solid #bbb;" alt="Preformatted text" /></th><td><pre><br /> lines<br /> of code<br /></pre></td><td> |
|
31 | <tr><th><img src="../images/jstoolbar/bt_pre.png" style="border: 1px solid #bbb;" alt="Preformatted text" /></th><td><pre><br /> lines<br /> of code<br /></pre></td><td> | |
32 | <pre> |
|
32 | <pre> | |
33 | lines |
|
33 | lines | |
34 | of code |
|
34 | of code | |
35 | </pre> |
|
35 | </pre> | |
36 | </td></tr> |
|
36 | </td></tr> | |
37 |
|
37 | |||
38 | <tr><th colspan="3">Lists</th></tr> |
|
38 | <tr><th colspan="3">Lists</th></tr> | |
39 | <tr><th><img src="../images/jstoolbar/bt_ul.png" style="border: 1px solid #bbb;" alt="Unordered list" /></th><td>* Item 1<br />* Item 2</td><td><ul><li>Item 1</li><li>Item 2</li></ul></td></tr> |
|
39 | <tr><th><img src="../images/jstoolbar/bt_ul.png" style="border: 1px solid #bbb;" alt="Unordered list" /></th><td>* Item 1<br />* Item 2</td><td><ul><li>Item 1</li><li>Item 2</li></ul></td></tr> | |
40 | <tr><th><img src="../images/jstoolbar/bt_ol.png" style="border: 1px solid #bbb;" alt="Ordered list" /></th><td># Item 1<br /># Item 2</td><td><ol><li>Item 1</li><li>Item 2</li></ol></td></tr> |
|
40 | <tr><th><img src="../images/jstoolbar/bt_ol.png" style="border: 1px solid #bbb;" alt="Ordered list" /></th><td># Item 1<br /># Item 2</td><td><ol><li>Item 1</li><li>Item 2</li></ol></td></tr> | |
41 |
|
41 | |||
42 | <tr><th colspan="3">Headings</th></tr> |
|
42 | <tr><th colspan="3">Headings</th></tr> | |
43 | <tr><th><img src="../images/jstoolbar/bt_h1.png" style="border: 1px solid #bbb;" alt="Heading 1" /></th><td>h1. Title 1</td><td><h1>Title 1</h1></td></tr> |
|
43 | <tr><th><img src="../images/jstoolbar/bt_h1.png" style="border: 1px solid #bbb;" alt="Heading 1" /></th><td>h1. Title 1</td><td><h1>Title 1</h1></td></tr> | |
44 | <tr><th><img src="../images/jstoolbar/bt_h2.png" style="border: 1px solid #bbb;" alt="Heading 2" /></th><td>h2. Title 2</td><td><h2>Title 2</h2></td></tr> |
|
44 | <tr><th><img src="../images/jstoolbar/bt_h2.png" style="border: 1px solid #bbb;" alt="Heading 2" /></th><td>h2. Title 2</td><td><h2>Title 2</h2></td></tr> | |
45 | <tr><th><img src="../images/jstoolbar/bt_h3.png" style="border: 1px solid #bbb;" alt="Heading 3" /></th><td>h3. Title 3</td><td><h3>Title 3</h3></td></tr> |
|
45 | <tr><th><img src="../images/jstoolbar/bt_h3.png" style="border: 1px solid #bbb;" alt="Heading 3" /></th><td>h3. Title 3</td><td><h3>Title 3</h3></td></tr> | |
46 |
|
46 | |||
47 | <tr><th colspan="3">Links</th></tr> |
|
47 | <tr><th colspan="3">Links</th></tr> | |
48 | <tr><th></th><td>http://foo.bar</td><td><a href="#">http://foo.bar</a></td></tr> |
|
48 | <tr><th></th><td>http://foo.bar</td><td><a href="#">http://foo.bar</a></td></tr> | |
49 | <tr><th></th><td>"Foo":http://foo.bar</td><td><a href="#">Foo</a></td></tr> |
|
49 | <tr><th></th><td>"Foo":http://foo.bar</td><td><a href="#">Foo</a></td></tr> | |
50 |
|
50 | |||
51 | <tr><th colspan="3">Redmine links</th></tr> |
|
51 | <tr><th colspan="3">Redmine links</th></tr> | |
52 | <tr><th><img src="../images/jstoolbar/bt_link.png" style="border: 1px solid #bbb;" alt="Link to a Wiki page" /></th><td>[[Wiki page]]</td><td><a href="#">Wiki page</a></td></tr> |
|
52 | <tr><th><img src="../images/jstoolbar/bt_link.png" style="border: 1px solid #bbb;" alt="Link to a Wiki page" /></th><td>[[Wiki page]]</td><td><a href="#">Wiki page</a></td></tr> | |
53 | <tr><th></th><td>Issue #12</td><td>Issue <a href="#">#12</a></td></tr> |
|
53 | <tr><th></th><td>Issue #12</td><td>Issue <a href="#">#12</a></td></tr> | |
54 | <tr><th></th><td>Revision r43</td><td>Revision <a href="#">r43</a></td></tr> |
|
54 | <tr><th></th><td>Revision r43</td><td>Revision <a href="#">r43</a></td></tr> | |
55 | <tr><th></th><td>commit:f30e13e43</td><td><a href="#">f30e13e4</a></td></tr> |
|
55 | <tr><th></th><td>commit:f30e13e43</td><td><a href="#">f30e13e4</a></td></tr> | |
56 | <tr><th></th><td>source:some/file</td><td><a href="#">source:some/file</a></td></tr> |
|
56 | <tr><th></th><td>source:some/file</td><td><a href="#">source:some/file</a></td></tr> | |
57 |
|
57 | |||
58 | <tr><th colspan="3">Inline images</th></tr> |
|
58 | <tr><th colspan="3">Inline images</th></tr> | |
59 | <tr><th><img src="../images/jstoolbar/bt_img.png" style="border: 1px solid #bbb;" alt="Image" /></th><td>!<em>image_url</em>!</td><td></td></tr> |
|
59 | <tr><th><img src="../images/jstoolbar/bt_img.png" style="border: 1px solid #bbb;" alt="Image" /></th><td>!<em>image_url</em>!</td><td></td></tr> | |
60 | <tr><th></th><td>!<em>attached_image</em>!</td><td></td></tr> |
|
60 | <tr><th></th><td>!<em>attached_image</em>!</td><td></td></tr> | |
61 | </table> |
|
61 | </table> | |
62 |
|
62 | |||
63 | <p><a href="wiki_syntax_detailed.html" onclick="window.open('wiki_syntax_detailed.html', '', ''); return false;">More Information</a></p> |
|
63 | <p><a href="wiki_syntax_detailed.html" onclick="window.open('wiki_syntax_detailed.html', '', ''); return false;">More Information</a></p> | |
64 |
|
64 | |||
65 | </body> |
|
65 | </body> | |
66 | </html> |
|
66 | </html> |
General Comments 0
You need to be logged in to leave comments.
Login now