# Project specific queries and global queries
visible << (@project.nil? ? ["project_id IS NULL"] : ["project_id IS NULL OR project_id = ?", @project.id])
@sidebar_queries = Query.find(:all,
- :select => 'id, name',
+ :select => 'id, name, is_public',
:order => "name ASC",
:conditions => visible.conditions)
end
@sidebar_queries
end
+ def query_links(title, queries)
+ content_tag('h3', title) +
+ queries.collect {|query|
+ link_to(h(query.name), :controller => 'issues', :action => 'index', :project_id => @project, :query_id => query)
+ }.join('<br />')
+ end
+
+ def render_sidebar_queries
+ out = ''
+ queries = sidebar_queries.select {|q| !q.is_public?}
+ out << query_links(l(:label_my_queries), queries) if queries.any?
+ queries = sidebar_queries.select {|q| q.is_public?}
+ out << query_links(l(:label_query_plural), queries) if queries.any?
+ out
+ end
+
def show_detail(detail, no_html=false)
case detail.property
when 'attr'
<% end %>
<%= call_hook(:view_issues_sidebar_planning_bottom) %>
-<% unless sidebar_queries.empty? -%>
-<h3><%= l(:label_query_plural) %></h3>
-
-<% sidebar_queries.each do |query| -%>
-<%= link_to(h(query.name), :controller => 'issues', :action => 'index', :project_id => @project, :query_id => query) %><br />
-<% end -%>
+<%= render_sidebar_queries %>
<%= call_hook(:view_issues_sidebar_queries_bottom) %>
-<% end -%>
field_warn_on_leaving_unsaved: Warn me when leaving a page with unsaved text
text_warn_on_leaving_unsaved: The current page contains unsaved text that will be lost if you leave this page.
+ label_my_queries: My custom queries
setting_gantt_items_limit: Maximum number of items displayed on the gantt chart
field_warn_on_leaving_unsaved: Warn me when leaving a page with unsaved text
text_warn_on_leaving_unsaved: The current page contains unsaved text that will be lost if you leave this page.
+ label_my_queries: My custom queries
setting_gantt_items_limit: Maximum number of items displayed on the gantt chart
field_warn_on_leaving_unsaved: Warn me when leaving a page with unsaved text
text_warn_on_leaving_unsaved: The current page contains unsaved text that will be lost if you leave this page.
+ label_my_queries: My custom queries
field_warn_on_leaving_unsaved: Warn me when leaving a page with unsaved text
text_warn_on_leaving_unsaved: The current page contains unsaved text that will be lost if you leave this page.
+ label_my_queries: My custom queries
setting_gantt_items_limit: Maximum number of items displayed on the gantt chart
field_warn_on_leaving_unsaved: Warn me when leaving a page with unsaved text
text_warn_on_leaving_unsaved: The current page contains unsaved text that will be lost if you leave this page.
+ label_my_queries: My custom queries
setting_gantt_items_limit: Maximale Anzahl von Aufgaben die im Gantt-Chart angezeigt werden.
field_warn_on_leaving_unsaved: Warn me when leaving a page with unsaved text
text_warn_on_leaving_unsaved: The current page contains unsaved text that will be lost if you leave this page.
+ label_my_queries: My custom queries
setting_gantt_items_limit: Maximum number of items displayed on the gantt chart
field_warn_on_leaving_unsaved: Warn me when leaving a page with unsaved text
text_warn_on_leaving_unsaved: The current page contains unsaved text that will be lost if you leave this page.
+ label_my_queries: My custom queries
setting_gantt_items_limit: Maximum number of items displayed on the gantt chart\r
field_warn_on_leaving_unsaved: Warn me when leaving a page with unsaved text\r
text_warn_on_leaving_unsaved: The current page contains unsaved text that will be lost if you leave this page.\r
+ label_my_queries: My custom queries\r
label_query: Custom query
label_query_plural: Custom queries
label_query_new: New query
+ label_my_queries: My custom queries
label_filter_add: Add filter
label_filter_plural: Filters
label_equals: is
setting_gantt_items_limit: Maximum number of items displayed on the gantt chart
field_warn_on_leaving_unsaved: Warn me when leaving a page with unsaved text
text_warn_on_leaving_unsaved: The current page contains unsaved text that will be lost if you leave this page.
+ label_my_queries: My custom queries
setting_gantt_items_limit: "Gantt grafikoan bistara daitekeen elementu kopuru maximoa"\r
field_warn_on_leaving_unsaved: Warn me when leaving a page with unsaved text\r
text_warn_on_leaving_unsaved: The current page contains unsaved text that will be lost if you leave this page.\r
+ label_my_queries: My custom queries\r
text_tip_issue_begin_end_day: issue beginning and ending this day
text_tip_issue_end_day: issue ending this day
text_warn_on_leaving_unsaved: The current page contains unsaved text that will be lost if you leave this page.
+ label_my_queries: My custom queries
setting_gantt_items_limit: Maximum number of items displayed on the gantt chart
field_warn_on_leaving_unsaved: Warn me when leaving a page with unsaved text
text_warn_on_leaving_unsaved: The current page contains unsaved text that will be lost if you leave this page.
+ label_my_queries: My custom queries
label_query: Rapport personnalisé
label_query_plural: Rapports personnalisés
label_query_new: Nouveau rapport
+ label_my_queries: Mes rapports personnalisés
label_filter_add: "Ajouter le filtre "
label_filter_plural: Filtres
label_equals: égal
setting_gantt_items_limit: Maximum number of items displayed on the gantt chart
field_warn_on_leaving_unsaved: Warn me when leaving a page with unsaved text
text_warn_on_leaving_unsaved: The current page contains unsaved text that will be lost if you leave this page.
+ label_my_queries: My custom queries
setting_gantt_items_limit: Maximum number of items displayed on the gantt chart
field_warn_on_leaving_unsaved: Warn me when leaving a page with unsaved text
text_warn_on_leaving_unsaved: The current page contains unsaved text that will be lost if you leave this page.
+ label_my_queries: My custom queries
setting_gantt_items_limit: Maximum number of items displayed on the gantt chart
field_warn_on_leaving_unsaved: Warn me when leaving a page with unsaved text
text_warn_on_leaving_unsaved: The current page contains unsaved text that will be lost if you leave this page.
+ label_my_queries: My custom queries
setting_gantt_items_limit: Maximum number of items displayed on the gantt chart
field_warn_on_leaving_unsaved: Warn me when leaving a page with unsaved text
text_warn_on_leaving_unsaved: The current page contains unsaved text that will be lost if you leave this page.
+ label_my_queries: My custom queries
setting_gantt_items_limit: Maximum number of items displayed on the gantt chart
field_warn_on_leaving_unsaved: Warn me when leaving a page with unsaved text
text_warn_on_leaving_unsaved: The current page contains unsaved text that will be lost if you leave this page.
+ label_my_queries: My custom queries
setting_gantt_items_limit: Massimo numero di oggetti da visualizzare sul diagramma di gantt
field_warn_on_leaving_unsaved: Warn me when leaving a page with unsaved text
text_warn_on_leaving_unsaved: The current page contains unsaved text that will be lost if you leave this page.
+ label_my_queries: My custom queries
enumeration_system_activity: システム作業分類
field_warn_on_leaving_unsaved: Warn me when leaving a page with unsaved text
text_warn_on_leaving_unsaved: The current page contains unsaved text that will be lost if you leave this page.
+ label_my_queries: My custom queries
setting_gantt_items_limit: Maximum number of items displayed on the gantt chart
field_warn_on_leaving_unsaved: Warn me when leaving a page with unsaved text
text_warn_on_leaving_unsaved: The current page contains unsaved text that will be lost if you leave this page.
+ label_my_queries: My custom queries
setting_gantt_items_limit: Maximum number of items displayed on the gantt chart
field_warn_on_leaving_unsaved: Warn me when leaving a page with unsaved text
text_warn_on_leaving_unsaved: The current page contains unsaved text that will be lost if you leave this page.
+ label_my_queries: My custom queries
setting_gantt_items_limit: Maximum number of items displayed on the gantt chart\r
field_warn_on_leaving_unsaved: Warn me when leaving a page with unsaved text\r
text_warn_on_leaving_unsaved: The current page contains unsaved text that will be lost if you leave this page.\r
+ label_my_queries: My custom queries\r
setting_gantt_items_limit: Maximum number of items displayed on the gantt chart\r
field_warn_on_leaving_unsaved: Warn me when leaving a page with unsaved text\r
text_warn_on_leaving_unsaved: The current page contains unsaved text that will be lost if you leave this page.\r
+ label_my_queries: My custom queries\r
setting_gantt_items_limit: Maximum number of items displayed on the gantt chart\r
field_warn_on_leaving_unsaved: Warn me when leaving a page with unsaved text\r
text_warn_on_leaving_unsaved: The current page contains unsaved text that will be lost if you leave this page.\r
+ label_my_queries: My custom queries\r
setting_gantt_items_limit: Maximum number of items displayed on the gantt chart
field_warn_on_leaving_unsaved: Warn me when leaving a page with unsaved text
text_warn_on_leaving_unsaved: The current page contains unsaved text that will be lost if you leave this page.
+ label_my_queries: My custom queries
setting_gantt_items_limit: Maximum number of items displayed on the gantt chart
field_warn_on_leaving_unsaved: Warn me when leaving a page with unsaved text
text_warn_on_leaving_unsaved: The current page contains unsaved text that will be lost if you leave this page.
+ label_my_queries: My custom queries
setting_gantt_items_limit: Maximum number of items displayed on the gantt chart
field_warn_on_leaving_unsaved: Warn me when leaving a page with unsaved text
text_warn_on_leaving_unsaved: The current page contains unsaved text that will be lost if you leave this page.
+ label_my_queries: My custom queries
setting_gantt_items_limit: Maximum number of items displayed on the gantt chart
field_warn_on_leaving_unsaved: Warn me when leaving a page with unsaved text
text_warn_on_leaving_unsaved: The current page contains unsaved text that will be lost if you leave this page.
+ label_my_queries: My custom queries
setting_gantt_items_limit: Maximum number of items displayed on the gantt chart
field_warn_on_leaving_unsaved: Warn me when leaving a page with unsaved text
text_warn_on_leaving_unsaved: The current page contains unsaved text that will be lost if you leave this page.
+ label_my_queries: My custom queries
setting_gantt_items_limit: Maximum number of items displayed on the gantt chart
field_warn_on_leaving_unsaved: Warn me when leaving a page with unsaved text
text_warn_on_leaving_unsaved: The current page contains unsaved text that will be lost if you leave this page.
+ label_my_queries: My custom queries
setting_gantt_items_limit: Maximum number of items displayed on the gantt chart
field_warn_on_leaving_unsaved: Warn me when leaving a page with unsaved text
text_warn_on_leaving_unsaved: The current page contains unsaved text that will be lost if you leave this page.
+ label_my_queries: My custom queries
setting_gantt_items_limit: Maximum number of items displayed on the gantt chart
field_warn_on_leaving_unsaved: Warn me when leaving a page with unsaved text
text_warn_on_leaving_unsaved: The current page contains unsaved text that will be lost if you leave this page.
+ label_my_queries: My custom queries
setting_gantt_items_limit: Maximum number of items displayed on the gantt chart
field_warn_on_leaving_unsaved: Warn me when leaving a page with unsaved text
text_warn_on_leaving_unsaved: The current page contains unsaved text that will be lost if you leave this page.
+ label_my_queries: My custom queries
setting_gantt_items_limit: Maximum number of items displayed on the gantt chart\r
field_warn_on_leaving_unsaved: Warn me when leaving a page with unsaved text\r
text_warn_on_leaving_unsaved: The current page contains unsaved text that will be lost if you leave this page.\r
+ label_my_queries: My custom queries\r
setting_gantt_items_limit: Maximum number of items displayed on the gantt chart
field_warn_on_leaving_unsaved: Warn me when leaving a page with unsaved text
text_warn_on_leaving_unsaved: The current page contains unsaved text that will be lost if you leave this page.
+ label_my_queries: My custom queries
enumeration_system_activity: Systemaktivitet
field_warn_on_leaving_unsaved: Warn me when leaving a page with unsaved text
text_warn_on_leaving_unsaved: The current page contains unsaved text that will be lost if you leave this page.
+ label_my_queries: My custom queries
setting_gantt_items_limit: Maximum number of items displayed on the gantt chart
field_warn_on_leaving_unsaved: Warn me when leaving a page with unsaved text
text_warn_on_leaving_unsaved: The current page contains unsaved text that will be lost if you leave this page.
+ label_my_queries: My custom queries
setting_gantt_items_limit: Maximum number of items displayed on the gantt chart
field_warn_on_leaving_unsaved: Warn me when leaving a page with unsaved text
text_warn_on_leaving_unsaved: The current page contains unsaved text that will be lost if you leave this page.
+ label_my_queries: My custom queries
setting_gantt_items_limit: Maximum number of items displayed on the gantt chart
field_warn_on_leaving_unsaved: Warn me when leaving a page with unsaved text
text_warn_on_leaving_unsaved: The current page contains unsaved text that will be lost if you leave this page.
+ label_my_queries: My custom queries
setting_gantt_items_limit: Maximum number of items displayed on the gantt chart
field_warn_on_leaving_unsaved: Warn me when leaving a page with unsaved text
text_warn_on_leaving_unsaved: The current page contains unsaved text that will be lost if you leave this page.
+ label_my_queries: My custom queries
enumeration_system_activity: 系統活動
field_warn_on_leaving_unsaved: Warn me when leaving a page with unsaved text
text_warn_on_leaving_unsaved: The current page contains unsaved text that will be lost if you leave this page.
+ label_my_queries: My custom queries
setting_gantt_items_limit: Maximum number of items displayed on the gantt chart
field_warn_on_leaving_unsaved: Warn me when leaving a page with unsaved text
text_warn_on_leaving_unsaved: The current page contains unsaved text that will be lost if you leave this page.
+ label_my_queries: My custom queries