Browse Source

Edit layout admin with DataTables

pull/475/head
Yaya Laressa 4 years ago
parent
commit
7741625aac
11 changed files with 183 additions and 173 deletions
  1. +14
    -10
      system/admin/admin.php
  2. +13
    -13
      system/admin/editor/css/editor.css
  3. +6
    -2
      system/admin/views/categories.html.php
  4. +9
    -5
      system/admin/views/category-list.html.php
  5. +97
    -115
      system/admin/views/layout.html.php
  6. +7
    -3
      system/admin/views/popular-posts.html.php
  7. +18
    -12
      system/admin/views/posts-list.html.php
  8. +6
    -2
      system/admin/views/user-draft.html.php
  9. +6
    -2
      system/admin/views/user-posts.html.php
  10. +5
    -4
      system/resources/js/bootstrap.min.js
  11. +2
    -5
      system/resources/js/jquery.min.js

+ 14
- 10
system/admin/admin.php View File

@ -836,11 +836,12 @@ function get_user_posts()
if (isset($_SESSION[config("site.url")]['user'])) {
$posts = get_profile_posts($_SESSION[config("site.url")]['user'], 1, 5);
if (!empty($posts)) {
echo '<table class="table post-list">';
echo '<tr class="head"><th>' . i18n('Title') . '</th><th>' . i18n('Published') . '</th>';
echo '<table id="htmly-table" class="table post-list">';
echo '<thead><tr class="head"><th>' . i18n('Title') . '</th><th>' . i18n('Published') . '</th>';
if (config("views.counter") == "true")
echo '<th>'.i18n('Views').'</th>';
echo '<th>' . i18n('Category') . '</th><th>' . i18n('Tags') . '</th><th>' . i18n('Operations') . '</th></tr>';
echo '<th>' . i18n('Category') . '</th><th>' . i18n('Tags') . '</th><th>' . i18n('Operations') . '</th></tr></thead>';
echo '<tbody>';
$i = 0;
$len = count($posts);
foreach ($posts as $p) {
@ -859,9 +860,10 @@ function get_user_posts()
echo '<td>' . $p->views . '</td>';
echo '<td><a href="' . str_replace('category', 'admin/categories', $p->categoryUrl) . '">'. strip_tags($p->category) .'</a></td>';
echo '<td>' . $p->tag . '</td>';
echo '<td><a class="btn btn-primary btn-xs" href="' . $p->url . '/edit?destination=admin">' . i18n('Edit') . '</a> <a class="btn btn-danger btn-xs" href="' . $p->url . '/delete?destination=admin">' . i18n('Delete') . '</a></td>';
echo '<td><a class="btn btn-primary btn-sm" href="' . $p->url . '/edit?destination=admin">' . i18n('Edit') . '</a> <a class="btn btn-danger btn-sm" href="' . $p->url . '/delete?destination=admin">' . i18n('Delete') . '</a></td>';
echo '</tr>';
}
echo '</tbody>';
echo '</table>';
}
}
@ -874,11 +876,12 @@ function get_user_pages()
$posts = get_static_post(null);
if (!empty($posts)) {
krsort($posts);
echo '<table class="table post-list">';
echo '<tr class="head"><th>' . i18n('Title') . '</th>';
echo '<table id="htmly-table" class="table post-list">';
echo '<thead><tr class="head"><th>' . i18n('Title') . '</th>';
if (config("views.counter") == "true")
echo '<th>'.i18n('Views').'</th>';
echo '<th>' . i18n('Operations') . '</th></tr>';
echo '<th>' . i18n('Operations') . '</th></tr></thead>';
echo '<tbody>';
$i = 0;
$len = count($posts);
foreach ($posts as $p) {
@ -895,7 +898,7 @@ function get_user_pages()
echo '<td><a target="_blank" href="' . $p->url . '">' . $p->title . '</a></td>';
if (config("views.counter") == "true")
echo '<td>' . $p->views . '</td>';
echo '<td><a class="btn btn-primary btn-xs" href="' . $p->url . '/add?destination=admin/pages">' . i18n('Add_sub') . '</a> <a class="btn btn-primary btn-xs" href="' . $p->url . '/edit?destination=admin/pages">' . i18n('Edit') . '</a> <a class="btn btn-danger btn-xs" href="' . $p->url . '/delete?destination=admin/pages">' . i18n('Delete') . '</a></td>';
echo '<td><a class="btn btn-primary btn-sm" href="' . $p->url . '/add?destination=admin/pages">' . i18n('Add_sub') . '</a> <a class="btn btn-primary btn-sm" href="' . $p->url . '/edit?destination=admin/pages">' . i18n('Edit') . '</a> <a class="btn btn-danger btn-sm" href="' . $p->url . '/delete?destination=admin/pages">' . i18n('Delete') . '</a></td>';
echo '</tr>';
$shortUrl = substr($p->url, strrpos($p->url, "/") + 1);
@ -906,10 +909,11 @@ function get_user_pages()
echo '<td> <span style="margin-left:30px;">&raquo; <a target="_blank" href="' . $sp->url . '">' . $sp->title . '</a></span></td>';
if (config("views.counter") == "true")
echo '<td>' . $sp->views . '</td>';
echo '<td><a class="btn btn-primary btn-xs" href="' . $sp->url . '/edit?destination=admin/pages">' . i18n('Edit') . '</a> <a class="btn btn-danger btn-xs" href="' . $sp->url . '/delete?destination=admin/pages">' . i18n('Delete') . '</a></td>';
echo '<td><a class="btn btn-primary btn-sm" href="' . $sp->url . '/edit?destination=admin/pages">' . i18n('Edit') . '</a> <a class="btn btn-danger btn-sm" href="' . $sp->url . '/delete?destination=admin/pages">' . i18n('Delete') . '</a></td>';
echo '</tr>';
}
}
echo '</tbody>';
echo '</table>';
}
}
@ -954,7 +958,7 @@ function get_backup_files()
echo '<tr class="' . $class . '">';
echo '<td>' . $name . '</td>';
echo '<td>' . $timestamp . '</td>';
echo '<td><a class="btn btn-primary btn-xs" target="_blank" href="' . $url . '">Download</a> <form method="GET"><input type="hidden" name="file" value="' . $name . '"/><input type="submit" class="btn btn-danger btn-xs" name="submit" value="Delete"/></form></td>';
echo '<td><a class="btn btn-primary btn-sm" target="_blank" href="' . $url . '">Download</a> <form method="GET"><input type="hidden" name="file" value="' . $name . '"/><input type="submit" class="btn btn-danger btn-sm" name="submit" value="Delete"/></form></td>';
echo '</tr>';
}
echo '</table>';


+ 13
- 13
system/admin/editor/css/editor.css View File

@ -1,6 +1,8 @@
/*
body {
font-family: Georgia, sans-serif;
}
*/
blockquote {
border-left: 2px dotted #888;
@ -40,17 +42,19 @@ blockquote {
margin: 20px 0;
}
.wmd-preview td, .wmd-preview th {
.wmd-preview td,
.wmd-preview th {
border-right: 1px solid #ccc;
padding: 8px 12px;
}
.wmd-preview td:last-child, .wmd-preview th:last-child {
.wmd-preview td:last-child,
.wmd-preview th:last-child {
border-right: none;
}
.wmd-preview td {
border-top: 1px solid #ccc;
border-top: 1px solid #ccc;
}
.wmd-button-row {
@ -74,10 +78,9 @@ blockquote {
float: left;
}
.wmd-button > span {
.wmd-button>span {
background-repeat: no-repeat;
background-position: 0px 0px;
display: inline-block;
}
@ -102,17 +105,17 @@ blockquote {
background-color: #F5F5F5;
}
.wmd-prompt-dialog > div {
.wmd-prompt-dialog>div {
font-size: 0.8em;
font-family: arial, helvetica, sans-serif;
}
.wmd-prompt-dialog > form > input[type="text"] {
.wmd-prompt-dialog>form>input[type="text"] {
border: 1px solid #999999;
color: black;
}
.wmd-prompt-dialog > form > input[type="button"] {
.wmd-prompt-dialog>form>input[type="button"] {
border: 1px solid #888888;
font-family: trebuchet MS, helvetica, sans-serif;
font-size: 0.8em;
@ -134,21 +137,18 @@ pre code {
}
@media all and (max-width: 980px) {
.nav {
width: 100%;
padding: 2%;
}
.wmd-panel, .wmd-preview {
.wmd-panel,
.wmd-preview {
width: 96%;
float: left;
padding: 2%;
}
pre {
white-space: pre-wrap;
word-wrap: break-word;
}
}

+ 6
- 2
system/admin/views/categories.html.php View File

@ -4,13 +4,16 @@
<br>
<a class="btn btn-primary " href="<?php echo site_url();?>add/category"><?php echo i18n('Add_category');?></a>
<br><br>
<table class="table category-list">
<table id="htmly-table" class="table category-list">
<thead>
<tr class="head">
<th>Name</th>
<th><?php echo i18n('Description');?></th>
<th><?php echo i18n('Contents');?></th>
<th><?php echo i18n('Operations');?></th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="<?php echo site_url();?>admin/categories/uncategorized"><?php echo i18n("Uncategorized");?></a></td>
<td><p><?php echo i18n('Uncategorized_comment');?>.</p></td>
@ -22,7 +25,8 @@
<td><a href="<?php echo site_url();?>/admin/categories/<?php echo $d->md;?>"><?php echo $d->title;?></a></td>
<td><?php echo $d->body;?></td>
<td><?php $total = get_draftcount($d->md) + get_categorycount($d->md); echo $total?></td>
<td><a class="btn btn-primary btn-xs" href="<?php echo $d->url;?>/edit?destination=admin/categories"><?php echo i18n('Edit');?></a> <?php if (get_categorycount($d->md) == 0 && get_draftcount($d->md) == 0 ){echo '<a class="btn btn-danger btn-xs" href="' . $d->url . '/delete?destination=admin/categories">' . i18n('Delete') . '</a>';}?></td>
<td><a class="btn btn-primary btn-sm" href="<?php echo $d->url;?>/edit?destination=admin/categories"><?php echo i18n('Edit');?></a> <?php if (get_categorycount($d->md) == 0 && get_draftcount($d->md) == 0 ){echo '<a class="btn btn-danger btn-sm" href="' . $d->url . '/delete?destination=admin/categories">' . i18n('Delete') . '</a>';}?></td>
</tr>
<?php endforeach;?>
</tbody>
</table>

+ 9
- 5
system/admin/views/category-list.html.php View File

@ -5,12 +5,15 @@
<?php if ($category->url !== site_url() . 'category/uncategorized'):?><a class="btn btn-primary right" href="<?php echo $category->url;?>/edit?destination=admin/categories"><?php echo i18n("Edit_category");?></a><?php endif;?>
<br><br>
<?php if (!empty($posts)) { ?>
<table class="table post-list">
<table id="htmly-table" class="table post-list">
<thead>
<tr class="head">
<th><?php echo i18n('Title');?></th>
<th><?php echo i18n('Published');?></th>
<th><?php echo i18n('Operations');?></th>
</tr>
<thead>
<tbody>
<?php $i = 0;
$len = count($posts); ?>
<?php foreach ($posts as $p): ?>
@ -28,15 +31,16 @@
<td><a target="_blank" href="<?php echo $p->url ?>"><?php echo $p->title ?></a></td>
<td><?php echo format_date($p->date) ?></td>
<?php if ($category->url !== site_url() . 'category/uncategorized') {?>
<td><a class="btn btn-primary btn-xs" href="<?php echo $p->url ?>/edit?destination=admin/categories/<?php echo $category->md;?>"><?php echo i18n('Edit');?></a> <a
class="btn btn-danger btn-xs" href="<?php echo $p->url ?>/delete?destination=admin/categories/<?php echo $category->md;?>"><?php echo i18n('Delete');?></a></td>
<td><a class="btn btn-primary btn-sm" href="<?php echo $p->url ?>/edit?destination=admin/categories/<?php echo $category->md;?>"><?php echo i18n('Edit');?></a> <a
class="btn btn-danger btn-sm" href="<?php echo $p->url ?>/delete?destination=admin/categories/<?php echo $category->md;?>"><?php echo i18n('Delete');?></a></td>
<?php } else {?>
<td><a class="btn btn-primary btn-xs" href="<?php echo $p->url ?>/edit?destination=admin/categories/uncategorized"><?php echo i18n('Edit');?></a> <a
class="btn btn-danger btn-xs" href="<?php echo $p->url ?>/delete?destination=admin/categories/uncategorized"><?php echo i18n('Delete');?></a></td>
<td><a class="btn btn-primary btn-sm" href="<?php echo $p->url ?>/edit?destination=admin/categories/uncategorized"><?php echo i18n('Edit');?></a> <a
class="btn btn-danger btn-sm" href="<?php echo $p->url ?>/delete?destination=admin/categories/uncategorized"><?php echo i18n('Delete');?></a></td>
<?php } ?>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php if (!empty($pagination['prev']) || !empty($pagination['next'])): ?>
<br>


+ 97
- 115
system/admin/views/layout.html.php View File

@ -2,24 +2,26 @@
<!DOCTYPE html>
<html lang="en">
<head>
<?php echo head_contents();?>
<title><?php echo $title;?></title>
<meta name="description" content="<?php echo $description; ?>"/>
<link rel="canonical" href="<?php echo $canonical; ?>" />
<?php echo head_contents(); ?>
<title><?php echo $title; ?></title>
<meta name="description" content="<?php echo $description; ?>"/>
<link rel="canonical" href="<?php echo $canonical; ?>" />
<link rel="stylesheet" href="<?php echo site_url() ?>system/resources/css/font-awesome.css">
<link href="<?php echo site_url() ?>system/resources/css/adminlte.min.css" rel="stylesheet">
<link rel="stylesheet" href="<?php echo site_url() ?>system/resources/css/adminlte.min.css">
<link rel="stylesheet" href="<?php echo site_url() ?>system/resources/css/OverlayScrollbars.min.css">
<link rel="stylesheet" type="text/css" href="<?php echo site_url() ?>system/resources/css/jquery.dataTables.min.css">
<link rel="stylesheet" type="text/css" href="<?php echo site_url() ?>system/resources/css/fixedHeader.dataTables.min.css">
<link rel="stylesheet" type="text/css" href="<?php echo site_url() ?>system/resources/css/responsive.dataTables.min.css">
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
<script src="<?php echo site_url() ?>system/resources/js/jquery.min.js"></script>
<script src="<?php echo site_url() ?>system/resources/js/jquery.min.js"></script>
</head>
<?php
if (isset($_GET['search'])) {
$search = _h($_GET['search']);
$url = site_url() . 'search/' . remove_accent($search);
header("Location: $url");
}
?>
<?php if (isset($_GET['search'])) {
$search = _h($_GET['search']);
$url = site_url() . 'search/' . remove_accent($search);
header("Location: $url");
} ?>
<?php if (login()) { ?>
<body class="hold-transition sidebar-mini">
<body class="hold-transition sidebar-mini layout-fixed">
<div class="wrapper">
<style>.error-message ul {margin:0;padding:0;}</style>
<!-- Navbar -->
@ -30,46 +32,37 @@
<a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fa fa-bars"></i></a>
</li>
<li class="nav-item d-none d-sm-inline-block">
<a href="<?php echo site_url();?>" class="nav-link"><i class="fa fa-globe"></i> <?php echo config('breadcrumb.home')?></a>
<a href="<?php echo site_url(); ?>" class="nav-link"><i class="fa fa-globe"></i> <?php echo config('breadcrumb.home') ?></a>
</li>
</ul>
<!-- SEARCH FORM -->
<form class="form-inline ml-3">
<input type="search" name="search" class="form-control" placeholder="<?php echo i18n('Type_to_search')?>">
<input type="search" name="search" class="form-control" placeholder="<?php echo i18n('Type_to_search') ?>">
</form>
</nav>
<!-- /.navbar -->
<!-- Main Sidebar Container -->
<aside class="main-sidebar sidebar-dark-primary elevation-4">
<!-- Brand Logo -->
<a href="<?php echo site_url(); ?>admin" class="brand-link">
<img src="<?php echo site_url(); ?>system/resources/images/logo-small.png"
alt="HTMLy Logo"
class="brand-image img-circle elevation-3"
style="opacity: .8">
<span class="brand-text font-weight-light"><?php echo i18n('Dashboard') ?></span>
</a>
<!-- Sidebar -->
<div class="sidebar">
<!-- Sidebar user panel (optional) -->
<div class="user-panel mt-3 pb-3 mb-3 d-flex">
<div class="image">
<img src="<?php echo site_url(); ?>system/resources/images/logo-small.png" class="img-circle elevation-2" alt="HTMLy logo">
</div>
<div class="info">
<a href="<?php echo site_url();?>admin" class="d-block"><?php echo i18n('Dashboard')?></a>
</div>
</div>
<!-- Sidebar Menu -->
<nav class="mt-2">
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">
<!-- Add icons to the links using the .nav-icon class
with font-awesome or any other icon font library -->
<li class="nav-item">
<a href="<?php echo site_url();?>admin/content" class="nav-link">
<a href="<?php echo site_url(); ?>admin/content" class="nav-link">
<i class="nav-icon fa fa-th"></i>
<p>
<?php echo ucwords(i18n('Add_content')); ?>
</p>
<p><?php echo ucwords(i18n('Add_content')); ?></p>
</a>
</li>
<li class="nav-item has-treeview menu-open">
@ -82,31 +75,23 @@
</a>
<ul class="nav nav-treeview">
<li class="nav-item">
<a href="<?php echo site_url();?>admin/posts" class="nav-link">
<p>
<?php echo i18n('Posts_list'); ?>
</p>
<a href="<?php echo site_url(); ?>admin/posts" class="nav-link">
<p><?php echo i18n('Posts_list'); ?></p>
</a>
</li>
<li class="nav-item">
<a href="<?php echo site_url();?>admin/draft" class="nav-link">
<p>
<?php echo i18n('Posts_draft'); ?>
</p>
<a href="<?php echo site_url(); ?>admin/draft" class="nav-link">
<p><?php echo i18n('Posts_draft'); ?></p>
</a>
</li>
<li class="nav-item">
<a href="<?php echo site_url();?>admin/pages" class="nav-link">
<p>
<?php echo i18n('Static_pages'); ?>
</p>
<a href="<?php echo site_url(); ?>admin/pages" class="nav-link">
<p><?php echo i18n('Static_pages'); ?></p>
</a>
</li>
<li class="nav-item">
<a href="<?php echo site_url();?>admin/categories" class="nav-link">
<p>
<?php echo i18n('Categories');?>
</p>
<a href="<?php echo site_url(); ?>admin/categories" class="nav-link">
<p><?php echo i18n('Categories'); ?></p>
</a>
</li>
</ul>
@ -120,18 +105,21 @@
</p>
</a>
<ul class="nav nav-treeview">
<?php if (config('static.frontpage') === 'true'): ?>
<li class="nav-item">
<a href="<?php echo site_url();?>admin/config" class="nav-link">
<p>
<?php echo i18n('Config'); ?>
</p>
<a href="<?php echo site_url(); ?>edit/frontpage" class="nav-link">
<p><?php echo i18n('Edit_frontpage'); ?></p>
</a>
</li>
<?php endif; ?>
<li class="nav-item">
<a href="<?php echo site_url();?>admin/menu" class="nav-link">
<p>
<?php echo i18n('Menus');?>
</p>
<a href="<?php echo site_url(); ?>admin/config" class="nav-link">
<p><?php echo i18n('Config'); ?></p>
</a>
</li>
<li class="nav-item">
<a href="<?php echo site_url(); ?>admin/menu" class="nav-link">
<p><?php echo i18n('Menus'); ?></p>
</a>
</li>
</ul>
@ -146,42 +134,32 @@
</a>
<ul class="nav nav-treeview">
<li class="nav-item">
<a href="<?php echo site_url();?>admin/clear-cache" class="nav-link">
<p>
<?php echo i18n('Clear_cache');?>
</p>
<a href="<?php echo site_url(); ?>admin/clear-cache" class="nav-link">
<p><?php echo i18n('Clear_cache'); ?></p>
</a>
</li>
<li class="nav-item">
<a href="<?php echo site_url();?>admin/update" class="nav-link">
<p>
<?php echo i18n('Check_update'); ?>
</p>
<a href="<?php echo site_url(); ?>admin/update" class="nav-link">
<p><?php echo i18n('Check_update'); ?></p>
</a>
</li>
<li class="nav-item">
<a href="<?php echo site_url();?>admin/backup" class="nav-link">
<p>
<?php echo i18n('Backup');?>
</p>
<a href="<?php echo site_url(); ?>admin/backup" class="nav-link">
<p><?php echo i18n('Backup'); ?></p>
</a>
</li>
<li class="nav-item">
<a href="<?php echo site_url();?>admin/import" class="nav-link">
<p>
<?php echo i18n('Import_RSS');?>
</p>
<a href="<?php echo site_url(); ?>admin/import" class="nav-link">
<p><?php echo i18n('Import_RSS'); ?></p>
</a>
</li>
<?php if (config('views.counter') == 'true') { ?>
<?php if (config('views.counter') === 'true'): ?>
<li class="nav-item">
<a href="<?php echo site_url();?>admin/popular" class="nav-link">
<p>
<?php echo i18n('Popular_posts');?>
</p>
<a href="<?php echo site_url(); ?>admin/popular" class="nav-link">
<p><?php echo i18n('Popular_posts'); ?></p>
</a>
</li>
<?php } ?>
<?php endif; ?>
</ul>
</li>
<li class="nav-item has-treeview menu-open">
@ -194,27 +172,22 @@
</a>
<ul class="nav nav-treeview">
<li class="nav-item">
<a href="<?php echo site_url();?>admin/mine" class="nav-link">
<p>
<?php echo i18n('My_posts');?>
</p>
<a href="<?php echo site_url(); ?>admin/mine" class="nav-link">
<p><?php echo i18n('My_posts'); ?></p>
</a>
</li>
<li class="nav-item">
<a href="<?php echo site_url();?>edit/profile" class="nav-link">
<p>
<?php echo i18n('Edit_profile');?>
</p>
<a href="<?php echo site_url(); ?>edit/profile" class="nav-link">
<p><?php echo i18n('Edit_profile'); ?></p>
</a>
</li>
<li class="nav-item">
<a href="<?php echo site_url();?>logout" class="nav-link">
<p>
<?php echo i18n('Logout'); ?>
</p>
<a href="<?php echo site_url(); ?>logout" class="nav-link">
<p><?php echo i18n('Logout'); ?></p>
</a>
</li>
</ul>
</li>
</ul>
</nav>
<!-- /.sidebar-menu -->
@ -229,10 +202,10 @@
<div class="container-fluid">
<div class="row mb-2">
<div class="col">
<?php if (!empty($breadcrumb)): ?>
<style>.breadcrumb a {margin:0 5px;}</style>
<div class="breadcrumb"><?php echo $breadcrumb ?></div>
<?php endif; ?>
<?php if (!empty($breadcrumb)): ?>
<style>.breadcrumb a {margin:0 5px;}</style>
<div class="breadcrumb"><?php echo $breadcrumb ?></div>
<?php endif; ?>
</div><!-- /.col -->
</div><!-- /.row -->
</div><!-- /.container-fluid -->
@ -246,7 +219,7 @@
<div class="col" >
<div class="card card-primary card-outline">
<div class="card-body">
<?php echo content() ?>
<?php echo content() ?>
</div>
</div><!-- /.card -->
</div>
@ -259,24 +232,14 @@
</div>
<!-- /.content-wrapper -->
<!-- Control Sidebar -->
<aside class="control-sidebar control-sidebar-dark">
<!-- Control sidebar content goes here -->
<div class="p-3">
<h5>Title</h5>
<p>Sidebar content</p>
</div>
</aside>
<!-- /.control-sidebar -->
<!-- Main Footer -->
<footer class="main-footer">
<!-- To the right -->
<div class="float-right d-none d-sm-inline">
<small><?php echo i18n('Admin_panel_style_based_on');?> <a rel="nofollow" target="_blank" href="https://github.com/ColorlibHQ/AdminLTE">AdminLTE</a></small>
<small><?php echo i18n('Admin_panel_style_based_on'); ?> <a rel="nofollow" target="_blank" href="https://github.com/ColorlibHQ/AdminLTE">AdminLTE</a></small>
</div>
<!-- Default to the left -->
<?php echo i18n('Proudly_powered_by');?> <a href="https://www.htmly.com" target="_blank">HTMLy</a>
<?php echo i18n('Proudly_powered_by'); ?> <a href="https://www.htmly.com" target="_blank">HTMLy</a>
</footer>
</div>
<!-- ./wrapper -->
@ -289,19 +252,38 @@
<!-- /.login-logo -->
<div class="card">
<div class="card-body login-card-body">
<p class="login-box-msg"><?php echo i18n('Sign_in_to_start_your_session');?></p>
<?php echo content();?>
<p class="login-box-msg"><?php echo i18n('Sign_in_to_start_your_session'); ?></p>
<?php echo content(); ?>
</div>
<!-- /.login-card-body -->
</div>
<span><a href="<?php echo site_url();?>"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-left" viewBox="0 0 16 16">
<span><a href="<?php echo site_url(); ?>"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-left" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M15 8a.5.5 0 0 0-.5-.5H2.707l3.147-3.146a.5.5 0 1 0-.708-.708l-4 4a.5.5 0 0 0 0 .708l4 4a.5.5 0 0 0 .708-.708L2.707 8.5H14.5A.5.5 0 0 0 15 8z"/>
</svg> <?php echo i18n('Back_to'); ?> <?php echo blog_title();?></a></span>
</svg> <?php echo i18n('Back_to'); ?> <?php echo blog_title(); ?></a></span>
</div>
<?php } ?>
<script src="<?php echo site_url() ?>system/resources/js/bootstrap.min.js"></script>
<script src="<?php echo site_url() ?>system/resources/js/jquery.dataTables.min.js"></script>
<script src="<?php echo site_url() ?>system/resources/js/dataTables.bootstrap4.min.js"></script>
<script src="<?php echo site_url() ?>system/resources/js/dataTables.fixedHeader.min.js"></script>
<script src="<?php echo site_url() ?>system/resources/js/dataTables.responsive.min.js"></script>
<script src="<?php echo site_url() ?>system/resources/js/jquery.overlayScrollbars.min.js"></script>
<script src="<?php echo site_url() ?>system/resources/js/adminlte.min.js"></script>
<script>
$(document).ready(function() {
var table = $('#htmly-table').DataTable( {
"paging": false,
"lengthChange": false,
"searching": false,
"ordering": true,
"info": false,
"autoWidth": true,
"responsive": true,
} );
new $.fn.dataTable.FixedHeader( table );
} );
</script>
</body>
</html>

+ 7
- 3
system/admin/views/popular-posts.html.php View File

@ -4,7 +4,8 @@
<a class="btn btn-primary right" href="<?php echo site_url();?>admin/content"><?php echo i18n('Add_new_post');?></a>
<br><br>
<?php if (!empty($posts)) { ?>
<table class="table post-list">
<table id="htmly-table" class="table post-list">
<thead>
<tr class="head">
<th><?php echo i18n('Title');?></th>
<th><?php echo i18n('Published');?></th><?php if (config("views.counter") == "true"): ?>
@ -14,6 +15,8 @@
<th><?php echo i18n('Tags');?></th>
<th><?php echo i18n('Operations');?></th>
</tr>
</thead>
<tbody>
<?php $i = 0;
$len = count($posts); ?>
<?php foreach ($posts as $p): ?>
@ -35,10 +38,11 @@
<td><a target="_blank" href="<?php echo $p->authorUrl ?>"><?php echo $p->author ?></a></td>
<td><a href="<?php echo str_replace('category', 'admin/categories', $p->categoryUrl); ?>"><?php echo strip_tags($p->category);?></a></td>
<td><?php echo $p->tag ?></td>
<td><a class="btn btn-primary btn-xs" href="<?php echo $p->url ?>/edit?destination=admin/posts"><?php echo i18n('Edit');?></a> <a
class="btn btn-danger btn-xs" href="<?php echo $p->url ?>/delete?destination=admin/posts"><?php echo i18n('Delete');?></a></td>
<td><a class="btn btn-primary btn-sm" href="<?php echo $p->url ?>/edit?destination=admin/posts"><?php echo i18n('Edit');?></a> <a
class="btn btn-danger btn-sm" href="<?php echo $p->url ?>/delete?destination=admin/posts"><?php echo i18n('Delete');?></a></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php } else {
echo i18n('No_posts_found') . '!';

+ 18
- 12
system/admin/views/posts-list.html.php View File

@ -4,16 +4,21 @@
<a class="btn btn-primary right" href="<?php echo site_url();?>admin/content"><?php echo i18n('Add_new_post');?></a>
<br><br>
<?php if (!empty($posts)) { ?>
<table class="table post-list">
<tr class="head">
<th><?php echo i18n('Title');?></th>
<th><?php echo i18n('Published');?></th><?php if (config("views.counter") == "true"): ?>
<th>Views</th><?php endif; ?>
<th><?php echo i18n('Author');?></th>
<th><?php echo i18n('Category');?></th>
<th><?php echo i18n('Tags');?></th>
<th><?php echo i18n('Operations');?></th>
</tr>
<table id="htmly-table" class="table post-list">
<thead>
<tr class="head">
<th><?php echo i18n('Title');?></th>
<th><?php echo i18n('Published');?></th>
<?php if (config("views.counter") == "true"): ?>
<th>Views</th>
<?php endif; ?>
<th><?php echo i18n('Author');?></th>
<th><?php echo i18n('Category');?></th>
<th><?php echo i18n('Tags');?></th>
<th><?php echo i18n('Operations');?></th>
</tr>
</thead>
<tbody>
<?php $i = 0;
$len = count($posts); ?>
<?php foreach ($posts as $p): ?>
@ -35,10 +40,11 @@
<td><a target="_blank" href="<?php echo $p->authorUrl ?>"><?php echo $p->author ?></a></td>
<td><a href="<?php echo str_replace('category', 'admin/categories', $p->categoryUrl); ?>"><?php echo strip_tags($p->category);?></a></td>
<td><?php echo $p->tag ?></td>
<td><a class="btn btn-primary btn-xs" href="<?php echo $p->url ?>/edit?destination=admin/posts"><?php echo i18n('Edit');?></a> <a
class="btn btn-danger btn-xs" href="<?php echo $p->url ?>/delete?destination=admin/posts"><?php echo i18n('Delete');?></a></td>
<td><a class="btn btn-primary btn-sm" href="<?php echo $p->url ?>/edit?destination=admin/posts"><?php echo i18n('Edit');?></a> <a
class="btn btn-danger btn-sm" href="<?php echo $p->url ?>/delete?destination=admin/posts"><?php echo i18n('Delete');?></a></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php if (!empty($pagination['prev']) || !empty($pagination['next'])): ?>
<br>


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

@ -4,7 +4,8 @@
<a class="btn btn-primary right" href="<?php echo site_url();?>admin/content"><?php echo i18n('Add_new_post');?></a>
<br><br>
<?php if (!empty($posts)) { ?>
<table class="table post-list">
<table id="htmly-table" class="table post-list">
<thead>
<tr class="head">
<th><?php echo i18n('Title');?></th>
<th><?php echo i18n('Created');?></th>
@ -12,6 +13,8 @@
<th><?php echo i18n('Tags');?></th>
<th><?php echo i18n('Operations');?></th>
</tr>
</thead>
<tbody>
<?php $i = 0;
$len = count($posts); ?>
<?php foreach ($posts as $p): ?>
@ -30,9 +33,10 @@
<td><?php echo format_date($p->date) ?></td>
<td><a href="<?php echo str_replace('category', 'admin/categories', $p->categoryUrl); ?>"><?php echo strip_tags($p->category);?></a></td>
<td><?php echo $p->tag ?></td>
<td><a class="btn btn-primary btn-xs" href="<?php echo $p->url ?>/edit?destination=admin/draft"><?php echo i18n('Edit');?></a> <a class="btn btn-danger btn-xs" href="<?php echo $p->url ?>/delete?destination=admin/draft"><?php echo i18n('Delete');?></a></td>
<td><a class="btn btn-primary btn-sm" href="<?php echo $p->url ?>/edit?destination=admin/draft"><?php echo i18n('Edit');?></a> <a class="btn btn-danger btn-sm" href="<?php echo $p->url ?>/delete?destination=admin/draft"><?php echo i18n('Delete');?></a></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php if (!empty($pagination['prev']) || !empty($pagination['next'])): ?>
<br>


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

@ -4,7 +4,8 @@
<a class="btn btn-primary right" href="<?php echo site_url();?>admin/content"><?php echo i18n('Add_new_post');?></a>
<br><br>
<?php if (!empty($posts)) { ?>
<table class="table post-list">
<table id="htmly-table" class="table post-list">
<thead>
<tr class="head">
<th><?php echo i18n('Title');?></th>
<th><?php echo i18n('Published');?></th>
@ -15,6 +16,8 @@
<th><?php echo i18n('Tags');?></th>
<th><?php echo i18n('Operations');?></th>
</tr>
</thead>
<tbody>
<?php $i = 0;
$len = count($posts); ?>
<?php foreach ($posts as $p): ?>
@ -36,9 +39,10 @@
<?php endif; ?>
<td><a href="<?php echo str_replace('category', 'admin/categories', $p->categoryUrl); ?>"><?php echo strip_tags($p->category);?></a></td>
<td><?php echo $p->tag ?></td>
<td><a class="btn btn-primary btn-xs" href="<?php echo $p->url ?>/edit?destination=admin/mine"><?php echo i18n('Edit');?></a> <a class="btn btn-danger btn-xs" href="<?php echo $p->url ?>/delete?destination=admin/mine"><?php echo i18n('Delete');?></a></td>
<td><a class="btn btn-primary btn-sm" href="<?php echo $p->url ?>/edit?destination=admin/mine"><?php echo i18n('Edit');?></a> <a class="btn btn-danger btn-sm" href="<?php echo $p->url ?>/delete?destination=admin/mine"><?php echo i18n('Delete');?></a></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php if (!empty($pagination['prev']) || !empty($pagination['next'])): ?>
<br>


+ 5
- 4
system/resources/js/bootstrap.min.js
File diff suppressed because it is too large
View File


+ 2
- 5
system/resources/js/jquery.min.js
File diff suppressed because it is too large
View File


Loading…
Cancel
Save