Patch #5556 » all_visible_projects_in_project_jump_box.diff
| config/settings.yml (working copy) | ||
|---|---|---|
|
default: ''
|
||
|
rest_api_enabled:
|
||
|
default: 0
|
||
|
display_member_projects_only:
|
||
|
default: 1
|
||
| app/views/settings/_projects.rhtml (working copy) | ||
|---|---|---|
|
<% form_tag({:action => 'edit', :tab => 'projects'}) do %>
|
||
|
<div class="box tabular settings">
|
||
|
<p><%= setting_check_box :display_member_projects_only %></p>
|
||
|
<p><%= setting_check_box :default_projects_public %></p>
|
||
|
<p><%= setting_multiselect(:default_projects_modules,
|
||
| app/helpers/application_helper.rb (working copy) | ||
|---|---|---|
|
# Renders the project quick-jump box
|
||
|
def render_project_jump_box
|
||
|
# Retrieve them now to avoid a COUNT query
|
||
|
projects = User.current.projects.all
|
||
|
projects = []
|
||
|
if Setting.display_member_projects_only?
|
||
|
projects = User.current.projects.all
|
||
|
else
|
||
|
unless Setting.login_required? && User.current.anonymous?
|
||
|
projects = Project.visible(User.current)
|
||
|
end
|
||
|
end
|
||
|
if projects.any?
|
||
|
s = '<select onchange="if (this.value != \'\') { window.location = this.value; }">' +
|
||
|
"<option value=''>#{ l(:label_jump_to_a_project) }</option>" +
|
||
| test/functional/welcome_controller_test.rb (working copy) | ||
|---|---|---|
|
assert_equal 'text/plain', @response.content_type
|
||
|
assert @response.body.match(%r{^Disallow: /projects/ecookbook/issues\r?$})
|
||
|
end
|
||
|
|
||
|
def test_jump_box_anonymous
|
||
|
Setting.display_member_projects_only = 0
|
||
|
get :index
|
||
|
assert_tag :div, :attributes => { :id => 'quick-search' }, :child => { :tag => 'select',
|
||
|
:child => { :tag => 'option', :content => 'eCookbook' }
|
||
|
}
|
||
|
|
||
|
Setting.display_member_projects_only = 1
|
||
|
get :index
|
||
|
assert_no_tag :div, :attributes => { :id => 'quick-search' },
|
||
|
:child => { :tag => 'select' }
|
||
|
end
|
||
|
|
||
|
def test_jump_box_logged
|
||
|
@request.session[:user_id] = 2
|
||
|
|
||
|
Setting.display_member_projects_only = 0
|
||
|
get :index
|
||
|
assert_tag :div, :attributes => { :id => 'quick-search' }, :child => { :tag => 'select',
|
||
|
:child => { :tag => 'option', :content => ' » Private child of eCookbook' }
|
||
|
}
|
||
|
assert_tag :div, :attributes => { :id => 'quick-search' }, :child => { :tag => 'select',
|
||
|
:child => { :tag => 'option', :content => ' » Child of private child' }
|
||
|
}
|
||
|
|
||
|
Setting.display_member_projects_only = 1
|
||
|
get :index
|
||
|
assert_tag :div, :attributes => { :id => 'quick-search' }, :child => { :tag => 'select',
|
||
|
:child => { :tag => 'option', :content => ' » Private child of eCookbook' }
|
||
|
}
|
||
|
assert_no_tag :div, :attributes => { :id => 'quick-search' }, :child => { :tag => 'select',
|
||
|
:child => { :tag => 'option', :content => ' » Child of private child' }
|
||
|
}
|
||
|
end
|
||
|
end
|
||
| config/locales/lt.yml (working copy) | ||
|---|---|---|
|
error_unable_to_connect: Unable to connect ({{value}})
|
||
|
error_can_not_remove_role: This role is in use and can not be deleted.
|
||
|
error_can_not_delete_tracker: This tracker contains issues and can't be deleted.
|
||
|
setting_display_member_projects_only: Display only projects I'm member of in the project jump box.
|
||
| config/locales/ro.yml (working copy) | ||
|---|---|---|
|
error_unable_to_connect: Unable to connect ({{value}})
|
||
|
error_can_not_remove_role: This role is in use and can not be deleted.
|
||
|
error_can_not_delete_tracker: This tracker contains issues and can't be deleted.
|
||
|
setting_display_member_projects_only: Display only projects I'm member of in the project jump box.
|
||
| config/locales/zh.yml (working copy) | ||
|---|---|---|
|
error_unable_to_connect: 不能连接到 ({{value}})
|
||
|
error_can_not_remove_role: 该角色正在使用中, 不能删除.
|
||
|
error_can_not_delete_tracker: 该跟踪标签包含问题, 不能删除.
|
||
|
setting_display_member_projects_only: Display only projects I'm member of in the project jump box.
|
||
| config/locales/lv.yml (working copy) | ||
|---|---|---|
|
label_subtask_plural: Subtasks
|
||
|
error_can_not_delete_tracker: This tracker contains issues and can't be deleted.
|
||
|
label_project_copy_notifications: Send email notifications during the project copy
|
||
|
setting_display_member_projects_only: Display only projects I'm member of in the project jump box.
|
||
| config/locales/pt.yml (working copy) | ||
|---|---|---|
|
error_unable_to_connect: Unable to connect ({{value}})
|
||
|
error_can_not_remove_role: This role is in use and can not be deleted.
|
||
|
error_can_not_delete_tracker: This tracker contains issues and can't be deleted.
|
||
|
setting_display_member_projects_only: Display only projects I'm member of in the project jump box.
|
||
| config/locales/ca.yml (working copy) | ||
|---|---|---|
|
error_unable_to_connect: Unable to connect ({{value}})
|
||
|
error_can_not_remove_role: This role is in use and can not be deleted.
|
||
|
error_can_not_delete_tracker: This tracker contains issues and can't be deleted.
|
||
|
setting_display_member_projects_only: Display only projects I'm member of in the project jump box.
|
||
| config/locales/pt-BR.yml (working copy) | ||
|---|---|---|
|
error_unable_to_connect: Não foi possível conectar ({{value}})
|
||
|
error_can_not_remove_role: Este papel está em uso e não pode ser excluído.
|
||
|
error_can_not_delete_tracker: Este tipo de tarefa está atribuído a alguma(s) tarefa(s) e não pode ser excluído.
|
||
|
setting_display_member_projects_only: Display only projects I'm member of in the project jump box.
|
||
| config/locales/tr.yml (working copy) | ||
|---|---|---|
|
error_unable_to_connect: Unable to connect ({{value}})
|
||
|
error_can_not_remove_role: This role is in use and can not be deleted.
|
||
|
error_can_not_delete_tracker: This tracker contains issues and can't be deleted.
|
||
|
setting_display_member_projects_only: Display only projects I'm member of in the project jump box.
|
||
| config/locales/ru.yml (working copy) | ||
|---|---|---|
|
label_close_versions: Закрыть завершенные версии
|
||
|
label_board_sticky: Прикреплена
|
||
|
label_board_locked: Заблокирована
|
||
|
setting_display_member_projects_only: Display only projects I'm member of in the project jump box.
|
||
| config/locales/id.yml (working copy) | ||
|---|---|---|
|
error_unable_to_connect: Unable to connect ({{value}})
|
||
|
error_can_not_remove_role: This role is in use and can not be deleted.
|
||
|
error_can_not_delete_tracker: This tracker contains issues and can't be deleted.
|
||
|
setting_display_member_projects_only: Display only projects I'm member of in the project jump box.
|
||
| config/locales/el.yml (working copy) | ||
|---|---|---|
|
error_unable_to_connect: Unable to connect ({{value}})
|
||
|
error_can_not_remove_role: This role is in use and can not be deleted.
|
||
|
error_can_not_delete_tracker: This tracker contains issues and can't be deleted.
|
||
|
setting_display_member_projects_only: Display only projects I'm member of in the project jump box.
|
||
| config/locales/en.yml (working copy) | ||
|---|---|---|
|
setting_start_of_week: Start calendars on
|
||
|
setting_rest_api_enabled: Enable REST web service
|
||
|
setting_cache_formatted_text: Cache formatted text
|
||
|
setting_display_member_projects_only: Display only projects I'm member of in the project jump box.
|
||
|
permission_add_project: Create project
|
||
|
permission_add_subprojects: Create subprojects
|
||
| config/locales/gl.yml (working copy) | ||
|---|---|---|
|
error_unable_to_connect: Unable to connect ({{value}})
|
||
|
error_can_not_remove_role: This role is in use and can not be deleted.
|
||
|
error_can_not_delete_tracker: This tracker contains issues and can't be deleted.
|
||
|
setting_display_member_projects_only: Display only projects I'm member of in the project jump box.
|
||
| config/locales/cs.yml (working copy) | ||
|---|---|---|
|
error_unable_to_connect: Unable to connect ({{value}})
|
||
|
error_can_not_remove_role: This role is in use and can not be deleted.
|
||
|
error_can_not_delete_tracker: This tracker contains issues and can't be deleted.
|
||
|
setting_display_member_projects_only: Display only projects I'm member of in the project jump box.
|
||
| config/locales/es.yml (working copy) | ||
|---|---|---|
|
error_unable_to_connect: Unable to connect ({{value}})
|
||
|
error_can_not_remove_role: This role is in use and can not be deleted.
|
||
|
error_can_not_delete_tracker: This tracker contains issues and can't be deleted.
|
||
|
setting_display_member_projects_only: Display only projects I'm member of in the project jump box.
|
||
| config/locales/eu.yml (working copy) | ||
|---|---|---|
|
error_unable_to_connect: Ezin da konektatu ({{value}})
|
||
|
error_can_not_remove_role: Rol hau erabiltzen hari da eta ezin da ezabatu.
|
||
|
error_can_not_delete_tracker: Aztarnari honek zereginak ditu eta ezin da ezabatu.
|
||
|
setting_display_member_projects_only: Display only projects I'm member of in the project jump box.
|
||
| config/locales/ko.yml (working copy) | ||
|---|---|---|
|
error_unable_to_connect: 연결할 수 없습니다(({{value}})
|
||
|
error_can_not_remove_role: 이 역할은 현재 사용 중이이서 삭제할 수 없습니다.
|
||
|
error_can_not_delete_tracker: 이 유형의 일감들이 있에서 삭제할 수 없습니다.
|
||
|
setting_display_member_projects_only: Display only projects I'm member of in the project jump box.
|
||
| config/locales/zh-TW.yml (working copy) | ||
|---|---|---|
|
enumeration_doc_categories: 文件分類
|
||
|
enumeration_activities: 活動 (時間追蹤)
|
||
|
enumeration_system_activity: 系統活動
|
||
|
setting_display_member_projects_only: Display only projects I'm member of in the project jump box.
|
||
| config/locales/mn.yml (working copy) | ||
|---|---|---|
|
error_unable_to_connect: Unable to connect ({{value}})
|
||
|
error_can_not_remove_role: This role is in use and can not be deleted.
|
||
|
error_can_not_delete_tracker: This tracker contains issues and can't be deleted.
|
||
|
setting_display_member_projects_only: Display only projects I'm member of in the project jump box.
|
||
| config/locales/it.yml (working copy) | ||
|---|---|---|
|
error_unable_to_connect: Unable to connect ({{value}})
|
||
|
error_can_not_remove_role: This role is in use and can not be deleted.
|
||
|
error_can_not_delete_tracker: This tracker contains issues and can't be deleted.
|
||
|
setting_display_member_projects_only: Display only projects I'm member of in the project jump box.
|
||
| config/locales/sk.yml (working copy) | ||
|---|---|---|
|
error_unable_to_connect: Nieje možné vymazať ({{value}})
|
||
|
error_can_not_remove_role: Táto roľa sa používa a nemôže byť vymazaná.
|
||
|
error_can_not_delete_tracker: Táto fronta obsahuje úlohy a nemôže byť vymazaná.
|
||
|
setting_display_member_projects_only: Display only projects I'm member of in the project jump box.
|
||
| config/locales/sl.yml (working copy) | ||
|---|---|---|
|
error_unable_to_connect: Unable to connect ({{value}})
|
||
|
error_can_not_remove_role: This role is in use and can not be deleted.
|
||
|
error_can_not_delete_tracker: This tracker contains issues and can't be deleted.
|
||
|
setting_display_member_projects_only: Display only projects I'm member of in the project jump box.
|
||
| config/locales/uk.yml (working copy) | ||
|---|---|---|
|
error_unable_to_connect: Unable to connect ({{value}})
|
||
|
error_can_not_remove_role: This role is in use and can not be deleted.
|
||
|
error_can_not_delete_tracker: This tracker contains issues and can't be deleted.
|
||
|
setting_display_member_projects_only: Display only projects I'm member of in the project jump box.
|
||
| config/locales/da.yml (working copy) | ||
|---|---|---|
|
error_unable_to_connect: Unable to connect ({{value}})
|
||
|
error_can_not_remove_role: This role is in use and can not be deleted.
|
||
|
error_can_not_delete_tracker: This tracker contains issues and can't be deleted.
|
||
|
setting_display_member_projects_only: Display only projects I'm member of in the project jump box.
|
||
| config/locales/sr.yml (working copy) | ||
|---|---|---|
|
error_unable_delete_issue_status: Unable to delete issue status
|
||
|
label_subtask_plural: Subtasks
|
||
|
error_can_not_delete_tracker: This tracker contains issues and can't be deleted.
|
||
|
setting_display_member_projects_only: Display only projects I'm member of in the project jump box.
|
||
| config/locales/de.yml (working copy) | ||
|---|---|---|
|
error_unable_to_connect: Unable to connect ({{value}})
|
||
|
error_can_not_remove_role: This role is in use and can not be deleted.
|
||
|
error_can_not_delete_tracker: This tracker contains issues and can't be deleted.
|
||
|
setting_display_member_projects_only: "Zeige in der Projektsprungbox nur Projekte, in denen ich Mitglied bin."
|
||
| config/locales/bg.yml (working copy) | ||
|---|---|---|
|
error_unable_to_connect: Unable to connect ({{value}})
|
||
|
error_can_not_remove_role: This role is in use and can not be deleted.
|
||
|
error_can_not_delete_tracker: This tracker contains issues and can't be deleted.
|
||
|
setting_display_member_projects_only: Display only projects I'm member of in the project jump box.
|
||
| config/locales/sv.yml (working copy) | ||
|---|---|---|
|
enumeration_doc_categories: Dokumentkategorier
|
||
|
enumeration_activities: Aktiviteter (tidsuppföljning)
|
||
|
enumeration_system_activity: Systemaktivitet
|
||
|
setting_display_member_projects_only: Display only projects I'm member of in the project jump box.
|
||
| config/locales/ja.yml (working copy) | ||
|---|---|---|
|
enumeration_doc_categories: 文書カテゴリ
|
||
|
enumeration_activities: 作業分類 (時間トラッキング)
|
||
|
enumeration_system_activity: システム作業分類
|
||
|
setting_display_member_projects_only: Display only projects I'm member of in the project jump box.
|
||
| config/locales/he.yml (working copy) | ||
|---|---|---|
|
label_subtask_plural: Subtasks
|
||
|
error_can_not_delete_tracker: This tracker contains issues and can't be deleted.
|
||
|
label_project_copy_notifications: Send email notifications during the project copy
|
||
|
setting_display_member_projects_only: Display only projects I'm member of in the project jump box.
|
||
| config/locales/sr-CY.yml (working copy) | ||
|---|---|---|
|
error_unable_delete_issue_status: Unable to delete issue status
|
||
|
label_subtask_plural: Subtasks
|
||
|
error_can_not_delete_tracker: This tracker contains issues and can't be deleted.
|
||
|
setting_display_member_projects_only: Display only projects I'm member of in the project jump box.
|
||
| config/locales/fi.yml (working copy) | ||
|---|---|---|
|
error_unable_to_connect: Unable to connect ({{value}})
|
||
|
error_can_not_remove_role: This role is in use and can not be deleted.
|
||
|
error_can_not_delete_tracker: This tracker contains issues and can't be deleted.
|
||
|
setting_display_member_projects_only: Display only projects I'm member of in the project jump box.
|
||
| config/locales/bs.yml (working copy) | ||
|---|---|---|
|
error_unable_to_connect: Unable to connect ({{value}})
|
||
|
error_can_not_remove_role: This role is in use and can not be deleted.
|
||
|
error_can_not_delete_tracker: This tracker contains issues and can't be deleted.
|
||
|
setting_display_member_projects_only: Display only projects I'm member of in the project jump box.
|
||
| config/locales/fr.yml (working copy) | ||
|---|---|---|
|
error_unable_to_connect: Unable to connect ({{value}})
|
||
|
error_can_not_remove_role: This role is in use and can not be deleted.
|
||
|
error_can_not_delete_tracker: This tracker contains issues and can't be deleted.
|
||
|
setting_display_member_projects_only: Display only projects I'm member of in the project jump box.
|
||
| config/locales/nl.yml (working copy) | ||
|---|---|---|
|
error_unable_to_connect: Unable to connect ({{value}})
|
||
|
error_can_not_remove_role: This role is in use and can not be deleted.
|
||
|
error_can_not_delete_tracker: This tracker contains issues and can't be deleted.
|
||
|
setting_display_member_projects_only: Display only projects I'm member of in the project jump box.
|
||
| config/locales/hr.yml (working copy) | ||
|---|---|---|
|
error_unable_to_connect: Unable to connect ({{value}})
|
||
|
error_can_not_remove_role: This role is in use and can not be deleted.
|
||
|
error_can_not_delete_tracker: This tracker contains issues and can't be deleted.
|
||
|
setting_display_member_projects_only: Display only projects I'm member of in the project jump box.
|
||
| config/locales/pl.yml (working copy) | ||
|---|---|---|
|
error_unable_to_connect: Unable to connect ({{value}})
|
||
|
error_can_not_remove_role: This role is in use and can not be deleted.
|
||
|
error_can_not_delete_tracker: This tracker contains issues and can't be deleted.
|
||
|
setting_display_member_projects_only: Display only projects I'm member of in the project jump box.
|
||
| config/locales/th.yml (working copy) | ||
|---|---|---|
|
error_unable_to_connect: Unable to connect ({{value}})
|
||
|
error_can_not_remove_role: This role is in use and can not be deleted.
|
||
|
error_can_not_delete_tracker: This tracker contains issues and can't be deleted.
|
||
|
setting_display_member_projects_only: Display only projects I'm member of in the project jump box.
|
||
| config/locales/no.yml (working copy) | ||
|---|---|---|
|
error_unable_to_connect: Unable to connect ({{value}})
|
||
|
error_can_not_remove_role: This role is in use and can not be deleted.
|
||
|
error_can_not_delete_tracker: This tracker contains issues and can't be deleted.
|
||
|
setting_display_member_projects_only: Display only projects I'm member of in the project jump box.
|
||
| config/locales/hu.yml (working copy) | ||
|---|---|---|
|
label_subtask_plural: Subtasks
|
||
|
error_can_not_delete_tracker: This tracker contains issues and can't be deleted.
|
||
|
label_project_copy_notifications: Send email notifications during the project copy
|
||
|
setting_display_member_projects_only: Display only projects I'm member of in the project jump box.
|
||
| config/locales/vi.yml (working copy) | ||
|---|---|---|
|
error_unable_to_connect: Unable to connect ({{value}})
|
||
|
error_can_not_remove_role: This role is in use and can not be deleted.
|
||
|
error_can_not_delete_tracker: This tracker contains issues and can't be deleted.
|
||
|
setting_display_member_projects_only: Display only projects I'm member of in the project jump box.
|
||