summaryrefslogtreecommitdiff
path: root/modules/gallery/views/login_current_user.html.php
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-11-06 14:08:46 -0800
committerTim Almdal <tnalmdal@shaw.ca>2009-11-06 14:08:46 -0800
commitb5f2dbc2c4fa974f486bc92c75054940424ed323 (patch)
tree90c38929aabd5f4786088ad49a0c8534c620e522 /modules/gallery/views/login_current_user.html.php
parentb01056da917e7da2921a5cd4c65b129489cbc19f (diff)
Create a user_menu for the top of the page. Change the login, edit profile and logout portions of the banner to be rendered by the Theme_View::user_menu callback. This fires the user_menu event. Fixes Ticket #871.
Diffstat (limited to 'modules/gallery/views/login_current_user.html.php')
-rw-r--r--modules/gallery/views/login_current_user.html.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/gallery/views/login_current_user.html.php b/modules/gallery/views/login_current_user.html.php
new file mode 100644
index 00000000..e3b3688f
--- /dev/null
+++ b/modules/gallery/views/login_current_user.html.php
@@ -0,0 +1,11 @@
+<?php defined("SYSPATH") or die("No direct script access.") ?>
+<li>
+ <? $name = $menu->label->for_html() ?>
+ <? if (identity::is_writable()): ?>
+ <?= t("Logged in as %name", array("name" => html::mark_clean(
+ "<a href='$menu->url' title='" . t("Edit your profile")->for_html_attr() .
+ "' id='$menu->id' class='g-dialog-link'>{$name}</a>"))) ?>
+ <? else: ?>
+ <?= t("Logged in as %name", array("name" => $name)) ?>
+ <? endif ?>
+</li>