]> source.dussan.org Git - redmine.git/commitdiff
Merged r15501 to r15508 (#15880).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 12 Jun 2016 05:50:26 +0000 (05:50 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 12 Jun 2016 05:50:26 +0000 (05:50 +0000)
git-svn-id: http://svn.redmine.org/redmine/branches/3.3-stable@15513 e93f8b46-1217-0410-a6f0-8f06a7374b81

60 files changed:
app/controllers/issues_controller.rb
app/views/settings/_display.html.erb
config/locales/ar.yml
config/locales/az.yml
config/locales/bg.yml
config/locales/bs.yml
config/locales/ca.yml
config/locales/cs.yml
config/locales/da.yml
config/locales/de.yml
config/locales/el.yml
config/locales/en-GB.yml
config/locales/en.yml
config/locales/es-PA.yml
config/locales/es.yml
config/locales/et.yml
config/locales/eu.yml
config/locales/fa.yml
config/locales/fi.yml
config/locales/fr.yml
config/locales/gl.yml
config/locales/he.yml
config/locales/hr.yml
config/locales/hu.yml
config/locales/id.yml
config/locales/it.yml
config/locales/ja.yml
config/locales/ko.yml
config/locales/lt.yml
config/locales/lv.yml
config/locales/mk.yml
config/locales/mn.yml
config/locales/nl.yml
config/locales/no.yml
config/locales/pl.yml
config/locales/pt-BR.yml
config/locales/pt.yml
config/locales/ro.yml
config/locales/ru.yml
config/locales/sk.yml
config/locales/sl.yml
config/locales/sq.yml
config/locales/sr-YU.yml
config/locales/sr.yml
config/locales/sv.yml
config/locales/th.yml
config/locales/tr.yml
config/locales/uk.yml
config/locales/vi.yml
config/locales/zh-TW.yml
config/locales/zh.yml
config/settings.yml
lib/redmine.rb
lib/redmine/menu_manager.rb
public/javascripts/application.js
public/stylesheets/application.css
public/themes/alternate/stylesheets/application.css
public/themes/classic/stylesheets/application.css
test/functional/issues_controller_test.rb
test/unit/lib/redmine/menu_manager/menu_helper_test.rb

index 67956667a07d59b9f533c352eb51e5c8913a0422..95c58674cee8caab53133f4f8e1ea9415a65baaf 100644 (file)
@@ -362,7 +362,7 @@ class IssuesController < ApplicationController
   # Overrides Redmine::MenuManager::MenuController::ClassMethods for
   # when the "New issue" tab is enabled
   def current_menu_item
-    if Setting.new_project_issue_tab_enabled? && [:new, :create].include?(action_name.to_sym) 
+    if Setting.new_item_menu_tab == '1' && [:new, :create].include?(action_name.to_sym) 
       :new_issue
     else
       super
index 1185a7caefd25d782accd1259cb8cce3a04242d8..be3e70e346526d6d99958f15510a8a70f6ce1363 100644 (file)
@@ -25,7 +25,7 @@
 
 <p><%= setting_text_field :thumbnails_size, :size => 6 %></p>
 
-<p><%= setting_check_box :new_project_issue_tab_enabled %></p>
+<p><%= setting_select :new_item_menu_tab, [[l(:label_none), '0'], [l(:label_new_project_issue_tab_enabled), '1'], [l(:label_new_object_tab_enabled), '2']] %></p>
 </div>
 
 <%= submit_tag l(:button_save) %>
index e1317219295ea2756334c097f4222e21b16ca496..a265f62433be19a30c8dca19155384494433d933 100644 (file)
@@ -1201,7 +1201,9 @@ ar:
   button_filter: Filter
   mail_body_password_updated: Your password has been changed.
   label_no_preview: No preview available
-  setting_new_project_issue_tab_enabled: Display the "New issue" tab
   error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers
     for which you can create an issue
   label_tracker_all: All trackers
+  label_new_project_issue_tab_enabled: Display the "New issue" tab
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index 7a5cdb9241698fe2e29a05e5d3cc543859873514..649a55e429df0b5a1042e24825b994d2a4f5bf49 100644 (file)
@@ -1296,7 +1296,9 @@ az:
   button_filter: Filter
   mail_body_password_updated: Your password has been changed.
   label_no_preview: No preview available
-  setting_new_project_issue_tab_enabled: Display the "New issue" tab
   error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers
     for which you can create an issue
   label_tracker_all: All trackers
+  label_new_project_issue_tab_enabled: Display the "New issue" tab
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index b6412c92b9918e8c79d4dfa6c8dc79fb683b300f..e505068a3da825b77ac595881384a9be75419b20 100644 (file)
@@ -447,7 +447,6 @@ bg:
   setting_search_results_per_page: Резултати от търсене на страница
   setting_attachment_extensions_allowed: Позволени типове на файлове
   setting_attachment_extensions_denied: Разрешени типове на файлове
-  setting_new_project_issue_tab_enabled: Показване на меню-елемент "Нова задача"
 
   permission_add_project: Създаване на проект
   permission_add_subprojects: Създаване на подпроекти
@@ -1193,3 +1192,6 @@ bg:
   description_date_from: Въведете начална дата
   description_date_to: Въведете крайна дата
   text_repository_identifier_info: 'Позволени са малки букви (a-z), цифри, тирета и _.<br />Промяна след създаването му не е възможна.'
+  label_new_project_issue_tab_enabled: Показване на меню-елемент "Нова задача"
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index aa47a22e9e7bd66bcf7bd5c4c5f19423f075e1ba..d65fc10995629f3d05e5540fbb67d714fd7505aa 100644 (file)
@@ -1214,7 +1214,9 @@ bs:
   button_filter: Filter
   mail_body_password_updated: Your password has been changed.
   label_no_preview: No preview available
-  setting_new_project_issue_tab_enabled: Display the "New issue" tab
   error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers
     for which you can create an issue
   label_tracker_all: All trackers
+  label_new_project_issue_tab_enabled: Display the "New issue" tab
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index ec0b3ca5ae77ddf7c330802c52a0688a8ccc39c8..8ab7b0f4b6cf41f7c2eced3aae89309f9a1a588c 100644 (file)
@@ -1194,7 +1194,9 @@ ca:
   button_filter: Filter
   mail_body_password_updated: Your password has been changed.
   label_no_preview: No preview available
-  setting_new_project_issue_tab_enabled: Display the "New issue" tab
   error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers
     for which you can create an issue
   label_tracker_all: All trackers
+  label_new_project_issue_tab_enabled: Display the "New issue" tab
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index f0ef5a4762f231d3624723873f67ee377a1561af..c09b6d0138a1923f7248ddc9ffff79da52ecba2b 100644 (file)
@@ -1202,7 +1202,9 @@ cs:
   button_filter: Filtr
   mail_body_password_updated: Vaše heslo bylo změněno.
   label_no_preview: Náhled není k dispozici
-  setting_new_project_issue_tab_enabled: Zobraz záložku "Nový úkol"
   error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers
     for which you can create an issue
   label_tracker_all: All trackers
+  label_new_project_issue_tab_enabled: Zobraz záložku "Nový úkol"
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index 9b2020b33a1e3ef6b7233cc315e89dc2ebe6ce7d..77756968f49c33c765e7526b02433ced78c9d654 100644 (file)
@@ -1218,7 +1218,9 @@ da:
   button_filter: Filter
   mail_body_password_updated: Your password has been changed.
   label_no_preview: No preview available
-  setting_new_project_issue_tab_enabled: Display the "New issue" tab
   error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers
     for which you can create an issue
   label_tracker_all: All trackers
+  label_new_project_issue_tab_enabled: Display the "New issue" tab
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index bf6a11c48df0e1b918fd284c1a45aed50dcb5fe2..59ce6e6a8240654560b6707586d837601e873806 100644 (file)
@@ -1204,7 +1204,9 @@ de:
   label_relations: Beziehungen
   button_filter: Filter
   mail_body_password_updated: Ihr Passwort wurde geändert.
-  setting_new_project_issue_tab_enabled: Tab "Neues Ticket" anzeigen
   error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers
     for which you can create an issue
   label_tracker_all: All trackers
+  label_new_project_issue_tab_enabled: Tab "Neues Ticket" anzeigen
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index 66f96bfdc92a537fa4df9a032f3cc3ca2867ce3a..63c6a774a9b0c0f74ce377ff54da2e9f804b8f6d 100644 (file)
@@ -1201,7 +1201,9 @@ el:
   button_filter: Filter
   mail_body_password_updated: Your password has been changed.
   label_no_preview: No preview available
-  setting_new_project_issue_tab_enabled: Display the "New issue" tab
   error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers
     for which you can create an issue
   label_tracker_all: All trackers
+  label_new_project_issue_tab_enabled: Display the "New issue" tab
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index cf6f9770a81120c23857dd196fba1784d07d0625..0617b2227d7c842592a6ffefd763293155c81e5c 100644 (file)
@@ -1203,7 +1203,9 @@ en-GB:
   label_relations: Relations
   button_filter: Filter
   mail_body_password_updated: Your password has been changed.
-  setting_new_project_issue_tab_enabled: Display the "New issue" tab
   error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers
     for which you can create an issue
   label_tracker_all: All trackers
+  label_new_project_issue_tab_enabled: Display the "New issue" tab
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index 522cb5227bfd19e80065bea0e2037b281720106c..908aa119a9f453844727ee6257c50e05fa15da3b 100644 (file)
@@ -444,7 +444,7 @@ en:
   setting_search_results_per_page: Search results per page
   setting_attachment_extensions_allowed: Allowed extensions
   setting_attachment_extensions_denied: Disallowed extensions
-  setting_new_project_issue_tab_enabled: Display the "New issue" tab
+  setting_new_item_menu_tab: Project menu tab for creating new objects
 
   permission_add_project: Create project
   permission_add_subprojects: Create subprojects
@@ -995,6 +995,8 @@ en:
   label_field_format_enumeration: Key/value list
   label_default_values_for_new_users: Default values for new users
   label_relations: Relations
+  label_new_project_issue_tab_enabled: Display the "New issue" tab
+  label_new_object_tab_enabled: Display the "+" drop-down
 
   button_login: Login
   button_submit: Submit
index 0b76bdada82e721a260f848d3db80fab60fa39ba..e7072a7cdaa9bf26147370191465e2b9ff79806c 100644 (file)
@@ -1235,7 +1235,9 @@ es-PA:
   button_filter: Filter
   mail_body_password_updated: Your password has been changed.
   label_no_preview: No preview available
-  setting_new_project_issue_tab_enabled: Display the "New issue" tab
   error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers
     for which you can create an issue
   label_tracker_all: All trackers
+  label_new_project_issue_tab_enabled: Display the "New issue" tab
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index d9e781495dc20f3d100b5b37db4ac2ac936b52c1..6cef342f588f57717e9cd3c7656610f79f7ef341 100644 (file)
@@ -1233,7 +1233,9 @@ es:
   button_filter: Filter
   mail_body_password_updated: Your password has been changed.
   label_no_preview: No preview available
-  setting_new_project_issue_tab_enabled: Display the "New issue" tab
   error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers
     for which you can create an issue
   label_tracker_all: All trackers
+  label_new_project_issue_tab_enabled: Display the "New issue" tab
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index f8ae0fbd9436009150dc0d4d4c913b1300ec30ba..510c9236ccd19f2486dc4cceedc49380a5e4ff0a 100644 (file)
@@ -1205,7 +1205,9 @@ et:
   button_filter: Filter
   mail_body_password_updated: Your password has been changed.
   label_no_preview: No preview available
-  setting_new_project_issue_tab_enabled: Display the "New issue" tab
   error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers
     for which you can create an issue
   label_tracker_all: All trackers
+  label_new_project_issue_tab_enabled: Display the "New issue" tab
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index 1dbfed25c7db2f49d45fdd1493e61681b5ead083..ebece4218eb7d53fb717039607b9fdf64f6c23d8 100644 (file)
@@ -1202,7 +1202,9 @@ eu:
   button_filter: Filter
   mail_body_password_updated: Your password has been changed.
   label_no_preview: No preview available
-  setting_new_project_issue_tab_enabled: Display the "New issue" tab
   error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers
     for which you can create an issue
   label_tracker_all: All trackers
+  label_new_project_issue_tab_enabled: Display the "New issue" tab
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index b9e7377e67d9dab4cc8a7fd24098a702734e5f99..c9d527f677661718b99983759ebc9d189d4b31ee 100644 (file)
@@ -1202,7 +1202,9 @@ fa:
   button_filter: Filter
   mail_body_password_updated: Your password has been changed.
   label_no_preview: No preview available
-  setting_new_project_issue_tab_enabled: Display the "New issue" tab
   error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers
     for which you can create an issue
   label_tracker_all: All trackers
+  label_new_project_issue_tab_enabled: Display the "New issue" tab
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index 14aa38cc85ff839a50eb13cd787e9bcb3873b599..c2449b0f1edc6be8c06b12bd8a4ff3db92a6bef7 100644 (file)
@@ -1222,7 +1222,9 @@ fi:
   button_filter: Filter
   mail_body_password_updated: Your password has been changed.
   label_no_preview: No preview available
-  setting_new_project_issue_tab_enabled: Display the "New issue" tab
   error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers
     for which you can create an issue
   label_tracker_all: All trackers
+  label_new_project_issue_tab_enabled: Display the "New issue" tab
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index 760c84c95741f930a3439dcb25ed142a02d1f31a..49803506bd0534a18163ec0b46eb3f9f09e2590f 100644 (file)
@@ -456,7 +456,7 @@ fr:
   setting_attachment_extensions_denied: Extensions non autorisées
   setting_sys_api_key: Clé de protection de l'API
   setting_lost_password: Autoriser la réinitialisation par email de mot de passe perdu
-  setting_new_project_issue_tab_enabled: Afficher l'onglet "Nouvelle demande"
+  setting_new_item_menu_tab: Onglet de création d'objets dans le menu du project
 
   permission_add_project: Créer un projet
   permission_add_subprojects: Créer des sous-projets
@@ -1004,6 +1004,8 @@ fr:
   label_field_format_enumeration: Liste clé/valeur
   label_default_values_for_new_users: Valeurs par défaut pour les nouveaux utilisateurs
   label_relations: Relations
+  label_new_project_issue_tab_enabled: Afficher l'onglet "Nouvelle demande"
+  label_new_object_tab_enabled: Afficher le menu déroulant "+"
 
   button_login: Connexion
   button_submit: Soumettre
index 437bf4b3f8c937e1424e67f30b9d2ce46b44de11..d0069b2435300f558041fa45099f5f41242ea98a 100644 (file)
@@ -1209,7 +1209,9 @@ gl:
   button_filter: Filter
   mail_body_password_updated: Your password has been changed.
   label_no_preview: No preview available
-  setting_new_project_issue_tab_enabled: Display the "New issue" tab
   error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers
     for which you can create an issue
   label_tracker_all: All trackers
+  label_new_project_issue_tab_enabled: Display the "New issue" tab
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index aad81c4a0cdffb7fff5eda688d26f0af69ecf0b2..b17742433f81b708b6e6ad4ffa5b5542ab1cf17d 100644 (file)
@@ -1206,7 +1206,9 @@ he:
   button_filter: Filter
   mail_body_password_updated: Your password has been changed.
   label_no_preview: No preview available
-  setting_new_project_issue_tab_enabled: Display the "New issue" tab
   error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers
     for which you can create an issue
   label_tracker_all: All trackers
+  label_new_project_issue_tab_enabled: Display the "New issue" tab
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index a09064a5fbb6e56c90d88cb3dd3576456fc915c8..9e37b7a2e676d33ee60687611ecba6192d42cab9 100644 (file)
@@ -1200,7 +1200,9 @@ hr:
   button_filter: Filter
   mail_body_password_updated: Your password has been changed.
   label_no_preview: No preview available
-  setting_new_project_issue_tab_enabled: Display the "New issue" tab
   error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers
     for which you can create an issue
   label_tracker_all: All trackers
+  label_new_project_issue_tab_enabled: Display the "New issue" tab
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index 6f7f075a89338ba2483a64ec75f2b9aae4319787..b8e9058f828d136f5d59ee141ffccbb29851369b 100644 (file)
   button_filter: Filter
   mail_body_password_updated: Your password has been changed.
   label_no_preview: No preview available
-  setting_new_project_issue_tab_enabled: Display the "New issue" tab
   error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers
     for which you can create an issue
   label_tracker_all: All trackers
+  label_new_project_issue_tab_enabled: Display the "New issue" tab
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index dfa63dc8e11be82d3ca0556b32bd0841918d8a93..750eb2e446fdba37aacff3d5e4bbcea68cd925e8 100644 (file)
@@ -1205,7 +1205,9 @@ id:
   button_filter: Filter
   mail_body_password_updated: Your password has been changed.
   label_no_preview: No preview available
-  setting_new_project_issue_tab_enabled: Display the "New issue" tab
   error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers
     for which you can create an issue
   label_tracker_all: All trackers
+  label_new_project_issue_tab_enabled: Display the "New issue" tab
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index b5310caadd4f43bb5b2f9a19ab30cabcbecbd6f8..57afce9f0a0feacc704708090e685a56826d1fe6 100644 (file)
@@ -1196,7 +1196,9 @@ it:
   button_filter: Filter
   mail_body_password_updated: Your password has been changed.
   label_no_preview: No preview available
-  setting_new_project_issue_tab_enabled: Display the "New issue" tab
   error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers
     for which you can create an issue
   label_tracker_all: All trackers
+  label_new_project_issue_tab_enabled: Display the "New issue" tab
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index 2c5a63514b5cc5b6e6949473051d30aae5ea7379..e10e1bd148302216b8baf8638600b575f1297a40 100644 (file)
@@ -1212,6 +1212,8 @@ ja:
   button_filter: フィルタ
   mail_body_password_updated: パスワードが変更されました。
   label_no_preview: このファイルはプレビューできません
-  setting_new_project_issue_tab_enabled: '"新しいチケット" タブを表示'
   error_no_tracker_allowed_for_new_issue_in_project: このプロジェクトにはチケットの追加が許可されているトラッカーがありません
   label_tracker_all: すべてのトラッカー
+  label_new_project_issue_tab_enabled: '"新しいチケット" タブを表示'
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index 5f9fd63da8b5c7f55d25bc6e26c048961c04d6ac..2fee6dc19a699fe0019e975bef0e6a38e26ff0b7 100644 (file)
@@ -1240,7 +1240,9 @@ ko:
   button_filter: 필터
   mail_body_password_updated: 암호가 변경되었습니다.
   label_no_preview: 미리보기 없음
-  setting_new_project_issue_tab_enabled: '"새 일감" 탭 표시'
   error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers
     for which you can create an issue
   label_tracker_all: All trackers
+  label_new_project_issue_tab_enabled: '"새 일감" 탭 표시'
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index 6aa63dcac583115369a2ac44f66d3128a7619af4..2a8b0b5d262670e6710e16aaea9b442aeb370614 100644 (file)
@@ -1190,7 +1190,9 @@ lt:
   button_filter: Filter
   mail_body_password_updated: Your password has been changed.
   label_no_preview: No preview available
-  setting_new_project_issue_tab_enabled: Display the "New issue" tab
   error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers
     for which you can create an issue
   label_tracker_all: All trackers
+  label_new_project_issue_tab_enabled: Display the "New issue" tab
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index 2a7dc3c1d9fbe6a105e638f99bfa6bac0d4cef6e..81184dfac24c4e61452f29c6fcf11360a6a65e9a 100644 (file)
@@ -1195,7 +1195,9 @@ lv:
   button_filter: Filter
   mail_body_password_updated: Your password has been changed.
   label_no_preview: No preview available
-  setting_new_project_issue_tab_enabled: Display the "New issue" tab
   error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers
     for which you can create an issue
   label_tracker_all: All trackers
+  label_new_project_issue_tab_enabled: Display the "New issue" tab
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index 02757abe0c8ac2b9b4324ff443f584195881784a..e7dc7ee3ebdb26a4a33dae352e1aa54d4916504b 100644 (file)
@@ -1201,7 +1201,9 @@ mk:
   button_filter: Filter
   mail_body_password_updated: Your password has been changed.
   label_no_preview: No preview available
-  setting_new_project_issue_tab_enabled: Display the "New issue" tab
   error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers
     for which you can create an issue
   label_tracker_all: All trackers
+  label_new_project_issue_tab_enabled: Display the "New issue" tab
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index 6176c97e5eb75adae75251e61d6f5320bdb30a1e..eb63b988f158e581d7855ff1ace572da52d4f385 100644 (file)
@@ -1202,7 +1202,9 @@ mn:
   button_filter: Filter
   mail_body_password_updated: Your password has been changed.
   label_no_preview: No preview available
-  setting_new_project_issue_tab_enabled: Display the "New issue" tab
   error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers
     for which you can create an issue
   label_tracker_all: All trackers
+  label_new_project_issue_tab_enabled: Display the "New issue" tab
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index e356bab91c31894cc5008cbbbda8c2244f1a05d0..23630b28ea3a4b35ff87117b1c2ee6e36ba2c814 100644 (file)
@@ -1180,7 +1180,9 @@ nl:
   button_filter: Filter
   mail_body_password_updated: Your password has been changed.
   label_no_preview: No preview available
-  setting_new_project_issue_tab_enabled: Display the "New issue" tab
   error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers
     for which you can create an issue
   label_tracker_all: All trackers
+  label_new_project_issue_tab_enabled: Display the "New issue" tab
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index 083a956ac45ba77fb32d8c718a0b18546a6673dd..ce5aef038dc8bfd16297f68db57a6b8909b0cd4d 100644 (file)
   button_filter: Filter
   mail_body_password_updated: Your password has been changed.
   label_no_preview: No preview available
-  setting_new_project_issue_tab_enabled: Display the "New issue" tab
   error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers
     for which you can create an issue
   label_tracker_all: All trackers
+  label_new_project_issue_tab_enabled: Display the "New issue" tab
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index a183a21307eacb4751f6c365fc1dd06c8ffc1f52..0534b6bee7a0364432290b252668592c8127d3cf 100644 (file)
@@ -1216,7 +1216,9 @@ pl:
   button_filter: Filter
   mail_body_password_updated: Your password has been changed.
   label_no_preview: No preview available
-  setting_new_project_issue_tab_enabled: Display the "New issue" tab
   error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers
     for which you can create an issue
   label_tracker_all: All trackers
+  label_new_project_issue_tab_enabled: Display the "New issue" tab
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index b8c360141528940048a12ad2721fc48e3b423f4a..28c5f230349c74285941211b48a94d249235d6c3 100644 (file)
@@ -1219,7 +1219,9 @@ pt-BR:
   button_filter: Filter
   mail_body_password_updated: Your password has been changed.
   label_no_preview: No preview available
-  setting_new_project_issue_tab_enabled: Display the "New issue" tab
   error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers
     for which you can create an issue
   label_tracker_all: All trackers
+  label_new_project_issue_tab_enabled: Display the "New issue" tab
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index 38b4b882ddb6e339fafdafcc79b161728067e632..6656b7944a714287a25cc0415486bacb2d42c139 100644 (file)
@@ -1203,7 +1203,9 @@ pt:
   button_filter: Filter
   mail_body_password_updated: Your password has been changed.
   label_no_preview: No preview available
-  setting_new_project_issue_tab_enabled: Display the "New issue" tab
   error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers
     for which you can create an issue
   label_tracker_all: All trackers
+  label_new_project_issue_tab_enabled: Display the "New issue" tab
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index 34e5405e3a63775ee567728ade47ab71b0d37581..03e937afa1d5ca3b704c65fba385372464171f28 100644 (file)
@@ -1196,7 +1196,9 @@ ro:
   button_filter: Filter
   mail_body_password_updated: Your password has been changed.
   label_no_preview: No preview available
-  setting_new_project_issue_tab_enabled: Display the "New issue" tab
   error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers
     for which you can create an issue
   label_tracker_all: All trackers
+  label_new_project_issue_tab_enabled: Display the "New issue" tab
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index fdce0f2539d9d1bbcd66381ee0296d13ec6843a6..363d1804cf01447684322bbf67761d5138009afd 100644 (file)
@@ -1302,7 +1302,9 @@ ru:
   button_filter: Filter
   mail_body_password_updated: Your password has been changed.
   label_no_preview: No preview available
-  setting_new_project_issue_tab_enabled: Display the "New issue" tab
   error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers
     for which you can create an issue
   label_tracker_all: All trackers
+  label_new_project_issue_tab_enabled: Display the "New issue" tab
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index b6c843947b2980ff6c167235a13af49c5855795f..276c8ff2cc99ca11547078a2b7693c8563f04fb4 100644 (file)
@@ -1191,7 +1191,9 @@ sk:
   button_filter: Filter
   mail_body_password_updated: Your password has been changed.
   label_no_preview: No preview available
-  setting_new_project_issue_tab_enabled: Display the "New issue" tab
   error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers
     for which you can create an issue
   label_tracker_all: All trackers
+  label_new_project_issue_tab_enabled: Display the "New issue" tab
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index 7d2d755fe2e110189a8a1425133dd87466eff6f1..d8f493a554a2848cd0fc880bc38703145c731306 100644 (file)
@@ -1201,7 +1201,9 @@ sl:
   button_filter: Filter
   mail_body_password_updated: Your password has been changed.
   label_no_preview: No preview available
-  setting_new_project_issue_tab_enabled: Display the "New issue" tab
   error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers
     for which you can create an issue
   label_tracker_all: All trackers
+  label_new_project_issue_tab_enabled: Display the "New issue" tab
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index 98d1f5e8a6f1613da3b31dddf73d0b57d523be46..658183886b64613ff8509eee77a8bc51b9537097 100644 (file)
@@ -1197,7 +1197,9 @@ sq:
   button_filter: Filter
   mail_body_password_updated: Your password has been changed.
   label_no_preview: No preview available
-  setting_new_project_issue_tab_enabled: Display the "New issue" tab
   error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers
     for which you can create an issue
   label_tracker_all: All trackers
+  label_new_project_issue_tab_enabled: Display the "New issue" tab
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index bf35302d2354c93bdfc5e762aade25b478e50640..0ae915f25c960108f50324a049866e95ef2f3a2b 100644 (file)
@@ -1203,7 +1203,9 @@ sr-YU:
   button_filter: Filter
   mail_body_password_updated: Your password has been changed.
   label_no_preview: No preview available
-  setting_new_project_issue_tab_enabled: Display the "New issue" tab
   error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers
     for which you can create an issue
   label_tracker_all: All trackers
+  label_new_project_issue_tab_enabled: Display the "New issue" tab
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index 9d12a7d6025dac43d1a7c77bcd7b0bb3ad5d88ac..5c27ec2be4f124253400f541c15db2be3b6d4e87 100644 (file)
@@ -1202,7 +1202,9 @@ sr:
   button_filter: Filter
   mail_body_password_updated: Your password has been changed.
   label_no_preview: No preview available
-  setting_new_project_issue_tab_enabled: Display the "New issue" tab
   error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers
     for which you can create an issue
   label_tracker_all: All trackers
+  label_new_project_issue_tab_enabled: Display the "New issue" tab
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index 4bdf72a51b3f4a05a70b15e76e9693b04fc4d43b..059852400ae5700ab277f4f3eab17b0f22d076f5 100644 (file)
@@ -1234,7 +1234,9 @@ sv:
   button_filter: Filter
   mail_body_password_updated: Your password has been changed.
   label_no_preview: No preview available
-  setting_new_project_issue_tab_enabled: Display the "New issue" tab
   error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers
     for which you can create an issue
   label_tracker_all: All trackers
+  label_new_project_issue_tab_enabled: Display the "New issue" tab
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index bfdc38490f9b1dbf5a394d7c86a769846f30f825..c25b780bf03001a38fe5751f45e89f45be4bc61a 100644 (file)
@@ -1198,7 +1198,9 @@ th:
   button_filter: Filter
   mail_body_password_updated: Your password has been changed.
   label_no_preview: No preview available
-  setting_new_project_issue_tab_enabled: Display the "New issue" tab
   error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers
     for which you can create an issue
   label_tracker_all: All trackers
+  label_new_project_issue_tab_enabled: Display the "New issue" tab
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index 8eeb40698613e7e0ceedfce3ddbdd9e23afe1511..7eb5f05e86b433e83c074959ca8ce0fd48ca68e1 100644 (file)
@@ -1208,7 +1208,9 @@ tr:
   button_filter: Filter
   mail_body_password_updated: Your password has been changed.
   label_no_preview: No preview available
-  setting_new_project_issue_tab_enabled: Display the "New issue" tab
   error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers
     for which you can create an issue
   label_tracker_all: All trackers
+  label_new_project_issue_tab_enabled: Display the "New issue" tab
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index cb24471591ef8547439b0432c1618388f3595893..8ea60d4a9f538c60d834f2956c34f95a30a82fd5 100644 (file)
@@ -1196,7 +1196,9 @@ uk:
   button_filter: Filter
   mail_body_password_updated: Your password has been changed.
   label_no_preview: No preview available
-  setting_new_project_issue_tab_enabled: Display the "New issue" tab
   error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers
     for which you can create an issue
   label_tracker_all: All trackers
+  label_new_project_issue_tab_enabled: Display the "New issue" tab
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index 04a4b45b7785f90a097303aa2c7635683a5a346f..73405c154d7b4023f12f5bdd1cd9a77d359cc229 100644 (file)
@@ -1254,7 +1254,9 @@ vi:
   button_filter: Filter
   mail_body_password_updated: Your password has been changed.
   label_no_preview: No preview available
-  setting_new_project_issue_tab_enabled: Display the "New issue" tab
   error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers
     for which you can create an issue
   label_tracker_all: All trackers
+  label_new_project_issue_tab_enabled: Display the "New issue" tab
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index 7ce98871c1e1863452703857d6529fa717be2311..6722bb0728ecedb8e472bfa3994d224e7c4f74d9 100644 (file)
   setting_search_results_per_page: 每一頁的搜尋結果數目
   setting_attachment_extensions_allowed: 允許使用的附檔名
   setting_attachment_extensions_denied: 禁止使用的副檔名
-  setting_new_project_issue_tab_enabled: 顯示「建立新議題」標籤頁面
 
   permission_add_project: 建立專案
   permission_add_subprojects: 建立子專案
   description_date_from: 輸入起始日期
   description_date_to: 輸入結束日期
   text_repository_identifier_info: '僅允許使用小寫英文字母 (a-z), 阿拉伯數字, 虛線與底線。<br />一旦儲存之後, 代碼便無法再次被更改。'
+  label_new_project_issue_tab_enabled: 顯示「建立新議題」標籤頁面
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index d66b2954cf80e34cdc5479c36006ecfdf5b29b92..9837307344a48a2dac3703e610f295aea37f6315 100644 (file)
@@ -1194,7 +1194,9 @@ zh:
   button_filter: 设置为过滤条件
   mail_body_password_updated: 您的密码已经变更。
   label_no_preview: 没有可以显示的预览内容
-  setting_new_project_issue_tab_enabled: 显示“新建问题”标签
   error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers
     for which you can create an issue
   label_tracker_all: All trackers
+  label_new_project_issue_tab_enabled: 显示“新建问题”标签
+  setting_new_item_menu_tab: Project menu tab for creating new objects
+  label_new_object_tab_enabled: Display the "+" drop-down
index fd807c8a112b5f172879bfc4c383672dec54ae2d..807f9b7a7d96f35f7225b5539e7fd3533b8597eb 100644 (file)
@@ -275,5 +275,5 @@ non_working_week_days:
   default:
   - '6'
   - '7'
-new_project_issue_tab_enabled:
-  default: 0
+new_item_menu_tab:
+  default: 2
index 6dfc880ff20f561243de7937effe4eaee6f4180f..71722cc8e2bfe6e0af973d815e4b08781c86be5d 100644 (file)
@@ -226,6 +226,26 @@ Redmine::MenuManager.map :admin_menu do |menu|
 end
 
 Redmine::MenuManager.map :project_menu do |menu|
+  menu.push :new_object, nil, :caption => ' + ',
+              :if => Proc.new { |p| Setting.new_item_menu_tab == '2' },
+              :html => { :id => 'new-object', :onclick => 'toggleNewObjectDropdown(); return false;' }
+  menu.push :new_issue_sub, { :controller => 'issues', :action => 'new', :copy_from => nil }, :param => :project_id, :caption => :label_issue_new,
+              :html => { :accesskey => Redmine::AccessKeys.key_for(:new_issue) },
+              :if => Proc.new { |p| Issue.allowed_target_trackers(p).any? },
+              :permission => :add_issues,
+              :parent => :new_object
+  menu.push :new_issue_category, {:controller => 'issue_categories', :action => 'new'}, :param => :project_id, :caption => :label_issue_category_new,
+              :parent => :new_object
+  menu.push :new_version, {:controller => 'versions', :action => 'new'}, :param => :project_id, :caption => :label_version_new,
+              :parent => :new_object
+  menu.push :new_news, {:controller => 'news', :action => 'new'}, :param => :project_id, :caption => :label_news_new,
+              :parent => :new_object
+  menu.push :new_document, {:controller => 'documents', :action => 'new'}, :param => :project_id, :caption => :label_document_new,
+              :parent => :new_object
+  menu.push :new_wiki_page, {:controller => 'wiki', :action => 'new'}, :param => :project_id, :caption => :label_wiki_page_new,
+              :parent => :new_object
+  menu.push :new_file, {:controller => 'files', :action => 'new'}, :param => :project_id, :caption => :label_attachment_new,
+              :parent => :new_object
   menu.push :overview, { :controller => 'projects', :action => 'show' }
   menu.push :activity, { :controller => 'activities', :action => 'index' }
   menu.push :roadmap, { :controller => 'versions', :action => 'index' }, :param => :project_id,
@@ -233,7 +253,7 @@ Redmine::MenuManager.map :project_menu do |menu|
   menu.push :issues, { :controller => 'issues', :action => 'index' }, :param => :project_id, :caption => :label_issue_plural
   menu.push :new_issue, { :controller => 'issues', :action => 'new', :copy_from => nil }, :param => :project_id, :caption => :label_issue_new,
               :html => { :accesskey => Redmine::AccessKeys.key_for(:new_issue) },
-              :if => Proc.new { |p| Setting.new_project_issue_tab_enabled? && Issue.allowed_target_trackers(p).any? },
+              :if => Proc.new { |p| Setting.new_item_menu_tab == '1' && Issue.allowed_target_trackers(p).any? },
               :permission => :add_issues
   menu.push :gantt, { :controller => 'gantts', :action => 'show' }, :param => :project_id, :caption => :label_gantt
   menu.push :calendar, { :controller => 'calendars', :action => 'show' }, :param => :project_id, :caption => :label_calendar
index fa7777065355374d614b4f7d458527f10df69f73..3d19edce7f4542a093b1b741384b3e3b8fdb1a6d 100644 (file)
@@ -147,7 +147,15 @@ module Redmine
       end
 
       def render_single_menu_node(item, caption, url, selected)
-        link_to(h(caption), url, item.html_options(:selected => selected))
+        options = item.html_options(:selected => selected)
+
+        # virtual nodes are only there for their children to be displayed in the menu
+        # and should not do anything on click, except if otherwise defined elsewhere
+        if url.blank?
+          url = '#'
+          options.reverse_merge!(:onclick => 'return false;')
+        end
+        link_to(h(caption), url, options)
       end
 
       def render_unattached_menu_item(menu_item, project)
@@ -433,7 +441,13 @@ module Redmine
       # * Checking the permission or the url target (project only)
       # * Checking the conditions of the item
       def allowed?(user, project)
-        if user && project
+        if url.blank?
+          # this is a virtual node that is only there for its children to be diplayed in the menu
+          # it is considered an allowed node if at least one of the children is allowed
+          all_children = children
+          all_children += child_menus.call(project) if child_menus
+          return false unless all_children.detect{|child| child.allowed?(user, project) }
+        elsif user && project
           if permission
             unless user.allowed_to?(permission, project)
               return false
index 347611bb28c70cc795f9fe56ee2ca1cdf1ca8529..eedeae08b403b2b3ea3247dca923f4be0e966e2c 100644 (file)
@@ -725,6 +725,15 @@ function toggleDisabledInit() {
   $('input[data-disables], input[data-enables], input[data-shows]').each(toggleDisabledOnChange);
 }
 
+function toggleNewObjectDropdown() {
+  var dropdown = $('#new-object + ul.menu-children');
+  if(dropdown.hasClass('visible')){
+    dropdown.removeClass('visible');
+  }else{
+    dropdown.addClass('visible');
+  }
+}
+
 (function ( $ ) {
 
   // detect if native date input is supported
index 021cb822dac911ab06acf4f9d6d7ff28c51389c9..3ab2eccf29895fe4c46678d9c0afe4e6e3dae085 100644 (file)
@@ -51,7 +51,24 @@ pre, code {font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace;}
   padding: 4px 10px 4px 10px;
 }
 #main-menu li a:hover {background:#759FCF; color:#fff;}
+#main-menu li:hover ul.menu-children, #main-menu li ul.menu-children.visible {display: block;}
 #main-menu li a.selected, #main-menu li a.selected:hover {background:#fff; color:#555;}
+#main-menu li a.new-object { background-color:#759FCF; }
+
+#main-menu .menu-children {
+  display: none;
+  position:absolute;
+  width: inherit;
+  z-index:1;
+  background-color:#fff;
+  border-right: 1px solid #759FCF;
+  border-bottom: 1px solid #759FCF;
+  border-left: 1px solid #759FCF;
+}
+#main-menu .menu-children li {float:left; clear:both; width:100%;}
+#main-menu .menu-children li a {color: #555; background-color:#fff; font-weight:normal;}
+#main-menu .menu-children li a:hover {color: #fff; background-color: #759FCF;}
+
 #main-menu .tabs-buttons {
   right: 6px;
   background-color: transparent;
index efa1129edd45c177c055132163e62df828d65abe..4ad6b7923ec6cfcbafc01e39713b21bf5b542f7e 100644 (file)
@@ -13,6 +13,15 @@ h2, h3, h4, .wiki h1, .wiki h2, .wiki h3 {border-bottom: 0px;}
 #main-menu li a { background-color: #507AAA; font-weight: bold;}
 #main-menu li a:hover { background: #507AAA; text-decoration: underline; }
 #main-menu li a.selected, #main-menu li a.selected:hover { background-color:#EEEEEE; }
+#main-menu li a.new-object { background-color:#507AAA; text-decoration: none; }
+
+#main-menu .menu-children {
+  border-right: 1px solid #507AAA;
+  border-bottom: 1px solid #507AAA;
+  border-left: 1px solid #507AAA;
+}
+#main-menu .menu-children li a:hover { background-color: #507AAA;}
+
 
 /* Tables */
 table.list tbody td, table.list tbody tr:hover td { border: solid 1px #d7d7d7; }
index 3f855fe96df3fd8bf39257ade9081c7016321c26..523104dcbc97935f357b3ed02ed18025caa5f4f0 100644 (file)
@@ -12,6 +12,15 @@ body{ color:#303030; background:#e8eaec; }
 #main-menu li a { background-color: #578bb8; border-right: 1px solid #fff; font-size: 90%; padding: 4px 8px 4px 8px; font-weight: bold; }
 #main-menu li a:hover { background-color: #80b0da; color: #ffffff; }
 #main-menu li a.selected, #main-menu li a.selected:hover { background-color: #80b0da; color: #ffffff; }
+#main-menu li a.new-object { background-color:#80b0da; }
+
+#main-menu .menu-children {
+  border-right: 1px solid #80b0da;
+  border-bottom: 1px solid #80b0da;
+  border-left: 1px solid #80b0da;
+}
+#main-menu .menu-children li a { border-right: none; }
+#main-menu .menu-children li a:hover { background-color: #80b0da }
 
 #footer { background-color: #578bb8; border: 0; color: #fff;}
 #footer a { color: #fff; font-weight: bold; }
index dc50d13310dcc475a3cacfcbcf663df4d6182423..046efb85635c503441126dc3fbdb384c66985a51 100644 (file)
@@ -1104,7 +1104,7 @@ class IssuesControllerTest < ActionController::TestCase
   end
 
   def test_index_should_not_include_new_issue_tab_when_disabled
-    with_settings :new_project_issue_tab_enabled => '0' do
+    with_settings :new_item_menu_tab => '0' do
       @request.session[:user_id] = 2
       get :index, :project_id => 1
       assert_select '#main-menu a.new-issue', 0
@@ -1112,7 +1112,7 @@ class IssuesControllerTest < ActionController::TestCase
   end
 
   def test_index_should_include_new_issue_tab_when_enabled
-    with_settings :new_project_issue_tab_enabled => '1' do
+    with_settings :new_item_menu_tab => '1' do
       @request.session[:user_id] = 2
       get :index, :project_id => 1
       assert_select '#main-menu a.new-issue[href="/projects/ecookbook/issues/new"]', :text => 'New issue'
@@ -1120,7 +1120,7 @@ class IssuesControllerTest < ActionController::TestCase
   end
 
   def test_new_should_have_new_issue_tab_as_current_menu_item
-    with_settings :new_project_issue_tab_enabled => '1' do
+    with_settings :new_item_menu_tab => '1' do
       @request.session[:user_id] = 2
       get :new, :project_id => 1
       assert_select '#main-menu a.new-issue.selected'
@@ -1128,7 +1128,7 @@ class IssuesControllerTest < ActionController::TestCase
   end
 
   def test_index_should_not_include_new_issue_tab_for_project_without_trackers
-    with_settings :new_project_issue_tab_enabled => '1' do
+    with_settings :new_item_menu_tab => '1' do
       Project.find(1).trackers.clear
   
       @request.session[:user_id] = 2
@@ -1138,7 +1138,7 @@ class IssuesControllerTest < ActionController::TestCase
   end
 
   def test_index_should_not_include_new_issue_tab_for_users_with_copy_issues_permission_only
-    with_settings :new_project_issue_tab_enabled => '1' do
+    with_settings :new_item_menu_tab => '1' do
       role = Role.find(1)
       role.remove_permission! :add_issues
       role.add_permission! :copy_issues
index 404ec64065d79c7620da4682d0564a526d50ff28..e19f066e0b6841da8e915f98ec52a2da01ca25f6 100644 (file)
@@ -208,6 +208,41 @@ class Redmine::MenuManager::MenuHelperTest < ActionView::TestCase
       end
     end
   end
+  def test_render_empty_virtual_menu_node_with_children
+
+    # only empty item with no click target
+    Redmine::MenuManager.map :menu1 do |menu|
+      menu.push(:parent_node, nil, { })
+    end
+
+    # parent with unallowed unattached child
+    Redmine::MenuManager.map :menu2 do |menu|
+      menu.push(:parent_node, nil, {:children => Proc.new {|p|
+         [Redmine::MenuManager::MenuItem.new("test_child_unallowed", {:controller => 'issues', :action => 'new'}, {})]
+       } })
+    end
+
+    # parent with unallowed standard child
+    Redmine::MenuManager.map :menu3 do |menu|
+      menu.push(:parent_node, nil, {})
+      menu.push(:test_child_unallowed, {:controller =>'issues', :action => 'new'}, {:parent => :parent_node})
+    end
+
+    # should not be displayed to anonymous
+    User.current = User.find(6)
+    assert_nil render_menu(:menu1, Project.find(1))
+    assert_nil render_menu(:menu2, Project.find(1))
+    assert_nil render_menu(:menu3, Project.find(1))
+
+    # should be displayed to an admin
+    User.current = User.find(1)
+    @output_buffer = render_menu(:menu2, Project.find(1))
+    assert_select("ul li a.parent-node", "Parent node")
+    @output_buffer = render_menu(:menu3, Project.find(1))
+    assert_select("ul li a.parent-node", "Parent node")
+
+  end
 
   def test_render_menu_node_with_children_without_an_array
     parent_node = Redmine::MenuManager::MenuItem.new(:parent_node,