Skip to content

Commit 179487a

Browse files
author
root
committed
added search and user dropdown in topbar
1 parent a286245 commit 179487a

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

themes/bootstrap/design/style.css

+7
Original file line numberDiff line numberDiff line change
@@ -2652,3 +2652,10 @@ div.SignInPopup .ExistingUsername {
26522652
color: #000;
26532653
display: block;
26542654
}
2655+
2656+
/* added by vbajpai */
2657+
/* align FB profile pic with topbar */
2658+
.topbarimg {
2659+
margin-top:8px;
2660+
margin-bottom:10px;
2661+
}

themes/bootstrap/views/default.master.php

+21-2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class="<?php echo $this->CssClass; ?>">
2020
if ($this->Menu) {
2121
$this->Menu->AddLink('Dashboard', T('Dashboard'), '/dashboard/settings', array('Garden.Settings.Manage'));
2222
$this->Menu->AddLink('Collector', T('Collectors'), '/collector');
23+
$this->Menu->AddLink('Meters', T('Meters'), '/meter');
2324
$this->Menu->AddLink('Activity', T('Activity'), '/activity');
2425
if ($Session->IsValid()) {
2526
$Name = $Session->User->Name;
@@ -32,8 +33,8 @@ class="<?php echo $this->CssClass; ?>">
3233
} else {
3334
$ProfileSlug = $Session->UserID.'/'.urlencode($Session->User->Name);
3435
}
35-
$this->Menu->AddLink('User', $Name, '/profile/'.$ProfileSlug, array('Garden.SignIn.Allow'), array('class' => 'UserNotifications'));
36-
$this->Menu->AddLink('SignOut', T('Sign Out'), Gdn::Authenticator()->SignOutUrl(), FALSE, array('class' => 'NonTab SignOut'));
36+
// $this->Menu->AddLink('User', $Name, '/profile/'.$ProfileSlug, array('Garden.SignIn.Allow'), array('class' => 'UserNotifications'));
37+
// $this->Menu->AddLink('SignOut', T('Sign Out'), Gdn::Authenticator()->SignOutUrl(), FALSE, array('class' => 'NonTab SignOut'));
3738
} else {
3839
$Attribs = array();
3940
if (SignInPopup() && strpos(Gdn::Request()->Url(), 'entry') === FALSE) {
@@ -44,6 +45,24 @@ class="<?php echo $this->CssClass; ?>">
4445
echo $this->Menu->ToString();
4546
}
4647
?>
48+
<form class="pull-left" action="">
49+
<input type="text" placeholder="Search">
50+
</form>
51+
52+
<ul class="nav secondary-nav">
53+
<li class="topbarimg">
54+
<fb:profile-pic uid="loggedinuser" width="28" linked="false" style="width: 28px; " class=" fb_profile_pic_rendered"><img src="https://fbcdn-profile-a.akamaihd.net/hprofile-ak-snc4/275739_581430275_2144356331_t.jpg" alt="Vaibhav Bajpai" title="Vaibhav Bajpai" style="width:28px;" class=" fb_profile_pic_rendered"></fb:profile-pic>
55+
</li>
56+
<li class="dropdown" data-dropdown="dropdown">
57+
<a href="#" class="dropdown-toggle">
58+
<fb:name uid="loggedinuser" use-you="no" linked="false">Vaibhav Bajpai</fb:name>
59+
</a>
60+
<ul class="dropdown-menu">
61+
<li><a href="#settings">Settings</a></li>
62+
<li><a href="#logout" onclick="FB.logout()">Logout</a></li>
63+
</ul>
64+
</li>
65+
</ul>
4766
<?php
4867
// $Form = Gdn::Factory('Form');
4968
// $Form->InputPrefix = '';

0 commit comments

Comments
 (0)