Changeset 16821
- Timestamp:
- 07/08/08 16:57:26 (5 months ago)
- Files:
-
- trunk/midcom/midgard.admin.asgard/config/config.inc (modified) (1 diff)
- trunk/midcom/midgard.admin.asgard/handler/type.php (modified) (2 diffs)
- trunk/midcom/midgard.admin.asgard/navigation.php (modified) (2 diffs)
- trunk/midcom/midgard.admin.asgard/style/midgard_admin_asgard_type.php (modified) (2 diffs)
- trunk/midcom/midgard.admin.asgard/style/midgard_admin_asgard_type_children_footer.php (added)
- trunk/midcom/midgard.admin.asgard/style/midgard_admin_asgard_type_children_header.php (added)
- trunk/midcom/midgard.admin.asgard/style/midgard_admin_asgard_type_children_item.php (added)
- trunk/midcom/midgard.admin.asgard/style/midgard_admin_asgard_type_children_start.php (added)
- trunk/midcom/midgard.admin.asgard/tree.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/midcom/midgard.admin.asgard/config/config.inc
r16301 r16821 94 94 'midgard_types' => '', // List of types, imploded and wrapped (e.g. |midgard_article|,|midgard_topic|) 95 95 'midgard_types_regexp' => '', // Perl-styled regular expression 96 'edit_mode' => false, // Enable to enter straight to the edit mode and to skip viewing mode97 96 98 97 // Welcome page trunk/midcom/midgard.admin.asgard/handler/type.php
r16336 r16821 16 16 { 17 17 var $type = ''; 18 var $_show_type_children_headers = true; 18 19 19 20 /** … … 298 299 midcom_show_style('midgard_admin_asgard_middle'); 299 300 301 // Show the garbage bins of child types 300 302 $data['type'] = $this->type; 303 $data['reflector'] = new midcom_helper_reflector_tree($this->type); 304 $data['type_name'] = $this->type; 305 $data['type_translated'] = $data['reflector']->get_class_label(); 306 301 307 midcom_show_style('midgard_admin_asgard_type'); 308 309 $class = $this->type; 310 311 $data['used_types'][] = $data['type']; 312 $data['used_types'][] = $_MIDCOM->dbclassloader->get_midcom_class_name_for_legacy_midgard_class($this->type); 313 314 $data['prefix'] = $_MIDCOM->get_context_data(MIDCOM_CONTEXT_ANCHORPREFIX); 315 316 $this->_show_headers = false; 317 318 $types = $data['reflector']->get_child_classes(); 319 320 if (count($types) > 0) 321 { 322 midcom_show_style('midgard_admin_asgard_type_children_start'); 323 $this->show_child_types($this->type, &$data); 324 midcom_show_style('midgard_admin_asgard_type_children_end'); 325 } 326 302 327 midcom_show_style('midgard_admin_asgard_footer'); 328 } 329 330 function show_child_types($type, &$data) 331 { 332 $types = $data['reflector']->get_child_classes(); 333 $first = true; 334 335 foreach ($types as $child_type) 336 { 337 if (in_array($child_type, $data['used_types'])) 338 { 339 continue; 340 } 341 342 // Show the header on first item. Has to be inside foreach loop, since we are 343 // 344 if ($first) 345 { 346 $first = false; 347 midcom_show_style('midgard_admin_asgard_type_children_header'); 348 } 349 350 $data['reflector'] = new midcom_helper_reflector_tree($child_type); 351 352 $data['type_name'] = $child_type; 353 $data['type_translated'] = $data['reflector']->get_class_label(); 354 355 $data['used_types'][] = $child_type; 356 357 midcom_show_style('midgard_admin_asgard_type_children_item'); 358 } 359 360 // Not a single type was shown, skip the footer item 361 if ($first) 362 { 363 return; 364 } 365 366 midcom_show_style('midgard_admin_asgard_type_children_footer'); 303 367 } 304 368 } trunk/midcom/midgard.admin.asgard/navigation.php
r16815 r16821 247 247 echo "<a href=\"{$_MIDGARD['self']}__mfa/asgard/object/{$this->_request_data['default_mode']}/{$object->guid}/\" title=\"GUID: {$object->guid}, ID: {$object->id}\">{$icon}{$label}</a>\n"; 248 248 249 /* If there is exactly one root object, show its children, since 250 * this is what the user most likely wants to reach 251 */ 249 // If there is exactly one root object, show its children, since this is what the user most likely wants to reach 252 250 if ($selected || sizeof($root_objects) == 1) 253 251 { … … 445 443 $this->_list_root_elements($root_objects, &$ref); 446 444 } 447 448 445 } 449 446 midcom_show_style('midgard_admin_asgard_navigation_section_footer'); trunk/midcom/midgard.admin.asgard/style/midgard_admin_asgard_type.php
r15733 r16821 94 94 echo " <tr>\n"; 95 95 echo " <td><a href=\"{$prefix}__mfa/asgard/object/{$data['default_mode']}/{$result->guid}/\">{$icon} {$label}</a></td>\n"; 96 echo " <td class=\"nowrap\">" . strftime('%x %X', $result->metadata->created) . "</td>\n";96 echo " <td>" . strftime('%x %X', $result->metadata->created) . "</td>\n"; 97 97 98 98 if ($persons[$result->metadata->creator]->guid) … … 113 113 echo " \$j('#search_results').tablesorter(\n"; 114 114 echo " {\n "; 115 echo " widgets: ['zebra'], \n";115 echo " widgets: ['zebra'],"; 116 116 echo " sortList: [[0,0]]\n"; 117 117 echo " });\n"; trunk/midcom/midgard.admin.asgard/tree.php
r16621 r16821 12 12 * @package midgard.admin.asgard 13 13 */ 14 class midgard_admin_asgard_copytree extends midgard_admin_asgard_navigation14 class midgard_admin_asgard_copytree extends midgard_admin_asgard_navigation 15 15 { 16 16 /**
