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