From: Jean-Philippe Lang
+<% end %>
+<%= hidden_field_tag 'query[column_names][]', '' %>
+<% end %>
diff --git a/app/views/queries/_form.rhtml b/app/views/queries/_form.rhtml
index b4a4987cd..a6b5a496c 100644
--- a/app/views/queries/_form.rhtml
+++ b/app/views/queries/_form.rhtml
@@ -10,13 +10,11 @@
<%= check_box 'query', 'is_public' %>
-<% @query.available_columns.each do |column| %>
-<%= check_box_tag 'query[column_names][]', column.name, @query.has_column?(column) %> <%= l("field_#{column.name}") %>
-<% end %>
-<%= hidden_field_tag 'query[column_names][]', '' %>
-
+<%= check_box_tag 'default_columns', 1, @query.has_default_columns?, :id => 'query_default_columns', + :onchange => 'if (this.checked) {Element.hide("columns")} else {Element.show("columns")}' %>
+<%= render :partial => 'queries/columns', :locals => {:query => query}%> <%= render :partial => 'queries/filters', :locals => {:query => query}%> diff --git a/lang/bg.yml b/lang/bg.yml index d576142d1..231d59329 100644 --- a/lang/bg.yml +++ b/lang/bg.yml @@ -512,3 +512,4 @@ enumeration_activities: ÐейноÑÑи (time tracking) label_file_plural: Files label_changeset_plural: Changesets field_column_names: Columns +label_default_columns: Default columns diff --git a/lang/cs.yml b/lang/cs.yml index 569002636..3415677ef 100644 --- a/lang/cs.yml +++ b/lang/cs.yml @@ -512,3 +512,4 @@ label_added_time_by: Added by %s %s ago field_estimated_hours: Estimated time label_changeset_plural: Changesets field_column_names: Columns +label_default_columns: Default columns diff --git a/lang/de.yml b/lang/de.yml index f2b5b069f..c20cbf4e4 100644 --- a/lang/de.yml +++ b/lang/de.yml @@ -512,3 +512,4 @@ enumeration_activities: Aktivitäten (Zeiterfassung) label_file_plural: Files label_changeset_plural: Changesets field_column_names: Columns +label_default_columns: Default columns diff --git a/lang/en.yml b/lang/en.yml index 6e23f377f..383b49150 100644 --- a/lang/en.yml +++ b/lang/en.yml @@ -423,6 +423,7 @@ label_updated_time: Updated %s ago label_jump_to_a_project: Jump to a project... label_file_plural: Files label_changeset_plural: Changesets +label_default_columns: Default columns button_login: Login button_submit: Submit diff --git a/lang/es.yml b/lang/es.yml index 82b0908a7..e467a5678 100644 --- a/lang/es.yml +++ b/lang/es.yml @@ -512,3 +512,4 @@ enumeration_activities: Activities (time tracking) label_file_plural: Files label_changeset_plural: Changesets field_column_names: Columns +label_default_columns: Default columns diff --git a/lang/fr.yml b/lang/fr.yml index 68d329774..129e91e4a 100644 --- a/lang/fr.yml +++ b/lang/fr.yml @@ -423,6 +423,7 @@ label_updated_time: Mis à jour il y a %s label_jump_to_a_project: Aller à un projet... label_file_plural: Fichiers label_changeset_plural: Révisions +label_default_columns: Colonnes par défaut button_login: Connexion button_submit: Soumettre diff --git a/lang/it.yml b/lang/it.yml index 54b008580..3b16097e3 100644 --- a/lang/it.yml +++ b/lang/it.yml @@ -512,3 +512,4 @@ enumeration_activities: Attività (time tracking) label_file_plural: Files label_changeset_plural: Changesets field_column_names: Columns +label_default_columns: Default columns diff --git a/lang/ja.yml b/lang/ja.yml index 0e2628c60..46c292b22 100644 --- a/lang/ja.yml +++ b/lang/ja.yml @@ -513,3 +513,4 @@ enumeration_activities: ä½æ¥åé¡ (æéãã©ããã³ã°) label_file_plural: Files label_changeset_plural: Changesets field_column_names: Columns +label_default_columns: Default columns diff --git a/lang/nl.yml b/lang/nl.yml index 916040747..cc87f3110 100644 --- a/lang/nl.yml +++ b/lang/nl.yml @@ -513,3 +513,4 @@ text_comma_separated: Multiple values allowed (comma separated). label_file_plural: Files label_changeset_plural: Changesets field_column_names: Columns +label_default_columns: Default columns diff --git a/lang/pl.yml b/lang/pl.yml index a61974afa..a575caf21 100644 --- a/lang/pl.yml +++ b/lang/pl.yml @@ -512,3 +512,4 @@ field_estimated_hours: Szacowany czas label_file_plural: Pliki label_changeset_plural: Zestawienia zmian field_column_names: Columns +label_default_columns: Default columns diff --git a/lang/pt-br.yml b/lang/pt-br.yml index e8f34b6d7..f10a4e9b7 100644 --- a/lang/pt-br.yml +++ b/lang/pt-br.yml @@ -512,3 +512,4 @@ enumeration_activities: Atividades (time tracking) label_file_plural: Files label_changeset_plural: Changesets field_column_names: Columns +label_default_columns: Default columns diff --git a/lang/pt.yml b/lang/pt.yml index f7cb5f91a..0bab2d3f8 100644 --- a/lang/pt.yml +++ b/lang/pt.yml @@ -512,3 +512,4 @@ enumeration_activities: Atividades (time tracking) label_file_plural: Files label_changeset_plural: Changesets field_column_names: Columns +label_default_columns: Default columns diff --git a/lang/ro.yml b/lang/ro.yml index d4cd69b37..bc9100ff1 100644 --- a/lang/ro.yml +++ b/lang/ro.yml @@ -512,3 +512,4 @@ label_index_by_title: Index by title label_file_plural: Files label_changeset_plural: Changesets field_column_names: Columns +label_default_columns: Default columns diff --git a/lang/sv.yml b/lang/sv.yml index ed5106a13..83488a4b9 100644 --- a/lang/sv.yml +++ b/lang/sv.yml @@ -513,3 +513,4 @@ field_comments: Comment label_file_plural: Files label_changeset_plural: Changesets field_column_names: Columns +label_default_columns: Default columns diff --git a/lang/zh.yml b/lang/zh.yml index ec286878d..07d57c855 100644 --- a/lang/zh.yml +++ b/lang/zh.yml @@ -515,3 +515,4 @@ label_wiki_page: Wiki page label_file_plural: Files label_changeset_plural: Changesets field_column_names: Columns +label_default_columns: Default columns