1
0
mirror of https://github.com/monstra-cms/monstra.git synced 2025-08-06 13:16:54 +02:00

Monstra Library: basic core improvments

This commit is contained in:
Awilum
2013-01-04 21:08:04 +02:00
parent 7437cc6abb
commit ef12b7492e
289 changed files with 16265 additions and 17155 deletions

View File

@@ -8,4 +8,4 @@
<plugin_version>1.0.0</plugin_version>
<plugin_author>Awilum</plugin_author>
<plugin_author_uri>http://monstra.org/</plugin_author_uri>
</root>
</root>

View File

@@ -1,49 +1,49 @@
<?php
return array(
'themes' => array(
'Themes' => 'Themes',
'Themes manager' => 'Themes Manager',
'Select theme' => 'Wähle Theme',
'Save' => 'Speichern',
'Save and exit' => 'Speichern und Schließen',
'Name' => 'Name',
'Create new template' => 'Erstelle neues Template',
'New template' => 'Neues Template',
'Delete template: :name' => 'Lösche Template: :name',
'Delete chunk: :name' => 'Lösche Chunk: :name',
'Delete styles: :name' => 'Lösche Styles: :name',
'Templates' => 'Templates',
'Clone' => 'Klonen',
'Edit' => 'Bearbeiten',
'Delete' => 'Löschen',
'Actions' => 'Aktionen',
'Create new chunk' => 'Erstelle neuen chunk',
'New chunk' => 'Neuer Chunk',
'Chunks' => 'Chunks',
'Create new styles' => 'Erstelle neue Styles',
'New styles' => 'Neue Styles',
'Styles' => 'Styles',
'Template content' => 'Template Inhalt',
'Styles content' => 'Styles Inhalt',
'Chunk content' => 'Chunk Inhalt',
'Edit template' => 'Bearbeite Template',
'Edit chunk' => 'Bearbeite Chunk',
'Edit styles' => 'Bearbeite Styles',
'Current site theme' => 'Aktuelle Seiten Template',
'Current admin theme' => 'Aktuelles Admin Template',
'This template already exists' => 'Dieses Template existiert bereits',
'This chunk already exists' => 'Dieser Chunk exisitert bereits',
'This styles already exists' => 'Diese Styles existieren bereits',
'Components templates' => 'Komponenten Templates',
'Your changes to the chunk <i>:name</i> have been saved.' => 'Deine Änderungen für das Chunk <i>:name</i> wurden gespeichert.',
'Your changes to the styles <i>:name</i> have been saved.' => 'Deine Änderungen für die Styles <i>:name</i> wurden gespeichert.',
'Your changes to the template <i>:name</i> have been saved.' => 'Deine Änderungen für das Template <i>:name</i> wurden gespeichert.',
'This field should not be empty' => 'Dieses Feld darf nicht leer sein.',
'Scripts' => 'Scripts',
'Create new script' => 'Erstelle neues Script',
'Script content' => 'Script Inhalt',
'New script' => 'Neues Script',
'Edit script' => 'Bearbeite Script',
)
);
<?php
return array(
'themes' => array(
'Themes' => 'Themes',
'Themes manager' => 'Themes Manager',
'Select theme' => 'Wähle Theme',
'Save' => 'Speichern',
'Save and exit' => 'Speichern und Schließen',
'Name' => 'Name',
'Create new template' => 'Erstelle neues Template',
'New template' => 'Neues Template',
'Delete template: :name' => 'Lösche Template: :name',
'Delete chunk: :name' => 'Lösche Chunk: :name',
'Delete styles: :name' => 'Lösche Styles: :name',
'Templates' => 'Templates',
'Clone' => 'Klonen',
'Edit' => 'Bearbeiten',
'Delete' => 'Löschen',
'Actions' => 'Aktionen',
'Create new chunk' => 'Erstelle neuen chunk',
'New chunk' => 'Neuer Chunk',
'Chunks' => 'Chunks',
'Create new styles' => 'Erstelle neue Styles',
'New styles' => 'Neue Styles',
'Styles' => 'Styles',
'Template content' => 'Template Inhalt',
'Styles content' => 'Styles Inhalt',
'Chunk content' => 'Chunk Inhalt',
'Edit template' => 'Bearbeite Template',
'Edit chunk' => 'Bearbeite Chunk',
'Edit styles' => 'Bearbeite Styles',
'Current site theme' => 'Aktuelle Seiten Template',
'Current admin theme' => 'Aktuelles Admin Template',
'This template already exists' => 'Dieses Template existiert bereits',
'This chunk already exists' => 'Dieser Chunk exisitert bereits',
'This styles already exists' => 'Diese Styles existieren bereits',
'Components templates' => 'Komponenten Templates',
'Your changes to the chunk <i>:name</i> have been saved.' => 'Deine Änderungen für das Chunk <i>:name</i> wurden gespeichert.',
'Your changes to the styles <i>:name</i> have been saved.' => 'Deine Änderungen für die Styles <i>:name</i> wurden gespeichert.',
'Your changes to the template <i>:name</i> have been saved.' => 'Deine Änderungen für das Template <i>:name</i> wurden gespeichert.',
'This field should not be empty' => 'Dieses Feld darf nicht leer sein.',
'Scripts' => 'Scripts',
'Create new script' => 'Erstelle neues Script',
'Script content' => 'Script Inhalt',
'New script' => 'Neues Script',
'Edit script' => 'Bearbeite Script',
)
);

View File

@@ -17,7 +17,7 @@
'Clone' => 'Clone',
'Edit' => 'Edit',
'Delete' => 'Delete',
'Actions' => 'Actions',
'Actions' => 'Actions',
'Create new chunk' => 'Create new chunk',
'New chunk' => 'New chunk',
'Chunks' => 'Chunks',
@@ -46,4 +46,4 @@
'New script' => 'New script',
'Edit script' => 'Edit script',
)
);
);

View File

@@ -17,7 +17,7 @@
'Clone' => 'Duplica',
'Edit' => 'Modifica',
'Delete' => 'Elimina',
'Actions' => 'Azioni',
'Actions' => 'Azioni',
'Create new chunk' => 'Crea nuovo chunk',
'New chunk' => 'Nuovo chunk',
'Chunks' => 'Chunks',
@@ -48,4 +48,4 @@
'New script' => 'Nuovo script',
'Edit script' => 'Modifica script',
)
);
);

View File

@@ -17,7 +17,7 @@
'Clone' => 'Klonuoti',
'Edit' => 'Redaguoti',
'Delete' => 'Ištrinti',
'Actions' => 'Veiksmai',
'Actions' => 'Veiksmai',
'Create new chunk' => 'Sukurti naują šablono dalį',
'New chunk' => 'Nauja šablono dalis',
'Chunks' => 'Šablono dalys',
@@ -46,4 +46,4 @@
'New script' => 'Naujas skriptas',
'Edit script' => 'Redaguoti skriptą',
)
);
);

View File

@@ -17,7 +17,7 @@
'Clone' => 'Clonar',
'Edit' => 'Editar',
'Delete' => 'Deletar',
'Actions' => 'Ações',
'Actions' => 'Ações',
'Create new chunk' => 'Criar novo pedaço',
'New chunk' => 'Novo pedaço',
'Chunks' => 'Pedaços',
@@ -46,4 +46,4 @@
'New script' => 'Novo script',
'Edit script' => 'Editar script',
)
);
);

View File

@@ -17,7 +17,7 @@
'Clone' => 'Клонировать',
'Edit' => 'Редактировать',
'Delete' => 'Удалить',
'Actions' => 'Действия',
'Actions' => 'Действия',
'Create new chunk' => 'Создать новый чанк',
'New chunk' => 'Новый чанк',
'Chunks' => 'Чанки',
@@ -48,4 +48,4 @@
'New script' => 'Новый скрипт',
'Edit script' => 'Редактирование скрипта',
)
);
);

View File

@@ -17,7 +17,7 @@
'Clone' => 'Клонувати',
'Edit' => 'Редагувати',
'Delete' => 'Видалити',
'Actions' => 'Дії',
'Actions' => 'Дії',
'Create new chunk' => 'Створити новий чанк',
'New chunk' => 'Новый чанк',
'Chunks' => 'Чанки',
@@ -48,4 +48,4 @@
'New script' => 'Новий скрипт',
'Edit script' => 'Редагування скрипту',
)
);
);

File diff suppressed because it is too large Load Diff

View File

@@ -1,199 +1,191 @@
<?php
/**
* Themes plugin
*
* @package Monstra
* @subpackage Plugins
* @author Romanenko Sergey / Awilum
* @copyright 2012 Romanenko Sergey / Awilum
* @version 1.0.0
*
*/
// Register plugin
Plugin::register( __FILE__,
__('Themes', 'themes'),
__('Themes manager', 'themes'),
'1.0.0',
'Awilum',
'http://monstra.org/',
null,
'box');
if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin'))) {
// Include Admin
Plugin::admin('themes', 'box');
}
/**
* Themes Class
*/
class Themes
{
/**
* Themes plugin
*
* @package Monstra
* @subpackage Plugins
* @author Romanenko Sergey / Awilum
* @copyright 2012 Romanenko Sergey / Awilum
* @version 1.0.0
*
* Get Themes
*/
public static function getAdminThemes()
{
$themes_folders = array();
// Get all themes folders
$_themes_admin_folders = Dir::scan(THEMES_ADMIN);
// Register plugin
Plugin::register( __FILE__,
__('Themes', 'themes'),
__('Themes manager', 'themes'),
'1.0.0',
'Awilum',
'http://monstra.org/',
null,
'box');
if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin'))) {
// Include Admin
Plugin::admin('themes', 'box');
// Create an array of valid themes folders
foreach($_themes_admin_folders as $folder) if (File::exists(THEMES_ADMIN . DS . $folder . DS . 'index.template.php')) $__themes_admin_folders[] = $folder;
foreach($__themes_admin_folders as $theme) $themes[$theme] = $theme;
return $themes;
}
/**
* Themes Class
* Get Admin Themes
*/
class Themes {
public static function getSiteThemes()
{
$themes_folders = array();
/**
* Get Themes
*/
public static function getAdminThemes() {
// Get all themes folders
$_themes_folders = Dir::scan(THEMES_SITE);
$themes_folders = array();
// Get all themes folders
$_themes_admin_folders = Dir::scan(THEMES_ADMIN);
// Create an array of valid themes folders
foreach($_themes_admin_folders as $folder) if (File::exists(THEMES_ADMIN . DS . $folder . DS . 'index.template.php')) $__themes_admin_folders[] = $folder;
foreach($__themes_admin_folders as $theme) $themes[$theme] = $theme;
return $themes;
}
/**
* Get Admin Themes
*/
public static function getSiteThemes() {
$themes_folders = array();
// Get all themes folders
$_themes_folders = Dir::scan(THEMES_SITE);
// Create an array of valid themes folders
foreach($_themes_folders as $folder) if (File::exists(THEMES_SITE . DS . $folder . DS . 'index.template.php')) $__themes_folders[] = $folder;
foreach($__themes_folders as $theme) $themes[$theme] = $theme;
return $themes;
}
/**
* Get Templates
*
* @param string $theme Theme name
* @return mixed
*/
public static function getTemplates($theme = null) {
$theme = ($theme === null) ? null : (string) $theme;
if ($theme == null) $theme = Option::get('theme_site_name');
$templates = array();
// Get all templates in current theme folder
$templates = File::scan(THEMES_SITE . DS . $theme, '.template.php');
return ($templates) ? $templates : array();
}
/**
* Get Chunks
*
* @param string $theme Theme name
* @return mixed
*/
public static function getChunks($theme = null) {
$theme = ($theme === null) ? null : (string) $theme;
if ($theme == null) $theme = Option::get('theme_site_name');
$chunks = array();
// Get all templates in current theme folder
$chunks = File::scan(THEMES_SITE . DS . $theme, '.chunk.php');
return ($chunks) ? $chunks : array();
}
/**
* Get Styles
*
* @param string $theme Theme name
* @return mixed
*/
public static function getStyles($theme = null) {
$theme = ($theme === null) ? null : (string) $theme;
if ($theme == null) $theme = Option::get('theme_site_name');
$styles = array();
// Get all templates in current theme folder
$styles = File::scan(THEMES_SITE . DS . $theme . DS . 'css', '.css');
return ($styles) ? $styles : array();
}
/**
* Get Scripts
*
* @param string $theme Theme name
* @return mixed
*/
public static function getScripts($theme = null) {
$theme = ($theme === null) ? null : (string) $theme;
if ($theme == null) $theme = Option::get('theme_site_name');
$scripts = array();
// Get all templates in current theme folder
$scripts = File::scan(THEMES_SITE . DS . $theme . DS . 'js' . DS , '.js');
return ($scripts) ? $scripts : array();
}
// Create an array of valid themes folders
foreach($_themes_folders as $folder) if (File::exists(THEMES_SITE . DS . $folder . DS . 'index.template.php')) $__themes_folders[] = $folder;
foreach($__themes_folders as $theme) $themes[$theme] = $theme;
return $themes;
}
/**
* Get Templates
*
* @param string $theme Theme name
* @return mixed
*/
public static function getTemplates($theme = null)
{
$theme = ($theme === null) ? null : (string) $theme;
if ($theme == null) $theme = Option::get('theme_site_name');
$templates = array();
// Get all templates in current theme folder
$templates = File::scan(THEMES_SITE . DS . $theme, '.template.php');
return ($templates) ? $templates : array();
}
/**
* Chunk class
* Get Chunks
*
* @param string $theme Theme name
* @return mixed
*/
class Chunk {
public static function getChunks($theme = null)
{
$theme = ($theme === null) ? null : (string) $theme;
/**
* Get chunk
*
* @param string $name Chunk name
* @param string $theme Theme name
*/
public static function get($name, $vars = array(), $theme = null) {
// Redefine vars
$name = (string) $name;
$current_theme = ($theme === null) ? Option::get('theme_site_name') : (string) $theme;
if ($theme == null) $theme = Option::get('theme_site_name');
// Extract vars
extract($vars);
$chunks = array();
// Chunk path
$chunk_path = THEMES_SITE . DS . $current_theme . DS;
// Get all templates in current theme folder
$chunks = File::scan(THEMES_SITE . DS . $theme, '.chunk.php');
// Is chunk exist ?
if (file_exists($chunk_path . $name . '.chunk.php')) {
return ($chunks) ? $chunks : array();
}
// Is chunk minified
if ( ! file_exists(MINIFY . DS . 'theme.' . $current_theme . '.minify.' . $name . '.chunk.php') or
filemtime(THEMES_SITE . DS . $current_theme . DS . $name .'.chunk.php') > filemtime(MINIFY . DS . 'theme.' . $current_theme . '.minify.' . $name . '.chunk.php')) {
file_put_contents(MINIFY . DS . 'theme.' . $current_theme . '.minify.' . $name . '.chunk.php',
Minify::html(file_get_contents(THEMES_SITE. DS . $current_theme . DS . $name .'.chunk.php')));
}
/**
* Get Styles
*
* @param string $theme Theme name
* @return mixed
*/
public static function getStyles($theme = null)
{
$theme = ($theme === null) ? null : (string) $theme;
// Include chunk
include MINIFY . DS . 'theme.' . $current_theme . '.minify.' . $name . '.chunk.php';
if ($theme == null) $theme = Option::get('theme_site_name');
$styles = array();
// Get all templates in current theme folder
$styles = File::scan(THEMES_SITE . DS . $theme . DS . 'css', '.css');
return ($styles) ? $styles : array();
}
/**
* Get Scripts
*
* @param string $theme Theme name
* @return mixed
*/
public static function getScripts($theme = null)
{
$theme = ($theme === null) ? null : (string) $theme;
if ($theme == null) $theme = Option::get('theme_site_name');
$scripts = array();
// Get all templates in current theme folder
$scripts = File::scan(THEMES_SITE . DS . $theme . DS . 'js' . DS , '.js');
return ($scripts) ? $scripts : array();
}
}
/**
* Chunk class
*/
class Chunk
{
/**
* Get chunk
*
* @param string $name Chunk name
* @param string $theme Theme name
*/
public static function get($name, $vars = array(), $theme = null)
{
// Redefine vars
$name = (string) $name;
$current_theme = ($theme === null) ? Option::get('theme_site_name') : (string) $theme;
// Extract vars
extract($vars);
// Chunk path
$chunk_path = THEMES_SITE . DS . $current_theme . DS;
// Is chunk exist ?
if (file_exists($chunk_path . $name . '.chunk.php')) {
// Is chunk minified
if ( ! file_exists(MINIFY . DS . 'theme.' . $current_theme . '.minify.' . $name . '.chunk.php') or
filemtime(THEMES_SITE . DS . $current_theme . DS . $name .'.chunk.php') > filemtime(MINIFY . DS . 'theme.' . $current_theme . '.minify.' . $name . '.chunk.php')) {
file_put_contents(MINIFY . DS . 'theme.' . $current_theme . '.minify.' . $name . '.chunk.php',
Minify::html(file_get_contents(THEMES_SITE. DS . $current_theme . DS . $name .'.chunk.php')));
}
// Include chunk
include MINIFY . DS . 'theme.' . $current_theme . '.minify.' . $name . '.chunk.php';
}
}
}
}

View File

@@ -1,7 +1,7 @@
<?php if ($action == 'chunk') { ?><h2><?php echo __('New chunk', 'themes'); ?></h2><?php } ?>
<?php if ($action == 'template') { ?><h2><?php echo __('New template', 'themes'); ?></h2><?php } ?>
<?php if ($action == 'styles') { ?><h2><?php echo __('New styles', 'themes'); ?></h2><?php } ?>
<?php if ($action == 'script') { ?><h2><?php echo __('New script', 'themes'); ?></h2><?php } ?>
<?php if ($action == 'styles') { ?><h2><?php echo __('New styles', 'themes'); ?></h2><?php } ?>
<?php if ($action == 'script') { ?><h2><?php echo __('New script', 'themes'); ?></h2><?php } ?>
<br />
<?php if (Notification::get('success')) Alert::success(Notification::get('success')); ?>
@@ -18,8 +18,8 @@
<?php echo (Form::input('name', $name, array('class' => (isset($errors['file_empty_name']) || isset($errors['file_exists'])) ? 'input-xxlarge error-field' : 'input-xxlarge'))); ?>
<?php if ($action == 'chunk') { ?><span class="add-on">.chunk.php</span><?php } ?>
<?php if ($action == 'template') { ?><span class="add-on">.template.php</span><?php } ?>
<?php if ($action == 'styles') { ?><span class="add-on">.css</span><?php } ?>
<?php if ($action == 'script') { ?><span class="add-on">.js</span><?php } ?>
<?php if ($action == 'styles') { ?><span class="add-on">.css</span><?php } ?>
<?php if ($action == 'script') { ?><span class="add-on">.js</span><?php } ?>
</div>
<?php
@@ -30,12 +30,12 @@
<br><br>
<?php
if ($action == 'chunk') { echo Form::label('content', __('Chunk content', 'themes')); }
if ($action == 'chunk') { echo Form::label('content', __('Chunk content', 'themes')); }
if ($action == 'template') { echo Form::label('content', __('Template content', 'themes')); }
if ($action == 'styles') { echo Form::label('content', __('Styles content', 'themes')); }
if ($action == 'script') { echo Form::label('content', __('Script content', 'themes')); }
echo Form::textarea('content', $content, array('style' => 'width:100%;height:400px;', 'class' => 'source-editor'));
echo (
@@ -44,4 +44,3 @@
Form::submit('add_file', __('Save', 'themes'), array('class' => 'btn')).
Form::close()
);
?>

View File

@@ -1,13 +1,13 @@
<?php if ($action == 'chunk') { ?><h2><?php echo __('Edit chunk', 'themes'); ?></h2><?php } ?>
<?php if ($action == 'template') { ?><h2><?php echo __('Edit template', 'themes'); ?></h2><?php } ?>
<?php if ($action == 'styles') { ?><h2><?php echo __('Edit styles', 'themes'); ?></h2><?php } ?>
<?php if ($action == 'styles') { ?><h2><?php echo __('Edit styles', 'themes'); ?></h2><?php } ?>
<?php if ($action == 'script') { ?><h2><?php echo __('Edit script', 'themes'); ?></h2><?php } ?>
<br />
<?php if (Notification::get('success')) Alert::success(Notification::get('success')); ?>
<?php
if ($content !== null) {
if ($content !== null) {
if (isset($errors['file_empty_name']) or isset($errors['file_exists'])) $error_class = 'error'; else $error_class = '';
@@ -18,9 +18,8 @@
<?php if ($action == 'chunk') { echo (Form::hidden('chunk_old_name', Request::get('filename'))); } ?>
<?php if ($action == 'template') { echo (Form::hidden('template_old_name', Request::get('filename'))); } ?>
<?php if ($action == 'styles') { echo (Form::hidden('styles_old_name', Request::get('filename'))); } ?>
<?php if ($action == 'script') { echo (Form::hidden('script_old_name', Request::get('filename'))); } ?>
<?php if ($action == 'styles') { echo (Form::hidden('styles_old_name', Request::get('filename'))); } ?>
<?php if ($action == 'script') { echo (Form::hidden('script_old_name', Request::get('filename'))); } ?>
<?php echo (Form::label('name', __('Name', 'themes'))); ?>
@@ -28,8 +27,8 @@
<?php echo (Form::input('name', $name, array('class' => (isset($errors['file_empty_name']) || isset($errors['file_exists'])) ? 'input-xxlarge error-field' : 'input-xxlarge'))); ?>
<?php if ($action == 'chunk') { ?><span class="add-on">.chunk.php</span><?php } ?>
<?php if ($action == 'template') { ?><span class="add-on">.template.php</span><?php } ?>
<?php if ($action == 'styles') { ?><span class="add-on">.css</span><?php } ?>
<?php if ($action == 'script') { ?><span class="add-on">.js</span><?php } ?>
<?php if ($action == 'styles') { ?><span class="add-on">.css</span><?php } ?>
<?php if ($action == 'script') { ?><span class="add-on">.js</span><?php } ?>
</div>
<?php
@@ -41,11 +40,11 @@
<?php
if ($action == 'chunk') { echo Form::label('content', __('Chunk content', 'themes')); }
if ($action == 'chunk') { echo Form::label('content', __('Chunk content', 'themes')); }
if ($action == 'template') { echo Form::label('content', __('Template content', 'themes')); }
if ($action == 'styles') { echo Form::label('content', __('Styles content', 'themes')); }
if ($action == 'script') { echo Form::label('content', __('Script content', 'themes')); }
echo (
Form::textarea('content', Html::toText($content), array('style' => 'width:100%;height:400px;', 'class' => 'source-editor')).
Html::br(2).
@@ -53,11 +52,10 @@
Form::submit('edit_file', __('Save', 'themes'), array('class' => 'btn')). Html::nbsp().
Form::close()
);
} else {
if ($action == 'chunk') { echo '<div class="message-error">'.__('This chunk does not exist', 'themes').'</div>'; }
if ($action == 'template') { echo '<div class="message-error">'.__('This template does not exist', 'themes').'</div>'; }
if ($action == 'styles') { echo '<div class="message-error">'.__('This styles does not exist', 'themes').'</div>'; }
if ($action == 'script') { echo '<div class="message-error">'.__('This script does not exist', 'themes').'</div>'; }
}
?>

View File

@@ -20,7 +20,6 @@
</div>
<div class="span6">
<h2><?php echo __('Admin theme', 'themes'); ?></h2>
@@ -49,13 +48,12 @@
<div class="span12">
<?php
<?php
echo (
Html::heading(__('Current site theme', 'themes') . ': '. $current_site_theme, 2). Html::br()
);
?>
<?php echo (Html::anchor(__('Create new template', 'themes'), 'index.php?id=themes&action=add_template', array('title' => __('Create new template'), 'class' => 'btn btn-small')).Html::br(2)); ?>
<!-- Templates_list -->
@@ -69,15 +67,15 @@
<tbody>
<?php if (count($templates) != 0) foreach ($templates as $template) { ?>
<tr>
<td><?php echo basename($template, '.template.php'); ?></td>
<td>
<td><?php echo basename($template, '.template.php'); ?></td>
<td>
<div class="pull-right">
<div class="btn-group">
<?php echo Html::anchor(__('Edit', 'themes'), 'index.php?id=themes&action=edit_template&filename='.basename($template, '.template.php'), array('class' => 'btn btn-small')); ?>
<a class="btn dropdown-toggle btn-small" data-toggle="dropdown" href="#" style="font-family:arial;"><span class="caret"></span></a>
<ul class="dropdown-menu">
<li><?php echo Html::anchor(__('Clone', 'themes'), 'index.php?id=themes&action=clone_template&filename='.basename($template, '.template.php').'&token='.Security::token(), array('title' => __('Clone'))); ?></li>
</ul>
</ul>
<?php echo Html::anchor(__('Delete', 'themes'),
'index.php?id=themes&action=delete_template&filename='.basename($template, '.template.php').'&token='.Security::token(),
array('class' => 'btn btn-actions btn-small btn-actions-default', 'onclick' => "return confirmDelete('".__('Delete template: :name', 'themes', array(':name' => basename($template, '.template.php')))."')"));
@@ -104,15 +102,15 @@
<tbody>
<?php if (count($chunks) != 0) foreach ($chunks as $chunk) { ?>
<tr>
<td><?php echo basename($chunk, '.chunk.php'); ?></td>
<td>
<td><?php echo basename($chunk, '.chunk.php'); ?></td>
<td>
<div class="pull-right">
<div class="btn-group">
<?php echo Html::anchor(__('Edit', 'themes'), 'index.php?id=themes&action=edit_chunk&filename='.basename($chunk, '.chunk.php'), array('class' => 'btn btn-small')); ?>
<a class="btn dropdown-toggle btn-small" data-toggle="dropdown" href="#" style="font-family:arial;"><span class="caret"></span></a>
<ul class="dropdown-menu">
<li><?php echo Html::anchor(__('Clone', 'themes'), 'index.php?id=themes&action=clone_chunk&filename='.basename($chunk, '.chunk.php').'&token='.Security::token(), array('title' => __('Clone', 'themes'))); ?></li>
</ul>
</ul>
<?php echo Html::anchor(__('Delete', 'themes'),
'index.php?id=themes&action=delete_chunk&filename='.basename($chunk, '.chunk.php').'&token='.Security::token(),
array('class' => 'btn btn-actions btn-small btn-actions-default', 'onclick' => "return confirmDelete('".__('Delete chunk: :name', 'themes', array(':name' => basename($chunk, '.chunk.php')))."')"));
@@ -139,15 +137,15 @@
<tbody>
<?php if (count($styles) != 0) foreach ($styles as $style) { ?>
<tr>
<td><?php echo basename($style, '.css'); ?></td>
<td>
<td><?php echo basename($style, '.css'); ?></td>
<td>
<div class="pull-right">
<div class="btn-group">
<?php echo Html::anchor(__('Edit', 'themes'), 'index.php?id=themes&action=edit_styles&filename='.basename($style, '.css'), array('class' => 'btn btn-small')); ?>
<a class="btn dropdown-toggle btn-small" data-toggle="dropdown" href="#" style="font-family:arial;"><span class="caret"></span></a>
<ul class="dropdown-menu">
<li><?php echo Html::anchor(__('Clone', 'themes'), 'index.php?id=themes&action=clone_styles&filename='.basename($style, '.css').'&token='.Security::token(), array('title' => __('Clone', 'themes'))); ?></li>
</ul>
</ul>
<?php echo Html::anchor(__('Delete', 'themes'),
'index.php?id=themes&action=delete_styles&filename='.basename($style, '.css').'&token='.Security::token(),
array('class' => 'btn btn-actions btn-small btn-actions-default', 'onclick' => "return confirmDelete('".__('Delete styles: :name', 'themes', array(':name' => basename($style, '.css')))."')"));
@@ -174,15 +172,15 @@
<tbody>
<?php if (count($scripts) != 0) foreach ($scripts as $script) { ?>
<tr>
<td><?php echo basename($script, '.js'); ?></td>
<td>
<td><?php echo basename($script, '.js'); ?></td>
<td>
<div class="pull-right">
<div class="btn-group">
<?php echo Html::anchor(__('Edit', 'themes'), 'index.php?id=themes&action=edit_script&filename='.basename($script, '.js'), array('class' => 'btn btn-small')); ?>
<a class="btn dropdown-toggle btn-small" data-toggle="dropdown" href="#" style="font-family:arial;"><span class="caret"></span></a>
<ul class="dropdown-menu">
<li><?php echo Html::anchor(__('Clone', 'themes'), 'index.php?id=themes&action=clone_script&filename='.basename($script, '.js').'&token='.Security::token(), array('title' => __('Clone', 'themes'))); ?></li>
</ul>
</ul>
<?php echo Html::anchor(__('Delete', 'themes'),
'index.php?id=themes&action=delete_script&filename='.basename($script, '.js').'&token='.Security::token(),
array('class' => 'btn btn-actions btn-small btn-actions-default', 'onclick' => "return confirmDelete('".__('Delete script: :name', 'themes', array(':name' => basename($script, '.js')))."')"));
@@ -196,9 +194,8 @@
</table>
<!-- /Scripts_list -->
<?php // All exept Pages, Users and Sitemap plugins
if(count(Plugin::$components) > 3) {
<?php // All exept Pages, Users and Sitemap plugins
if (count(Plugin::$components) > 3) {
?>
<h2><?php echo __('Components templates', 'themes'); ?></h2><br />
<?php
@@ -208,4 +205,4 @@ if(count(Plugin::$components) > 3) {
?>
</div>
</div>
</div>