Browse Source

Cleanup

pull/674/head
danpros 1 year ago
parent
commit
7d0865fdab
4 changed files with 14 additions and 8 deletions
  1. +6
    -4
      system/admin/views/static-pages.html.php
  2. +5
    -1
      system/admin/views/static-subpages.html.php
  3. +2
    -2
      system/admin/views/user-draft.html.php
  4. +1
    -1
      system/includes/functions.php

+ 6
- 4
system/admin/views/static-pages.html.php View File

@ -34,7 +34,9 @@ $(function() {
<thead> <thead>
<tr class="head" id="head"> <tr class="head" id="head">
<th><?php echo i18n('Title');?> </th> <th><?php echo i18n('Title');?> </th>
<th><?php echo i18n('Description');?></th>
<?php if (config("views.counter") == "true"): ?>
<th><?php echo i18n('Views');?></th>
<?php endif; ?>
<th><?php echo i18n('Operations');?></th> <th><?php echo i18n('Operations');?></th>
<th>Sub <?php echo i18n('pages');?></th> <th>Sub <?php echo i18n('pages');?></th>
</tr> </tr>
@ -45,15 +47,15 @@ $(function() {
<?php $dr = find_draft_subpage($p->slug);?> <?php $dr = find_draft_subpage($p->slug);?>
<tr id="<?php echo $p->md;?>" class="sort-item" style="cursor:move;"> <tr id="<?php echo $p->md;?>" class="sort-item" style="cursor:move;">
<td><a href="<?php echo site_url();?>admin/pages/<?php echo $p->slug;?>"><?php echo $p->title;?></a></td> <td><a href="<?php echo site_url();?>admin/pages/<?php echo $p->slug;?>"><?php echo $p->title;?></a></td>
<td><?php echo shorten($p->description, '50');?>...</td>
<td><a class="btn btn-primary btn-xs" href="<?php echo $p->url;?>/add?destination=admin/pages/<?php echo $p->slug;?>"><?php echo i18n('Add_sub');?></a> <a class="btn btn-primary btn-xs" href="<?php echo $p->url;?>/edit?destination=admin/pages"><?php echo i18n('Edit');?></a> <?php if (empty($dd) && empty($dr)):?><a class="btn btn-danger btn-xs" href="<?php echo $p->url;?>/delete?destination=admin/pages"><?php echo i18n('Delete');?></a><?php endif;?></td>
<td><?php echo $p->views;?></td>
<td><a class="btn btn-primary btn-xs" href="<?php echo site_url();?>admin/pages/<?php echo $p->slug;?>"><?php echo i18n('page');?> <?php echo i18n('settings');?></a> <a class="btn btn-primary btn-xs" href="<?php echo $p->url;?>/add?destination=admin/pages/<?php echo $p->slug;?>"><?php echo i18n('Add_sub');?></a> <a class="btn btn-primary btn-xs" href="<?php echo $p->url;?>/edit?destination=admin/pages"><?php echo i18n('Edit');?></a> <?php if (empty($dd) && empty($dr)):?><a class="btn btn-danger btn-xs" href="<?php echo $p->url;?>/delete?destination=admin/pages"><?php echo i18n('Delete');?></a><?php endif;?></td>
<td> <td>
<div><a class="btn btn-primary btn-xs" href="<?php echo site_url();?>admin/pages/<?php echo $p->slug;?>"><?php echo i18n('page');?> <?php echo i18n('settings');?></a></div><hr>
<?php foreach ($dd as $sp):?> <?php foreach ($dd as $sp):?>
<div class="row"> <div class="row">
<div class="col-sm"> <div class="col-sm">
<span><a target="_blank" href="<?php echo $sp->url;?>"><?php echo $sp->title;?></a></span> <span><a target="_blank" href="<?php echo $sp->url;?>"><?php echo $sp->title;?></a></span>
</div> </div>
<div class="col-sm"><i class="fa fa-line-chart" aria-hidden="true"></i> <?php echo $sp->views;?></div>
<div class="col-sm"> <div class="col-sm">
<span><a class="btn btn-primary btn-xs" href="<?php echo $sp->url;?>/edit?destination=admin/pages/<?php echo $sp->parentSlug;?>"><?php echo i18n('Edit');?></a> <a class="btn btn-danger btn-xs" href="<?php echo $sp->url;?>/delete?destination=admin/pages/<?php echo $sp->parentSlug;?>"><?php echo i18n('Delete');?></a></span> <span><a class="btn btn-primary btn-xs" href="<?php echo $sp->url;?>/edit?destination=admin/pages/<?php echo $sp->parentSlug;?>"><?php echo i18n('Edit');?></a> <a class="btn btn-danger btn-xs" href="<?php echo $sp->url;?>/delete?destination=admin/pages/<?php echo $sp->parentSlug;?>"><?php echo i18n('Delete');?></a></span>
</div> </div>


+ 5
- 1
system/admin/views/static-subpages.html.php View File

@ -46,6 +46,9 @@ $(function() {
<tr class="head"> <tr class="head">
<th><?php echo i18n('Title');?></th> <th><?php echo i18n('Title');?></th>
<th><?php echo i18n('Description');?></th> <th><?php echo i18n('Description');?></th>
<?php if (config("views.counter") == "true"): ?>
<th><?php echo i18n('Views');?></th>
<?php endif; ?>
<th><?php echo i18n('Operations');?></th> <th><?php echo i18n('Operations');?></th>
</tr> </tr>
</thead> </thead>
@ -54,7 +57,8 @@ $(function() {
<tr id="<?php echo $sp->parent;?>/<?php echo $sp->md;?>" style="cursor:move;"> <tr id="<?php echo $sp->parent;?>/<?php echo $sp->md;?>" style="cursor:move;">
<td><a href="<?php echo $sp->url ?>"><?php echo $sp->title ?></a></td> <td><a href="<?php echo $sp->url ?>"><?php echo $sp->title ?></a></td>
<td><?php echo $sp->description;?></td> <td><?php echo $sp->description;?></td>
<td> <span><a class="btn btn-primary btn-xs" href="<?php echo $sp->url;?>/edit?destination=admin/pages/<?php echo $static->slug;?>"><?php echo i18n('Edit');?></a> <a class="btn btn-danger btn-xs" href="<?php echo $sp->url;?>/delete?destination=admin/pages/<?php echo $static->slug;?>"><?php echo i18n('Delete');?></a></span></td>
<td><?php echo $sp->views;?></td>
<td><span><a class="btn btn-primary btn-xs" href="<?php echo $sp->url;?>/edit?destination=admin/pages/<?php echo $static->slug;?>"><?php echo i18n('Edit');?></a> <a class="btn btn-danger btn-xs" href="<?php echo $sp->url;?>/delete?destination=admin/pages/<?php echo $static->slug;?>"><?php echo i18n('Delete');?></a></span></td>
</tr> </tr>
<?php endforeach; ?> <?php endforeach; ?>


+ 2
- 2
system/admin/views/user-draft.html.php View File

@ -55,7 +55,7 @@
<table class="table post-list"> <table class="table post-list">
<tr class="head"> <tr class="head">
<th><?php echo i18n('Title');?></th> <th><?php echo i18n('Title');?></th>
<th><?php echo i18n('Created');?></th>
<th><?php echo i18n('Edit');?></th>
<th><?php echo i18n('Operations');?></th> <th><?php echo i18n('Operations');?></th>
</tr> </tr>
<?php foreach ($draftPages as $d): ?> <?php foreach ($draftPages as $d): ?>
@ -76,7 +76,7 @@
<table class="table post-list"> <table class="table post-list">
<tr class="head"> <tr class="head">
<th><?php echo i18n('Title');?></th> <th><?php echo i18n('Title');?></th>
<th><?php echo i18n('Created');?></th>
<th><?php echo i18n('Edit');?></th>
<th><?php echo i18n('Operations');?></th> <th><?php echo i18n('Operations');?></th>
<th><?php echo i18n('Static_pages');?></th> <th><?php echo i18n('Static_pages');?></th>
</tr> </tr>


+ 1
- 1
system/includes/functions.php View File

@ -136,7 +136,7 @@ function get_draft_subpages($static = null)
if (isset($y[1])) { if (isset($y[1])) {
$z = $y[1]; $z = $y[1];
} else { } else {
$z = $x;
$z = $y[0];
} }
if ($z == $static) { if ($z == $static) {
return true; return true;


Loading…
Cancel
Save