[horde] User name and email in top bar

Oscar del Rio delrio at mie.utoronto.ca
Wed Feb 6 21:18:09 UTC 2013


On 02/ 6/13 03:08 PM, Michael M Slusarz wrote:
> Quoting Oscar del Rio <delrio at mie.utoronto.ca>:
>
>> The Horde portal identifies the user that is currently logged on in 
>> the top bar, below the logout icon, which is nice.
>> However, none of the other applications show that info and there is 
>> no easy way to know which account is logged on.
>> Mail (imp) shows the name of the current folder and the other 
>> applications do not show anything in the top bar.
>>
>> Is there a way to show the user's name and email in every 
>> application, just like in the portal?
>
> Search for 'Horde_View_Topbar' in the applications and alter as you 
> feel appropriate (this is the View library used to create the topbar 
> content).
>

Thanks!

I found the code for the portal in horde/services/portal/index.php

$injector->getInstance('Horde_View_Topbar')->subinfo =
htmlspecialchars($injector->getInstance('Horde_Core_Factory_Identity')->create()->getDefaultFromAddress(true));

I was able to add similar code to imp and kronolith:

imp/mailbox.php (basic view)

$injector->getInstance('Horde_View_Topbar')->subinfo =
htmlspecialchars($injector->getInstance('Horde_Core_Factory_Identity')->create()->getDefaultFromAddress(true))
    . $subinfo->render();

imp/lib/Dynamic/Mailbox.php (dynamic view)

$topbar->subinfo =
htmlspecialchars($injector->getInstance('Horde_Core_Factory_Identity')->create()->getDefaultFromAddress(true)) 

                 . $impSubinfo->render('mailbox_subinfo');


kronolith/index.php (seems to affect only dynamic view?)

$topbar->subinfo =
htmlspecialchars($injector->getInstance('Horde_Core_Factory_Identity')->create()->getDefaultFromAddress(true));


Would this be worth adding to the distribution?
Maybe a cleaner/nicer design would to have the Horde_View_Topbar library 
add this info regardless of application?
Perhaps in a separate, centered div?  Currently the Topbar seems mostly 
underutilized (just the date in most apps).

<div id="horde-sub">
   <div id="horde-date">02/06/13</div>
   <div id="horde-center">User Name and Email</div>
   <div id="horde-info">(application subinfo)></div>
</div>



More information about the horde mailing list