[Jaws-commits] r13329 - in trunk/jaws/html: gadgets/ControlPanel/resources gadgets/ControlPanel/templates include/Jaws

afz at jaws-project.com afz at jaws-project.com
Thu Aug 9 12:37:35 UTC 2012


Author: afz
Date: 2012-08-09 12:37:35 +0000 (Thu, 09 Aug 2012)
New Revision: 13329

Modified:
   trunk/jaws/html/gadgets/ControlPanel/resources/public.css
   trunk/jaws/html/gadgets/ControlPanel/resources/public.rtl.css
   trunk/jaws/html/gadgets/ControlPanel/templates/Layout.html
   trunk/jaws/html/include/Jaws/Layout.php
Log:
Fixed displaying no permission when user click on account link in ControlPanel area

Modified: trunk/jaws/html/gadgets/ControlPanel/resources/public.css
===================================================================
--- trunk/jaws/html/gadgets/ControlPanel/resources/public.css	2012-08-09 09:13:35 UTC (rev 13328)
+++ trunk/jaws/html/gadgets/ControlPanel/resources/public.css	2012-08-09 12:37:35 UTC (rev 13329)
@@ -196,9 +196,10 @@
 }
 
 #login-info .name {
-display: inline-block;
 margin-top: 5px;
+font-weight: bold;
 white-space: nowrap;
+display: inline-block;
 }
 
 #login-info .logout {

Modified: trunk/jaws/html/gadgets/ControlPanel/resources/public.rtl.css
===================================================================
--- trunk/jaws/html/gadgets/ControlPanel/resources/public.rtl.css	2012-08-09 09:13:35 UTC (rev 13328)
+++ trunk/jaws/html/gadgets/ControlPanel/resources/public.rtl.css	2012-08-09 12:37:35 UTC (rev 13329)
@@ -200,9 +200,10 @@
 }
 
 #login-info .name {
-display: inline-block;
 margin-top: 5px;
+font-weight: bold;
 white-space: nowrap;
+display: inline-block;
 }
 
 #login-info .logout {

Modified: trunk/jaws/html/gadgets/ControlPanel/templates/Layout.html
===================================================================
--- trunk/jaws/html/gadgets/ControlPanel/templates/Layout.html	2012-08-09 09:13:35 UTC (rev 13328)
+++ trunk/jaws/html/gadgets/ControlPanel/templates/Layout.html	2012-08-09 12:37:35 UTC (rev 13329)
@@ -29,7 +29,7 @@
    <div id="login-info">
       <!-- BEGIN login-info -->
       <img alt="{name}" width="48" height="48" src="{avatar}" />
-      <div class="name"><a href="{my-account-url}"><strong>{nickname}</strong></a></div>
+      <div class="name">{my-account}</div>
       <div class="logout"><a href="{logout-url}">{logout}</a></div>
       <!-- END login-info -->
    </div>

Modified: trunk/jaws/html/include/Jaws/Layout.php
===================================================================
--- trunk/jaws/html/include/Jaws/Layout.php	2012-08-09 09:13:35 UTC (rev 13328)
+++ trunk/jaws/html/include/Jaws/Layout.php	2012-08-09 12:37:35 UTC (rev 13329)
@@ -317,8 +317,18 @@
         $this->_Template->SetVariable('email',    $uInfo['email']);
         $this->_Template->SetVariable('avatar',   $uInfo['avatar']);
         $this->_Template->SetVariable('site-url', $GLOBALS['app']->GetSiteURL());
-        $this->_Template->SetVariable('my-account', _t('GLOBAL_MY_ACCOUNT'));
-        $this->_Template->SetVariable('my-account-url', BASE_SCRIPT . '?gadget=Users&action=MyAccount');
+
+        if ($GLOBALS['app']->Session->GetPermission('Users', 'default_admin') &&
+            $GLOBALS['app']->Session->GetPermission('Users', 'EditAccountInformation'))
+        {
+            $uAccoun =& Piwi::CreateWidget('Link',
+                                           $uInfo['nickname'],
+                                           BASE_SCRIPT . '?gadget=Users&action=MyAccount');
+        } else {
+            $uAccoun =& Piwi::CreateWidget('Label', $uInfo['nickname']);
+        }
+
+        $this->_Template->SetVariable('my-account', $uAccoun->Get());
         $this->_Template->SetVariable('logout', _t('GLOBAL_LOGOUT'));
         $this->_Template->SetVariable('logout-url', BASE_SCRIPT . '?gadget=ControlPanel&action=Logout');
         $this->_Template->ParseBlock('layout/login-info');
@@ -713,7 +723,7 @@
     function Get($raw_content = false)
     {
         // Set Headers
-        header('Content-Type: text/html; charset=utf-8'); //magic, big fix
+        header('Content-Type: text/html; charset=utf-8');
         header('Cache-Control: no-cache, must-revalidate');
         header('Pragma: no-cache');
 



More information about the Jaws-commits mailing list