##// END OF EJS Templates
Typo....
Jean-Philippe Lang -
r11223:78997eea1688
parent child
Show More
@@ -1,55 +1,55
1 1 <%= error_messages_for 'query' %>
2 2
3 3 <div class="box">
4 4 <div class="tabular">
5 5 <p><label for="query_name"><%=l(:field_name)%></label>
6 6 <%= text_field 'query', 'name', :size => 80 %></p>
7 7
8 8 <% if User.current.admin? || User.current.allowed_to?(:manage_public_queries, @project) %>
9 9 <p><label for="query_is_public"><%=l(:field_is_public)%></label>
10 10 <%= check_box 'query', 'is_public',
11 11 :onchange => (User.current.admin? ? nil : 'if (this.checked) {$("#query_is_for_all").removeAttr("checked"); $("#query_is_for_all").attr("disabled", true);} else {$("#query_is_for_all").removeAttr("disabled");}') %></p>
12 12 <% end %>
13 13
14 14 <p><label for="query_is_for_all"><%=l(:field_is_for_all)%></label>
15 15 <%= check_box_tag 'query_is_for_all', 1, @query.project.nil?,
16 16 :disabled => (!@query.new_record? && (@query.project.nil? || (@query.is_public? && !User.current.admin?))) %></p>
17 17
18 18 <p><label for="query_default_columns"><%=l(:label_default_columns)%></label>
19 19 <%= check_box_tag 'default_columns', 1, @query.has_default_columns?, :id => 'query_default_columns',
20 20 :onclick => 'if (this.checked) {$("#columns").hide();} else {$("#columns").show();}' %></p>
21 21
22 22 <p><label for="query_group_by"><%= l(:field_group_by) %></label>
23 23 <%= select 'query', 'group_by', @query.groupable_columns.collect {|c| [c.caption, c.name.to_s]}, :include_blank => true %></p>
24 24
25 25 <p><label><%= l(:button_show) %></label>
26 26 <%= available_block_columns_tags(@query) %></p>
27 27 </div>
28 28
29 29 <fieldset id="filters"><legend><%= l(:label_filter_plural) %></legend>
30 30 <%= render :partial => 'queries/filters', :locals => {:query => query}%>
31 31 </fieldset>
32 32
33 33 <fieldset><legend><%= l(:label_sort) %></legend>
34 34 <% 3.times do |i| %>
35 35 <%= i+1 %>:
36 36 <%= label_tag "query_sort_criteria_attribute_" + i.to_s,
37 37 l(:description_query_sort_criteria_attribute), :class => "hidden-for-sighted" %>
38 38 <%= select_tag("query[sort_criteria][#{i}][]",
39 39 options_for_select([[]] + query.available_columns.select(&:sortable?).collect {|column| [column.caption, column.name.to_s]}, @query.sort_criteria_key(i)),
40 40 :id => "query_sort_criteria_attribute_" + i.to_s)%>
41 41 <%= label_tag "query_sort_criteria_direction_" + i.to_s,
42 42 l(:description_query_sort_criteria_direction), :class => "hidden-for-sighted" %>
43 43 <%= select_tag("query[sort_criteria][#{i}][]",
44 44 options_for_select([[], [l(:label_ascending), 'asc'], [l(:label_descending), 'desc']], @query.sort_criteria_order(i)),
45 45 :id => "query_sort_criteria_direction_" + i.to_s) %>
46 46 <br />
47 47 <% end %>
48 48 </fieldset>
49 49
50 50 <%= content_tag 'fieldset', :id => 'columns', :style => (query.has_default_columns? ? 'display:none;' : nil) do %>
51 51 <legend><%= l(:field_column_names) %></legend>
52 <%= render render_query_columns_selection(query) %>
52 <%= render_query_columns_selection(query) %>
53 53 <% end %>
54 54
55 55 </div>
General Comments 0
You need to be logged in to leave comments. Login now