Permalink
Browse files

Added an option in plugin settings so that admin links can be hidden …

…(closes #17)
  • Loading branch information...
jbbarth committed Feb 20, 2010
1 parent 14cd79f commit fb0496504cb9a73ed080f27aed0930054dd815ec
@@ -1,6 +1,6 @@
<% content_for :sidebar do %>
<div id="admin-menu">
- <% if User.current.admin? %>
+ <% if User.current.admin? && !Setting[:plugin_datacenter_plugin][:hide_admin_links] %>
<h3><%=l(:label_administration)%></h3>
<ul>
<li><%= link_to l(:label_project_plural), {:controller => 'admin', :action => 'projects'}, :class => 'projects' %></li>
@@ -3,3 +3,8 @@
<%= hidden_field_tag 'settings[multiple_select]', 0 %>
<%= check_box_tag 'settings[multiple_select]', "1", Setting.datacenter_multiselect? %>
</p>
+<p>
+ <label><%= l(:text_hide_admin_links_in_sidebar) %></label>
+ <%= check_box_tag 'settings[hide_admin_links]', 1,
+ Setting[:plugin_datacenter_plugin][:hide_admin_links] %>
+</p>
View
@@ -41,3 +41,5 @@ en:
field_appli: Application
field_appli_instance_ids: Applications
field_server_ids: Servers
+
+ text_hide_admin_links_in_sidebar: Hide admin links in sidebar ?
View
@@ -41,3 +41,5 @@ fr:
field_appli: Application
field_appli_instance_ids: Applications
field_server_ids: Serveurs
+
+ text_hide_admin_links_in_sidebar: Cacher les liens d'administration sur le côté ?
View
@@ -45,6 +45,7 @@
settings :default => {
'multiple_select' => "1", #false=checkboxes, true=multiple_select
+ 'hide_admin_links' => false,
'domain' => ""
},
:partial => 'settings/redmine_datacenter'

0 comments on commit fb04965

Please sign in to comment.