Index: trunk/admin/include/subitems.css =================================================================== diff -u -N -r13 -r22 --- trunk/admin/include/subitems.css (.../subitems.css) (revision 13) +++ trunk/admin/include/subitems.css (.../subitems.css) (revision 22) @@ -36,11 +36,27 @@ .dBody {border-top-width:1px; border-top-style:solid; border-top-color:#666767; width: 269px; height: 21px; overflow:hidden} -.lTD {border-right-width: 1px; border-right-style: solid; border-right-color: #CCCCCC} +.lTD { + border-right-width: 1px; + border-right-style: solid; + border-right-color: #CCCCCC +} -.lTDi {border-right-width: 1px; border-right-style: solid; border-right-color: #CCCCCC; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #CCCCCC} -.rTDi {border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #CCCCCC} +.lTDi { + border-right-width: 1px; + border-right-style: solid; + border-right-color: #CCCCCC; + border-bottom-width: 1px; + border-bottom-style: solid; + border-bottom-color: #CCCCCC; +} +.rTDi { + border-bottom-width: 1px; + border-bottom-style: solid; + border-bottom-color: #CCCCCC; +} + .info {FONT-SIZE: 11px; COLOR: #707070; FONT-FAMILY: arial,verdana,sans-serif; font-weight: normal;} .imgButton {cursor: hand} Index: trunk/kernel/admin/include/summary/root.php =================================================================== diff -u -N -r13 -r22 --- trunk/kernel/admin/include/summary/root.php (.../root.php) (revision 13) +++ trunk/kernel/admin/include/summary/root.php (.../root.php) (revision 22) @@ -1,36 +1,37 @@ CountPending(); +//$PendingUsers = (int)$objUsers->CountPending(); -if( isset($objTopicList) && is_object($objTopicList) ) $PendingTopics = (int)@$objTopicList->CountPending(); -if( isset($objTopicList) && is_object($objArticleList) ) $PendingNews = (int)@$objArticleList->CountPending(); +//if( isset($objTopicList) && is_object($objTopicList) ) $PendingTopics = (int)@$objTopicList->CountPending(); +//if( isset($objTopicList) && is_object($objArticleList) ) $PendingNews = (int)@$objArticleList->CountPending(); -$PendingLinks = (int)@$objLinkList->CountPending(); -$PendingCats = (int)@$objCatList->CountPending(); +//$PendingLinks = (int)@$objLinkList->CountPending(); +//$PendingCats = (int)@$objCatList->CountPending(); -$PendingTotal = $PendingUsers + $PendingTopics+$PendingNews+$PendingLinks+$PendingCats; +$PendingTotal = 0; //$PendingUsers + $PendingCats + $PendingTopics + $PendingNews + $PendingLinks; $date_str = adodb_date("F j, Y"); @@ -40,7 +41,7 @@

- +
@@ -64,7 +65,7 @@ $i = 0; $col = 1; $o = ""; -while($i<$ItemsPerCol) +while($i < $ItemsPerCol) { $s = $objStats->GetItemByIndex($i); @@ -91,6 +92,90 @@ print $o; +// ---- prepare pending items list based on modules installed: begin ----- + +$m = GetModuleArray(); +foreach($m as $key => $value) +{ + $path = $pathtoroot.$value."admin/include/parser.php"; + if( file_exists($path) ) include_once($path); +} + +$modules = $objModules->GetModuleList(); +$pending_source = $objModules->ExecuteFunction('GetModuleInfo', 'summary_pending'); + + +// get total pending item count & merge them into one array +$all_pending = Array(); +$pending_col_1 = ''; +$pending_col_2 = ''; + +foreach($pending_source as $module_name => $pending_items) + foreach($pending_items as $p_item) + $all_pending[] = $p_item; + +if( count($all_pending) % 2 ) $all_pending[] = 'empty'; + +$ItemCount = count($all_pending); +$ItemsPerCol = ceil($ItemCount / 2); + + +// lTDi, rTDi, lTD, rTD + + +$i = 0; +while($i < $ItemCount) +{ + // create cell content + $item_count = 0; + $col_type = ($i < $ItemsPerCol) ? 'l' : 'r'; + $class = $col_type.'TDi'; + + // if last item then change class + if($i+1 == $ItemsPerCol) + $class = 'lTD'; + elseif($i+1 == $ItemsPerCol*2) + $class = 'rTD'; + + //print_pre($all_pending[$i]); + $cell = is_array($all_pending[$i]) ? PendingCell($all_pending[$i], $class, $item_count) : ''; + + if($col_type == 'l') + $pending_col_1 .= $cell; + elseif($col_type == 'r') + $pending_col_2 .= $cell; + + $PendingTotal += $item_count; + + //allocate it to row + + + $i++; +} + +// <- ok + +//if($peding_items_count % 2 != 0) $pending_html .= ''; + +function PendingCell($params, $class, &$pending_count) +{ + $pending_count = $GLOBALS[ $params['list_var_name'] ]->CountPending(); + $o = ''."\n"; + $o .= ''."\n"; + $o .= ''."\n"; + return $o; +} + + + + +// ---- prepare pending items list based on modules installed: end ----- + print << @@ -118,7 +203,7 @@

-
Overview $date_str 
 
 
'."\n"; + $o .= ''."\n"; + $o .= ''."\n"; + $o .= admin_language($params['phrase']); + $o .= ' ('.$pending_count.')'."\n"; + $o .= '
+
@@ -127,34 +212,19 @@
-
$lang_PendingItems  ($PendingTotal)
+
- - + + - - - - - - - -
- - $lang_Users ($PendingUsers) - - - $lang_Topics ($PendingTopics) - + + $pending_col_1 +
+
+ + $pending_col_2 +
+
- - $lang_Categories ($PendingCats) - - - $lang_Articles ($PendingNews) -
- - $lang_Links ($PendingLinks) -  
Index: trunk/kernel/admin/include/parser.php =================================================================== diff -u -N -r13 -r22 --- trunk/kernel/admin/include/parser.php (.../parser.php) (revision 13) +++ trunk/kernel/admin/include/parser.php (.../parser.php) (revision 22) @@ -241,10 +241,33 @@ function m_GetModuleInfo($info_type) { // get information for building sql in - // Edit Category -> Relations List - if($info_type = 'rel_list') - return Array( 'MainTable' => 'Category', 'ItemNameField' => 'CachedNavbar', - 'ItemNamePhrase' => 'la_Text_Category', 'TargetType' => 1); + switch($info_type) + { + case 'rel_list': // Edit Category -> Relations List + return Array( 'MainTable' => 'Category', 'ItemNameField' => 'CachedNavbar', + 'ItemNamePhrase' => 'la_Text_Category', 'TargetType' => 1); + break; + + case 'summary_pending': + global $imagesURL; + $ret = Array(); + + $UserURL = $GLOBALS['adminURL'].'/users/user_list.php?env='.BuildEnv(); + + // pending users + $ret[] = Array( 'link' => "config_val('User_View', '4' ,'$UserURL')", + 'icon_image' => $imagesURL.'/itemicons/icon16_user_pending.gif', + 'phrase' => 'la_Text_Users', 'list_var_name' => 'objUsers' ); + + // pending categories + $ret[] = Array( 'link' => "PendingLink('category','Category_View',32)", + 'icon_image' => $imagesURL.'/itemicons/icon16_cat_pending.gif', + 'phrase' => 'la_tab_Categories', 'list_var_name' => 'objCatList'); + + return $ret; + break; + } + return false; }