public function executeFilters(sfWebRequest $request) { $m = array(); $params = false; $m = app::getFilterMenuItemsByTable($m, 'UsersGroups', 'Group', 'users/index', $params); $this->m = array(array('title' => __('Filters'), 'submenu' => $m)); }
public function executeFilters() { $m = array(); $m = app::getFilterMenuItemsByTable($m, 'ProjectsStatus', 'Status', 'projects/index'); $m = app::getFilterMenuItemsByTable($m, 'ProjectsTypes', 'Type', 'projects/index'); $m = app::getFilterMenuUsers($m, 'Users', 'In Team', 'projects/index'); $this->m = array(array('title' => __('Filters'), 'submenu' => $m)); }
public function executeFilters(sfWebRequest $request) { $m = array(); $params = (int) $request->getParameter('projects_id') > 0 ? 'projects_id=' . $request->getParameter('projects_id') : false; $m = app::getFilterMenuItemsByTable($m, 'DiscussionsStatus', 'Status', 'discussions/index', $params); $m = app::getFilterMenuUsers($m, 'DiscussionsAssignedTo', 'Assigned To', 'discussions/index', $params); $m = app::getFilterMenuUsers($m, 'DiscussionsCreatedBy', 'Created By', 'discussions/index', $params); if (!$params) { $m = app::getFilterProjects($m, 'discussions/index', $params, array(), $this->getUser()); $m = app::getFilterMenuItemsByTable($m, 'ProjectsStatus', 'Projects Status', 'discussions/index', $params); $m = app::getFilterMenuItemsByTable($m, 'ProjectsTypes', 'Projects Types', 'discussions/index', $params); } $this->m = array(array('title' => __('Filters'), 'submenu' => $m)); }
public function executeFilters(sfWebRequest $request) { $m = array(); $params = (int) $request->getParameter('projects_id') > 0 ? 'projects_id=' . $request->getParameter('projects_id') : false; $m = app::getFilterMenuItemsByTable($m, 'TasksPriority', 'Priority', 'ganttChart/index', $params); $m = app::getFilterMenuStatusItemsByTable($m, 'TasksStatus', 'Status', 'ganttChart/index', $params); $m = app::getFilterMenuItemsByTable($m, 'TasksLabels', 'Label', 'ganttChart/index', $params); $m = app::getFilterMenuItemsByTable($m, 'TasksTypes', 'Type', 'ganttChart/index', $params); $m = app::getFilterMenuUsers($m, 'TasksAssignedTo', 'Assigned To', 'ganttChart/index', $params); $m = app::getFilterMenuUsers($m, 'TasksCreatedBy', 'Created By', 'ganttChart/index', $params); if (!$params) { $m = app::getFilterProjects($m, 'ganttChart/index', $params, array(), $this->getUser()); $m = app::getFilterMenuStatusItemsByTable($m, 'ProjectsStatus', 'Project Status', 'ganttChart/index', $params); $m = app::getFilterMenuItemsByTable($m, 'ProjectsTypes', 'Project Type', 'ganttChart/index', $params); } else { $m = app::getFilterMenuItemsByTable($m, 'TasksGroups', 'Group', 'ganttChart/index', $params); $m = app::getFilterMenuItemsByTable($m, 'ProjectsPhases', 'Phase', 'ganttChart/index', $params); $m = app::getFilterMenuItemsByTable($m, 'Versions', 'Version', 'ganttChart/index', $params); } $this->m = array(array('title' => __('Filters'), 'submenu' => $m)); }
<td> <div class="filterPreviewBox"> <table> <tr> <td valign="top" style="padding-top: 2px;"><?php echo link_to(image_tag('icons/close_gray.png'), 'projects/index?remove_filter=' . $table, array('title' => __('Remove Filter'))); ?> </td> <td valign="top"><div id="filtersPreviewMenuBox"> <?php switch ($table) { case 'Users': $m = app::getFilterMenuUsers(array(), $table, 'In Team', 'projects/index', false, $filter_by[$table]); break; default: $m = app::getFilterMenuItemsByTable(array(), $table, $title, 'projects/index', false, $filter_by[$table], $sf_user); break; } echo renderYuiMenu('filtersMenu' . $table, $m); ?> </div></td> <td valign="top" class="selectedFilterItems"><?php echo strstr($table, 'extraField') ? $filter_by[$table] : app::getNameByTableId($table, $filter_by[$table]); ?> </td> </tr> </table> </div> <script type="text/javascript"> YAHOO.util.Event.onContentReady("filtersMenu<?php
<?php switch ($table) { case 'TasksStatus': $m = app::getFilterMenuStatusItemsByTable(array(), $table, 'Status', 'timeReport/' . $action_name, $params, $filter_by[$table]); break; case 'TasksAssignedTo': $m = app::getFilterMenuUsers(array(), $table, 'Assigned To', 'timeReport/' . $action_name, $params, $filter_by[$table]); break; case 'TasksCreatedBy': $m = app::getFilterMenuUsers(array(), $table, 'Created By', 'timeReport/' . $action_name, $params, $filter_by[$table]); break; case 'Projects': $m = app::getFilterProjects(array(), 'timeReport/' . $action_name, $params, $filter_by[$table], $sf_user); break; default: $m = app::getFilterMenuItemsByTable(array(), $table, $title, 'timeReport/' . $action_name, $params, $filter_by[$table], $sf_user); break; } echo renderYuiMenu('filtersMenu' . $table, $m); ?> </div></td> <td valign="top" class="selectedFilterItems"><?php echo strstr($table, 'extraField') ? $filter_by[$table] : app::getNameByTableId($table, $filter_by[$table]); ?> </td> </tr> </table> </div> <script type="text/javascript"> YAHOO.util.Event.onContentReady("filtersMenu<?php
$m = app::getFilterMenuStatusItemsByTable(array(), $table, 'Status', 'discussions/index', $params, $filter_by[$table]); break; case 'DiscussionsAssignedTo': $m = app::getFilterMenuUsers(array(), $table, 'Assigned To', 'discussions/index', $params, $filter_by[$table]); break; case 'DiscussionsCreatedBy': $m = app::getFilterMenuUsers(array(), $table, 'Created By', 'discussions/index', $params, $filter_by[$table]); break; case 'Projects': $m = app::getFilterProjects(array(), 'discussions/index', $params, $filter_by[$table], $sf_user); break; case 'ProjectsStatus': $m = app::getFilterMenuStatusItemsByTable(array(), $table, 'Project Status', 'discussions/index', $params, $filter_by[$table]); break; default: $m = app::getFilterMenuItemsByTable(array(), $table, $title, 'discussions/index', $params, $filter_by[$table], $sf_user); break; } } echo renderYuiMenu('filtersMenu' . $table, $m); ?> </div></td> <td valign="top" class="selectedFilterItems"><?php echo strstr($table, 'extraField') ? $filter_by[$table] : app::getNameByTableId($table, $filter_by[$table]); ?> </td> </tr> </table> </div> <script type="text/javascript">
$count++; ?> <td> <div class="filterPreviewBox"> <table> <tr> <td valign="top" style="padding-top: 2px;"><?php echo link_to(image_tag('icons/close_gray.png'), 'users/index?remove_filter=' . $table . ($params ? '&' . $params : ''), array('title' => __('Remove Filter'))); ?> </td> <td valign="top"><div id="filtersPreviewMenuBox"> <?php switch ($table) { default: $m = app::getFilterMenuItemsByTable(array(), $table, $title, 'users/index', $params, $filter_by[$table]); break; } echo renderYuiMenu('filtersMenu' . $table, $m); ?> </div></td> <td valign="top" class="selectedFilterItems"><?php echo strstr($table, 'extraField') ? $filter_by[$table] : app::getNameByTableId($table, $filter_by[$table]); ?> </td> </tr> </table> </div> <script type="text/javascript"> YAHOO.util.Event.onContentReady("filtersMenu<?php