Exemple #1
0
 public function executeOrderByMenu(sfWebRequest $request)
 {
     $params = $request->hasParameter('projects_id') ? '&projects_id=' . $request->getParameter('projects_id') : '';
     $m = array();
     $m[] = array('title' => __('Date Added'), 'url' => $this->module . '/index?set_order=date_added' . $params);
     switch ($this->module) {
         case 'projects':
             $m[] = array('title' => __('Name'), 'url' => $this->module . '/index?set_order=name');
             if (app::countItemsByTable('ProjectsStatus') > 0) {
                 $m[] = array('title' => __('Status'), 'url' => $this->module . '/index?set_order=status');
             }
             if (app::countItemsByTable('ProjectsTypes') > 0) {
                 $m[] = array('title' => __('Type'), 'url' => $this->module . '/index?set_order=type');
             }
             break;
         case 'tasks':
             $m[] = array('title' => __('Name'), 'url' => $this->module . '/index?set_order=name' . $params);
             if (app::countItemsByTable('TasksPriority') > 0) {
                 $m[] = array('title' => __('Priority'), 'url' => $this->module . '/index?set_order=priority' . $params);
             }
             if (app::countItemsByTable('TasksStatus') > 0) {
                 $m[] = array('title' => __('Status'), 'url' => $this->module . '/index?set_order=status' . $params);
             }
             if (app::countItemsByTable('TasksTypes') > 0) {
                 $m[] = array('title' => __('Type'), 'url' => $this->module . '/index?set_order=type' . $params);
             }
             if (app::countItemsByTable('TasksLabels') > 0) {
                 $m[] = array('title' => __('Label'), 'url' => $this->module . '/index?set_order=label' . $params);
             }
             break;
         case 'tickets':
             $m[] = array('title' => __('Name'), 'url' => $this->module . '/index?set_order=name' . $params);
             if (app::countItemsByTable('TicketsStatus') > 0) {
                 $m[] = array('title' => __('Status'), 'url' => $this->module . '/index?set_order=status' . $params);
             }
             if (app::countItemsByTable('TicketsTypes') > 0) {
                 $m[] = array('title' => __('Type'), 'url' => $this->module . '/index?set_order=type' . $params);
             }
             if (app::countItemsByTable('Departments') > 0) {
                 $m[] = array('title' => __('Department'), 'url' => $this->module . '/index?set_order=department' . $params);
             }
             break;
         case 'discussions':
             $m[] = array('title' => __('Name'), 'url' => $this->module . '/index?set_order=name' . $params);
             if (app::countItemsByTable('DiscussionsStatus') > 0) {
                 $m[] = array('title' => __('Status'), 'url' => $this->module . '/index?set_order=status' . $params);
             }
             break;
     }
     $this->m = array(array('title' => __('Order By'), 'submenu' => $m));
 }
Exemple #2
0
</th>
              <td>
                <?php 
    echo $form['projects_phases_id']->renderError();
    ?>
                <?php 
    echo $form['projects_phases_id'];
    ?>
              </td>
            </tr>
            <?php 
}
?>
            
            <?php 
if (app::countItemsByTable('Versions', $sf_request->getParameter('projects_id')) > 0) {
    ?>
            <tr>
              <th><?php 
    echo $form['versions_id']->renderLabel();
    ?>
</th>
              <td>
                <?php 
    echo $form['versions_id']->renderError();
    ?>
                <?php 
    echo $form['versions_id'];
    ?>
              </td>
            </tr>
Exemple #3
0
                <th><?php 
        echo __('Label');
        ?>
</th>
                <td>
                  <?php 
        echo select_tag('tasks_labels_id', '', array('choices' => app::getItemsChoicesByTable('TasksLabels', true)));
        ?>
                </td>
              </tr>
              <?php 
    }
    ?>
              
              <?php 
    if (app::countItemsByTable('TasksTypes') > 0) {
        ?>
              <tr>
                <th><?php 
        echo __('Type');
        ?>
</th>
                <td>
                  <?php 
        echo select_tag('tasks_types_id', '', array('choices' => app::getItemsChoicesByTable('TasksTypes', true)));
        ?>
                </td>
              </tr>
              <?php 
    }
    ?>
Exemple #4
0
echo input_hidden_tag('projects_id', $sf_request->getParameter('projects_id'));
?>
          <input type="submit" value="<?php 
echo __('Save');
?>
" class="btn" />
        </td>
      </tr>
    </tfoot>
    <tbody>
      <?php 
echo $form->renderGlobalErrors();
?>
      
      <?php 
if (app::countItemsByTable('VersionsStatus') > 0) {
    ?>
      <tr>
        <th><?php 
    echo $form['versions_status_id']->renderLabel();
    ?>
</th>
        <td>
          <?php 
    echo $form['versions_status_id']->renderError();
    ?>
          <?php 
    echo $form['versions_status_id'];
    ?>
        </td>
      </tr>
Exemple #5
0
</th>
            <td>
              <?php 
    echo $form['projects_types_id']->renderError();
    ?>
              <?php 
    echo $form['projects_types_id'];
    ?>
            </td>
          </tr>
          <?php 
}
?>
                
          <?php 
if (app::countItemsByTable('ProjectsStatus') > 0) {
    ?>
      
          <tr>
            <th><?php 
    echo $form['projects_status_id']->renderLabel();
    ?>
</th>
            <td>
              <?php 
    echo $form['projects_status_id']->renderError();
    ?>
              <?php 
    echo $form['projects_status_id'];
    ?>
            </td>
Exemple #6
0
            <td>
              <?php 
        echo select_tag('projects_types_id', '', array('choices' => app::getItemsChoicesByTable('ProjectsTypes', true)));
        ?>
            </td>
          </tr>
          <?php 
    }
    ?>
                    
    <?php 
}
?>
                
          <?php 
if (app::countItemsByTable('ProjectsStatus') > 0 and $form->getObject()->isNew()) {
    ?>
      
          <tr>
            <th><?php 
    echo __('Status');
    ?>
</th>
            <td>              
              <?php 
    echo select_tag('projects_status_id', '', array('choices' => app::getItemsChoicesByTable('ProjectsStatus', true)));
    ?>
            </td>
          </tr>
          <?php 
}
Exemple #7
0
</th>
                <td>
                  <?php 
    echo $form['tickets_types_id']->renderError();
    ?>
                  <?php 
    echo $form['tickets_types_id'];
    ?>
                </td>
              </tr>
              <?php 
}
?>
                          
              <?php 
if (app::countItemsByTable('TicketsStatus') > 0) {
    ?>
              <tr>
                <th><?php 
    echo $form['tickets_status_id']->renderLabel();
    ?>
</th>
                <td>
                  <?php 
    echo $form['tickets_status_id']->renderError();
    ?>
                  <?php 
    echo $form['tickets_status_id'];
    ?>
                </td>
              </tr>
Exemple #8
0
 public static function getReportFormFilterByTable($title, $field, $t, $values, $sf_user = false)
 {
     if (app::countItemsByTable($t) > 0) {
         if (!is_string($values)) {
             $values = '';
         }
         return '<td style="padding-right: 10px;"><b>' . __($title) . '</b><br>' . select_tag($field, explode(',', $values), array('choices' => app::getItemsChoicesByTable($t, false, false, $sf_user), 'expanded' => true, 'multiple' => true)) . '</td>';
     } else {
         return '';
     }
 }
Exemple #9
0
echo __('General');
?>
</a></li>      	
      	<li><a href="#"><?php 
echo __('Attachments');
?>
</a></li>
      </ul>
      
      <div class="panes">
        <div>
        
         <table>

         <?php 
if (app::countItemsByTable('DiscussionsStatus') > 0 and $form->getObject()->isNew()) {
    ?>
          <tr>
            <th><?php 
    echo $form['discussions_status_id']->renderLabel();
    ?>
</th>
            <td>
              <?php 
    echo $form['discussions_status_id']->renderError();
    ?>
              <?php 
    echo $form['discussions_status_id'];
    ?>
            </td>
          </tr>
Exemple #10
0
<?php

$lc = new listingController('projects', $url_params, $sf_request, $sf_user);
$extra_fields = ExtraFieldsList::getFieldsByType('projects', $sf_user);
$totals = array();
$is_filter = array();
$is_filter['status'] = app::countItemsByTable('ProjectsStatus');
$is_filter['type'] = app::countItemsByTable('ProjectsTypes');
$has_comments_access = Users::hasAccess('view', 'projectsComments', $sf_user);
?>
   

<table width="100%">
  <tr>
    <td>
      <table>
        <tr>
          <?php 
if ($display_insert_button) {
    ?>
          <td style="padding-right: 15px;"><?php 
    echo $lc->insert_button(__('Add Project'));
    ?>
</td>
          <?php 
}
?>
          <td style="padding-right: 15px;"><div id="tableListingMultipleActionsMenu"><?php 
echo $lc->rednerWithSelectedAction($tlId);
?>
</div></td>
Exemple #11
0
<?php

include_component('projects', 'shortInfo', array('projects' => $projects));
?>

<h1><?php 
echo __('Projects Phases');
?>
</h1>

<?php 
$in_listing = array();
$in_listing['status'] = app::countItemsByTable('PhasesStatus');
$lc = new cfgListingController($sf_context->getModuleName(), 'projects_id=' . $projects->getId());
echo $lc->insert_button(__('Add Phase'));
?>

<table class="tableListing">
  <thead>
    <tr>
      <th><?php 
echo __('Action');
?>
</th>
      
      <?php 
if ($in_listing['status']) {
    ?>
      <th><?php 
    echo __('Status');
    ?>
Exemple #12
0
        <ul class="tabs">
        	<li><a href="#"><?php 
echo __('General');
?>
</a></li>                  	
        	<li><a href="#"><?php 
echo __('Attachments');
?>
</a></li>
        </ul>
        
        <div class="panes">
          <div>         
            <table>    
              <?php 
if (app::countItemsByTable('DiscussionsStatus') > 0) {
    ?>
              <tr>
                <th><?php 
    echo $form['discussions_status_id']->renderLabel();
    ?>
</th>
                <td>
                  <?php 
    echo $form['discussions_status_id']->renderError();
    ?>
                  <?php 
    echo $form['discussions_status_id'];
    ?>
                </td>
              </tr>
Exemple #13
0
    echo $form['tickets_status_id'];
    ?>
                </td>
              </tr>
              <?php 
}
?>
           
           
        <?php 
if (Users::hasTicketsAccess('edit', $sf_user, $tickets, $projects) and $form->getObject()->isNew()) {
    ?>
                          
              
              <?php 
    if (app::countItemsByTable('TicketsTypes') > 0) {
        ?>
              <tr>
                <th><?php 
        echo __('Type');
        ?>
</th>
                <td>                  
                  <?php 
        echo select_tag('tickets_types_id', '', array('choices' => app::getItemsChoicesByTable('TicketsTypes', true)));
        ?>
                </td>
              </tr>
              <?php 
    }
    ?>
Exemple #14
0
<?php

$lc = new listingController('tickets', $url_params, $sf_request, $sf_user);
$extra_fields = ExtraFieldsList::getFieldsByType('tickets', $sf_user);
$totals = array();
$is_filter = array();
$is_filter['status'] = app::countItemsByTable('TicketsStatus');
$is_filter['type'] = app::countItemsByTable('TicketsTypes');
$has_comments_access = Users::hasAccess('view', 'ticketsComments', $sf_user);
?>

<table width="100%">
  <tr>
    <td>
      <table>
        <tr>
          <?php 
if ($display_insert_button) {
    ?>
          <td style="padding-right: 15px;"><?php 
    echo $lc->insert_button(__('Add Ticket'));
    ?>
</td>
          <?php 
}
?>
          <td style="padding-right: 15px;"><div id="tableListingMultipleActionsMenu"><?php 
echo $lc->rednerWithSelectedAction($tlId);
?>
</div></td>
          <td><?php 
Exemple #15
0
<?php

include_component('projects', 'shortInfo', array('projects' => $projects));
?>

<h1><?php 
echo __('Tasks Versions');
?>
</h1>

<?php 
$in_listing = array();
$in_listing['status'] = app::countItemsByTable('VersionsStatus');
$lc = new cfgListingController($sf_context->getModuleName(), 'projects_id=' . $projects->getId());
echo $lc->insert_button(__('Add Version'));
?>

<table class="tableListing">
  <thead>
    <tr>
      <th><?php 
echo __('Action');
?>
</th>      
      
      <?php 
if ($in_listing['status']) {
    ?>
      <th><?php 
    echo __('Status');
    ?>
Exemple #16
0
<?php

$lc = new listingController('tasks', $url_params, $sf_request, $sf_user);
$extra_fields = ExtraFieldsList::getFieldsByType('tasks', $sf_user);
$totals = array();
$totals['EstimatedTime'] = 0;
$totals['WorkHours'] = 0;
$is_filter = array();
$is_filter['TasksPriority'] = app::countItemsByTable('TasksPriority');
$is_filter['TasksLabels'] = app::countItemsByTable('TasksLabels');
$is_filter['TasksStatus'] = app::countItemsByTable('TasksStatus');
$is_filter['TasksTypes'] = app::countItemsByTable('TasksTypes');
$is_filter['TasksGroups'] = app::countItemsByTable('TasksGroups', $sf_request->getParameter('projects_id'));
$is_filter['Versions'] = app::countItemsByTable('Versions', $sf_request->getParameter('projects_id'));
$is_filter['ProjectsPhases'] = app::countItemsByTable('ProjectsPhases', $sf_request->getParameter('projects_id'));
$in_listing = explode(',', sfConfig::get('app_tasks_columns_list'));
foreach ($is_filter as $k => $v) {
    if ($v == 0 and array_search($k, $in_listing) > 0) {
        unset($in_listing[array_search($k, $in_listing)]);
    }
}
$cols = 1;
$has_comments_access = Users::hasAccess('view', 'tasksComments', $sf_user);
?>
   

<table width="100%">
  <tr>
    <td>
      <table>
        <tr>
Exemple #17
0
<?php

$lc = new listingController('discussions', $url_params, $sf_request, $sf_user);
$extra_fields = ExtraFieldsList::getFieldsByType('discussions', $sf_user);
$totals = array();
$is_filter = array();
$is_filter['status'] = app::countItemsByTable('DiscussionsStatus');
$has_comments_access = Users::hasAccess('view', 'discussionsComments', $sf_user);
?>

<table width="100%">
  <tr>
    <td>
      <table>
        <tr>
          <?php 
if ($display_insert_button) {
    ?>
          <td style="padding-right: 15px;"><?php 
    echo $lc->insert_button(__('Add Discussion'));
    ?>
</td>
          <?php 
}
?>
          <td style="padding-right: 15px;"><div id="tableListingMultipleActionsMenu"><?php 
echo $lc->rednerWithSelectedAction($tlId);
?>
</div></td>
          <td><?php 
echo count($discussions_list) > sfConfig::get('app_rows_per_page') ? get_partial('global/jsPager', array('id' => 'pager' . $tlId)) : '';