• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • Examples
  • File List

system/admin/theme.php

00001 <?php
00002 
00003 namespace Habari;
00004 
00005 class Monolith extends Theme
00006 {
00011   public function action_admin_header( $theme )
00012   {
00013 
00014     // Since this is the core admin theme, all of these named StackItems should have been added via Stack::action_register_stackitems()
00015 
00016     Stack::add( 'admin_header_javascript', 'jquery.color' );
00017     Stack::add( 'admin_header_javascript', 'jquery-nested-sortable' );
00018     Stack::add( 'admin_header_javascript', 'humanmsg' );
00019     Stack::add( 'admin_header_javascript', 'jquery.hotkeys' );
00020     Stack::add( 'admin_header_javascript', 'locale-js' );
00021     Stack::add( 'admin_header_javascript', 'media' );
00022     Stack::add( 'admin_header_javascript', 'admin-js' );
00023     Stack::add( 'admin_header_javascript', 'crc32' );
00024     Stack::add( 'admin_header_javascript', 'select2' );
00025 
00026     Stack::add( 'admin_stylesheet', 'jquery.ui-css' );
00027     Stack::add( 'admin_stylesheet', 'select2-css' );
00028 
00029     if ( defined( 'DEBUG_ADMIN' ) ) {
00030       Stack::add( 'admin_footer_javascript', 'less' );
00031       Stack::add( 'admin_stylesheet', 'admin-less' );
00032     }
00033     else {
00034       Stack::add( 'admin_stylesheet', 'admin-css' );
00035     }
00036   }
00037 
00046   public function get_blocks( $area, $scope, $theme )
00047   {
00048     if($area == 'dashboard') {
00049       $area = 'dashboard_' . User::identify()->id;
00050     }
00051     return parent::get_blocks($area, $scope, $theme);
00052   }
00053 
00061   public function action_block_content($block, $theme)
00062   {
00063     static $available_modules;
00064     if(!isset($available_modules)) {
00065       $available_modules = Plugins::filter('dashboard_block_list', array());
00066     }
00067     if( isset( $available_modules[$block->type] ) ) {
00068       $block->_title = $available_modules[$block->type];
00069     }
00070   }
00071 }
00072 ?>

Generated on Sun Aug 4 2013 12:51:43 for Habari by  doxygen 1.7.1