예제 #1
0
// | 59 Temple Place - Suite 330                                          |
// | Boston, MA 02111-1307, USA.                                          |
// +----------------------------------------------------------------------+
// | Authors: João Prado Maia <*****@*****.**>                             |
// +----------------------------------------------------------------------+
//
// @(#) $Id: s.searchbar.php 1.3 03/09/26 02:06:54-00:00 jpradomaia $
//
include_once "config.inc.php";
include_once APP_INC_PATH . "db_access.php";
include_once APP_INC_PATH . "class.template.php";
include_once APP_INC_PATH . "class.auth.php";
include_once APP_INC_PATH . "class.category.php";
include_once APP_INC_PATH . "class.priority.php";
include_once APP_INC_PATH . "class.misc.php";
include_once APP_INC_PATH . "class.release.php";
include_once APP_INC_PATH . "class.project.php";
include_once APP_INC_PATH . "class.filter.php";
include_once APP_INC_PATH . "class.status.php";
$tpl = new Template_API();
$tpl->setTemplate("searchbar.tpl.html");
Auth::checkAuthentication(APP_COOKIE);
$prj_id = Auth::getCurrentProject();
$tpl->assign("priorities", Priority::getList($prj_id));
$tpl->assign("status", Status::getAssocStatusList($prj_id));
$tpl->assign("users", Project::getUserAssocList($prj_id));
$tpl->assign("categories", Category::getAssocList($prj_id));
$tpl->assign("custom", Filter::getListing($prj_id));
$options = Issue::saveSearchParams();
$tpl->assign("options", $options);
$tpl->displayTemplate();
예제 #2
0
// customers should not be able to see this page
$role_id = Auth::getCurrentRole();
if ($role_id < User::getRoleID('Standard User')) {
    Auth::redirect(APP_RELATIVE_URL . "list.php");
}
$prj_id = Auth::getCurrentProject();
// generate options for assign list. If there are groups and user is above a customer, include groups
$groups = Group::getAssocList($prj_id);
$users = Project::getUserAssocList($prj_id, 'active', User::getRoleID('Customer'));
$assign_options = array("" => "Any", "-1" => "un-assigned", "-2" => "myself and un-assigned");
if (User::getGroupID(Auth::getUserID()) != '') {
    $assign_options['-3'] = 'myself and my group';
    $assign_options['-4'] = 'myself, un-assigned and my group';
}
if (count($groups) > 0 && $role_id > User::getRoleID("Customer")) {
    foreach ($groups as $grp_id => $grp_name) {
        $assign_options["grp:{$grp_id}"] = "Group: " . $grp_name;
    }
}
$assign_options += $users;
$tpl->assign(array("cats" => Category::getAssocList($prj_id), "priorities" => Priority::getList($prj_id), "status" => Status::getAssocStatusList($prj_id), "users" => $assign_options, "releases" => Release::getAssocList($prj_id, TRUE), "custom" => Filter::getListing($prj_id), "custom_fields" => Custom_Field::getListByProject($prj_id, ''), "reporters" => Project::getReporters($prj_id)));
if (!empty($HTTP_GET_VARS["custom_id"])) {
    $check_perm = true;
    if (Filter::isGlobal($HTTP_GET_VARS["custom_id"])) {
        if ($role_id >= User::getRoleID('Manager')) {
            $check_perm = false;
        }
    }
    $tpl->assign("options", Filter::getDetails($HTTP_GET_VARS["custom_id"], $check_perm));
}
$tpl->displayTemplate();
예제 #3
0
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or    |
// | (at your option) any later version.                                  |
// |                                                                      |
// | This program is distributed in the hope that it will be useful,      |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of       |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        |
// | GNU General Public License for more details.                         |
// |                                                                      |
// | You should have received a copy of the GNU General Public License    |
// | along with this program; if not, write to:                           |
// |                                                                      |
// | Free Software Foundation, Inc.                                       |
// | 59 Temple Place - Suite 330                                          |
// | Boston, MA 02111-1307, USA.                                          |
// +----------------------------------------------------------------------+
// | Authors: Elan Ruusamäe <*****@*****.**>                               |
// +----------------------------------------------------------------------+
require_once dirname(__FILE__) . '/../init.php';
if (!empty($_GET['custom_id'])) {
    $filters = Filter::getListing(true);
    foreach ($filters as $filter) {
        if ($filter['cst_id'] == (int) $_GET['custom_id']) {
            parse_str($filter['url'], $params);
            $params = array_merge($params, $_POST, $_GET);
            unset($params['custom_id']);
            $url = 'list.php?cat=search&' . http_build_query($params);
            Auth::redirect($url);
        }
    }
}
예제 #4
0
파일: list.php 프로젝트: korusdipl/eventum
    }
}
$assign_options += $users;
$list = Search::getListing($prj_id, $options, $pagerRow, $rows);
$tpl->assign('list', $list['list']);
$tpl->assign('list_info', $list['info']);
$tpl->assign('csv_data', base64_encode(@$list['csv']));
$tpl->assign('match_modes', Search::getMatchModes());
$tpl->assign('supports_excerpts', Search::doesBackendSupportExcerpts());
$tpl->assign('columns', Display_Column::getColumnsToDisplay($prj_id, 'list_issues'));
$tpl->assign('priorities', Priority::getAssocList($prj_id));
$tpl->assign('severities', Severity::getAssocList($prj_id));
$tpl->assign('status', Status::getAssocStatusList($prj_id));
$tpl->assign('assign_options', $assign_options);
$tpl->assign('custom', Filter::getAssocList($prj_id));
$tpl->assign('csts', Filter::getListing(true));
$tpl->assign('active_filters', Filter::getActiveFilters($options));
$tpl->assign('categories', Category::getAssocList($prj_id));
$tpl->assign('releases', Release::getAssocList($prj_id, true));
$tpl->assign('reporters', Project::getReporters($prj_id));
$tpl->assign(array('products' => Product::getAssocList(false)));
$prefs = Prefs::get($usr_id);
$tpl->assign('refresh_rate', $prefs['list_refresh_rate'] * 60);
$tpl->assign('refresh_page', 'list.php');
// items needed for bulk update tool
if (Auth::getCurrentRole() > User::getRoleID('Developer')) {
    $tpl->assign('users', $users);
    if (Workflow::hasWorkflowIntegration($prj_id)) {
        $open_statuses = Workflow::getAllowedStatuses($prj_id);
    } else {
        $open_statuses = Status::getAssocStatusList($prj_id, false);
예제 #5
0
// generate options for assign list. If there are groups and user is above a customer, include groups
$groups = Group::getAssocList($prj_id);
$users = Project::getUserAssocList($prj_id, 'active', User::getRoleID('Customer'));
$assign_options = array('' => ev_gettext('Any'), '-1' => ev_gettext('un-assigned'), '-2' => ev_gettext('myself and un-assigned'));
if (Auth::isAnonUser()) {
    unset($assign_options['-2']);
} elseif (User::getGroupID(Auth::getUserID()) != '') {
    $assign_options['-3'] = ev_gettext('myself and my group');
    $assign_options['-4'] = ev_gettext('myself, un-assigned and my group');
}
if (count($groups) > 0 && $role_id > User::getRoleID('Customer')) {
    foreach ($groups as $grp_id => $grp_name) {
        $assign_options["grp:{$grp_id}"] = 'Group: ' . $grp_name;
    }
}
$assign_options += $users;
$tpl->assign(array('cats' => Category::getAssocList($prj_id), 'priorities' => Priority::getList($prj_id), 'severities' => Severity::getList($prj_id), 'status' => Status::getAssocStatusList($prj_id), 'users' => $assign_options, 'releases' => Release::getAssocList($prj_id, true), 'custom' => Filter::getListing($prj_id), 'custom_fields' => Custom_Field::getListByProject($prj_id, ''), 'reporters' => Project::getReporters($prj_id), 'products' => Product::getAssocList(false)));
if (!empty($_GET['custom_id'])) {
    $check_perm = true;
    if (Filter::isGlobal($_GET['custom_id'])) {
        if ($role_id >= User::getRoleID('Manager')) {
            $check_perm = false;
        }
    }
    $options = Filter::getDetails($_GET['custom_id'], $check_perm);
} else {
    $options = array();
    $options['cst_rows'] = APP_DEFAULT_PAGER_SIZE;
}
$tpl->assign('options', $options);
$tpl->displayTemplate();
예제 #6
0
            continue;
        }
        $field = Custom_Field::getDetails($fld_id);
        if ($field['fld_type'] == 'combo' || $field['fld_type'] == 'multiple') {
            $custom_fields_display[$fld_id] = join(', ', Custom_Field::getOptions($fld_id, $search_value));
        }
    }
}
$list = Issue::getListing($prj_id, $options, $pagerRow, $rows);
$tpl->assign("list", $list["list"]);
$tpl->assign("list_info", $list["info"]);
$tpl->assign("csv_data", base64_encode(@$list["csv"]));
$tpl->assign("columns", Display_Column::getColumnsToDisplay($prj_id, 'list_issues'));
$tpl->assign("priorities", Priority::getAssocList($prj_id));
$tpl->assign("status", Status::getAssocStatusList($prj_id));
$tpl->assign("open_status", Status::getAssocStatusList($prj_id, true));
$tpl->assign("users", $users);
$tpl->assign("assign_options", $assign_options);
$tpl->assign("custom", Filter::getAssocList($prj_id));
$tpl->assign("csts", Filter::getListing(true));
$tpl->assign("filter_info", Filter::getFiltersInfo());
$tpl->assign("categories", Category::getAssocList($prj_id));
$tpl->assign("releases", Release::getAssocList($prj_id, true));
$tpl->assign("available_releases", Release::getAssocList($prj_id));
$tpl->assign("groups", $groups);
$tpl->assign("custom_fields_display", $custom_fields_display);
$tpl->assign("reporters", Project::getReporters($prj_id));
$prefs = Prefs::get($usr_id);
$tpl->assign("refresh_rate", $prefs['list_refresh_rate'] * 60);
$tpl->assign("refresh_page", "list.php");
$tpl->displayTemplate();