$lastcomment = '0000-00-00 00:00:00'; if (isset($lastactivities[$row->get('id')])) { $lastcomment = $lastactivities[$row->get('id')]['lastactivity']; } $tags = ''; if (isset($alltags[$row->get('id')])) { $tags = $row->tags('linkedlist'); } ?> <tr class="<?php echo $cls == 'odd' ? 'even' : 'odd'; ?> "> <td<?php if ($row->get('status')) { echo $row->status('color') ? ' style="border-left-color: #' . $row->status('color') . ';"' : ''; } ?> > <span class="hasTip" title="<?php echo Lang::txt('COM_SUPPORT_DETAILS'); ?> :: <?php echo Lang::txt('COM_SUPPORT_COL_STATUS') . ': ' . $row->status('text'); ?> "> <span class="ticket-id"> <?php echo $row->get('id'); ?> </span>
/** * Displays details for a ticket * * @apiMethod GET * @apiUri /support/{ticket} * @apiParameter { * "name": "ticket", * "description": "Ticket identifier", * "type": "integer", * "required": true, * "default": 0 * } * @return void */ public function readTask() { $this->requiresAuthentication(); if (!$this->acl->check('read', 'tickets')) { throw new Exception(Lang::txt('Not authorized'), 403); } // Initiate class and bind data to database fields $ticket_id = Request::getInt('ticket', 0); // Initiate class and bind data to database fields $ticket = new \Components\Support\Models\Ticket($ticket_id); $response = new stdClass(); $response->id = $ticket->get('id'); $response->owner = new stdClass(); $response->owner->username = $ticket->owner('username'); $response->owner->name = $ticket->owner('name'); $response->owner->id = $ticket->owner('id'); $response->reporter = new stdClass(); $response->reporter->name = $ticket->submitter('name'); $response->reporter->username = $ticket->submitter('username'); $response->reporter->email = $ticket->submitter('email'); $response->status = new stdClass(); $response->status->alias = $ticket->status('class'); $response->status->title = $ticket->status('text'); $response->status->id = $ticket->get('status'); foreach (array('created', 'severity', 'os', 'browser', 'ip', 'hostname', 'uas', 'referrer', 'open', 'closed') as $prop) { $response->{$prop} = $ticket->get($prop); } $response->report = $ticket->content('raw'); $response->url = str_replace('/api', '', rtrim(Request::base(), '/') . '/' . ltrim(Route::url('index.php?option=com_support&controller=tickets&task=tickets&id=' . $response->id), '/')); $response->comments = array(); foreach ($ticket->comments() as $comment) { $c = new stdClass(); $c->id = $comment->get('id'); $c->created = $comment->get('created'); $c->creator = new stdClass(); $c->creator->username = $comment->creator('username'); $c->creator->name = $comment->creator('name'); $c->creator->id = $comment->creator('id'); $c->private = $comment->access ? true : false; $c->content = $comment->content('raw'); $response->comments[] = $c; } $this->send($response); }
$tags = $row->tags('linkedlist'); } ?> <li class="<?php echo !$row->isOpen() ? 'closed' : 'open'; ?> " data-id="<?php echo $row->get('id'); ?> " id="ticket-<?php echo $row->get('id'); ?> "> <div class="ticket-wrap"<?php if ($row->get('status')) { echo $row->status('color') ? ' style="border-left-color: #' . $row->status('color') . ';"' : ''; } ?> > <p> <input type="checkbox" name="id[]" id="cb<?php echo $i; ?> " value="<?php echo $row->get('id'); ?> " onclick="isChecked(this.checked, this);" /> <span class="ticket-id"> # <?php echo $row->get('id'); ?>