Example #1
0
 public static function renderDescriptionFileds($bind_type, $object, $sf_user, $use_fields = '')
 {
     if (strlen($use_fields) > 0 and $use_fields == 'set_off_extra_fields') {
         return '';
     }
     $extra_fields = ExtraFieldsList::getFieldsByType($bind_type, $sf_user, false, array('include' => 'textarea_wysiwyg,file', 'all' => true));
     $values = ExtraFieldsList::getValuesList($extra_fields, $object ? $object->getId() : false);
     $html = '';
     foreach ($extra_fields as $v) {
         if (strlen($use_fields) > 0 and !in_array($v['id'], explode(',', $use_fields))) {
             continue;
         }
         if (strlen($value = ExtraFieldsList::renderFieldValueByType($v, $values)) == 0) {
             continue;
         }
         if ($v['type'] == 'textarea_wysiwyg') {
             $value = replaceTextToLinks($value);
         }
         $html .= '<div class="fieldHeading">' . $v['name'] . ':</strong></div><div class="fieldDescription">' . $value . '</div>';
     }
     return $html;
 }
Example #2
0
<?php

echo app::setCssForEmailContent('<h1>' . link_to($projects->getName(), 'projectsComments/index?projects_id=' . $projects->getId(), array('absolute' => true)) . '</h1>');
?>

<table width="100%">
<tr>
  <td style="vertical-align: top; font-family:  Arial; font-size: 13px; color: black; padding: 2px;">
    <?php 
echo replaceTextToLinks($projects->getDescription());
?>
<br>
    <?php 
include_component('attachments', 'attachmentsList', array('bind_type' => 'projects', 'bind_id' => $projects->getId()));
?>
  </td>
  <td width="30%" valign="top">            
      <?php 
echo app::setCssForEmailContent('<div>' . get_component('projects', 'details', array('projects' => $projects)) . '</div>');
?>
    
  </td>
</tr>
</table>
Example #3
0
  <td style="vertical-align: top; font-family:  Arial; font-size: 13px; color: black; padding: 2px;">
    
    <table style="width:100%">
    <?php 
$count = 0;
foreach ($comments_history as $c) {
    if ($count == 1) {
        echo app::setCssForEmailContent('<tr><td colspan="2"><h2>' . __('Previous Comments') . '</h2></td></tr>');
    }
    $count++;
    ?>
     
        <tr>
          <td style="vertical-align: top; font-family:  Arial; font-size: 13px; color: black; padding: 2px; border-bottom:1px dashed LightGray">
            <?php 
    echo replaceTextToLinks($c->getDescription());
    ?>
            <div><?php 
    include_component('attachments', 'attachmentsList', array('bind_type' => 'discussionsComments', 'bind_id' => $c->getId()));
    ?>
</div>
            <div><?php 
    include_component('discussionsComments', 'info', array('c' => $c));
    ?>
</div>
          </td>
          <td style="width:25%; vertical-align: top; font-family:  Arial; font-size: 13px; color: black; padding: 2px; border-bottom:1px dashed LightGray"><?php 
    echo app::dateTimeFormat($c->getCreatedAt()) . '<br>' . $c->getUsers()->getName() . '<br>' . renderUserPhoto($c->getUsers()->getPhoto());
    ?>
</td>      
        </tr>      
Example #4
0
        ?>
    <tr>
      <td>
        <?php 
        if ($comments_access['edit'] and $comments_access['view_own']) {
            if ($c['users_id'] == $sf_user->getAttribute('id')) {
                echo $lc->action_buttons($c['id']);
            }
        } elseif ($comments_access['edit']) {
            echo $lc->action_buttons($c['id']);
        }
        ?>
      </td>            
      <td style="white-space:normal">
        <?php 
        echo replaceTextToLinks($c['description']);
        ?>
        <div><?php 
        include_component('attachments', 'attachmentsList', array('bind_type' => 'ticketsComments', 'bind_id' => $c['id']));
        ?>
</div>
        <div><?php 
        include_component('ticketsComments', 'info', array('c' => $c));
        ?>
</div>
      </td>
      <td><?php 
        echo app::dateTimeFormat($c['created_at']) . '<br>' . $c['Users']['name'] . '<br>' . renderUserPhoto($c['Users']['photo']);
        ?>
</td>      
    </tr>
Example #5
0
<?php

echo app::setCssForEmailContent('<h1>' . link_to($discussions->getProjects()->getName(), 'projectsComments/index?projects_id=' . $discussions->getProjectsId(), array('absolute' => true)) . ': ' . link_to($discussions->getName(), 'discussionsComments/index?projects_id=' . $discussions->getProjectsId() . '&discussions_id=' . $discussions->getId(), array('absolute' => true)) . '</h1>');
?>

<table width="100%">
<tr>
  <td style="vertical-align: top; font-family:  Arial; font-size: 13px; color: black; padding: 2px;">
    <?php 
echo replaceTextToLinks($discussions->getDescription());
?>
<br>
    <?php 
include_component('attachments', 'attachmentsList', array('bind_type' => 'discussions', 'bind_id' => $discussions->getId()));
?>
  </td>
  <td width="30%" valign="top">            
      <?php 
echo app::setCssForEmailContent('<div>' . get_component('discussions', 'details', array('discussions' => $discussions, 'is_email' => true)) . '</div>');
?>
    
  </td>
</tr>
</table>
Example #6
0
<?php

if ($tickets->getProjectsId() > 0) {
    echo app::setCssForEmailContent('<h1>' . link_to($tickets->getProjects()->getName(), 'projectsComments/index?projects_id=' . $tickets->getProjectsId(), array('absolute' => true)) . ': ' . link_to($tickets->getName(), 'ticketsComments/index?projects_id=' . $tickets->getProjectsId() . '&tickets_id=' . $tickets->getId(), array('absolute' => true)) . '</h1>');
} else {
    echo app::setCssForEmailContent('<h1>' . link_to($tickets->getName(), 'ticketsComments/index?tickets_id=' . $tickets->getId(), array('absolute' => true)) . '</h1>');
}
?>

<table width="100%">
<tr>
  <td style="vertical-align: top; font-family:  Arial; font-size: 13px; color: black; padding: 2px;">
    <?php 
echo replaceTextToLinks($tickets->getDescription());
?>
<br>
    <div><?php 
echo ExtraFieldsList::renderDescriptionFileds('tickets', $tickets, $sf_user);
?>
</div>
    <?php 
include_component('attachments', 'attachmentsList', array('bind_type' => 'tickets', 'bind_id' => $tickets->getId()));
?>
  </td>
  <td width="30%" valign="top">            
      <?php 
echo app::setCssForEmailContent('<div>' . get_component('tickets', 'details', array('tickets' => $tickets, 'is_email' => true)) . '</div>');
?>
    
  </td>
</tr>