Exemplo n.º 1
0
        if (!$setup && !$row->isPublic()) {
            ?>
								<span class="s-private">&nbsp;</span>
							<?php 
        }
        ?>
							<a href="<?php 
        echo Route::url('index.php?option=' . $this->option . '&task=view&alias=' . $row->get('alias'));
        ?>
">
								<img src="<?php 
        echo Route::url('index.php?option=' . $this->option . '&alias=' . $row->get('alias') . '&task=media');
        ?>
" alt="" />
								<span class="block"><?php 
        echo Hubzero\Utility\String::truncate($this->escape($row->get('title')), 30);
        ?>
</span>
							</a>
							<?php 
        if ($setup) {
            ?>
								<span class="s-complete"><?php 
            echo Lang::txt('COM_PROJECTS_COMPLETE_SETUP');
            ?>
</span>
							<?php 
        } else {
            if ($row->get('state') == 0) {
                ?>
								<span class="s-suspended"><?php 
Exemplo n.º 2
0
 /**
  * Called after updating a ticket
  *
  * @param   object  $ticket
  * @param   object  $comment
  * @return  void
  */
 public function onTicketUpdate($ticket, $comment)
 {
     if (!$this->isReady() || !$this->params->get('notify_updated')) {
         return;
     }
     if (!$this->params->get('notify_private') && $comment->isPrivate()) {
         return;
     }
     if ($group = $this->params->get('group_updated')) {
         if ($group != $ticket->get('group')) {
             return;
         }
     }
     $channel = $this->params->get('channel_updated', $this->params->get('channel'));
     $url = rtrim(Request::base(), '/') . '/' . ltrim(Route::url($ticket->link()), '/');
     if (App::isAdmin()) {
         $url = rtrim(Request::root(), '/') . '/support/ticket/' . $ticket->get('id');
     }
     $pretext = Lang::txt('PLG_SUPPORT_SLACK_TICKET_UPDATED', Config::get('sitename'));
     //, $comment->creator()->get('name'));
     $text = preg_replace("/<br\\s?\\/>/i", '', $comment->get('comment'));
     $text = Hubzero\Utility\String::truncate(Hubzero\Utility\Sanitize::stripWhitespace($text), 300);
     $color = 'good';
     if ($comment->isPrivate()) {
         $color = '#ecada2';
         $pretext .= ' *' . Lang::txt('PLG_SUPPORT_SLACK_PRIVATE') . '*';
     }
     $title = Lang::txt('PLG_SUPPORT_SLACK_TICKET_NUMBER', $ticket->get('id'));
     if (Component::params('com_support')->get('email_terse')) {
         $text = Lang::txt('PLG_SUPPORT_SLACK_COMMENT_NEW');
     } else {
         $title .= ': ' . $ticket->get('summary');
     }
     $data = array('fallback' => $pretext . ': ' . $url . ' - ' . $text, 'pretext' => $pretext, 'title' => $title, 'title_link' => $url, 'text' => $text, 'color' => $color, 'author_name' => $comment->creator()->get('name'));
     if (!Component::params('com_support')->get('email_terse')) {
         $fields = array();
         foreach ($comment->changelog()->lists() as $type => $log) {
             if (is_array($log) && count($log) > 0) {
                 if ($type != 'changes') {
                     continue;
                 }
                 foreach ($log as $items) {
                     if ($items->before != $items->after) {
                         $fields[] = array('title' => ucfirst($items->field), 'value' => $items->after, 'short' => true);
                     }
                 }
             }
         }
         if (!empty($fields)) {
             $data['fields'] = $fields;
         }
     }
     $this->send($channel, $data);
 }
Exemplo n.º 3
0
            echo $group->gidNumber;
            ?>
" href="<?php 
            echo Route::url('index.php?option=' . $this->option . '&cn=' . $group->cn);
            ?>
">
									<?php 
            echo $this->escape(Hubzero\Utility\String::truncate(stripslashes($group->description), 60));
            ?>
								</a>
							<?php 
        } else {
            ?>
								<span class="group-title">
									<?php 
            echo $this->escape(Hubzero\Utility\String::truncate(stripslashes($group->description), 60));
            ?>
								</span>
							<?php 
        }
        ?>

							<?php 
        if ($published) {
            ?>
								<span class="<?php 
            echo $status;
            ?>
 group-membership-status">
									<?php 
            switch ($status) {
Exemplo n.º 4
0
} else {
    echo $dt->relative();
}
?>
</time></span>
			</div><!-- / .activity-details -->

			<div class="activity-event">
				<?php 
$content = $this->row->log->get('description');
$short = null;
$attachments = $this->row->log->details->get('attachments');
$attachments = $attachments ?: array();
$attached = count($attachments);
if (strlen(strip_tags($content)) > 150) {
    $short = Hubzero\Utility\String::truncate($content, 150, array('html' => true));
    ?>
					<div class="activity-event-preview">
						<?php 
    echo $short;
    ?>
						<p>
							<a class="more-content" href="#activity-event-content<?php 
    echo $this->row->get('id');
    ?>
">
								<?php 
    echo Lang::txt('PLG_GROUPS_ACTIVITY_MORE');
    ?>
							</a>
						</p>
Exemplo n.º 5
0
									<div class="result-snippet">
										<?php 
        foreach ($fields as $c) {
            ?>
											<?php 
            if (in_array($c['raw'], array('name', 'org', 'organization'))) {
                continue;
            }
            if ($val = $row->get($c['raw'])) {
                $val = is_array($val) ? implode(', ', $val) : $val;
                ?>
												<div class="result-snippet-<?php 
                echo $this->escape($c['raw']);
                ?>
"><?php 
                echo $this->escape(Hubzero\Utility\String::truncate(strip_tags(stripslashes($val)), 150));
                ?>
</div>
											<?php 
            }
            ?>
										<?php 
        }
        ?>
									</div>
									<?php 
        if ($messageuser) {
            ?>
										<div class="result-extras message-member">
											<a class="btn" href="<?php 
            echo Route::url('index.php?option=' . $this->option . '&id=' . User::get('id') . '&active=messages&task=new&to[]=' . $row->get('id'));
Exemplo n.º 6
0
            ?>
								<dd>
								<dd class="time">
									<?php 
            echo Date::of($event->get('publish_up'))->toLocal(Lang::txt('TIME_FORMAT_HZ1'));
            ?>
								<dd>
							<?php 
        }
        ?>
						</dl>
						<div class="entry-content">
							<p>
								<?php 
        $content = strip_tags($event->get('content'));
        echo $content ? Hubzero\Utility\String::truncate($content, 500) : '<em>no content</em>';
        ?>
							</p>
						</div>
					</li>
				<?php 
    }
    ?>
			</ol>

			<?php 
    $pageNav = $this->pagination($this->eventsCount, $this->filters['start'], $this->filters['limit']);
    $pageNav->setAdditionalUrlParam('cn', $this->group->get('cn'));
    $pageNav->setAdditionalUrlParam('active', 'calendar');
    echo $pageNav->render();
    ?>