Exemplo n.º 1
0
          <h3>
            <?php 
    if ($branch['reviewRequest'] == 1) {
        ?>
<span  class="new">new!</span><?php 
    }
    ?>
            <?php 
    echo link_to($branch['name'], 'default/fileList', array('query_string' => 'branch=' . $branch['id']));
    ?>
          </h3><br />
          <span title="<?php 
    echo $branch['lastCommitDesc'];
    ?>
" class="commit_desc tooltip"><?php 
    echo stringUtils::shorten(stringUtils::trimTicketInfos($branch['lastCommitDesc']), 105);
    ?>
</span>
        </td>
        <td class="branch_ago"><?php 
    echo time_ago_in_words($branch['created']);
    ?>
 ago</td>
        <td class="branch_infos">
          <?php 
    echo $branch['total'] . ' files';
    ?>
          <?php 
    if ($branch['added']) {
        ?>
<span class="added tooltip" title="<?php 
Exemplo n.º 2
0
" />
          <?php 
        echo link_to($commentBoard['UserName'], 'user/view', array('query_string' => 'id=' . $commentBoard['UserId']));
        ?>
<br/>
          <span class="date"><?php 
        echo $commentBoard['CreatedAt'];
        ?>
</span>
        </td>
        <td class="status_content">
          <div class="message tooltip" title="<?php 
        echo $commentBoard['Message'];
        ?>
"><?php 
        echo stringUtils::shorten($commentBoard['Message'], 120);
        ?>
</div>
          <div class="path">
            <?php 
        if (!empty($commentBoard['ProjectId'])) {
            echo link_to($commentBoard['ProjectName'], 'default/branchList', array('query_string' => 'repository=' . $commentBoard['ProjectId']));
        }
        ?>
            <?php 
        if (!empty($commentBoard['BranchId'])) {
            ?>
&gt; <?php 
            echo link_to($commentBoard['BranchName'], 'default/fileList', array('query_string' => 'branch=' . $commentBoard['BranchId']));
        }
        ?>
Exemplo n.º 3
0
 /**
  * @param string $type
  * @param string $comment
  */
 protected function createCommentNotificationMessage($type, $comment)
 {
     $configEvent = $this->getEventConfig('comment');
     $message = '';
     if (isset($configEvent[$type . '_message'])) {
         $message = $configEvent[$type . '_message'];
         $message = str_replace('%branch%', $comment->getBranch()->__toString(), $message);
         $message = str_replace('%message%', stringUtils::shorten($comment->getValue(), 40, '...', true), $message);
         $message = str_replace('%date%', date('d/m/Y H:i'), $message);
         $message = str_replace('%author%', $this->subject->getUser()->__toString(), $message);
         switch ($type) {
             case 'line':
                 $message = str_replace('%line%', $comment->getLine(), $message);
             case 'file':
                 $message = str_replace('%file%', $comment->getFile()->getFilename(), $message);
         }
         if (isset($configEvent['add-links']) && $configEvent['add-links']) {
             switch ($type) {
                 case 'branch':
                     $link = " : " . $this->generateUrl('fileList', array('branch' => $comment->getBranch()->getId(), 'anchor' => 'comment-' . $comment->getId()));
                     break;
                 case 'file':
                 case 'line':
                     $link = " : " . $this->generateUrl('file', array('file' => $comment->getFileId(), 'anchor' => 'comment-' . $comment->getId()));
                     break;
             }
             $message .= $link;
         }
     }
     return $message;
 }
Exemplo n.º 4
0
    ?>
" />
          <?php 
    echo $file->getsfGuardUser()->getProfile()->__toString();
    ?>
 :
        <?php 
}
?>
      </span>
      <span class="tooltip" title="<?php 
echo stringUtils::trimTicketInfos($file->getLastChangeCommitDesc());
?>
">
        <?php 
echo stringUtils::shorten(stringUtils::trimTicketInfos($file->getLastChangeCommitDesc()), 65);
?>
      </span>
      <ul class="right dropdown-action">
        <li class="dropdown">
          <?php 
if (BranchPeer::OK === $file->getStatus()) {
    ?>
            <?php 
    echo link_to('Ã', 'default/changeStatus', array('query_string' => sprintf('type=file&id=%s&status=%s', $file->getId(), BranchPeer::OK), 'class' => 'dropdown-toggle ricon validate tooltip', 'title' => 'Validated'));
    ?>
            <ul class="dropdown-menu">
              <lI><?php 
    echo link_to('Â', 'default/changeStatus', array('query_string' => sprintf('type=file&id=%s&status=%s', $file->getId(), BranchPeer::KO), 'class' => 'ricon invalidate item-status-action tooltip', 'title' => 'Invalidated'));
    ?>
</lI>