mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-08-05 20:57:49 +02:00
Pages Plugin: code optimizations
This commit is contained in:
@@ -1,14 +1,11 @@
|
|||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
|
|
||||||
<div class="span12">
|
<div class="span12">
|
||||||
|
|
||||||
<h2><?php echo __('Pages', 'pages'); ?></h2>
|
<h2><?php echo __('Pages', 'pages'); ?></h2>
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
|
|
||||||
<?php if (Notification::get('success')) Alert::success(Notification::get('success')); ?>
|
<?php if (Notification::get('success')) Alert::success(Notification::get('success')); ?>
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
echo (
|
echo (
|
||||||
Html::anchor(__('Create new page', 'pages'), 'index.php?id=pages&action=add_page', array('title' => __('Create new page', 'pages'), 'class' => 'btn default btn-small')). Html::nbsp(3).
|
Html::anchor(__('Create new page', 'pages'), 'index.php?id=pages&action=add_page', array('title' => __('Create new page', 'pages'), 'class' => 'btn default btn-small')). Html::nbsp(3).
|
||||||
@@ -16,7 +13,6 @@
|
|||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
<br /><br />
|
<br /><br />
|
||||||
|
|
||||||
<table class="table table-bordered">
|
<table class="table table-bordered">
|
||||||
@@ -35,21 +31,14 @@
|
|||||||
foreach ($pages as $page) {
|
foreach ($pages as $page) {
|
||||||
if ($page['parent'] != '') { $dash = Html::arrow('right').' '; } else { $dash = ""; }
|
if ($page['parent'] != '') { $dash = Html::arrow('right').' '; } else { $dash = ""; }
|
||||||
?>
|
?>
|
||||||
<?php if ($page['parent'] == '') $parent_style=''; else $parent_style = ''; ?>
|
|
||||||
<?php if ($page['slug'] != 'error404') { ?>
|
<?php if ($page['slug'] != 'error404') { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
if ($page['parent'] != '') {
|
$parent = (trim($page['parent']) == '') ? '' : $page['parent'].'/';
|
||||||
$parent = $page['parent'].'/';
|
echo (trim($page['parent']) == '') ? '' : ' ';
|
||||||
} else {
|
echo $dash.Html::anchor(Html::toText($page['title']), $site_url.$parent.$page['slug'], array('target' => '_blank'));
|
||||||
$parent = '';
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
<?php
|
|
||||||
if ($page['parent'] != '') echo ' ';
|
|
||||||
?>
|
|
||||||
<?php echo $dash.Html::anchor(Html::toText($page['title']), $site_url.$parent.$page['slug'], array('target' => '_blank')); ?>
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<?php echo $page['author']; ?>
|
<?php echo $page['author']; ?>
|
||||||
|
Reference in New Issue
Block a user