Skip to content

Commit

Permalink
Add items to Backstage user menu to match Mainstage
Browse files Browse the repository at this point in the history
  • Loading branch information
Yannick committed Jan 17, 2015
1 parent a984ea0 commit 46e73cb
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
15 changes: 15 additions & 0 deletions backstage/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,21 @@ label .help-block {
padding: 9px 20px;
}

.avatar {
padding: 0;
border: 0;
margin: 0;
width: 30px;
height: 30px;
margin-right: 5px;
display: inline;
}

.dropdown-toggle {
padding-top: 10px !important;
padding-bottom: 10px !important;
}

/* Heading - jumbotron and navtabs */
.jumboheader {
color: #fff;
Expand Down
2 changes: 1 addition & 1 deletion help.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
if ($cur_item['visible'] == '1')
$links[] = '<li><a href="'.$cur_item['url'].'">'.$cur_item['name'].'</a></li>';
[/code]
</pre></p>
</pre></p>
<p><?php echo $lang['produces code box'] ?></p>
<div class="codebox"><pre class=" language-php"><code class=" language-php">if ($db->num_rows($result) > 0)
while ($cur_item = $db->fetch_assoc($result))
Expand Down
9 changes: 6 additions & 3 deletions include/backstage_functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,16 @@ function load_admin_nav($section, $page) {
<ul class="nav navbar-nav navbar-right">
<li class="dropdown usermenu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<?php print(luna_htmlspecialchars($luna_user['username'])) ?> <span class="fa fa-angle-down"></span>
<?php print(luna_htmlspecialchars($luna_user['username'])) ?> <?php echo draw_user_avatar($luna_user['id'], 'avatar'); ?> <span class="fa fa-angle-down"></span>
</a>
<ul class="dropdown-menu">
<li><?php echo '<a href="../me.php?id='.$luna_user['id'].'">' ?><?php echo $lang['Profile'] ?></a></li>
<li><a href="../me.php?id=<?php echo $luna_user['id'] ?>"><?php echo $lang['Profile'] ?></a></li>
<li><a href="../settings.php?id=<?php echo ''.$luna_user['id'] ?>"><?php echo $lang['Settings'] ?></a></li>
<li class="divider"></li>
<li><a href="../help.php"><?php echo $lang['Help'] ?></a></li>
<li><a href="http://getluna.org"><?php echo $lang['Support'] ?></a></li>
<li class="divider"></li>
<li><?php echo '<a href="../login.php?action=out&amp;id='.$luna_user['id'].'&amp;csrf_token='.luna_hash($luna_user['id'].luna_hash(get_remote_address())).'">' ?><?php echo $lang['Logout'] ?></a></li>
<li><a href="../login.php?action=out&amp;id=<?php echo ''.$luna_user['id'].'&amp;csrf_token='.luna_hash($luna_user['id'].luna_hash(get_remote_address())) ?>"><?php echo $lang['Logout'] ?></a></li>
</ul>
</li>
</ul>
Expand Down

0 comments on commit 46e73cb

Please sign in to comment.