Browse Source

Improve admin style

Improve admin style
pull/31/merge
Danang Probo Sayekti 11 years ago
parent
commit
5389b38e4d
5 changed files with 41 additions and 19 deletions
  1. +26
    -4
      system/admin/admin.php
  2. +1
    -1
      system/admin/views/404.html.php
  3. +4
    -4
      system/admin/views/layout.html.php
  4. +5
    -5
      system/admin/views/posts-list.html.php
  5. +5
    -5
      system/admin/views/user-posts.html.php

+ 26
- 4
system/admin/admin.php View File

@ -315,9 +315,20 @@ function get_recent_posts() {
$posts = get_profile($_SESSION['user'], 1, 5);
if(!empty($posts)) {
echo '<table class="post-list">';
echo '<tr><th>Title</th><th>Published</th><th>Tag</th><th>Operations</th></tr>';
echo '<tr class="head"><th>Title</th><th>Published</th><th>Tag</th><th>Operations</th></tr>';
$i = 0; $len = count($posts);
foreach($posts as $p) {
echo '<tr>';
if ($i == 0) {
$class = 'item first';
}
elseif ($i == $len - 1) {
$class = 'item last';
}
else {
$class = 'item';
}
$i++;
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->tag . '</td>';
@ -336,9 +347,20 @@ function get_recent_pages() {
if(!empty($posts)) {
krsort($posts);
echo '<table class="post-list">';
echo '<tr><th>Title</th><th>Operations</th></tr>';
echo '<tr class="head"><th>Title</th><th>Operations</th></tr>';
$i = 0; $len = count($posts);
foreach($posts as $p) {
echo '<tr>';
if ($i == 0) {
$class = 'item first';
}
elseif ($i == $len - 1) {
$class = 'item last';
}
else {
$class = 'item';
}
$i++;
echo '<tr class="' . $class . '">';
echo '<td><a target="_blank" href="' . $p->url . '">' . $p->title . '</a></td>';
echo '<td><a href="' . $p->url . '/edit?destination=admin">Edit</a> <a href="' . $p->url . '/delete?destination=admin">Delete</a></td>';
echo '</tr>';


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

@ -5,7 +5,7 @@
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" user-scalable="no" />
<title>404 Not Found - <?php echo config('blog.title') ?></title>
<title>404 Not Found - <?php echo blog_title() ?></title>
<link href="<?php echo site_url() ?>themes/default/css/style.css" rel="stylesheet" />
<!-- Include the Open Sans font -->
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>


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

@ -11,8 +11,8 @@
</head>
<body class="admin <?php echo $bodyclass; ?>" itemscope="itemscope" itemtype="http://schema.org/Blog">
<div class="hide">
<meta content="<?php echo config('blog.title') ?>" itemprop="name"/>
<meta content="<?php echo config('blog.description')?>" itemprop="description"/>
<meta content="<?php echo blog_title() ?>" itemprop="name"/>
<meta content="<?php echo blog_description() ?>" itemprop="description"/>
</div>
<?php if(login()) { toolbar();} ?>
<div id="outer-wrapper">
@ -28,8 +28,8 @@
<div class="container">
<header id="header">
<section id="branding">
<h1 class="blog-title"><a href="<?php echo site_url() ?>"><?php echo config('blog.title') ?></a></h1>
<div class="blog-tagline"><p><?php echo config('blog.tagline')?></p></div>
<h1 class="blog-title"><a href="<?php echo site_url() ?>"><?php echo blog_title() ?></a></h1>
<div class="blog-tagline"><p><?php echo blog_tagline() ?></p></div>
</section>
</header>
</div>


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

@ -1,22 +1,22 @@
<h2 class="post-index"><?php echo $heading?></h2>
<?php if(!empty($posts)) {?>
<table class="post-list">
<tr><th>Title</th><th>Published</th><th>Author</th><th>Tag</th><th>Operations</th></tr>
<tr class="head"><th>Title</th><th>Published</th><th>Author</th><th>Tag</th><th>Operations</th></tr>
<?php $i = 0; $len = count($posts);?>
<?php foreach($posts as $p):?>
<?php
if ($i == 0) {
$class = 'first';
$class = 'item first';
}
elseif ($i == $len - 1) {
$class = 'last';
$class = 'item last';
}
else {
$class = '';
$class = 'item';
}
$i++;
?>
<tr>
<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><a target="_blank" href="<?php echo $p->authorurl ?>"><?php echo $p->author ?></a></td>


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

@ -1,22 +1,22 @@
<h2 class="post-index"><?php echo $heading?></h2>
<?php if(!empty($posts)) {?>
<table class="post-list">
<tr><th>Title</th><th>Published</th><th>Tag</th><th>Operations</th></tr>
<tr class="head"><th>Title</th><th>Published</th><th>Tag</th><th>Operations</th></tr>
<?php $i = 0; $len = count($posts);?>
<?php foreach($posts as $p):?>
<?php
if ($i == 0) {
$class = 'first';
$class = 'item first';
}
elseif ($i == $len - 1) {
$class = 'last';
$class = 'item last';
}
else {
$class = '';
$class = 'item';
}
$i++;
?>
<tr>
<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->tag ?></td>


Loading…
Cancel
Save