public function buildHeader($fields = array(), $sortable = false, $m = '')
 {
     $header = parent::buildHeader($fields, $sortable, $m);
     if ('projectdesigner' == $m) {
         $checkAll = '<th width="1"><input type="checkbox" onclick="select_all_rows(this, \'selected_task[]\')" name="multi_check"/></th></tr>';
         $header = str_replace('</tr>', $checkAll, $header);
     }
     return $header;
 }
 public function renderContactTable($moduleName, array $contactList)
 {
     $module = new w2p_System_Module();
     $fields = $module->loadSettings('contacts', $moduleName . '_view');
     if (0 == count($fields)) {
         $fieldList = array('contact_name', 'contact_email', 'contact_phone', 'dept_name');
         $fieldNames = array('Name', 'Email', 'Phone', 'Department');
         $module->storeSettings('contacts', $moduleName . '_view', $fieldList, $fieldNames);
         $fields = array_combine($fieldList, $fieldNames);
     }
     $listTable = new w2p_Output_ListTable($this->AppUI);
     $output = $listTable->startTable();
     $output .= $listTable->buildHeader($fields);
     $output .= $listTable->buildRows($contactList);
     $output .= $listTable->endTable();
     return $output;
 }
<?php

if (!defined('W2P_BASE_DIR')) {
    die('You should not access this file directly.');
}
// @todo    convert to template
global $AppUI, $project;
$items = $project->getForumList();
$module = new w2p_System_Module();
$fields = $module->loadSettings('forums', 'projects_view');
if (0 == count($fields)) {
    $fieldList = array('forum_name', 'forum_description', 'forum_owner', 'forum_last_date');
    $fieldNames = array('Forum Name', 'Description', 'Owner', 'Last Post Info');
    $module->storeSettings('forums', 'projects_view', $fieldList, $fieldNames);
    $fields = array_combine($fieldList, $fieldNames);
}
?>
<a name="forums-projects_view"> </a> <?php 
$listTable = new w2p_Output_ListTable($AppUI);
$listTable->df .= ' ' . $AppUI->getPref('TIMEFORMAT');
echo $listTable->startTable();
echo $listTable->buildHeader($fields);
echo $listTable->buildRows($items);
echo $listTable->endTable();
echo $AppUI->getTheme()->styleRenderBoxTop();
?>
<form name="watcher" action="?m=forums&a=viewer&forum_id=<?php 
echo $forum_id;
?>
&f=<?php 
echo $f;
?>
" method="post" accept-charset="utf-8">
    <input type="hidden" name="dosql" value="do_watch_forum" />
    <input type="hidden" name="watch" value="topic" />
    <?php 
$listHelper = new w2p_Output_ListTable($AppUI);
$listHelper->addBefore('watch', 'message_id');
echo $listHelper->startTable();
echo $listHelper->buildHeader($fields);
echo $listHelper->buildRows($items);
?>
        <tr>
            <td colspan="12">
                <div class="left">
                    <input type="submit" class="button" value="<?php 
echo $AppUI->_('update watches');
?>
" />
                </div>

                <?php 
if ($canAuthor) {
    ?>
                    <input type="button" class="button right" value="<?php 
Exemple #5
0
<?php

/**
 * This is the base list template used by nearly every module within the
 *   system. It provides a simple table layout with headers, support for our
 *   System Lookup Values, and it handles all the row generation.
 *
 * Like any template, this can be overridden by creating a list.php file
 *   within the root of your custom theme.
 *
 * The modules which use this template also include their own list templates
 *   which are included.. but are empty except for an include to this file.
 *   This is on purpose in case you just want to customize some of the list
 *   screens in certain modules instead of all of them at once.
 */
global $m;
$page = (int) w2PgetParam($_GET, 'page', 1);
$paginator = new w2p_Utilities_Paginator($items);
$items = $paginator->getItemsOnPage($page);
echo $paginator->buildNavigation($AppUI, $m, $tab);
$listTable = new w2p_Output_ListTable($AppUI);
echo $listTable->startTable();
echo $listTable->buildHeader($fields, $sortable, $m);
echo $listTable->buildRows($items, $customLookups);
echo $listTable->endTable();
echo $paginator->buildNavigation($AppUI, $m, $tab);
}
$orderby = $AppUI->getState('DeptProjIdxOrderBy') ? $AppUI->getState('DeptProjIdxOrderBy') : 'project_end_date';
$orderdir = $AppUI->getState('DeptProjIdxOrderDir') ? $AppUI->getState('DeptProjIdxOrderDir') : 'asc';
/*
 *  TODO:  This is a *nasty* *nasty* kludge that should be cleaned up.
 * Unfortunately due to the global variables from dotProject, we're stuck with
 * this mess for now.
 * 
 * May God have mercy on our souls for the atrocity we're about to commit.
 */
$tmpDepartments = $department;
$department = $dept_id;
$project = new CProject();
$projects = projects_list_data($user_id);
$department = $tmpDepartments;
$items = $projects;
$module = new w2p_System_Module();
$fields = $module->loadSettings('projects', 'department_view');
if (0 == count($fields)) {
    $fieldList = array('project_color_identifier', 'project_priority', 'project_name', 'company_name', 'project_start_date', 'project_duration', 'project_end_date', 'project_end_actual', 'task_log_problem', 'project_owner', 'project_task_count', 'project_status');
    $fieldNames = array('Color', 'P', 'Project Name', 'Company', 'Start', 'Duration', 'End', 'Actual', 'LP', 'Owner', 'Tasks', 'Status');
    $module->storeSettings('projects', 'department_view', $fieldList, $fieldNames);
    $fields = array_combine($fieldList, $fieldNames);
}
$pstatus = w2PgetSysVal('ProjectStatus');
$customLookups = array('project_status' => $pstatus);
$listHelper = new w2p_Output_ListTable($AppUI);
echo $listHelper->startTable();
echo $listHelper->buildHeader($fields, true, 'departments&a=view&dept_id=' . $dept_id);
echo $listHelper->buildRows($items, $customLookups);
echo $listHelper->endTable();
Exemple #7
0
    $fields = array_combine($fieldList, $fieldNames);
}
?>

<form name="watcher" action="./index.php?m=forums&f=<?php 
echo $f;
?>
" method="post" accept-charset="utf-8">
	<input type="hidden" name="dosql" value="do_watch_forum" />
	<input type="hidden" name="watch" value="forum" />

    <?php 
$listTable = new w2p_Output_ListTable($AppUI);
$listTable->addBefore('watch', 'forum_id');
echo $listTable->startTable();
echo $listTable->buildHeader($fields, true, 'forums&f=' . $f);
echo $listTable->buildRows($items);
?>
    <tr>
        <td colspan="<?php 
echo $listTable->cellCount;
?>
">
            <input type="submit" class="button" value="<?php 
echo $AppUI->_('update watches');
?>
" />
        </td>
    </tr>
    <?php 
echo $listTable->endTable();
if (!defined('W2P_BASE_DIR')) {
    die('You should not access this file directly.');
}
// @todo    convert to template
global $a, $addPwT, $AppUI, $buffer, $company_id, $department, $min_view, $m, $priority, $projects, $tab, $user_id, $orderdir, $orderby;
if (isset($_GET['orderby'])) {
    $orderdir = $AppUI->getState('UsrProjIdxOrderDir') ? $AppUI->getState('UsrProjIdxOrderDir') == 'asc' ? 'desc' : 'asc' : 'desc';
    $AppUI->setState('UsrProjIdxOrderBy', w2PgetParam($_GET, 'orderby', null));
    $AppUI->setState('UsrProjIdxOrderDir', $orderdir);
}
$orderby = $AppUI->getState('UsrProjIdxOrderBy') ? $AppUI->getState('UsrProjIdxOrderBy') : 'project_end_date';
$orderdir = $AppUI->getState('UsrProjIdxOrderDir') ? $AppUI->getState('UsrProjIdxOrderDir') : 'asc';
$project = new CProject();
$projects = projects_list_data($user_id);
$items = $projects;
$module = new w2p_System_Module();
$fields = $module->loadSettings('projects', 'admin_view');
if (0 == count($fields)) {
    $fieldList = array('project_color_identifier', 'project_priority', 'project_name', 'company_name', 'project_start_date', 'project_duration', 'project_end_date', 'project_end_actual', 'task_log_problem', 'project_owner', 'project_task_count', 'project_status');
    $fieldNames = array('Color', 'P', 'Project Name', 'Company', 'Start', 'Duration', 'End', 'Actual', 'LP', 'Owner', 'Tasks', 'Status');
    $module->storeSettings('projects', 'admin_view', $fieldList, $fieldNames);
    $fields = array_combine($fieldList, $fieldNames);
}
$pstatus = w2PgetSysVal('ProjectStatus');
$customLookups = array('project_status' => $pstatus);
$listHelper = new w2p_Output_ListTable($AppUI);
echo $listHelper->startTable();
echo $listHelper->buildHeader($fields, true, 'admin&a=view&user_id=' . $user_id);
echo $listHelper->buildRows($items, $customLookups);
echo $listHelper->endTable();
Exemple #9
0
    // TODO: This is only in place to provide an pre-upgrade-safe
    //   state for versions earlier than v3.0
    //   At some point at/after v4.0, this should be deprecated
    $fieldList = array('contact_display_name', 'user_username', 'company_name', 'dept_name');
    $fieldNames = array('Real Name', 'Login Name', 'Company', 'Department');
    //TODO: This doesn't save the columns yet as we can't allow customization yet.
}
if ($display_last_login) {
    array_unshift($fieldList, '');
    array_unshift($fieldNames, 'Login History');
}
$fields = array_combine($fieldList, $fieldNames);
$listTable = new w2p_Output_ListTable($AppUI);
echo $listTable->startTable();
$listTable->addBefore(1);
echo $listTable->buildHeader($fields, false, $m);
$types = w2PgetSysVal('UserType');
$customLookups = array('user_type' => $types);
$perms =& $AppUI->acl();
foreach ($users as $row) {
    if ($perms->isUserPermitted($row['user_id']) != $canLogin) {
        continue;
    }
    $listTable->stageRowData($row);
    ?>
<tr>
    <td>
        <a href="./index.php?m=users&a=addedit&user_id=<?php 
    echo $row['user_id'];
    ?>
"><img src="<?php