Bläddra i källkod

! Going to display the inactive items slightly differently.

Signed-off-by: Peter Spicer <[email protected]>
Peter Spicer 11 år sedan
förälder
incheckning
146c3d9643
3 ändrade filer med 8 tillägg och 1 borttagningar
  1. 3 0
      Sources/Subs-Menu.php
  2. 1 1
      Themes/default/Admin.template.php
  3. 4 0
      Themes/default/css/admin.css

+ 3 - 0
Sources/Subs-Menu.php

@@ -147,6 +147,9 @@ function createMenu($menuData, $menuOptions = array())
 								$menu_context['sections'][$section_id]['areas'][$area_id]['bigicon'] = $settings['default_images_url'] . '/admin/big/default.png';
 						}
 
+						// Some areas may be listed but not active, which we show as greyed out.
+						$menu_context['sections'][$section_id]['areas'][$area_id]['inactive'] = !empty($area['inactive']);
+
 						// Did it have subsections?
 						if (!empty($area['subsections']))
 						{

+ 1 - 1
Themes/default/Admin.template.php

@@ -115,7 +115,7 @@ function template_admin()
 
 			$url = isset($item['url']) ? $item['url'] : $scripturl . '?action=admin;area=' . $item_id . (!empty($context[$context['admin_menu_name']]['extra_parameters']) ? $context[$context['admin_menu_name']]['extra_parameters'] : '');
 			echo '
-				<a href="', $url, '"><img src="', $item['bigicon'], '" alt="" /><br />', $item['label'], '</a>';
+				<a href="', $url, '"', !empty($item['inactive']) ? ' class="inactive"' : '', '><img src="', $item['bigicon'], '" alt="" /><br />', $item['label'], '</a>';
 		}
 
 		echo '

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

@@ -482,6 +482,10 @@ fieldset.admin_group a {
 	text-align: center;
 	vertical-align: top;
 }
+fieldset.admin_group .inactive {
+	opacity: 0.4;
+	filter:Alpha(opacity=40);
+}
 
 /* The update warning. */
 #update_section {