mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-23 15:26:16 +00:00
fixed dirty error in queue's that didn't allow me to assing/unassign after creating a queue
This commit is contained in:
parent
83d4a89e46
commit
e0d9ff8628
4 changed files with 48 additions and 35 deletions
|
@ -5,6 +5,7 @@ class Gui_Elements{
|
|||
public static function make_table( $inputList, $funcArray ,$fieldArray){
|
||||
$i = 0;
|
||||
$result = Array();
|
||||
if(!empty($inputList)){
|
||||
foreach($inputList as $element){
|
||||
$j = 0;
|
||||
foreach($funcArray as $function){
|
||||
|
@ -31,6 +32,7 @@ class Gui_Elements{
|
|||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
|
|
@ -33,8 +33,11 @@ class Ticket_Queue_Handler{
|
|||
default:
|
||||
return "ERROR";
|
||||
}
|
||||
|
||||
$this->pagination = new Pagination($this->queue->getQuery(),"lib",10,"Ticket",$this->queue->getParams());
|
||||
foreach( $this->pagination->getElements() as $element ){
|
||||
$elemArray = $this->pagination->getElements();
|
||||
if(!empty($elemArray)){
|
||||
foreach( $elemArray as $element ){
|
||||
$catInstance = new Ticket_Category();
|
||||
$catInstance->load_With_TCategoryId($element->getTicket_Category());
|
||||
$element->setTicket_Category($catInstance);
|
||||
|
@ -43,6 +46,7 @@ class Ticket_Queue_Handler{
|
|||
$userInstance->load_With_TUserId($element->getAuthor());
|
||||
$element->setAuthor($userInstance);
|
||||
}
|
||||
}
|
||||
return $this->pagination->getElements();
|
||||
|
||||
}
|
||||
|
|
|
@ -16,6 +16,12 @@ function show_queue(){
|
|||
//Pagination Base Links
|
||||
$result['pagination_base_link'] = "index.php?page=show_queue&get=".$result['queue_view'] ;
|
||||
|
||||
//form url to keep the getters constant
|
||||
$result['getURL'] = "index.php?page=show_queue&get=" . $result['queue_view'];
|
||||
if(isset($_GET['pagenum'])){
|
||||
$result['getURL'] = $result['getURL'] . "&pagenum=".$_GET['pagenum'];
|
||||
}
|
||||
|
||||
if(isset($_GET['get']) && ($_GET['get'] == "create") && isset($_GET['userid']) && isset($_GET['groupid']) && isset($_GET['what']) && isset($_GET['how']) && isset($_GET['who'])){
|
||||
$userid = filter_var($_GET['userid'], FILTER_SANITIZE_NUMBER_INT);
|
||||
$groupid = filter_var($_GET['groupid'], FILTER_SANITIZE_NUMBER_INT);
|
||||
|
@ -29,6 +35,9 @@ function show_queue(){
|
|||
$result['prev_created_what'] = $what;
|
||||
$result['prev_created_how'] = $how;
|
||||
$result['prev_created_who'] = $who;
|
||||
|
||||
$result['getURL'] = $result['getURL'] . "&userid=".$userid."&groupid=".$groupid."&what=".$what."&how=".$how."&who=".$who;
|
||||
|
||||
}
|
||||
|
||||
//if an action is set
|
||||
|
@ -57,9 +66,7 @@ function show_queue(){
|
|||
$result['prev_created_what'] = $what;
|
||||
$result['prev_created_how'] = $how;
|
||||
$result['prev_created_who'] = $who;
|
||||
|
||||
|
||||
|
||||
$result['getURL'] = $result['getURL'] . "&userid=".$userid."&groupid=".$groupid."&what=".$what."&how=".$how."&who=".$who;
|
||||
|
||||
break;
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
<span id="userList" {if $prev_created_who eq "user"}style="display:inline;"{else if $prev_created_who eq "support_group"}style="display:none;"{else}style="display:inline;"{/if}>
|
||||
<select style="width: 140px;" name="userid">
|
||||
{foreach from=$teamlist item=member}
|
||||
<option value="{$member.tUserId}" {if $prev_created_userid eq $member.tUserId}selected="selected"{else if $user_id eq $member.tUserId}selected="selected"{/if}>{$member.name}</option>
|
||||
<option value="{$member.tUserId}" {if isset($prev_created_userid)} {if $prev_created_userid eq $member.tUserId}selected="selected"{/if}{else if $user_id eq $member.tUserId}selected="selected"{/if}>{$member.name}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</span>
|
||||
|
@ -108,13 +108,13 @@
|
|||
</td>
|
||||
<td>
|
||||
{if $ticket.assigned eq 0}
|
||||
<form id="assign_ticket" class="form-vertical" method="post" action="" style="margin:0px 0px 0px;">
|
||||
<form id="assign_ticket" class="form-vertical" method="post" action="{$getURL}" style="margin:0px 0px 0px;">
|
||||
<input type="hidden" name="ticket_id" value="{$ticket.tId}">
|
||||
<input type="hidden" name="action" value="assignTicket">
|
||||
<button type="submit" class="btn btn-primary" ><i class="icon-flag icon-white"></i> Assign Ticket</button>
|
||||
</form>
|
||||
{else if $ticket.assigned eq $user_id}
|
||||
<form id="assign_ticket" class="form-vertical" method="post" action="" style="margin:0px 0px 0px;">
|
||||
<form id="assign_ticket" class="form-vertical" method="post" action="{$getURL}" style="margin:0px 0px 0px;">
|
||||
<input type="hidden" name="ticket_id" value="{$ticket.tId}">
|
||||
<input type="hidden" name="action" value="unAssignTicket">
|
||||
<button type="submit" class="btn btn-warning" ><i class="icon-remove icon-white"></i> Remove Assign</button>
|
||||
|
|
Loading…
Reference in a new issue