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

system/admin/themes.php

00001 <?php namespace Habari; ?>
00002 <?php if ( !defined( 'HABARI_PATH' ) ) { die('No direct access'); } ?>
00003 <?php include('header.php');?>
00004 
00005 <div class="container main currenttheme">
00006   <h2 class="lead"><?php _e( 'Current Theme' ); ?></h2>
00007   <div class="item">
00008     <div class="head">
00009       <div class="title">
00010         <a href="<?php echo $active_theme['info']->url; ?>" class="plugin"><?php echo $active_theme['info']->name; ?></a> <?php echo $active_theme['info']->version; ?> <?php _e('by'); ?>
00011         <?php
00012         $authors = array();
00013         foreach ( $active_theme['info']->author as $author ) {
00014           $authors[] = isset( $author['url'] ) ? '<a href="' . $author['url'] . '">' . $author . '</a>' : $author;
00015         }
00016         // @locale The string used between the last two items in the list of authors of a theme on the admin page (one, two, three *and* four).
00017         echo Format::and_list( $authors,  _t( ' and ' ));
00018         ?>
00019       </div>
00020       <?php
00021         if ( isset( $active_theme['info']->help ) ):
00022           if( Controller::get_var('help') == $active_theme['dir'] ):
00023       ?>
00024         <a class="help active" href="<?php URL::out( 'display_themes' ); ?>"><?php _e('Help'); ?></a>
00025         <?php else: ?>
00026         <a class="help" href="<?php URL::out( 'display_themes', 'help=' . $active_theme['dir'] ); ?>"><?php _e('Help'); ?></a>
00027         <?php
00028           endif;
00029         endif;
00030       ?>
00031 
00032       <?php if ( $configurable ): ?>
00033       <ul class="dropbutton">
00034         <li><a href="<?php URL::out( 'display_themes', 'configure=' . $active_theme['dir'] ); ?>"><?php _e('Settings'); ?></a></li>
00035       </ul>
00036       <?php endif; ?>
00037 
00038       <?php if ( $active_theme['info']->update != '' ): ?>
00039       <ul class="dropbutton alert">
00040         <li><a href="#"><?php _e('v'); ?><?php echo $active_theme['info']->update; ?> <?php _e('Update Available'); ?></a></li>
00041       </ul>
00042       <?php endif; ?>
00043 
00044     </div>
00045 
00046     <div class="clearfix">
00047       <div class="thumb columns four"><img class="colmuns four" src="<?php echo $active_theme['screenshot']; ?>">
00048       </div>
00049       <div class="themeinfo columns ten">
00050         <p class="description"><?php echo $active_theme['info']->description; ?></p>
00051         <?php if ( $active_theme['info']->license != '' ): ?>
00052         <p class="description"><?php printf( _t('%1$s is licensed under the %2$s'), $active_theme['info']->name, '<a href="' . $active_theme['info']->license['url'] . '">' . $active_theme['info']->license . '</a>' ); ?></p>
00053         <?php endif; ?>
00054 
00055         <?php if ( isset( $active_theme['info']->help ) ): ?>
00056         <div id="themehelp" class="<?php if( Controller::get_var('help') == $active_theme['dir'] ): ?>active<?php endif; ?>">
00057           <div class="help">
00058             <?php echo Pluggable::get_xml_text($active_theme['info']['filename'], $active_theme['info']->help); ?>
00059           </div>
00060         </div>
00061         <?php endif; ?>
00062       </div>
00063     </div>
00064   </div>
00065 </div>
00066 
00067   <?php
00068   // Capture the admin config output.  If nothing is there, don't output the section
00069   ob_start();
00070   Plugins::act( 'theme_ui', $active_theme );
00071   $output = ob_get_clean();
00072   if (trim($output) != '') :
00073   ?>
00074 
00075   <div class="item">
00076     <h3><?php _e( "General" ); ?></h3>
00077     <?php echo $output; ?>
00078     <div></div>
00079   </div>
00080   <?php endif; ?>
00081 
00082   <?php if ( isset($active_theme['info']->areas) ): ?>
00083   <div id="blocksconfigure" class="item container">
00084     <h3 class="lead"><?php _e( "Areas" ); ?></h3>
00085       <div id="block_add" class="columns ten">
00086         <?php $this->display('block_instances'); ?>
00087       </div>
00088       <div class="columns four">
00089         <div id="scope_container">
00090         <?php $this->display('block_areas'); ?>
00091         </div>
00092         <div class="formcontrol"><button id="save_areas" disabled="disabled"><?php _e('Save'); ?></button>
00093         </div>
00094       </div>
00095     <?php endif; ?>
00096   </div>
00097 
00098 <div class="container main availablethemes">
00099 
00100   <h2 class="lead"><?php _e('Available Themes'); ?></h2>
00101 <?php
00102 foreach ( $all_themes as $inactive_theme ):
00103   if ( $inactive_theme['path'] != $active_theme_dir ) : ?>
00104   <div class="item <?php if ($previewed == $inactive_theme['dir']) echo " previewing"; ?>"> 
00105     <div class="head">
00106       <div class="title">
00107         <a href="<?php echo $inactive_theme['info']->url; ?>"><?php echo $inactive_theme['info']->name; ?> <?php echo $inactive_theme['info']->version; ?></a> <?php _e('by'); ?> 
00108         <?php
00109         $authors = array();
00110         foreach ( $inactive_theme['info']->author as $author ) {
00111           $authors[] = isset( $author['url'] ) ? '<a href="' . $author['url'] . '">' . $author . '</a>' : $author;
00112         }
00113         // @locale The string used between the last two items in the list of authors of a theme on the admin page (one, two, three *and* four).
00114         echo Format::and_list( $authors,  _t( ' and ' ));
00115         ?>
00116       </div>
00117 
00118         <?php
00119         if ( $inactive_theme['info']->getName() != 'pluggable' || (string) $inactive_theme['info']->attributes()->type != 'theme' ) : ?>
00120       <p class="legacy"><?php _e( 'Legacy theme.' ); ?></p>
00121         <?php elseif(isset($inactive_theme['req_parent'])): ?>
00122       <p class="legacy"><?php _e( 'This theme requires the parent theme named "%s".', array($inactive_theme['req_parent']) ); ?></p>
00123         <?php else: ?>
00124           <?php
00125           $dbtn = FormControlDropbutton::create('actions');
00126           $dbtn->append(FormControlSubmit::create('activate')->set_url(URL::get( 'activate_theme', 'theme_dir=' . $inactive_theme['dir'] . '&theme_name=' . $inactive_theme['info']->name ))->set_caption(_t('Activate')));
00127           if ($previewed == $inactive_theme['dir']) {
00128             $dbtn->append(FormControlSubmit::create('end_preview')->set_url(URL::get( 'preview_theme', 'theme_dir=' . $inactive_theme['dir'] . '&theme_name=' . $inactive_theme['info']->name ))->set_caption(_t('End Preview')));
00129           }
00130           else {
00131             $dbtn->append(FormControlSubmit::create('preview')->set_url(URL::get( 'preview_theme', 'theme_dir=' . $inactive_theme['dir'] . '&theme_name=' . $inactive_theme['info']->name ))->set_caption(_t('Preview')));
00132           }
00133           echo $dbtn->pre_out();
00134           echo $dbtn->get($theme);
00135           ?>
00136         <?php endif; ?>
00137     </div>
00138     <div class="clearfix">
00139         <div class="thumb columns four">
00140         <img class="themethumb columns four" src="<?php echo $inactive_theme['screenshot']; ?>">
00141       </div>
00142       <div class="themeinfo columns ten">
00143         <div class="pointer"></div>
00144         <p class="description"><?php echo $inactive_theme['info']->description; ?></p>
00145         <?php if ( $inactive_theme['info']->license != '' ): ?>
00146         <p class="description"><?php printf( _t('%1$s is licensed under the %2$s'), $inactive_theme['info']->name, '<a href="' . $inactive_theme['info']->license['url'] . '">' . $inactive_theme['info']->license . '</a>' ); ?></p>
00147         <?php endif; ?>
00148       </div>
00149   </div>  
00150 </div>
00151 <?php
00152   endif;
00153 endforeach;
00154 ?>
00155 </div>
00156 
00157 <?php if (isset($theme_loader) && $theme_loader != ''): ?>
00158 <div class="container" id="themeloader">
00159 <?php echo $theme_loader; ?>
00160 </div>
00161 <?php endif; ?>
00162 
00163 <?php include('footer.php');?>

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