Browse Source

Fix layout Admin with DataTables

pull/475/head
Yaya Laressa 4 years ago
parent
commit
766c5326f8
8 changed files with 14 additions and 16 deletions
  1. +2
    -2
      system/admin/admin.php
  2. +1
    -1
      system/admin/views/categories.html.php
  3. +1
    -1
      system/admin/views/category-list.html.php
  4. +6
    -8
      system/admin/views/layout.html.php
  5. +1
    -1
      system/admin/views/popular-posts.html.php
  6. +1
    -1
      system/admin/views/posts-list.html.php
  7. +1
    -1
      system/admin/views/user-draft.html.php
  8. +1
    -1
      system/admin/views/user-posts.html.php

+ 2
- 2
system/admin/admin.php View File

@ -836,7 +836,7 @@ 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 id="htmly-table" class="table post-list">';
echo '<table id="htmly-table" class="table post-list" style="width:100%">';
echo '<thead><tr class="head"><th>' . i18n('Title') . '</th><th>' . i18n('Published') . '</th>';
if (config("views.counter") == "true")
echo '<th>'.i18n('Views').'</th>';
@ -876,7 +876,7 @@ function get_user_pages()
$posts = get_static_post(null);
if (!empty($posts)) {
krsort($posts);
echo '<table id="htmly-table" class="table post-list">';
echo '<table id="htmly-table" class="table post-list" style="width:100%">';
echo '<thead><tr class="head"><th>' . i18n('Title') . '</th>';
if (config("views.counter") == "true")
echo '<th>'.i18n('Views').'</th>';


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

@ -4,7 +4,7 @@
<br>
<a class="btn btn-primary " href="<?php echo site_url();?>add/category"><?php echo i18n('Add_category');?></a>
<br><br>
<table id="htmly-table" class="table category-list">
<table id="htmly-table" class="table category-list" style="width:100%">
<thead>
<tr class="head">
<th>Name</th>


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

@ -5,7 +5,7 @@
<?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 id="htmly-table" class="table post-list">
<table id="htmly-table" class="table post-list" style="width:100%">
<thead>
<tr class="head">
<th><?php echo i18n('Title');?></th>


+ 6
- 8
system/admin/views/layout.html.php View File

@ -9,9 +9,8 @@
<link rel="stylesheet" href="<?php echo site_url() ?>system/resources/css/font-awesome.css">
<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 rel="stylesheet" type="text/css" href="<?php echo site_url() ?>system/resources/css/dataTables.bootstrap4.min.css">
<link rel="stylesheet" type="text/css" href="<?php echo site_url() ?>system/resources/css/responsive.bootstrap4.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>
</head>
@ -266,23 +265,22 @@
<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/responsive.bootstrap4.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( {
$('#htmly-table').DataTable({
"paging": false,
"lengthChange": false,
"searching": false,
"ordering": true,
"ordering": false,
"info": false,
"autoWidth": true,
"responsive": true,
} );
new $.fn.dataTable.FixedHeader( table );
});
} );
</script>
</body>


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

@ -4,7 +4,7 @@
<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 id="htmly-table" class="table post-list">
<table id="htmly-table" class="table post-list" style="width:100%">
<thead>
<tr class="head">
<th><?php echo i18n('Title');?></th>


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

@ -4,7 +4,7 @@
<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 id="htmly-table" class="table post-list">
<table id="htmly-table" class="table post-list" style="width:100%">
<thead>
<tr class="head">
<th><?php echo i18n('Title');?></th>


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

@ -4,7 +4,7 @@
<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 id="htmly-table" class="table post-list">
<table id="htmly-table" class="table post-list" style="width:100%">
<thead>
<tr class="head">
<th><?php echo i18n('Title');?></th>


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

@ -4,7 +4,7 @@
<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 id="htmly-table" class="table post-list">
<table id="htmly-table" class="table post-list" style="width:100%">
<thead>
<tr class="head">
<th><?php echo i18n('Title');?></th>


Loading…
Cancel
Save