Skip to content

Issues-376:design tweaks #59

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 11, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 18 additions & 13 deletions Topcoder/views/modules/topcoderme.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,16 @@
$CountNotifications = $User->CountNotifications;
$CNotifications = is_numeric($CountNotifications) && $CountNotifications > 0 ? '<span class="Alert NotificationsAlert">'.$CountNotifications.'</span>' : '';

echo '<span class="ToggleFlyout" rel="/profile/notificationspopin?TransientKey='.htmlspecialchars(urlencode($transientKey)).'">';
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"]);
echo sprite('SpFlyoutHandle', 'Arrow');
echo '<div class="Flyout FlyoutMenu Flyout-withFrame"></div></span>';

$showNotifications = false;
if($showNotifications) {
echo '<span class="ToggleFlyout" rel="/profile/notificationspopin?TransientKey=' . htmlspecialchars(urlencode($transientKey)) . '">';
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"]);
echo sprite('SpFlyoutHandle', 'Arrow');
echo '<div class="Flyout FlyoutMenu Flyout-withFrame"></div></span>';
}
// Inbox
if (Gdn::addonManager()->lookupAddon('conversations')) {
$showInbox = false;
if ($showInbox && Gdn::addonManager()->lookupAddon('conversations')) {
$CountInbox = val('CountUnreadConversations', Gdn::session()->User);
$CInbox = is_numeric($CountInbox) && $CountInbox > 0 ? ' <span class="Alert">'.$CountInbox.'</span>' : '';
echo '<span class="ToggleFlyout" rel="/messages/popin">';
Expand All @@ -62,7 +65,8 @@
}

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

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

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

Expand Down Expand Up @@ -121,10 +125,11 @@

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

echo anchor(t('Sign In'), signInUrl($this->_Sender->SelfUrl), (signInPopup() ? ' SignInPopup' : ''), ['rel' => 'nofollow']);
$Url = registerUrl($this->_Sender->SelfUrl);
if (!empty($Url))
echo bullet(' ').anchor(t('Register'), $Url, 'ApplyButton', ['rel' => 'nofollow']).' ';
echo anchor(t('Login'), signInUrl($this->_Sender->SelfUrl), (signInPopup() ? ' SignInPopup' : ''), ['rel' => 'nofollow']);
// $Url = registerUrl($this->_Sender->SelfUrl);
// if (!empty($Url)) {
// echo bullet(' ').anchor(t('Register'), $Url, 'ApplyButton', ['rel' => 'nofollow']).' ';
// }
echo '</div>';

echo ' <div class="SignInIcons">';
Expand Down