diff --git a/after_init.rb b/after_init.rb
index 0380ff06..47ae5def 100644
--- a/after_init.rb
+++ b/after_init.rb
@@ -42,9 +42,11 @@ def dmsf_init
parent: :new_object
end
# Main menu extension
- Redmine::MenuManager.map :top_menu do |menu|
- menu.push :dmsf, { controller: 'dmsf', action: 'index' }, caption: :menu_dmsf, html: { class: 'icon-dmsf' },
+ unless(defined?(Setting.plugin_redmine_dmsf) && Setting.plugin_redmine_dmsf['dmsf_global_menu_disabled'])
+ Redmine::MenuManager.map :top_menu do |menu|
+ menu.push :dmsf, { controller: 'dmsf', action: 'index' }, caption: :menu_dmsf, html: { class: 'icon-dmsf' },
if: Proc.new { User.current.allowed_to?(:view_dmsf_folders, nil, global: true) }
+ end
end
Redmine::AccessControl.map do |map|
diff --git a/app/views/settings/_dmsf_settings.html.erb b/app/views/settings/_dmsf_settings.html.erb
index daf37132..a733ca44 100644
--- a/app/views/settings/_dmsf_settings.html.erb
+++ b/app/views/settings/_dmsf_settings.html.erb
@@ -151,6 +151,15 @@
+
+ <%= content_tag :label, l(:label_dmsf_global_menu_disabled) %>
+ <%= check_box_tag 'settings[dmsf_global_menu_disabled]', true, @settings['dmsf_global_menu_disabled'] %>
+
+ <%= l(:note_dmsf_global_menu_disabled) %>
+ <%= l(:label_default) %>: <%= l(:general_text_No) %>
+
+
+
<%= l(:label_dmsf_columns) %>
diff --git a/config/locales/cs.yml b/config/locales/cs.yml
index 01333bc7..98a36047 100644
--- a/config/locales/cs.yml
+++ b/config/locales/cs.yml
@@ -456,6 +456,9 @@ cs:
label_column_workflow: Schvalování
label_column_author: Autor
+ label_dmsf_global_menu_disabled: Global DMS menu disabled
+ note_dmsf_global_menu_disabled: If yes, DMS menu item is not present in the top menu.
+
easy_pages:
modules:
dmsf_locked_documents: My locked documents
diff --git a/config/locales/de.yml b/config/locales/de.yml
index 7228c593..9a8c0684 100644
--- a/config/locales/de.yml
+++ b/config/locales/de.yml
@@ -452,6 +452,9 @@ de:
label_column_workflow: Workflow
label_column_author: Autor
+ label_dmsf_global_menu_disabled: Global DMS menu disabled
+ note_dmsf_global_menu_disabled: If yes, DMS menu item is not present in the top menu.
+
easy_pages:
modules:
dmsf_locked_documents: Von mir gesperrte Dokumente
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 294be10c..c12f9bb0 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -456,6 +456,9 @@ en:
label_column_workflow: Workflow
label_column_author: Author
+ label_dmsf_global_menu_disabled: Global DMS menu disabled
+ note_dmsf_global_menu_disabled: If yes, DMS menu item is not present in the top menu.
+
easy_pages:
modules:
dmsf_locked_documents: My locked documents
diff --git a/config/locales/es.yml b/config/locales/es.yml
index e4701178..4b65b9ad 100644
--- a/config/locales/es.yml
+++ b/config/locales/es.yml
@@ -456,6 +456,9 @@ es:
label_column_workflow: Flujo
label_column_author: Autor
+ label_dmsf_global_menu_disabled: Global DMS menu disabled
+ note_dmsf_global_menu_disabled: If yes, DMS menu item is not present in the top menu.
+
easy_pages:
modules:
dmsf_locked_documents: My locked documents
diff --git a/config/locales/fa.yml b/config/locales/fa.yml
index 0b664552..7d43ca8c 100644
--- a/config/locales/fa.yml
+++ b/config/locales/fa.yml
@@ -435,6 +435,9 @@ fa:
label_column_workflow: روال تایید
label_column_author: نویسنده
+ label_dmsf_global_menu_disabled: Global DMS menu disabled
+ note_dmsf_global_menu_disabled: If yes, DMS menu item is not present in the top menu.
+
easy_pages:
modules:
dmsf_locked_documents: اسناد قفل شدهی من
diff --git a/config/locales/fr.yml b/config/locales/fr.yml
index c32867bc..b2a32604 100644
--- a/config/locales/fr.yml
+++ b/config/locales/fr.yml
@@ -456,6 +456,9 @@ fr:
label_column_workflow: Flux
label_column_author: Auteur
+ label_dmsf_global_menu_disabled: Global DMS menu disabled
+ note_dmsf_global_menu_disabled: If yes, DMS menu item is not present in the top menu.
+
easy_pages:
modules:
dmsf_locked_documents: My locked documents
diff --git a/config/locales/hu.yml b/config/locales/hu.yml
index 906ff4ef..3a2919b8 100644
--- a/config/locales/hu.yml
+++ b/config/locales/hu.yml
@@ -455,6 +455,9 @@ hu:
label_column_workflow: Workflow
label_column_author: Szerző
+ label_dmsf_global_menu_disabled: Global DMS menu disabled
+ note_dmsf_global_menu_disabled: If yes, DMS menu item is not present in the top menu.
+
easy_pages:
modules:
dmsf_locked_documents: My locked documents
diff --git a/config/locales/it.yml b/config/locales/it.yml
index 1e63516b..a57ca720 100644
--- a/config/locales/it.yml
+++ b/config/locales/it.yml
@@ -456,6 +456,9 @@ it: # Italian strings thx 2 Matteo Arceci!
label_column_workflow: Darbų eiga
label_column_author: Autorius
+ label_dmsf_global_menu_disabled: Global DMS menu disabled
+ note_dmsf_global_menu_disabled: If yes, DMS menu item is not present in the top menu.
+
easy_pages:
modules:
dmsf_locked_documents: My locked documents
diff --git a/config/locales/ja.yml b/config/locales/ja.yml
index 3db54091..c89cafa0 100644
--- a/config/locales/ja.yml
+++ b/config/locales/ja.yml
@@ -457,6 +457,9 @@ ja:
label_column_workflow: ワークフロー
label_column_author: 作成者
+ label_dmsf_global_menu_disabled: Global DMS menu disabled
+ note_dmsf_global_menu_disabled: If yes, DMS menu item is not present in the top menu.
+
easy_pages:
modules:
dmsf_locked_documents: 自分がロック中の文書
diff --git a/config/locales/ko.yml b/config/locales/ko.yml
index d9d3c2b4..f2b9f912 100644
--- a/config/locales/ko.yml
+++ b/config/locales/ko.yml
@@ -456,6 +456,9 @@ ko:
label_column_workflow: 업무흐름
label_column_author: 저자
+ label_dmsf_global_menu_disabled: Global DMS menu disabled
+ note_dmsf_global_menu_disabled: If yes, DMS menu item is not present in the top menu.
+
easy_pages:
modules:
dmsf_locked_documents: 내 잠긴 파일
diff --git a/config/locales/nl.yml b/config/locales/nl.yml
index a95c1ffb..38936afb 100644
--- a/config/locales/nl.yml
+++ b/config/locales/nl.yml
@@ -456,6 +456,9 @@ nl:
label_column_workflow: Workflow
label_column_author: Auteur
+ label_dmsf_global_menu_disabled: Global DMS menu disabled
+ note_dmsf_global_menu_disabled: If yes, DMS menu item is not present in the top menu.
+
easy_pages:
modules:
dmsf_locked_documents: My locked documents
diff --git a/config/locales/pl.yml b/config/locales/pl.yml
index 743f3f99..13df5deb 100644
--- a/config/locales/pl.yml
+++ b/config/locales/pl.yml
@@ -456,6 +456,9 @@ pl:
label_column_workflow: Akceptacje
label_column_author: Autor
+ label_dmsf_global_menu_disabled: Global DMS menu disabled
+ note_dmsf_global_menu_disabled: If yes, DMS menu item is not present in the top menu.
+
easy_pages:
modules:
dmsf_locked_documents: My locked documents
diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml
index 40a5719d..113b60ce 100644
--- a/config/locales/pt-BR.yml
+++ b/config/locales/pt-BR.yml
@@ -456,6 +456,9 @@ pt-BR:
label_column_workflow: Fluxo
label_column_author: Autor
+ label_dmsf_global_menu_disabled: Global DMS menu disabled
+ note_dmsf_global_menu_disabled: If yes, DMS menu item is not present in the top menu.
+
easy_pages:
modules:
dmsf_locked_documents: My locked documents
diff --git a/config/locales/sl.yml b/config/locales/sl.yml
index 4a8d1d38..c8c5c5e4 100644
--- a/config/locales/sl.yml
+++ b/config/locales/sl.yml
@@ -456,6 +456,9 @@ sl:
label_column_workflow: Potek dela
label_column_author: Avtor
+ label_dmsf_global_menu_disabled: Global DMS menu disabled
+ note_dmsf_global_menu_disabled: If yes, DMS menu item is not present in the top menu.
+
easy_pages:
modules:
dmsf_locked_documents: My locked documents
diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml
index 06aaee7c..35c6aece 100644
--- a/config/locales/zh-TW.yml
+++ b/config/locales/zh-TW.yml
@@ -455,6 +455,9 @@ zh-TW:
label_column_workflow: 流程
label_column_author: 作者
+ label_dmsf_global_menu_disabled: Global DMS menu disabled
+ note_dmsf_global_menu_disabled: If yes, DMS menu item is not present in the top menu.
+
easy_pages:
modules:
dmsf_locked_documents: My locked documents
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index f7d788bd..94de57d7 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -456,6 +456,9 @@ zh:
label_column_workflow: 工作流程
label_column_author: 作者
+ label_dmsf_global_menu_disabled: Global DMS menu disabled
+ note_dmsf_global_menu_disabled: If yes, DMS menu item is not present in the top menu.
+
easy_pages:
modules:
dmsf_locked_documents: My locked documents
diff --git a/init.rb b/init.rb
index bf99833e..ec9c84f7 100644
--- a/init.rb
+++ b/init.rb
@@ -62,7 +62,8 @@ Redmine::Plugin.register :redmine_dmsf do
'dmsf_projects_as_subfolders' => nil,
'only_approval_zero_minor_version' => '0',
'dmsf_max_notification_receivers_info' => 10,
- 'office_bin' => 'libreoffice'
+ 'office_bin' => 'libreoffice',
+ 'dmsf_global_menu_disabled' => 0
}
end