Module: nagvis
Branch: master
Commit: cdf0c34d7fe4420e51ee2011abe9a900210f21c7
URL:    
http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=cdf0c34d7fe4420e51ee2011abe9a900210f21c7

Author: Lars Michelsen <[email protected]>
Date:   Mon Apr 26 14:13:36 2010 +0200

Added backlink from WUI to regular map view

---

 .../nagvis-js/classes/NagVisHeaderMenu.php         |    8 +++-----
 share/userfiles/templates/default.header.html      |    2 ++
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/share/frontend/nagvis-js/classes/NagVisHeaderMenu.php 
b/share/frontend/nagvis-js/classes/NagVisHeaderMenu.php
index 463444a..f51ca67 100644
--- a/share/frontend/nagvis-js/classes/NagVisHeaderMenu.php
+++ b/share/frontend/nagvis-js/classes/NagVisHeaderMenu.php
@@ -108,11 +108,8 @@ class NagVisHeaderMenu {
                $this->aMacros['bRotation'] = $this->bRotation;
                
                // Check if the user is permitted to edit the current 
map/automap
-               if($this->CORE->getAuthorization() !== null && 
$this->CORE->getAuthorization()->isPermitted($this->aMacros['mod'], 'edit', 
$this->UHANDLER->get('show'))) {
-                       $this->aMacros['permittedEdit'] = true;
-               } else {
-                       $this->aMacros['permittedEdit'] = false;
-               }
+               $this->aMacros['permittedView'] = 
$this->CORE->getAuthorization() !== null && 
$this->CORE->getAuthorization()->isPermitted($this->aMacros['mod'], 'view', 
$this->UHANDLER->get('show'));
+               $this->aMacros['permittedEdit'] = 
$this->CORE->getAuthorization() !== null && 
$this->CORE->getAuthorization()->isPermitted($this->aMacros['mod'], 'edit', 
$this->UHANDLER->get('show'));
                
                $this->aMacros['currentUser'] = 
$this->AUTHORISATION->getAuthentication()->getUser();
                
@@ -309,6 +306,7 @@ class NagVisHeaderMenu {
                        'langStateless' => 
$this->CORE->getLang()->getText('Stateless'),
                        'langSpecial' => 
$this->CORE->getLang()->getText('special'),
                        'langEditMap' => 
$this->CORE->getLang()->getText('editMap'),
+                       'langViewMap' => $this->CORE->getLang()->getText('View 
current map'),
                        'langOptions' => 
$this->CORE->getLang()->getText('Options'),
                        'langWuiConfiguration' => 
$this->CORE->getLang()->getText('General Configuration'),
                        'langMgmtBackends' => 
$this->CORE->getLang()->getText('Manage Backends'),
diff --git a/share/userfiles/templates/default.header.html 
b/share/userfiles/templates/default.header.html
index b83227d..5f16d32 100644
--- a/share/userfiles/templates/default.header.html
+++ b/share/userfiles/templates/default.header.html
@@ -58,6 +58,8 @@
                                        {/if}
                                        {if $mod == 'Map' && $permittedEdit == 
true && $act != 'edit'}
                                        <li><a 
href="{$pathBase}/frontend/wui/index.php?mod=Map&amp;act=edit&amp;show={$currentMap}"
 class="underline">{$langEditMap}</a></li>
+                                       {elseif $mod == 'Map' && $permittedView 
== true && $act != 'view'}
+                                       <li><a 
href="{$pathBase}/frontend/nagvis-js/index.php?mod=Map&amp;act=view&amp;show={$currentMap}"
 class="underline">{$langViewMap}</a></li>
                                        {else}
                                        <li class="spacer underline"></li>
                                        {/if}


------------------------------------------------------------------------------
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to