Browse Source

Ugly lines are ugly (seriously 1403 chars in a single line is crazy) and moved some inline styles to admin.css

Signed-off-by: emanuele <[email protected]>
emanuele 12 years ago
parent
commit
18ecebb42e

+ 3 - 0
Sources/ManagePermissions.php

@@ -123,6 +123,7 @@ function PermissionIndex()
 			'can_search' => false,
 			'href' => '',
 			'link' => '',
+			'help' => 'membergroup_guests',
 			'is_post_group' => false,
 			'color' => '',
 			'icons' => '',
@@ -142,6 +143,7 @@ function PermissionIndex()
 			'allow_modify' => true,
 			'can_search' => false,
 			'href' => $scripturl . '?action=moderate;area=viewgroups;sa=members;group=0',
+			'help' => 'membergroup_regular_members',
 			'is_post_group' => false,
 			'color' => '',
 			'icons' => '',
@@ -188,6 +190,7 @@ function PermissionIndex()
 			'allow_modify' => $row['id_group'] > 1,
 			'can_search' => $row['id_group'] != 3,
 			'href' => $scripturl . '?action=moderate;area=viewgroups;sa=members;group=' . $row['id_group'],
+			'help' => $row['id_group'] == 1 ? 'membergroup_administrator' : ($row['id_group'] == 3 ? 'membergroup_moderator' : ''),
 			'is_post_group' => $row['min_posts'] != -1,
 			'color' => empty($row['online_color']) ? '' : $row['online_color'],
 			'icons' => !empty($row['icons'][0]) && !empty($row['icons'][1]) ? str_repeat('<img src="' . $settings['images_url'] . '/' . $row['icons'][1] . '" alt="*" />', $row['icons'][0]) : '',

+ 2 - 2
Themes/default/ManagePermissions.template.php

@@ -37,7 +37,7 @@ function template_permission_index()
 			</div>';
 
 		echo '
-			<table width="100%" class="table_grid">
+			<table class="table_grid">
 				<thead>
 					<tr class="catbg">
 						<th class="first_th">', $txt['membergroups_name'], '</th>
@@ -67,7 +67,7 @@ function template_permission_index()
 		echo '
 					<tr class="windowbg', $alternate ? '2' : '', '">
 						<td>
-							', $group['id'] == -1 ? ' <a class="help" href="' . $scripturl . '?action=helpadmin;help=membergroup_guests" onclick="return reqOverlayDiv(this.href);"><img class="icon" style="vertical-align: top" src="' . $settings['images_url'] . '/helptopics.png" alt="' . $txt['help'] . '" /></a>' : ($group['id'] == 0 ? ' <a class="help" href="' . $scripturl . '?action=helpadmin;help=membergroup_regular_members" onclick="return reqOverlayDiv(this.href);"><img class="icon" style="vertical-align: top" src="' . $settings['images_url'] . '/helptopics.png" alt="' . $txt['help'] . '" /></a>' : ($group['id'] == 1 ? ' <a class="help" href="' . $scripturl . '?action=helpadmin;help=membergroup_administrator" onclick="return reqOverlayDiv(this.href);"><img class="icon" style="vertical-align: top" src="' . $settings['images_url'] . '/helptopics.png" alt="' . $txt['help'] . '" /></a>' : ($group['id'] == 3 ? ' <a class="help" href="' . $scripturl . '?action=helpadmin;help=membergroup_moderator" onclick="return reqOverlayDiv(this.href);"><img class="icon" style="vertical-align: top" src="' . $settings['images_url'] . '/helptopics.png" alt="' . $txt['help'] . '" /></a>' : '<img class="icon" style="vertical-align: top" src="' . $settings['images_url'] . '/blank.png" width="16px" alt="' . $txt['help'] . '" />'))), '&nbsp;<span>', $group['name'], '</span>';
+							', !empty($group['help']) ? sprintf(' <a class="help" href="' . $scripturl . '?action=helpadmin;help=%1$s" onclick="return reqOverlayDiv(this.href);"><img class="icon" src="' . $settings['images_url'] . '/helptopics.png" alt="' . $txt['help'] . '" /></a>', $group['help']) : '<img class="icon" src="' . $settings['images_url'] . '/blank.png" alt="' . $txt['help'] . '" />', '&nbsp;<span>', $group['name'], '</span>';
 
 		if (!empty($group['children']))
 			echo '

+ 7 - 0
Themes/default/css/admin.css

@@ -880,6 +880,13 @@ dl.settings dd.small_caption {
 }
 /* Styles for the manage permissions section.
 ------------------------------------------------- */
+#permissionForm .table_grid {
+	width: 100%;
+}
+#permissionForm .table_grid img.icon {
+	vertical-align: top;
+	width: 16px;
+}
 dl.admin_permissions dt {
 	width: 35%;
 }