dashboard added that shows the newest ticket, the amount of tickets in your todo list and tickets waiting on YOUR response
--HG-- branch : quitta-gsoc-2013hg/feature/sse2
parent
9647d6ec8f
commit
af6c57ff52
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
function dashboard(){
|
||||
|
||||
//if logged in
|
||||
if(WebUsers::isLoggedIn()){
|
||||
|
||||
//is Mod
|
||||
if(ticket_user::isMod($_SESSION['ticket_user'])){
|
||||
$result['user_id'] = $_SESSION['ticket_user']->getTUserId();
|
||||
$result['nrToDo'] = Ticket_Queue_Handler::getNrOfTicketsToDo($_SESSION['ticket_user']->getTUserId());
|
||||
$result['nrAssignedWaiting'] = Ticket_Queue_Handler::getNrOfTicketsAssignedWaiting($_SESSION['ticket_user']->getTUserId());
|
||||
$result['nrTotalTickets'] = Ticket_Queue_Handler::getNrOfTickets();
|
||||
$ticket = Ticket_Queue_Handler::getNewestTicket();
|
||||
$result['newestTicketId'] = $ticket->getTId();
|
||||
$result['newestTicketTitle'] = $ticket->getTitle();
|
||||
$result['newestTicketAuthor'] = Ticket_User::get_username_from_id($ticket->getAuthor());
|
||||
return $result;
|
||||
|
||||
}else{
|
||||
//ERROR: No access!
|
||||
$_SESSION['error_code'] = "403";
|
||||
header("Location: index.php?page=error");
|
||||
exit;
|
||||
|
||||
}
|
||||
|
||||
}else{
|
||||
//ERROR: not logged in!
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
{block name=content}
|
||||
|
||||
|
||||
<div class="sortable row-fluid ui-sortable">
|
||||
<a data-original-title="{$nrAssignedWaiting} Assigned to you and waiting for support!" data-rel="tooltip" class="well span3 top-block"
|
||||
href="index.php?page=show_queue&get=create&userid={$user_id}&groupid=1&what=waiting_for_support&how=assigned&who=user">
|
||||
<span class="icon32 icon-blue icon-alert"></span>
|
||||
<div>Tickets Waiting for Direct Action</div>
|
||||
<span class="notification red">{$nrAssignedWaiting}</span>
|
||||
</a>
|
||||
|
||||
<a data-original-title="{$nrToDo} Tickets Todo." data-rel="tooltip" class="well span3 top-block" href="index.php?page=show_queue&get=todo">
|
||||
<span class="icon32 icon-blue icon-tag"></span>
|
||||
<div>Tickets Todo</div>
|
||||
<span class="notification red">{$nrToDo}</span>
|
||||
</a>
|
||||
|
||||
<a data-original-title="By {$newestTicketAuthor}" data-rel="tooltip" class="well span3 top-block" href="index.php?page=show_ticket&id={$newestTicketId}">
|
||||
<span class="icon32 icon-blue icon-flag"></span>
|
||||
<div>Newest Ticket</div>
|
||||
<span class="notification blue">{$newestTicketTitle}</span>
|
||||
</a>
|
||||
|
||||
<a data-original-title="{$nrTotalTickets} tickets in total" data-rel="tooltip" class="well span3 top-block" href="index.php?page=show_queue&get=all">
|
||||
<span class="icon32 icon-blue icon-archive"></span>
|
||||
<div>Total amount of Tickets</div>
|
||||
<span class="notification blue">{$nrTotalTickets}</span>
|
||||
</a>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="box span12">
|
||||
<div class="box-header well">
|
||||
<h2><i class="icon-info-sign"></i> {$home_title}</h2>
|
||||
<div class="box-icon">
|
||||
<a href="#" class="btn btn-round" onclick="javascript:show_help('intro');return false;"><i class="icon-info-sign"></i></a>
|
||||
<a href="#" class="btn btn-setting btn-round"><i class="icon-cog"></i></a>
|
||||
<a href="#" class="btn btn-minimize btn-round"><i class="icon-chevron-up"></i></a>
|
||||
<a href="#" class="btn btn-close btn-round"><i class="icon-remove"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-content">
|
||||
<p><strong>{$home_info}</strong></p>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
|
@ -1,53 +0,0 @@
|
||||
{block name=content}
|
||||
|
||||
|
||||
<div class="sortable row-fluid ui-sortable">
|
||||
<a data-original-title="6 new members." data-rel="tooltip" class="well span3 top-block" href="#">
|
||||
<span class="icon32 icon-red icon-user"></span>
|
||||
<div>Total Members</div>
|
||||
<div>507</div>
|
||||
<span class="notification">6</span>
|
||||
</a>
|
||||
|
||||
<a data-original-title="4 new pro members." data-rel="tooltip" class="well span3 top-block" href="#">
|
||||
<span class="icon32 icon-color icon-star-on"></span>
|
||||
<div>Pro Members</div>
|
||||
<div>228</div>
|
||||
<span class="notification green">4</span>
|
||||
</a>
|
||||
|
||||
<a data-original-title="$34 new sales." data-rel="tooltip" class="well span3 top-block" href="#">
|
||||
<span class="icon32 icon-color icon-cart"></span>
|
||||
<div>Sales</div>
|
||||
<div>$13320</div>
|
||||
<span class="notification yellow">$34</span>
|
||||
</a>
|
||||
|
||||
<a data-original-title="12 new messages." data-rel="tooltip" class="well span3 top-block" href="#">
|
||||
<span class="icon32 icon-color icon-envelope-closed"></span>
|
||||
<div>Messages</div>
|
||||
<div>25</div>
|
||||
<span class="notification red">12</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="box span12">
|
||||
<div class="box-header well">
|
||||
<h2><i class="icon-info-sign"></i> {$home_title}</h2>
|
||||
<div class="box-icon">
|
||||
<a href="#" class="btn btn-round" onclick="javascript:show_help('intro');return false;"><i class="icon-info-sign"></i></a>
|
||||
<a href="#" class="btn btn-setting btn-round"><i class="icon-cog"></i></a>
|
||||
<a href="#" class="btn btn-minimize btn-round"><i class="icon-chevron-up"></i></a>
|
||||
<a href="#" class="btn btn-close btn-round"><i class="icon-remove"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-content">
|
||||
<p><strong>{$home_info}</strong></p>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
|
Loading…
Reference in New Issue