예제 #1
0
?>
</th> -->
						<th scope="col"><?php 
echo Lang::txt('COM_TOOLS_LINKS');
?>
</th>
					</tr>
				</thead>
				<tbody>
				<?php 
$k = 0;
for ($i = 0, $n = count($this->rows); $i < $n; $i++) {
    $row =& $this->rows[$i];
    $row->state_changed = $row->state_changed != '0000-00-00 00:00:00' ? $row->state_changed : $row->registered;
    $row->title .= $row->version ? ' v' . $row->version : '';
    \Components\Tools\Helpers\Html::getStatusName($row->state, $status);
    ?>
					<tr class="<?php 
    echo strtolower($status);
    if (!$this->admin) {
        echo ' user-submitted';
    }
    ?>
">
						<th class="priority-5">
							<span class="entry-id">
								<?php 
    echo $this->escape($row->id);
    ?>
							</span>
						</th>
예제 #2
0
 *
 * @package   hubzero-cms
 * @author    Shawn Rice <*****@*****.**>
 * @copyright Copyright 2005-2015 HUBzero Foundation, LLC.
 * @license   http://opensource.org/licenses/MIT MIT
 */
// No direct access.
defined('_HZEXEC_') or die;
// get configurations/ defaults
$developer_site = $this->config->get('developer_site', 'hubFORGE');
$live_site = rtrim(Request::base(), '/');
$developer_url = $live_site = 'https://' . preg_replace('#^(https://|http://)#', '', $live_site);
$project_path = $this->config->get('project_path', '/tools/');
$dev_suffix = $this->config->get('dev_suffix', '_dev');
// get status name
\Components\Tools\Helpers\Html::getStatusName($this->status['state'], $state);
\Components\Tools\Helpers\Html::getStatusClass($this->status['state'], $this->statusClass);
$this->css('pipeline.css')->js('pipeline.js');
?>
<header id="content-header">
	<h2><?php 
echo $this->title;
?>
 - <span class="state_hed"><?php 
echo $state;
?>
</span></h2>

	<div id="content-header-extra">
		<ul id="useroptions">
			<li><a class="icon-main main-page btn" href="<?php 
예제 #3
0
 /**
  * Update a support ticket
  *
  * @param      integer $toolid    Tool ID
  * @param      array   $oldstuff  Information before any changes
  * @param      array   $newstuff  Information after changes
  * @param      string  $comment   Comments to add
  * @param      integer $access    Parameter description (if any) ...
  * @param      integer $email     Parameter description (if any) ...
  * @param      integer $action    Parameter description (if any) ...
  * @return     boolean False if errors, True on success
  */
 protected function _updateTicket($toolid, $oldstuff, $newstuff, $comment, $access = 0, $email = 0, $action = 1, $toolinfo = array())
 {
     $obj = new \Components\Tools\Tables\Tool($this->database);
     $summary = '';
     $rowc = new \Components\Support\Models\Comment();
     $rowc->set('ticket', $obj->getTicketId($toolid));
     // see what changed
     if ($oldstuff != $newstuff) {
         if ($oldstuff['toolname'] != $newstuff['toolname']) {
             $rowc->changelog()->changed(Lang::txt('COM_TOOLS_TOOLNAME'), $oldstuff['toolname'], $newstuff['toolname']);
         }
         if ($oldstuff['title'] != $newstuff['title']) {
             $rowc->changelog()->changed(Lang::txt('COM_TOOLS_TOOL') . ' ' . strtolower(Lang::txt('COM_TOOLS_TITLE')), $oldstuff['title'], $newstuff['title']);
             $summary .= strtolower(Lang::txt('COM_TOOLS_TITLE'));
         }
         if ($oldstuff['version'] != '' && $oldstuff['version'] != $newstuff['version']) {
             $rowc->changelog()->changed(strtolower(Lang::txt('COM_TOOLS_DEV_VERSION_LABEL')), $oldstuff['version'], $newstuff['version']);
             $summary .= $summary == '' ? '' : ', ';
             $summary .= strtolower(Lang::txt('COM_TOOLS_VERSION'));
         } else {
             if ($oldstuff['version'] == '' && $newstuff['version'] != '') {
                 $rowc->changelog()->changed(strtolower(Lang::txt('COM_TOOLS_DEV_VERSION_LABEL')), '', $newstuff['version']);
             }
         }
         if ($oldstuff['description'] != $newstuff['description']) {
             $rowc->changelog()->changed(Lang::txt('COM_TOOLS_TOOL') . ' ' . strtolower(Lang::txt('COM_TOOLS_DESCRIPTION')), $oldstuff['description'], $newstuff['description']);
             $summary .= $summary == '' ? '' : ', ';
             $summary .= strtolower(Lang::txt('COM_TOOLS_DESCRIPTION'));
         }
         if ($oldstuff['exec'] != $newstuff['exec']) {
             $rowc->changelog()->changed(Lang::txt('COM_TOOLS_TOOL_ACCESS'), $oldstuff['exec'], $newstuff['exec']);
             if ($newstuff['exec'] == '@GROUP') {
                 $rowc->changelog()->changed(Lang::txt('COM_TOOLS_ALLOWED_GROUPS'), '', \Components\Tools\Helpers\Html::getGroups($newstuff['membergroups']));
             }
             $summary .= $summary == '' ? '' : ', ';
             $summary .= strtolower(Lang::txt('COM_TOOLS_TOOL_ACCESS'));
         }
         if ($oldstuff['code'] != $newstuff['code']) {
             $rowc->changelog()->changed(Lang::txt('COM_TOOLS_CODE_ACCESS'), $oldstuff['code'], $newstuff['code']);
             $summary .= $summary == '' ? '' : ', ';
             $summary .= strtolower(Lang::txt('COM_TOOLS_CODE_ACCESS'));
         }
         if ($oldstuff['wiki'] != $newstuff['wiki']) {
             $rowc->changelog()->changed(Lang::txt('COM_TOOLS_WIKI_ACCESS'), $oldstuff['wiki'], $newstuff['wiki']);
             $summary .= $summary == '' ? '' : ', ';
             $summary .= strtolower(Lang::txt('COM_TOOLS_WIKI_ACCESS'));
         }
         if ($oldstuff['vncGeometry'] != $newstuff['vncGeometry']) {
             $rowc->changelog()->changed(Lang::txt('COM_TOOLS_VNC_GEOMETRY'), $oldstuff['vncGeometry'], $newstuff['vncGeometry']);
             $summary .= $summary == '' ? '' : ', ';
             $summary .= strtolower(Lang::txt('COM_TOOLS_VNC_GEOMETRY'));
         }
         if ($oldstuff['developers'] != $newstuff['developers']) {
             $rowc->changelog()->changed(Lang::txt('COM_TOOLS_DEVELOPMENT_TEAM'), \Components\Tools\Helpers\Html::getDevTeam($oldstuff['developers']), \Components\Tools\Helpers\Html::getDevTeam($newstuff['developers']));
             $summary .= $summary == '' ? '' : ', ';
             $summary .= strtolower(Lang::txt('COM_TOOLS_DEVELOPMENT_TEAM'));
         }
         // end of tool information changes
         if ($summary) {
             $summary .= ' ' . Lang::txt('COM_TOOLS_INFO_CHANGED');
             $action = 1;
         }
         // tool status/priority changes
         if ($oldstuff['priority'] != $newstuff['priority']) {
             $rowc->changelog()->changed(Lang::txt('COM_TOOLS_PRIORITY'), \Components\Tools\Helpers\Html::getPriority($oldstuff['priority']), \Components\Tools\Helpers\Html::getPriority($newstuff['priority']));
             $email = 0;
             // do not send email about priority changes
         }
         if ($oldstuff['state'] != $newstuff['state']) {
             $rowc->changelog()->changed(Lang::txt('COM_TOOLS_TICKET_CHANGED_FROM'), \Components\Tools\Helpers\Html::getStatusName($oldstuff['state'], $oldstate), \Components\Tools\Helpers\Html::getStatusName($newstuff['state'], $newstate));
             $summary = Lang::txt('COM_TOOLS_STATUS') . ' ' . Lang::txt('COM_TOOLS_TICKET_CHANGED_FROM') . ' ' . $oldstate . ' ' . Lang::txt('COM_TOOLS_TO') . ' ' . $newstate;
             $email = 1;
             // send email about status changes
             $action = 2;
         }
     }
     if ($comment) {
         //$action = $action==2 ? $action : 3;
         $email = 1;
         $rowc->set('comment', nl2br($comment));
     }
     $rowc->set('created', Date::toSql());
     $rowc->set('created_by', User::get('id'));
     $rowc->set('access', $access);
     if (!$rowc->store()) {
         $this->setError($rowc->getError());
         return false;
     }
     if ($email) {
         // send notification emails
         $summary = $summary ? $summary : $comment;
         $this->_email($toolid, $summary, $comment, $access, $action, $toolinfo);
     }
     return true;
 }