PK NyÏ\õx/| | CoreController.phpnu W+A„¶ loco-core-view
*/
class Loco_admin_list_CoreController extends Loco_admin_RedirectController {
/**
* {@inheritdoc}
*/
public function getLocation(){
return Loco_mvc_AdminRouter::generate('core-view');
}
}PK NyÏ\Øž„Š. . ThemesController.phpnu W+A„¶ set('type', 'theme' );
$this->set('title', __( 'Translate themes', 'loco' ) );
/* @var $theme WP_Theme */
foreach( wp_get_themes() as $theme ){
$bundle = Loco_package_Theme::create( $theme->get_stylesheet() );
$this->addBundle( $bundle );
}
return parent::render();
}
}PK NyÏ\—fs> > PluginsController.phpnu W+A„¶ set( 'type', 'plugin' );
$this->set( 'title', __( 'Translate plugins', 'loco' ) );
foreach( Loco_package_Plugin::get_plugins() as $handle => $data ){
try {
$bundle = Loco_package_Plugin::create( $handle );
$this->addBundle($bundle);
}
// @codeCoverageIgnoreStart
catch( Exception $e ){
$bundle = new Loco_package_Plugin( $handle, $handle );
$this->addBundle( $bundle );
}
// @codeCoverageIgnoreEnd
}
return parent::render();
}
}PK NyÏ\ÇrÝ ì ì BaseController.phpnu W+A„¶ getHandle();
// compatibility will be 'ok', 'warn' or 'error' depending on severity
if( $default = $bundle->getDefaultProject() ){
$compat = $default->getPot() instanceof Loco_fs_File;
}
else {
$compat = false;
}
//$info = $bundle->getHeaderInfo();
return new Loco_mvc_ViewParams( array (
'id' => $bundle->getId(),
'name' => $bundle->getName(),
'dflt' => $default ? $default->getDomain() : '--',
'size' => count( $bundle ),
'save' => $bundle->isConfigured(),
'type' => $type = strtolower( $bundle->getType() ),
'view' => Loco_mvc_AdminRouter::generate( $type.'-view', array( 'bundle' => $handle ) ),
'time' => $bundle->getLastUpdated(),
) );
}
/**
* Add bundle to enabled or disabled list, depending on whether it is configured
*/
protected function addBundle( Loco_package_Bundle $bundle ){
$this->bundles[] = $this->bundleParam($bundle);
}
/**
* {@inheritdoc}
*/
public function getHelpTabs(){
return array (
__('Overview','default') => $this->view('tab-list-bundles'),
);
}
/**
* {@inheritdoc}
*/
public function render(){
// breadcrumb is just the root
$here = new Loco_admin_Navigation( array (
new Loco_mvc_ViewParams( array( 'name' => $this->get('title') ) ),
) );
/*/ tab between the types of bundles
$types = array (
'' => __('Home','loco'),
'theme' => __('Themes','loco'),
'plugin' => __('Plugins','loco'),
);
$current = $this->get('_route');
$tabs = new Loco_admin_Navigation;
foreach( $types as $type => $name ){
$href = Loco_mvc_AdminRouter::generate($type);
$tabs->add( $name, $href, $type === $current );
}
*/
return $this->view( 'admin/list/bundles', array (
'bundles' => $this->bundles,
'breadcrumb' => $here,
) );
}
}PK WyÏ\$Ãp1 1
inc-table.phpnu W+A„¶
|
|
|
|
|
|
e('name')?>
|
e('dflt')?>
|
|
n('size')?>
|
PK WyÏ\ÃäÒ±« « bundles.phpnu W+A„¶ extend('../layout');
echo $this->render('../common/inc-table-filter');
echo $this->render('inc-table');PK ÈyÐ\‡HÓÑr r locales.phpnu W+A„¶ extend('../layout');
echo $this->render('../common/inc-table-filter');
?>
PK NyÏ\õx/| | CoreController.phpnu W+A„¶ PK NyÏ\Øž„Š. . ¾ ThemesController.phpnu W+A„¶ PK NyÏ\—fs> > 0 PluginsController.phpnu W+A„¶ PK NyÏ\ÇrÝ ì ì ³ BaseController.phpnu W+A„¶ PK WyÏ\$Ãp1 1
á inc-table.phpnu W+A„¶ PK WyÏ\ÃäÒ±« « O bundles.phpnu W+A„¶ PK ÈyÐ\‡HÓÑr r 5 locales.phpnu W+A„¶ PK 0 â