Splits private/public issue queries in the sidebar (#1067).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4908 e93f8b46-1217-0410-a6f0-8f06a7374b81
pull/351/head
Jean-Philippe Lang 14 years ago committed by Eric Davis
parent 0e39c0e550
commit 886c3e295b
  1. 18
      app/helpers/issues_helper.rb
  2. 8
      app/views/issues/_sidebar.rhtml
  3. 1
      config/locales/bg.yml
  4. 1
      config/locales/bs.yml
  5. 1
      config/locales/ca.yml
  6. 1
      config/locales/cs.yml
  7. 1
      config/locales/da.yml
  8. 1
      config/locales/de.yml
  9. 1
      config/locales/el.yml
  10. 1
      config/locales/en.yml
  11. 1
      config/locales/es.yml
  12. 1
      config/locales/eu.yml
  13. 1
      config/locales/fa.yml
  14. 1
      config/locales/fi.yml
  15. 1
      config/locales/fr.yml
  16. 1
      config/locales/gl.yml
  17. 1
      config/locales/he.yml
  18. 1
      config/locales/hr.yml
  19. 1
      config/locales/hu.yml
  20. 1
      config/locales/id.yml
  21. 1
      config/locales/it.yml
  22. 1
      config/locales/ja.yml
  23. 1
      config/locales/ko.yml
  24. 1
      config/locales/lt.yml
  25. 1
      config/locales/lv.yml
  26. 1
      config/locales/mk.yml
  27. 1
      config/locales/mn.yml
  28. 1
      config/locales/nl.yml
  29. 1
      config/locales/no.yml
  30. 1
      config/locales/pl.yml
  31. 1
      config/locales/pt-BR.yml
  32. 1
      config/locales/pt.yml
  33. 1
      config/locales/ro.yml
  34. 1
      config/locales/ru.yml
  35. 1
      config/locales/sk.yml
  36. 1
      config/locales/sl.yml
  37. 1
      config/locales/sr-YU.yml
  38. 1
      config/locales/sr.yml
  39. 1
      config/locales/sv.yml
  40. 1
      config/locales/th.yml
  41. 1
      config/locales/tr.yml
  42. 1
      config/locales/uk.yml
  43. 1
      config/locales/vi.yml
  44. 1
      config/locales/zh-TW.yml
  45. 1
      config/locales/zh.yml

@ -106,13 +106,29 @@ module IssuesHelper
# 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'

@ -13,11 +13,5 @@
<% 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 -%>

@ -945,3 +945,4 @@ bg:
label_cvs_path: CVSROOT
label_git_path: Path to .git directory
label_mercurial_path: Root directory
label_my_queries: My custom queries

@ -959,3 +959,4 @@ bs:
label_cvs_path: CVSROOT
label_git_path: Path to .git directory
label_mercurial_path: Root directory
label_my_queries: My custom queries

@ -948,3 +948,4 @@ ca:
label_cvs_path: CVSROOT
label_git_path: Path to .git directory
label_mercurial_path: Root directory
label_my_queries: My custom queries

@ -1169,3 +1169,4 @@ cs:
label_cvs_path: CVSROOT
label_git_path: Path to .git directory
label_mercurial_path: Root directory
label_my_queries: My custom queries

@ -961,3 +961,4 @@ da:
label_cvs_path: CVSROOT
label_git_path: Path to .git directory
label_mercurial_path: Root directory
label_my_queries: My custom queries

@ -962,3 +962,4 @@ de:
label_cvs_path: CVSROOT
label_git_path: Path to .git directory
label_mercurial_path: Root directory
label_my_queries: My custom queries

@ -945,3 +945,4 @@ el:
label_cvs_path: CVSROOT
label_git_path: Path to .git directory
label_mercurial_path: Root directory
label_my_queries: My custom queries

@ -595,6 +595,7 @@ en:
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

@ -982,3 +982,4 @@ es:
label_cvs_path: CVSROOT
label_git_path: Path to .git directory
label_mercurial_path: Root directory
label_my_queries: My custom queries

@ -949,3 +949,4 @@ eu:
setting_commit_logtime_enabled: "Erregistrutako denbora gaitu"
notice_gantt_chart_truncated: Grafikoa moztu da bistara daitekeen elementuen kopuru maximoa gainditu delako (%{max})
setting_gantt_items_limit: "Gantt grafikoan bistara daitekeen elementu kopuru maximoa"
label_my_queries: My custom queries

@ -941,3 +941,4 @@ fa:
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

@ -966,3 +966,4 @@ fi:
label_cvs_path: CVSROOT
label_git_path: Path to .git directory
label_mercurial_path: Root directory
label_my_queries: My custom queries

@ -596,6 +596,7 @@ fr:
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

@ -957,3 +957,4 @@ gl:
label_cvs_path: CVSROOT
label_git_path: Path to .git directory
label_mercurial_path: Root directory
label_my_queries: My custom queries

@ -950,3 +950,4 @@ he:
label_cvs_path: CVSROOT
label_git_path: Path to .git directory
label_mercurial_path: Root directory
label_my_queries: My custom queries

@ -952,3 +952,4 @@ hr:
label_cvs_path: CVSROOT
label_git_path: Path to .git directory
label_mercurial_path: Root directory
label_my_queries: My custom queries

@ -964,3 +964,4 @@
label_cvs_path: CVSROOT
label_git_path: Path to .git directory
label_mercurial_path: Root directory
label_my_queries: My custom queries

@ -953,3 +953,4 @@ id:
label_cvs_path: CVSROOT
label_git_path: Path to .git directory
label_mercurial_path: Root directory
label_my_queries: My custom queries

@ -946,3 +946,4 @@ it:
label_cvs_path: CVSROOT
label_git_path: Path to .git directory
label_mercurial_path: Root directory
label_my_queries: My custom queries

@ -966,3 +966,4 @@ ja:
label_cvs_path: CVSROOT
label_git_path: Path to .git directory
label_mercurial_path: Root directory
label_my_queries: My custom queries

@ -997,3 +997,4 @@ ko:
label_cvs_path: CVSROOT
label_git_path: Path to .git directory
label_mercurial_path: Root directory
label_my_queries: My custom queries

@ -1005,3 +1005,4 @@ lt:
label_cvs_path: CVSROOT
label_git_path: Path to .git directory
label_mercurial_path: Root directory
label_my_queries: My custom queries

@ -940,3 +940,4 @@ lv:
label_cvs_path: CVSROOT
label_git_path: Path to .git directory
label_mercurial_path: Root directory
label_my_queries: My custom queries

@ -945,3 +945,4 @@ mk:
label_cvs_path: CVSROOT
label_git_path: Path to .git directory
label_mercurial_path: Root directory
label_my_queries: My custom queries

@ -946,3 +946,4 @@ mn:
label_cvs_path: CVSROOT
label_git_path: Path to .git directory
label_mercurial_path: Root directory
label_my_queries: My custom queries

@ -927,3 +927,4 @@ nl:
label_cvs_path: CVSROOT
label_git_path: Path to .git directory
label_mercurial_path: Root directory
label_my_queries: My custom queries

@ -932,3 +932,4 @@
label_cvs_path: CVSROOT
label_git_path: Path to .git directory
label_mercurial_path: Root directory
label_my_queries: My custom queries

@ -962,3 +962,4 @@ pl:
label_cvs_path: CVSROOT
label_git_path: Path to .git directory
label_mercurial_path: Root directory
label_my_queries: My custom queries

@ -965,3 +965,4 @@ pt-BR:
label_cvs_path: CVSROOT
label_git_path: Path to .git directory
label_mercurial_path: Root directory
label_my_queries: My custom queries

@ -949,3 +949,4 @@ pt:
label_cvs_path: CVSROOT
label_git_path: Path to .git directory
label_mercurial_path: Root directory
label_my_queries: My custom queries

@ -938,3 +938,4 @@ ro:
label_cvs_path: CVSROOT
label_git_path: Path to .git directory
label_mercurial_path: Root directory
label_my_queries: My custom queries

@ -1058,3 +1058,4 @@ ru:
label_cvs_path: CVSROOT
label_git_path: Путь к каталогу .git
label_mercurial_path: Каталог
label_my_queries: My custom queries

@ -940,3 +940,4 @@ sk:
label_cvs_path: CVSROOT
label_git_path: Path to .git directory
label_mercurial_path: Root directory
label_my_queries: My custom queries

@ -941,3 +941,4 @@ sl:
label_cvs_path: CVSROOT
label_git_path: Path to .git directory
label_mercurial_path: Root directory
label_my_queries: My custom queries

@ -945,3 +945,4 @@ sr-YU:
label_cvs_path: CVSROOT
label_git_path: Path to .git directory
label_mercurial_path: Root directory
label_my_queries: My custom queries

@ -946,3 +946,4 @@ sr:
label_cvs_path: CVSROOT
label_git_path: Path to .git directory
label_mercurial_path: Root directory
label_my_queries: My custom queries

@ -986,3 +986,4 @@ sv:
label_cvs_path: CVSROOT
label_git_path: Path to .git directory
label_mercurial_path: Root directory
label_my_queries: My custom queries

@ -942,3 +942,4 @@ th:
label_cvs_path: CVSROOT
label_git_path: Path to .git directory
label_mercurial_path: Root directory
label_my_queries: My custom queries

@ -964,3 +964,4 @@ tr:
label_cvs_path: CVSROOT
label_git_path: Path to .git directory
label_mercurial_path: Root directory
label_my_queries: My custom queries

@ -941,3 +941,4 @@ uk:
label_cvs_path: CVSROOT
label_git_path: Path to .git directory
label_mercurial_path: Root directory
label_my_queries: My custom queries

@ -996,3 +996,4 @@ vi:
label_cvs_path: CVSROOT
label_git_path: Path to .git directory
label_mercurial_path: Root directory
label_my_queries: My custom queries

@ -1026,3 +1026,4 @@
label_cvs_path: CVSROOT
label_git_path: Path to .git directory
label_mercurial_path: Root directory
label_my_queries: My custom queries

@ -959,3 +959,4 @@ zh:
label_cvs_path: CVSROOT
label_git_path: Path to .git directory
label_mercurial_path: Root directory
label_my_queries: My custom queries

Loading…
Cancel
Save