Half-baked newish admin dashboard
This commit is contained in:
parent
90ce8db424
commit
de7ed0f1f3
@ -59,7 +59,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-8 col-md-offset-2" style="padding-top: 20px">
|
<div class="col-md-10 col-md-offset-1" style="padding-top: 20px">
|
||||||
<?php
|
<?php
|
||||||
/* This will handle error, success and notice messages */
|
/* This will handle error, success and notice messages */
|
||||||
hesk_handle_messages();
|
hesk_handle_messages();
|
||||||
@ -70,12 +70,10 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
|||||||
if ( ! isset($_SESSION['hide']['ticket_list']) ) //Number of tickets (table header. NOT ACTUAL TABLE)
|
if ( ! isset($_SESSION['hide']['ticket_list']) ) //Number of tickets (table header. NOT ACTUAL TABLE)
|
||||||
{
|
{
|
||||||
echo '
|
echo '
|
||||||
<div class="row">
|
<div class="panel panel-default">
|
||||||
<div class="col-md-4"> </div>
|
<div class="panel-heading">
|
||||||
<div class="col-md-4" style="text-align: center"><h3>'.$hesklang['open_tickets'].'</h3></div>
|
<h4>'.$hesklang['open_tickets'].' <span style="float: right; font-size: .75em"><a href="new_ticket.php">'.$hesklang['nti'].'</a></span></h4>
|
||||||
<div class="col-md-4"> </div>
|
</div>'; // The rest of the panel will be printed by print_tickets.inc.php
|
||||||
</div>
|
|
||||||
';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Reset default settings? */
|
/* Reset default settings? */
|
||||||
|
@ -115,33 +115,29 @@ if ($total > 0)
|
|||||||
|
|
||||||
if ($pages > 1)
|
if ($pages > 1)
|
||||||
{
|
{
|
||||||
|
//-- Precondition: The panel has already been created, and there is NO open <div class="panel-body"> tag yet.
|
||||||
echo '
|
echo '
|
||||||
<div>
|
<div class="panel-body">
|
||||||
<div align="center" style="float: left">
|
'.sprintf($hesklang['tickets_on_pages'],$total,$pages).' '.$hesklang['jump_page'].' <select name="myHpage" id="myHpage">';
|
||||||
'.sprintf($hesklang['tickets_on_pages'],$total,$pages).' '.$hesklang['jump_page'].' <select name="myHpage" id="myHpage">
|
for ($i=1;$i<=$pages;$i++)
|
||||||
</div>
|
{
|
||||||
<div align="right" style="text-align: right">
|
$tmp = ($page == $i) ? ' selected="selected"' : '';
|
||||||
<a href="new_ticket.php">'.$hesklang['nti'].'</a>
|
echo '<option value="'.$i.'"'.$tmp.'>'.$i.'</option>';
|
||||||
</div>
|
}
|
||||||
</div>';
|
echo'</select> <input type="button" value="'.$hesklang['go'].'" onclick="javascript:window.location=\''.$href.'?'.$query.'\'+document.getElementById(\'myHpage\').value" class="btn btn-default btn-xs" /><br />';
|
||||||
for ($i=1;$i<=$pages;$i++)
|
|
||||||
{
|
|
||||||
$tmp = ($page == $i) ? ' selected="selected"' : '';
|
|
||||||
echo '<option value="'.$i.'"'.$tmp.'>'.$i.'</option>';
|
|
||||||
}
|
|
||||||
echo'</select> <input type="button" value="'.$hesklang['go'].'" onclick="javascript:window.location=\''.$href.'?'.$query.'\'+document.getElementById(\'myHpage\').value" class="btn btn-default btn-xs" /><br />';
|
|
||||||
|
|
||||||
/* List pages */
|
/* List pages */
|
||||||
|
echo '<div class="row"><div class="col-md-10 col-md-offset-1 col-sm-12" style="text-align: center"><ul class="pagination">';
|
||||||
if ($pages > 7)
|
if ($pages > 7)
|
||||||
{
|
{
|
||||||
if ($page > 2)
|
if ($page > 2)
|
||||||
{
|
{
|
||||||
echo '<a href="'.$href.'?'.$query.'1"><b>«</b></a> ';
|
echo '<li><a href="'.$href.'?'.$query.'1">«</a></li>'; // <<
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($prev_page)
|
if ($prev_page)
|
||||||
{
|
{
|
||||||
echo '<a href="'.$href.'?'.$query.$prev_page.'"><b>‹</b></a> ';
|
echo '<li><a href="'.$href.'?'.$query.$prev_page.'">‹</a></li>'; // <
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -151,11 +147,11 @@ if ($total > 0)
|
|||||||
{
|
{
|
||||||
if ($i == $page)
|
if ($i == $page)
|
||||||
{
|
{
|
||||||
echo ' <b>'.$i.'</b> ';
|
echo '<li class="active"><a href="#">'.$i.'</a></li> ';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
echo ' <a href="'.$href.'?'.$query.$i.'">'.$i.'</a> ';
|
echo '<li><a href="'.$href.'?'.$query.$i.'">'.$i.'</a></li>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -164,36 +160,16 @@ if ($total > 0)
|
|||||||
{
|
{
|
||||||
if ($next_page)
|
if ($next_page)
|
||||||
{
|
{
|
||||||
echo ' <a href="'.$href.'?'.$query.$next_page.'"><b>›</b></a> ';
|
echo '<li><a href="'.$href.'?'.$query.$next_page.'">›</a></li>'; // >
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($page < ($pages - 1))
|
if ($page < ($pages - 1))
|
||||||
{
|
{
|
||||||
echo ' <a href="'.$href.'?'.$query.$pages.'"><b>»</b></a>';
|
echo '<li><a href="'.$href.'?'.$query.$pages.'">»</a></li>'; // >>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
echo '</ul></div></div></span>';
|
||||||
|
|
||||||
echo '</p>';
|
|
||||||
echo '
|
|
||||||
<div>
|
|
||||||
<div align="center" style="float: left"></div>
|
|
||||||
<div align="right" style="text-align: right">
|
|
||||||
<a href="new_ticket.php">'.$hesklang['nti'].'</a>
|
|
||||||
</div>
|
|
||||||
</div>';
|
|
||||||
|
|
||||||
} // end PAGES > 1
|
|
||||||
else
|
|
||||||
{
|
|
||||||
echo '
|
|
||||||
<div>
|
|
||||||
<div align="center" style="float: left">
|
|
||||||
'.sprintf($hesklang['tickets_on_pages'],$total,$pages).'
|
|
||||||
</div>
|
|
||||||
<div align="right" style="text-align: right">
|
|
||||||
<a href="new_ticket.php">'.$hesklang['nti'].'</a>
|
|
||||||
</div>
|
|
||||||
</div>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We have the full SQL query now, get tickets */
|
/* We have the full SQL query now, get tickets */
|
||||||
|
@ -410,7 +410,7 @@ $hesklang['remember_user']='Remember my username';
|
|||||||
$hesklang['wrong_user']='Wrong username';
|
$hesklang['wrong_user']='Wrong username';
|
||||||
$hesklang['no_permission']='You don\'t have permission to perform this task, please login with an account that has.';
|
$hesklang['no_permission']='You don\'t have permission to perform this task, please login with an account that has.';
|
||||||
$hesklang['tickets_on_pages']='Number of tickets: %d | Number of pages: %d'; // First %d is replaced with number of tickets, second %d with number of pages
|
$hesklang['tickets_on_pages']='Number of tickets: %d | Number of pages: %d'; // First %d is replaced with number of tickets, second %d with number of pages
|
||||||
$hesklang['jump_page']=' | Jump to page:';
|
$hesklang['jump_page']='Jump to page:';
|
||||||
$hesklang['no_tickets_open']='No unresolved tickets found';
|
$hesklang['no_tickets_open']='No unresolved tickets found';
|
||||||
$hesklang['no_tickets_crit']='No tickets found matching your criteria';
|
$hesklang['no_tickets_crit']='No tickets found matching your criteria';
|
||||||
$hesklang['confirm_execute']='Are you sure you want to continue?';
|
$hesklang['confirm_execute']='Are you sure you want to continue?';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user