Skip to content

Commit

Permalink
Mirage: Completed menu item for logout. Fixed regression in menu CSS.
Browse files Browse the repository at this point in the history
  • Loading branch information
coder4life committed Mar 20, 2012
1 parent 12366bf commit 2378f1a
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 35 deletions.
4 changes: 2 additions & 2 deletions components/com_kunena/template/mirage/css/position.css
Expand Up @@ -130,12 +130,12 @@
line-height: normal;
}

#kunena.layout li.dropdown a > * {
#kunena.layout li.dropdown .dropdown-menu > * {
visibility: hidden;
display: none;
}

#kunena.layout li.dropdown a:hover > * {
#kunena.layout li.dropdown:hover .dropdown-menu > * {
visibility: visible;
display: block;
}
Expand Down
62 changes: 30 additions & 32 deletions components/com_kunena/template/mirage/html/common/logout.php
Expand Up @@ -10,37 +10,35 @@
**/
defined ( '_JEXEC' ) or die ();
?>
<div class="login dropdown-menu">
<ul class="list-unstyled login-profile">
<li class="login-avatar link-dropdown">
<a class="link" href="<?php echo KunenaRoute::_('index.php?option=com_kunena&view=user') ?>">
<span class="login-avatar"><?php echo $this->me->getAvatarImage('', 'welcome'), JText::_('COM_KUNENA_VIEW_COMMON_LOGOUT_OWN_LINK_TITLE') ?></span>
<span class="login-welcome"><?php echo JText::sprintf('COM_KUNENA_VIEW_COMMON_LOGOUT_WELCOME', $this->me->getName()) ?></span>
</a>
</li>
<li class="divider"></li>
<?php if (!empty($this->privateMessagesLink)) echo '<li class="pm link-dropdown">'.$this->privateMessagesLink.'</li>' ?>
<?php if (!empty($this->editProfileLink)) echo '<li class="editprofile link-dropdown">'.$this->editProfileLink.'</li>' ?>
<?php if (!empty($this->announcementsLink)) echo '<li class="announcements link-dropdown">'.$this->announcementsLink.'</li>' ?>
<li class="divider"></li>
<?php if ($this->logout) : ?>
<li class="login-form">
<form action="<?php echo KunenaRoute::_('index.php?option=com_kunena&view=user') ?>" method="post" class="form logout">
<input type="hidden" name="task" value="logout" />
<?php echo $this->displayFormToken() ?>

<fieldset>
<legend class="klegend klogout"><?php echo JText::_('COM_KUNENA_VIEW_COMMON_LOGOUT_LONG') ?></legend>
<button class="kbutton button-type-standard" type="submit"><span><?php echo JText::_('COM_KUNENA_PROFILEBOX_LOGOUT') ?></span></button>
</fieldset>
</form>
</li>
<?php endif ?>
<ul class="list-unstyled login login-profile dropdown-menu">
<li class="login-avatar">
<a class="link" href="<?php echo KunenaRoute::_('index.php?option=com_kunena&view=user') ?>">
<span class="login-avatar"><?php echo $this->me->getAvatarImage('', 'welcome'), JText::_('COM_KUNENA_VIEW_COMMON_LOGOUT_OWN_LINK_TITLE') ?></span>
<span class="login-welcome"><?php echo JText::sprintf('COM_KUNENA_VIEW_COMMON_LOGOUT_WELCOME', $this->me->getName()) ?></span>
</a>
</li>
<li class="divider"></li>
<?php if (!empty($this->privateMessagesLink)) echo '<li class="pm link-dropdown">'.$this->privateMessagesLink.'</li>' ?>
<?php if (!empty($this->editProfileLink)) echo '<li class="editprofile link-dropdown">'.$this->editProfileLink.'</li>' ?>
<?php if (!empty($this->announcementsLink)) echo '<li class="announcements link-dropdown">'.$this->announcementsLink.'</li>' ?>
<li class="divider"></li>
<?php if ($this->logout) : ?>
<li class="login-form">
<form action="<?php echo KunenaRoute::_('index.php?option=com_kunena&view=user') ?>" method="post" class="form logout">
<input type="hidden" name="task" value="logout" />
<?php echo $this->displayFormToken() ?>

<?php if ($this->moduleHtml) : ?>
<li class = "login-modules">
<?php echo $this->moduleHtml ?>
<fieldset>
<legend class="klegend klogout"><?php echo JText::_('COM_KUNENA_VIEW_COMMON_LOGOUT_LONG') ?></legend>
<button class="kbutton button-type-standard" type="submit"><span><?php echo JText::_('COM_KUNENA_PROFILEBOX_LOGOUT') ?></span></button>
</fieldset>
</form>
</li>
<?php endif; ?>
</ul>
</div>
<?php endif ?>

<?php if ($this->moduleHtml) : ?>
<li class = "login-modules">
<?php echo $this->moduleHtml ?>
</li>
<?php endif; ?>
</ul>
Expand Up @@ -15,7 +15,7 @@
// Note. It is important to remove spaces between elements.
?>

<ul class="menu<?php echo $this->class_sfx;?>"<?php echo ($this->parameters->get('tag_id')) ? " id=\"{$this->parameters->get('tag_id')}\"" : '' ?>>
<ul class="list-unstyled menu<?php echo $this->class_sfx;?>"<?php echo ($this->parameters->get('tag_id')) ? " id=\"{$this->parameters->get('tag_id')}\"" : '' ?>>
<?php
foreach ($this->list as $i => $item) :
$class = 'item-'.$item->id;
Expand Down

0 comments on commit 2378f1a

Please sign in to comment.