Browse Source

! Making members pending approval and moderation reports more prominent. The moderation menu, like most of the time, has it wrong anyway and a separate "accident" may happen to it in the future, but for now, let's get rid of icky (and frequently wrong, as well as some old) language strings and be a bit daring.

Signed-off-by: Peter Spicer <[email protected]>
Peter Spicer 11 years ago
parent
commit
b0179a5b1c

+ 1 - 3
Sources/Subs.php

@@ -2884,10 +2884,8 @@ function setupThemeContext($forceload = false)
 		$_SESSION['unread_messages'] = $user_info['unread_messages'];
 
 		if (allowedTo('moderate_forum'))
-		{
 			$context['unapproved_members'] = (!empty($modSettings['registration_method']) && $modSettings['registration_method'] == 2) || !empty($modSettings['approveAccountDeletion']) ? $modSettings['unapprovedMembers'] : 0;
-			$context['unapproved_members_text'] = $context['unapproved_members'] == 1 ? sprintf($txt['approve_one_member_waiting'],  $scripturl . '?action=admin;area=viewmembers;sa=browse;type=approve') : sprintf($txt['approve_many_members_waiting'],  $scripturl . '?action=admin;area=viewmembers;sa=browse;type=approve', $context['unapproved_members']);
-		}
+
 		$context['show_open_reports'] = empty($user_settings['mod_prefs']) || $user_settings['mod_prefs'][0] == 1;
 
 		$context['user']['avatar'] = array();

+ 12 - 0
Themes/default/css/index.css

@@ -1337,6 +1337,7 @@ img.sort {
 }
 #top_section ul li {
 	margin-bottom: 2px;
+	margin-right: 7px;
 	display: inline;
 	font-size: 0.9em;
 }
@@ -1344,6 +1345,17 @@ img.sort {
 {
  font-weight: bold;
 }
+.modnotice
+{
+	padding: 4px;
+}
+.modnotice .amt
+{
+	padding: 0 4px;
+	color: white;
+	background: #6d90ad;
+	border-radius: 4px;
+}
 #search_form {
 	padding: 4px 0 0 0;
 	text-align: right;

+ 11 - 13
Themes/default/index.template.php

@@ -188,8 +188,15 @@ function template_body_above()
 		if ($context['in_maintenance'] && $context['user']['is_admin'])
 			echo '
 				<li class="notice">', $txt['maintain_mode_on'], '<br /></li>';
+
+		if (!empty($context['open_mod_reports']) && $context['show_open_reports'])
+			echo '
+				<li class="modnotice"><a href="', $scripturl, '?action=moderate;area=reports">', $txt['mod_reports_waiting'], '</a>: <span class="amt">', $context['open_mod_reports'], '</span></li>';
+
+		// Are there any members waiting for approval?
+		if (!empty($context['unapproved_members']))
 			echo '
-				<li>', $context['current_time'], '</li>';
+				<li class="modnotice"><a href="', $scripturl, '?action=admin;area=viewmembers;sa=browse;type=approve">', $txt['approve_members_waiting'], '</a>: <span class="amt">', $context['unapproved_members'], '</span></li>';
 	}
 	// Otherwise they're a guest. Ask them to either register or login.
 	else
@@ -301,20 +308,11 @@ function template_body_above()
 		if (!empty($context['user']['avatar']))
 			echo '
 						<a href="', $scripturl, '?action=profile" class="avatar">', $context['user']['avatar']['image'], '</a>';
-			echo '
-						<ul>
-							<li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span></li>';
-
-		// Are there any members waiting for approval?
-		if (!empty($context['unapproved_members']))
-			echo '
-							<li>', $context['unapproved_members_text'], '</li>';
-
-		if (!empty($context['open_mod_reports']) && $context['show_open_reports'])
-			echo '
-							<li><a href="', $scripturl, '?action=moderate;area=reports">', sprintf($txt['mod_reports_waiting'], $context['open_mod_reports']), '</a></li>';
 
 		echo '
+						<ul>
+							<li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span></li>
+							<li>', $context['current_time'], '</li>
 						</ul>';
 	}
 

+ 2 - 8
Themes/default/languages/index.english.php

@@ -700,13 +700,7 @@ $txt['totalTimeLogged5'] = 'd ';
 $txt['totalTimeLogged6'] = 'h ';
 $txt['totalTimeLogged7'] = 'm';
 
-$txt['approve_thereis'] = 'There is'; //Deprecated
-$txt['approve_thereare'] = 'There are'; //Deprecated
-$txt['approve_member'] = 'one member'; //Deprecated
-$txt['approve_members'] = 'members'; //Deprecated
-$txt['approve_members_waiting'] = 'awaiting approval.'; //Deprecated
-$txt['approve_one_member_waiting'] = 'There is <a href="%1$s">one member</a> awaiting approval.';
-$txt['approve_many_members_waiting'] = 'There are <a href="%1$s">%2$d members</a> awaiting approval.';
+$txt['approve_members_waiting'] = 'Member Approvals';
 
 $txt['notifyboard_turnon'] = 'Do you want a notification email when someone posts a new topic in this board?';
 $txt['notifyboard_turnoff'] = 'Are you sure you do not want to receive new topic notifications for this board?';
@@ -769,7 +763,7 @@ $txt['unapproved_posts'] = 'Unapproved Posts (Topics: %1$d, Posts: %2$d)';
 
 $txt['ajax_in_progress'] = 'Loading...';
 
-$txt['mod_reports_waiting'] = 'There are currently %1$d moderator reports open.';
+$txt['mod_reports_waiting'] = 'Reported Posts';
 
 $txt['view_unread_category'] = 'Unread Posts';
 $txt['new_posts_in_category'] = 'Click to see the new posts in %1$s';