mirror of
https://github.com/danpros/htmly.git
synced 2026-04-22 13:36:22 +05:30
Merge branch 'viewCount+subPages' into viewCount
Conflicts: system/admin/admin.php system/htmly.php
This commit is contained in:
commit
f7502b95b5
5 changed files with 55 additions and 18 deletions
|
|
@ -321,7 +321,10 @@ function get_recent_posts() {
|
|||
$posts = get_profile($_SESSION[config("site.url")]['user'], 1, 5);
|
||||
if (!empty($posts)) {
|
||||
echo '<table class="post-list">';
|
||||
echo '<tr class="head"><th>Title</th><th>Published</th><th>Views</th><th>Tag</th><th>Operations</th></tr>';
|
||||
echo '<tr class="head"><th>Title</th><th>Published</th>';
|
||||
if (config("views.counter") == "true")
|
||||
echo '<th>Views</th>';
|
||||
echo '<th>Tag</th><th>Operations</th></tr>';
|
||||
$i = 0;
|
||||
$len = count($posts);
|
||||
foreach ($posts as $p) {
|
||||
|
|
@ -336,7 +339,8 @@ function get_recent_posts() {
|
|||
echo '<tr class="' . $class . '">';
|
||||
echo '<td><a target="_blank" href="' . $p->url . '">' . $p->title . '</a></td>';
|
||||
echo '<td>' . date('d F Y', $p->date) . '</td>';
|
||||
echo '<td>' . $p->views . '</td>';
|
||||
if (config("views.counter") == "true")
|
||||
echo '<td>' . $p->views . '</td>';
|
||||
echo '<td>' . $p->tag . '</td>';
|
||||
echo '<td><a href="' . $p->url . '/edit?destination=admin">Edit</a> <a href="' . $p->url . '/delete?destination=admin">Delete</a></td>';
|
||||
echo '</tr>';
|
||||
|
|
@ -368,7 +372,8 @@ function get_recent_pages() {
|
|||
|
||||
echo '<tr class="' . $class . '">';
|
||||
echo '<td><a target="_blank" href="' . $p->url . '">' . $p->title . '</a></td>';
|
||||
echo '<td>' . $p->views . '</td>';
|
||||
if (config("views.counter") == "true")
|
||||
echo '<td>' . $p->views . '</td>';
|
||||
echo '<td><a href="' . $p->url . '/edit?destination=admin">Edit</a> <a href="' . $p->url . '/delete?destination=admin">Delete</a></td>';
|
||||
echo '</tr>';
|
||||
|
||||
|
|
@ -379,7 +384,8 @@ function get_recent_pages() {
|
|||
{
|
||||
echo '<tr class="' . $class . '">';
|
||||
echo '<td> »<a target="_blank" href="' . $sp->url . '">' . $sp->title . '</a></td>';
|
||||
echo '<td>' . $sp->views . '</td>';
|
||||
if (config("views.counter") == "true")
|
||||
echo '<td>' . $sp->views . '</td>';
|
||||
echo '<td><a href="' . $sp->url . '/edit?destination=admin">Edit</a> <a href="' . $sp->url . '/delete?destination=admin">Delete</a></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<h2 class="post-index"><?php echo $heading?></h2>
|
||||
<?php if(!empty($posts)) {?>
|
||||
<table class="post-list">
|
||||
<tr class="head"><th>Title</th><th>Published</th><th>Views</th><th>Author</th><th>Tag</th><th>Operations</th></tr>
|
||||
<tr class="head"><th>Title</th><th>Published</th><?php if(config("views.counter") == "true"):?><th>Views</th><?php endif;?><th>Author</th><th>Tag</th><th>Operations</th></tr>
|
||||
<?php $i = 0; $len = count($posts);?>
|
||||
<?php foreach($posts as $p):?>
|
||||
<?php
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
<tr class="<?php echo $class ?>">
|
||||
<td><a target="_blank" href="<?php echo $p->url ?>"><?php echo $p->title ?></a></td>
|
||||
<td><?php echo date('d F Y', $p->date) ?></td>
|
||||
<td><?php echo $p->views ?></td>
|
||||
<?php if(config("views.counter") == "true"):?><td><?php echo $p->views ?></td><?php endif;?>
|
||||
<td><a target="_blank" href="<?php echo $p->authorurl ?>"><?php echo $p->author ?></a></td>
|
||||
<td><?php echo $p->tag ?></td>
|
||||
<td><a href="<?php echo $p->url ?>/edit?destination=admin/posts">Edit</a> <a href="<?php echo $p->url ?>/delete?destination=admin/posts">Delete</a></td>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue