Skip to content

Commit ab57323

Browse files
authored
Merge pull request #59 from topcoder-platform/Issues-376
Issues-376:design tweaks
2 parents e847125 + b90f0ce commit ab57323

File tree

1 file changed

+18
-13
lines changed

1 file changed

+18
-13
lines changed

Topcoder/views/modules/topcoderme.php

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,16 @@
4646
$CountNotifications = $User->CountNotifications;
4747
$CNotifications = is_numeric($CountNotifications) && $CountNotifications > 0 ? '<span class="Alert NotificationsAlert">'.$CountNotifications.'</span>' : '';
4848

49-
echo '<span class="ToggleFlyout" rel="/profile/notificationspopin?TransientKey='.htmlspecialchars(urlencode($transientKey)).'">';
50-
echo anchor(sprite('SpNotifications', 'Sprite Sprite16', t('Notifications')).$CNotifications, userUrl($User), 'MeButton FlyoutButton js-clear-notifications', ['title' => t('Notifications'), 'tabindex' => '0', "role" => "button", "aria-haspopup" => "true"]);
51-
echo sprite('SpFlyoutHandle', 'Arrow');
52-
echo '<div class="Flyout FlyoutMenu Flyout-withFrame"></div></span>';
53-
49+
$showNotifications = false;
50+
if($showNotifications) {
51+
echo '<span class="ToggleFlyout" rel="/profile/notificationspopin?TransientKey=' . htmlspecialchars(urlencode($transientKey)) . '">';
52+
echo anchor(sprite('SpNotifications', 'Sprite Sprite16', t('Notifications')) . $CNotifications, userUrl($User), 'MeButton FlyoutButton js-clear-notifications', ['title' => t('Notifications'), 'tabindex' => '0', "role" => "button", "aria-haspopup" => "true"]);
53+
echo sprite('SpFlyoutHandle', 'Arrow');
54+
echo '<div class="Flyout FlyoutMenu Flyout-withFrame"></div></span>';
55+
}
5456
// Inbox
55-
if (Gdn::addonManager()->lookupAddon('conversations')) {
57+
$showInbox = false;
58+
if ($showInbox && Gdn::addonManager()->lookupAddon('conversations')) {
5659
$CountInbox = val('CountUnreadConversations', Gdn::session()->User);
5760
$CInbox = is_numeric($CountInbox) && $CountInbox > 0 ? ' <span class="Alert">'.$CountInbox.'</span>' : '';
5861
echo '<span class="ToggleFlyout" rel="/messages/popin">';
@@ -62,7 +65,8 @@
6265
}
6366

6467
// Bookmarks
65-
if (Gdn::addonManager()->lookupAddon('Vanilla')) {
68+
$showBookmarks = false;
69+
if ($showBookmarks && Gdn::addonManager()->lookupAddon('Vanilla')) {
6670
echo '<span class="ToggleFlyout" rel="/discussions/bookmarkedpopin">';
6771
echo anchor(sprite('SpBookmarks', 'Sprite Sprite16', t('Bookmarks')), '/discussions/bookmarked', 'MeButton FlyoutButton', ['title' => t('Bookmarks'), 'tabindex' => '0', "role" => "button", "aria-haspopup" => "true"]);
6872
echo sprite('SpFlyoutHandle', 'Arrow');
@@ -76,12 +80,12 @@
7680

7781
if ($useNewFlyouts) {
7882
$imgUrl = userPhotoUrl($User);
79-
$triggerIcon = "<img class='ProfilePhoto ProfilePhotoSmall' src='$imgUrl'/>";
83+
$triggerIcon = "<span><img class='ProfilePhoto ProfilePhotoSmall' src='$imgUrl'/><span class='Username'>".$User->Name."</span><span class='icon icon-chevron-down'></span></span>";
8084
} else {
8185
$triggerIcon = sprite('SpOptions', 'Sprite Sprite16', $triggerTitle);
8286
}
8387

84-
$dropdown->setTrigger('', 'anchor', 'MeButton FlyoutButton MeButton-user', $triggerIcon, '/profile', ['title' => $triggerTitle, 'tabindex' => '0', "role" => "button", "aria-haspopup" => "true"]);
88+
$dropdown->setTrigger('', 'anchor', 'MeButton FlyoutButton MeButton-user TopcoderMeButton', $triggerIcon, '/profile', ['title' => $triggerTitle, 'tabindex' => '0', "role" => "button", "aria-haspopup" => "true"]);
8589
$editModifiers['listItemCssClasses'] = ['EditProfileWrap', 'link-editprofile'];
8690
$preferencesModifiers['listItemCssClasses'] = ['EditProfileWrap', 'link-preferences'];
8791

@@ -121,10 +125,11 @@
121125

122126
echo '<div class="SignInLinks">';
123127

124-
echo anchor(t('Sign In'), signInUrl($this->_Sender->SelfUrl), (signInPopup() ? ' SignInPopup' : ''), ['rel' => 'nofollow']);
125-
$Url = registerUrl($this->_Sender->SelfUrl);
126-
if (!empty($Url))
127-
echo bullet(' ').anchor(t('Register'), $Url, 'ApplyButton', ['rel' => 'nofollow']).' ';
128+
echo anchor(t('Login'), signInUrl($this->_Sender->SelfUrl), (signInPopup() ? ' SignInPopup' : ''), ['rel' => 'nofollow']);
129+
// $Url = registerUrl($this->_Sender->SelfUrl);
130+
// if (!empty($Url)) {
131+
// echo bullet(' ').anchor(t('Register'), $Url, 'ApplyButton', ['rel' => 'nofollow']).' ';
132+
// }
128133
echo '</div>';
129134

130135
echo ' <div class="SignInIcons">';

0 commit comments

Comments
 (0)