##// END OF EJS Templates
Added missing labels to the Issue Calendar....
Eric Davis -
r3632:51d3f511599d
parent child
Show More
@@ -1,54 +1,56
1 <h2><%= l(:label_calendar) %></h2>
1 <h2><%= l(:label_calendar) %></h2>
2
2
3 <% form_tag({}, :id => 'query_form') do %>
3 <% form_tag({}, :id => 'query_form') do %>
4 <fieldset id="filters" class="collapsible">
4 <fieldset id="filters" class="collapsible">
5 <legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend>
5 <legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend>
6 <div>
6 <div>
7 <%= render :partial => 'queries/filters', :locals => {:query => @query} %>
7 <%= render :partial => 'queries/filters', :locals => {:query => @query} %>
8 </div>
8 </div>
9 </fieldset>
9 </fieldset>
10
10
11 <p style="float:right;">
11 <p style="float:right;">
12 <%= link_to_remote ('&#171; ' + (@month==1 ? "#{month_name(12)} #{@year-1}" : "#{month_name(@month-1)}")),
12 <%= link_to_remote ('&#171; ' + (@month==1 ? "#{month_name(12)} #{@year-1}" : "#{month_name(@month-1)}")),
13 {:update => "content", :url => { :year => (@month==1 ? @year-1 : @year), :month =>(@month==1 ? 12 : @month-1) }},
13 {:update => "content", :url => { :year => (@month==1 ? @year-1 : @year), :month =>(@month==1 ? 12 : @month-1) }},
14 {:href => url_for(:action => 'show', :year => (@month==1 ? @year-1 : @year), :month =>(@month==1 ? 12 : @month-1))}
14 {:href => url_for(:action => 'show', :year => (@month==1 ? @year-1 : @year), :month =>(@month==1 ? 12 : @month-1))}
15 %> |
15 %> |
16 <%= link_to_remote ((@month==12 ? "#{month_name(1)} #{@year+1}" : "#{month_name(@month+1)}") + ' &#187;'),
16 <%= link_to_remote ((@month==12 ? "#{month_name(1)} #{@year+1}" : "#{month_name(@month+1)}") + ' &#187;'),
17 {:update => "content", :url => { :year => (@month==12 ? @year+1 : @year), :month =>(@month==12 ? 1 : @month+1) }},
17 {:update => "content", :url => { :year => (@month==12 ? @year+1 : @year), :month =>(@month==12 ? 1 : @month+1) }},
18 {:href => url_for(:action => 'show', :year => (@month==12 ? @year+1 : @year), :month =>(@month==12 ? 1 : @month+1))}
18 {:href => url_for(:action => 'show', :year => (@month==12 ? @year+1 : @year), :month =>(@month==12 ? 1 : @month+1))}
19 %>
19 %>
20 </p>
20 </p>
21
21
22 <p class="buttons">
22 <p class="buttons">
23 <%= label_tag('month', l(:label_month)) %>
23 <%= select_month(@month, :prefix => "month", :discard_type => true) %>
24 <%= select_month(@month, :prefix => "month", :discard_type => true) %>
25 <%= label_tag('year', l(:label_year)) %>
24 <%= select_year(@year, :prefix => "year", :discard_type => true) %>
26 <%= select_year(@year, :prefix => "year", :discard_type => true) %>
25
27
26 <%= link_to_remote l(:button_apply),
28 <%= link_to_remote l(:button_apply),
27 { :url => { :set_filter => (@query.new_record? ? 1 : nil) },
29 { :url => { :set_filter => (@query.new_record? ? 1 : nil) },
28 :update => "content",
30 :update => "content",
29 :with => "Form.serialize('query_form')"
31 :with => "Form.serialize('query_form')"
30 }, :class => 'icon icon-checked' %>
32 }, :class => 'icon icon-checked' %>
31
33
32 <%= link_to_remote l(:button_clear),
34 <%= link_to_remote l(:button_clear),
33 { :url => { :set_filter => (@query.new_record? ? 1 : nil) },
35 { :url => { :set_filter => (@query.new_record? ? 1 : nil) },
34 :update => "content",
36 :update => "content",
35 }, :class => 'icon icon-reload' if @query.new_record? %>
37 }, :class => 'icon icon-reload' if @query.new_record? %>
36 </p>
38 </p>
37 <% end %>
39 <% end %>
38
40
39 <%= error_messages_for 'query' %>
41 <%= error_messages_for 'query' %>
40 <% if @query.valid? %>
42 <% if @query.valid? %>
41 <%= render :partial => 'common/calendar', :locals => {:calendar => @calendar} %>
43 <%= render :partial => 'common/calendar', :locals => {:calendar => @calendar} %>
42
44
43 <p class="legend cal">
45 <p class="legend cal">
44 <span class="starting"><%= l(:text_tip_task_begin_day) %></span>
46 <span class="starting"><%= l(:text_tip_task_begin_day) %></span>
45 <span class="ending"><%= l(:text_tip_task_end_day) %></span>
47 <span class="ending"><%= l(:text_tip_task_end_day) %></span>
46 <span class="starting ending"><%= l(:text_tip_task_begin_end_day) %></span>
48 <span class="starting ending"><%= l(:text_tip_task_begin_end_day) %></span>
47 </p>
49 </p>
48 <% end %>
50 <% end %>
49
51
50 <% content_for :sidebar do %>
52 <% content_for :sidebar do %>
51 <%= render :partial => 'issues/sidebar' %>
53 <%= render :partial => 'issues/sidebar' %>
52 <% end %>
54 <% end %>
53
55
54 <% html_title(l(:label_calendar)) -%>
56 <% html_title(l(:label_calendar)) -%>
@@ -1,104 +1,104
1 <script type="text/javascript">
1 <script type="text/javascript">
2 //<![CDATA[
2 //<![CDATA[
3 function add_filter() {
3 function add_filter() {
4 select = $('add_filter_select');
4 select = $('add_filter_select');
5 field = select.value
5 field = select.value
6 Element.show('tr_' + field);
6 Element.show('tr_' + field);
7 check_box = $('cb_' + field);
7 check_box = $('cb_' + field);
8 check_box.checked = true;
8 check_box.checked = true;
9 toggle_filter(field);
9 toggle_filter(field);
10 select.selectedIndex = 0;
10 select.selectedIndex = 0;
11
11
12 for (i=0; i<select.options.length; i++) {
12 for (i=0; i<select.options.length; i++) {
13 if (select.options[i].value == field) {
13 if (select.options[i].value == field) {
14 select.options[i].disabled = true;
14 select.options[i].disabled = true;
15 }
15 }
16 }
16 }
17 }
17 }
18
18
19 function toggle_filter(field) {
19 function toggle_filter(field) {
20 check_box = $('cb_' + field);
20 check_box = $('cb_' + field);
21
21
22 if (check_box.checked) {
22 if (check_box.checked) {
23 Element.show("operators_" + field);
23 Element.show("operators_" + field);
24 toggle_operator(field);
24 toggle_operator(field);
25 } else {
25 } else {
26 Element.hide("operators_" + field);
26 Element.hide("operators_" + field);
27 Element.hide("div_values_" + field);
27 Element.hide("div_values_" + field);
28 }
28 }
29 }
29 }
30
30
31 function toggle_operator(field) {
31 function toggle_operator(field) {
32 operator = $("operators_" + field);
32 operator = $("operators_" + field);
33 switch (operator.value) {
33 switch (operator.value) {
34 case "!*":
34 case "!*":
35 case "*":
35 case "*":
36 case "t":
36 case "t":
37 case "w":
37 case "w":
38 case "o":
38 case "o":
39 case "c":
39 case "c":
40 Element.hide("div_values_" + field);
40 Element.hide("div_values_" + field);
41 break;
41 break;
42 default:
42 default:
43 Element.show("div_values_" + field);
43 Element.show("div_values_" + field);
44 break;
44 break;
45 }
45 }
46 }
46 }
47
47
48 function toggle_multi_select(field) {
48 function toggle_multi_select(field) {
49 select = $('values_' + field);
49 select = $('values_' + field);
50 if (select.multiple == true) {
50 if (select.multiple == true) {
51 select.multiple = false;
51 select.multiple = false;
52 } else {
52 } else {
53 select.multiple = true;
53 select.multiple = true;
54 }
54 }
55 }
55 }
56 //]]>
56 //]]>
57 </script>
57 </script>
58
58
59 <table width="100%">
59 <table width="100%">
60 <tr>
60 <tr>
61 <td>
61 <td>
62 <table>
62 <table>
63 <% query.available_filters.sort{|a,b| a[1][:order]<=>b[1][:order]}.each do |filter| %>
63 <% query.available_filters.sort{|a,b| a[1][:order]<=>b[1][:order]}.each do |filter| %>
64 <% field = filter[0]
64 <% field = filter[0]
65 options = filter[1] %>
65 options = filter[1] %>
66 <tr <%= 'style="display:none;"' unless query.has_filter?(field) %> id="tr_<%= field %>" class="filter">
66 <tr <%= 'style="display:none;"' unless query.has_filter?(field) %> id="tr_<%= field %>" class="filter">
67 <td style="width:200px;">
67 <td style="width:200px;">
68 <%= check_box_tag 'fields[]', field, query.has_filter?(field), :onclick => "toggle_filter('#{field}');", :id => "cb_#{field}" %>
68 <%= check_box_tag 'fields[]', field, query.has_filter?(field), :onclick => "toggle_filter('#{field}');", :id => "cb_#{field}" %>
69 <label for="cb_<%= field %>"><%= filter[1][:name] || l(("field_"+field.to_s.gsub(/\_id$/, "")).to_sym) %></label>
69 <label for="cb_<%= field %>"><%= filter[1][:name] || l(("field_"+field.to_s.gsub(/\_id$/, "")).to_sym) %></label>
70 </td>
70 </td>
71 <td style="width:150px;">
71 <td style="width:150px;">
72 <%= select_tag "operators[#{field}]", options_for_select(operators_for_select(options[:type]), query.operator_for(field)), :id => "operators_#{field}", :onchange => "toggle_operator('#{field}');", :class => "select-small", :style => "vertical-align: top;" %>
72 <%= select_tag "operators[#{field}]", options_for_select(operators_for_select(options[:type]), query.operator_for(field)), :id => "operators_#{field}", :onchange => "toggle_operator('#{field}');", :class => "select-small", :style => "vertical-align: top;" %>
73 </td>
73 </td>
74 <td>
74 <td>
75 <div id="div_values_<%= field %>" style="display:none;">
75 <div id="div_values_<%= field %>" style="display:none;">
76 <% case options[:type]
76 <% case options[:type]
77 when :list, :list_optional, :list_status, :list_subprojects %>
77 when :list, :list_optional, :list_status, :list_subprojects %>
78 <select <%= "multiple=true" if query.values_for(field) and query.values_for(field).length > 1 %> name="values[<%= field %>][]" id="values_<%= field %>" class="select-small" style="vertical-align: top;">
78 <select <%= "multiple=true" if query.values_for(field) and query.values_for(field).length > 1 %> name="values[<%= field %>][]" id="values_<%= field %>" class="select-small" style="vertical-align: top;">
79 <%= options_for_select options[:values], query.values_for(field) %>
79 <%= options_for_select options[:values], query.values_for(field) %>
80 </select>
80 </select>
81 <%= link_to_function image_tag('bullet_toggle_plus.png'), "toggle_multi_select('#{field}');", :style => "vertical-align: bottom;" %>
81 <%= link_to_function image_tag('bullet_toggle_plus.png'), "toggle_multi_select('#{field}');", :style => "vertical-align: bottom;" %>
82 <% when :date, :date_past %>
82 <% when :date, :date_past %>
83 <%= text_field_tag "values[#{field}][]", query.values_for(field), :id => "values_#{field}", :size => 3, :class => "select-small" %> <%= l(:label_day_plural) %>
83 <%= text_field_tag "values[#{field}][]", query.values_for(field), :id => "values_#{field}", :size => 3, :class => "select-small" %> <%= l(:label_day_plural) %>
84 <% when :string, :text %>
84 <% when :string, :text %>
85 <%= text_field_tag "values[#{field}][]", query.values_for(field), :id => "values_#{field}", :size => 30, :class => "select-small" %>
85 <%= text_field_tag "values[#{field}][]", query.values_for(field), :id => "values_#{field}", :size => 30, :class => "select-small" %>
86 <% when :integer %>
86 <% when :integer %>
87 <%= text_field_tag "values[#{field}][]", query.values_for(field), :id => "values_#{field}", :size => 3, :class => "select-small" %>
87 <%= text_field_tag "values[#{field}][]", query.values_for(field), :id => "values_#{field}", :size => 3, :class => "select-small" %>
88 <% end %>
88 <% end %>
89 </div>
89 </div>
90 <script type="text/javascript">toggle_filter('<%= field %>');</script>
90 <script type="text/javascript">toggle_filter('<%= field %>');</script>
91 </td>
91 </td>
92 </tr>
92 </tr>
93 <% end %>
93 <% end %>
94 </table>
94 </table>
95 </td>
95 </td>
96 <td class="add-filter">
96 <td class="add-filter">
97 <%= l(:label_filter_add) %>:
97 <%= label_tag('add_filter_select', l(:label_filter_add)) %>:
98 <%= 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),
98 <%= 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),
99 :onchange => "add_filter();",
99 :onchange => "add_filter();",
100 :class => "select-small",
100 :class => "select-small",
101 :name => nil %>
101 :name => nil %>
102 </td>
102 </td>
103 </tr>
103 </tr>
104 </table>
104 </table>
General Comments 0
You need to be logged in to leave comments. Login now