Author:   Lars Michelsen <[email protected]>
Date:     Thu Jun 14 09:19:33 2012 +0200
Committer:   Lars Michelsen <[email protected]>
Commit-Date: Thu Jun 14 09:19:33 2012 +0200

Added rotations to sidebar

---

 ChangeLog                                          |    1 +
 .../nagvis-js/classes/NagVisHeaderMenu.php         |    9 +++++++++
 share/userfiles/templates/default.header.html      |    9 +++++++++
 3 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 4e04aa1..b1f30d4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@ Core
   * Suppressing debug messages in non debug mode
 
 Frontend
+  * Added rotations to sidebar
   * Bugfix: When releasing relative coordinates the parent object is not 
highlighted anymore
   * Info page shows json_encode/json_decode capability of used PHP
 
diff --git a/share/frontend/nagvis-js/classes/NagVisHeaderMenu.php 
b/share/frontend/nagvis-js/classes/NagVisHeaderMenu.php
index 4bdf647..7b7cdfc 100644
--- a/share/frontend/nagvis-js/classes/NagVisHeaderMenu.php
+++ b/share/frontend/nagvis-js/classes/NagVisHeaderMenu.php
@@ -253,6 +253,14 @@ class NagVisHeaderMenu {
             $this->aMacros['usesSources'] = false;
         }
 
+        // Add permitted rotations
+        $this->aMacros['rotations'] = array();
+        foreach($this->CORE->getDefinedRotationPools() AS $poolName) {
+            if($AUTHORISATION->isPermitted('Rotation', 'view', $poolName)) {
+                $this->aMacros['rotations'][] = $poolName;
+            }
+        }
+
         // Initialize the enable fade option. Is overridden by the current map 
or left as is
         $this->aMacros['bEnableFade'] = cfg('defaults', 'headerfade');
 
@@ -303,6 +311,7 @@ class NagVisHeaderMenu {
             'langChangePassword' => l('Change password'),
             'langOpen' => l('Open'),
             'langMap' => l('Map'),
+            'langRotations' => l('Rotations'),
             'langMapOptions' => l('Map Options'),
             'langMapManageTmpl' => l('Manage Templates'),
             'langMapAddIcon' => l('Add Icon'),
diff --git a/share/userfiles/templates/default.header.html 
b/share/userfiles/templates/default.header.html
index 148318b..1aef2d0 100644
--- a/share/userfiles/templates/default.header.html
+++ b/share/userfiles/templates/default.header.html
@@ -155,6 +155,15 @@
     <li class="closed"><a class="title" href="#" 
onclick="sidebarToggleSubtree(this)">{$langMaps}</a>
         <ul style="display:none;">{sideMaps $maps $pathBase "Map"}</ul>
     </li>
+    {if count($rotations) > 0}
+    <li class="closed spacertop"><a class="title" href="#" 
onclick="sidebarToggleSubtree(this)">{$langRotations}</a>
+        <ul style="display:none;">
+        {foreach $rotations rotation}
+            <li class=lvl1><a 
href="{$pathBase}/frontend/nagvis-js/index.phpi?mod=Rotation&act=view&show={$rotation}">{$rotation}</a></li>
+        {/foreach}
+        </ul>
+    </li>
+    {/if}
 </ul>
 </div>
 <div id="headerspacer"></div>


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to