当前位置: 首页>>代码示例>>PHP>>正文


PHP Project::getUserAssocList方法代码示例

本文整理汇总了PHP中Project::getUserAssocList方法的典型用法代码示例。如果您正苦于以下问题:PHP Project::getUserAssocList方法的具体用法?PHP Project::getUserAssocList怎么用?PHP Project::getUserAssocList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Project的用法示例。


在下文中一共展示了Project::getUserAssocList方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __invoke

 public function __invoke(Template_Helper $tpl)
 {
     $units = array('hour' => 'Hours', 'day' => 'Days');
     $type_list = array('phone' => 'Phone Calls', 'note' => 'Notes', 'email' => 'Email', 'draft' => 'Drafts', 'time' => 'Time Tracking', 'reminder' => 'Reminders');
     $tpl->assign(array('units' => $units, 'users' => Project::getUserAssocList($this->prj_id, 'active', User::ROLE_CUSTOMER), 'developer' => $this->usr_id, 'type_list' => $type_list, 'activity_types' => $this->activity_types ?: array_keys($type_list), 'unit' => $this->unit, 'amount' => $this->amount, 'start_date' => $this->start_date, 'end_date' => $this->end_date, 'sort_order' => $this->sort_order));
     if (!$this->unit && !$this->amount) {
         return;
     }
     $data = array();
     if (in_array('phone', $this->activity_types)) {
         $data['phone'] = $this->phoneActivity();
     }
     if (in_array('note', $this->activity_types)) {
         $data['note'] = $this->noteActivity();
     }
     if (in_array('email', $this->activity_types)) {
         $data['email'] = $this->emailActivity();
     }
     if (in_array('draft', $this->activity_types)) {
         $data['draft'] = $this->draftActivity();
     }
     if (in_array('time', $this->activity_types)) {
         $data['time'] = $this->timeActivity();
     }
     if (!$this->developer && in_array('reminder', $this->activity_types)) {
         $data['reminder'] = $this->reminderActivity();
     }
     $tpl->assign(array('data' => $data, 'developer' => $this->developer));
 }
开发者ID:dabielkabuto,项目名称:eventum,代码行数:29,代码来源:RecentActivity.php

示例2: implode

if (!Access::canAccessReports(Auth::getUserID())) {
    echo 'Invalid role';
    exit;
}
$prj_id = Auth::getCurrentProject();
if (count(@$_REQUEST['start']) > 0 && @$_REQUEST['start']['Year'] != 0 && @$_REQUEST['start']['Month'] != 0 && @$_REQUEST['start']['Day'] != 0) {
    $start_date = implode('-', $_REQUEST['start']);
} elseif (!empty($_GET['start_date'])) {
    $start_date = $_GET['start_date'];
}
if (count(@$_REQUEST['end']) > 0 && @$_REQUEST['end']['Year'] != 0 && @$_REQUEST['end']['Month'] != 0 && @$_REQUEST['end']['Day'] != 0) {
    $end_date = implode('-', $_REQUEST['end']);
} elseif (!empty($_GET['end_date'])) {
    $end_date = $_GET['end_date'];
}
$tpl->assign(array('weeks' => Date_Helper::getWeekOptions(3, 0), 'users' => Project::getUserAssocList($prj_id, 'active', User::ROLE_CUSTOMER), 'start_date' => @$start_date, 'end_date' => @$end_date, 'report_type' => @$_REQUEST['report_type']));
if (!empty($_REQUEST['developer'])) {
    //split date up
    if (@$_REQUEST['report_type'] == 'weekly') {
        $dates = explode('_', $_REQUEST['week']);
    } else {
        $dates = array($start_date, $end_date);
    }
    // print out emails
    $developer = $_REQUEST['developer'];
    $prj_id = Auth::getCurrentProject();
    $options = array('separate_closed' => @$_REQUEST['separate_closed'], 'separate_not_assigned_to_user' => @$_REQUEST['separate_not_assigned_to_user'], 'ignore_statuses' => @$_REQUEST['ignore_statuses'], 'show_per_issue' => !empty($_REQUEST['show_per_issue']), 'separate_no_time' => !empty($_REQUEST['separate_no_time']));
    $data = Report::getWeeklyReport($developer, $prj_id, $dates[0], $dates[1], $options);
    // order issues by time spent on them
    if (isset($_REQUEST['show_per_issue'])) {
        $sort_function = function ($a, $b) {
开发者ID:dabielkabuto,项目名称:eventum,代码行数:31,代码来源:weekly.php

示例3: Template_API

include_once APP_INC_PATH . "db_access.php";
$tpl = new Template_API();
$tpl->setTemplate("reports/weekly.tpl.html");
Auth::checkAuthentication(APP_COOKIE);
if (Auth::getCurrentRole() <= User::getRoleID("Customer")) {
    echo "Invalid role";
    exit;
}
$prj_id = Auth::getCurrentProject();
if (count(@$HTTP_POST_VARS["start"]) > 0 && @$HTTP_POST_VARS["start"]["Year"] != 0 && @$HTTP_POST_VARS["start"]["Month"] != 0 && @$HTTP_POST_VARS["start"]["Day"] != 0) {
    $start_date = join("-", $HTTP_POST_VARS["start"]);
}
if (count(@$HTTP_POST_VARS["end"]) > 0 && @$HTTP_POST_VARS["end"]["Year"] != 0 && @$HTTP_POST_VARS["end"]["Month"] != 0 && @$HTTP_POST_VARS["end"]["Day"] != 0) {
    $end_date = join("-", $HTTP_POST_VARS["end"]);
}
$tpl->assign(array("weeks" => Date_API::getWeekOptions(3, 0), "users" => Project::getUserAssocList($prj_id, 'active', User::getRoleID('Customer')), "start_date" => @$start_date, "end_date" => @$end_date, "report_type" => @$HTTP_POST_VARS["report_type"]));
if (!empty($HTTP_POST_VARS["developer"])) {
    //split date up
    if (@$HTTP_POST_VARS["report_type"] == "weekly") {
        $dates = explode("_", $HTTP_POST_VARS["week"]);
    } else {
        $dates = array($start_date, $end_date);
    }
    // print out emails
    $data = Report::getWeeklyReport($HTTP_POST_VARS["developer"], $dates[0], $dates[1], @$_REQUEST['separate_closed']);
    $tpl->assign("data", $data);
}
if (empty($HTTP_POST_VARS["week"])) {
    $tpl->assign("week", Date_API::getCurrentWeek());
} else {
    $tpl->assign("week", $HTTP_POST_VARS["week"]);
开发者ID:juliogallardo1326,项目名称:proc,代码行数:31,代码来源:weekly.php

示例4: date

$tpl->setTemplate('reports/stalled_issues.tpl.html');
Auth::checkAuthentication();
if (!Access::canAccessReports(Auth::getUserID())) {
    echo 'Invalid role';
    exit;
}
$prj_id = Auth::getCurrentProject();
if (count(@$_REQUEST['before']) < 1) {
    $before = date('Y-m-d', time() - Date_Helper::MONTH);
} else {
    $before = implode('-', $_REQUEST['before']);
}
if (count(@$_REQUEST['after']) < 1) {
    $after = date('Y-m-d', time() - Date_Helper::YEAR);
} else {
    $after = implode('-', $_REQUEST['after']);
}
if (empty($_REQUEST['sort_order'])) {
    $_REQUEST['sort_order'] = 'ASC';
}
$data = Report::getStalledIssuesByUser($prj_id, @$_REQUEST['developers'], @$_REQUEST['status'], $before, $after, $_REQUEST['sort_order']);
$groups = Group::getAssocList($prj_id);
$assign_options = array();
if (count($groups) > 0 && Auth::getCurrentRole() > User::ROLE_CUSTOMER) {
    foreach ($groups as $grp_id => $grp_name) {
        $assign_options["grp:{$grp_id}"] = 'Group: ' . $grp_name;
    }
}
$assign_options += Project::getUserAssocList($prj_id, 'active', User::ROLE_USER);
$tpl->assign(array('users' => $assign_options, 'before_date' => $before, 'after_date' => $after, 'data' => $data, 'developers' => @$_REQUEST['developers'], 'status_list' => Status::getAssocStatusList($prj_id), 'status' => @$_REQUEST['status'], 'sort_order' => $_REQUEST['sort_order']));
$tpl->displayTemplate();
开发者ID:dabielkabuto,项目名称:eventum,代码行数:31,代码来源:stalled_issues.php

示例5: date

$tpl->setTemplate("reports/stalled_issues.tpl.html");
Auth::checkAuthentication(APP_COOKIE);
if (Auth::getCurrentRole() <= User::getRoleID("Customer")) {
    echo "Invalid role";
    exit;
}
$prj_id = Auth::getCurrentProject();
if (count(@$_REQUEST['before']) < 1) {
    $before = date("Y-m-d", time() - MONTH);
} else {
    $before = join('-', $_REQUEST['before']);
}
if (count(@$_REQUEST['after']) < 1) {
    $after = date("Y-m-d", time() - YEAR);
} else {
    $after = join('-', $_REQUEST['after']);
}
if (empty($_REQUEST['sort_order'])) {
    $_REQUEST['sort_order'] = 'ASC';
}
$data = Report::getStalledIssuesByUser($prj_id, @$_REQUEST['developers'], @$_REQUEST['status'], $before, $after, $_REQUEST['sort_order']);
$groups = Group::getAssocList($prj_id);
$assign_options = array();
if (count($groups) > 0 && Auth::getCurrentRole() > User::getRoleID("Customer")) {
    foreach ($groups as $grp_id => $grp_name) {
        $assign_options["grp:{$grp_id}"] = "Group: " . $grp_name;
    }
}
$assign_options += Project::getUserAssocList($prj_id, 'active', User::getRoleID('Standard User'));
$tpl->assign(array("users" => $assign_options, "before_date" => $before, "after_date" => $after, "data" => $data, "developers" => @$_REQUEST['developers'], "status_list" => Status::getAssocStatusList($prj_id), "status" => @$_REQUEST['status'], "sort_order" => $_REQUEST['sort_order']));
$tpl->displayTemplate();
开发者ID:juliogallardo1326,项目名称:proc,代码行数:31,代码来源:stalled_issues.php

示例6: array

    if (@$HTTP_POST_VARS["cat"] == "update") {
        $res = Issue::update($HTTP_POST_VARS["issue_id"]);
        $tpl->assign("update_result", $res);
        if (Issue::hasDuplicates($HTTP_POST_VARS["issue_id"])) {
            $tpl->assign("has_duplicates", "yes");
        }
    }
    $prj_id = Auth::getCurrentProject();
    $setup = Setup::load();
    $tpl->assign("allow_unassigned_issues", @$setup["allow_unassigned_issues"]);
    // if currently selected release is in the past, manually add it to list
    $releases = Release::getAssocList($prj_id);
    if ($details["iss_pre_id"] != 0 && empty($releases[$details["iss_pre_id"]])) {
        $releases = array($details["iss_pre_id"] => $details["pre_title"]) + $releases;
    }
    if (Workflow::hasWorkflowIntegration($prj_id)) {
        $statuses = Workflow::getAllowedStatuses($prj_id, $issue_id);
        // if currently selected release is not on list, go ahead and add it.
    } else {
        $statuses = Status::getAssocStatusList($prj_id, false);
    }
    if (!empty($details['iss_sta_id']) && empty($statuses[$details['iss_sta_id']])) {
        $statuses[$details['iss_sta_id']] = Status::getStatusTitle($details['iss_sta_id']);
    }
    $tpl->assign(array("subscribers" => Notification::getSubscribers($issue_id), "categories" => Category::getAssocList($prj_id), "priorities" => Priority::getAssocList($prj_id), "status" => $statuses, "releases" => $releases, "resolutions" => Resolution::getAssocList(), "users" => Project::getUserAssocList($prj_id, 'active', User::getRoleID('Customer')), "assoc_issues" => array_map("htmlspecialchars", array()), "one_week_ts" => time() + 7 * DAY, "allow_unassigned_issues" => @$setup["allow_unassigned_issues"], "groups" => Group::getAssocList($prj_id)));
    $cookie = Auth::getCookieInfo(APP_PROJECT_COOKIE);
    if (!empty($cookie['auto_switched_from'])) {
        $tpl->assign(array("project_auto_switched" => 1, "old_project" => Project::getName($cookie['auto_switched_from'])));
    }
}
$tpl->displayTemplate();
开发者ID:juliogallardo1326,项目名称:proc,代码行数:31,代码来源:update.php

示例7: foreach

if (is_array($fields) && count($fields) > 0) {
    foreach ($fields as $field) {
        $custom_fields[$field['fld_id']] = $field['fld_title'];
        $options[$field['fld_id']] = Custom_Field::getOptions($field['fld_id']);
    }
} else {
    echo ev_gettext('No custom fields for this project');
    exit;
}
if (!empty($_REQUEST['start']['Year']) && !empty($_REQUEST['start']['Month']) && !empty($_REQUEST['start']['Day'])) {
    $start = implode('-', $_REQUEST['start']);
} else {
    $start = false;
}
if (!empty($_REQUEST['end']['Year']) && !empty($_REQUEST['end']['Month']) && !empty($_REQUEST['end']['Day'])) {
    $end = implode('-', $_REQUEST['end']);
} else {
    $end = false;
}
if (count(@$_GET['custom_field']) > 0) {
    $data = Report::getCustomFieldReport(@$_GET['custom_field'], @$_GET['custom_options'], @$_GET['group_by'], $start, $end, true, @$_REQUEST['interval'], @$_REQUEST['assignee']);
}
if ($start == false || ($end = false)) {
    $start = '--';
    $end = '--';
}
$tpl->assign(array('custom_fields' => $custom_fields, 'custom_field' => @$_GET['custom_field'], 'options' => $options, 'custom_options' => @$_GET['custom_options'], 'group_by' => @$_GET['group_by'], 'selected_options' => @$_REQUEST['custom_options'], 'data' => @$data, 'start_date' => $start, 'end_date' => $end, 'assignees' => Project::getUserAssocList($prj_id, 'active', User::ROLE_CUSTOMER), 'assignee' => @$_REQUEST['assignee']));
if (isset($_GET['custom_field'])) {
    $tpl->assign(array('field_info' => Custom_Field::getDetails($_GET['custom_field'])));
}
$tpl->displayTemplate();
开发者ID:dabielkabuto,项目名称:eventum,代码行数:31,代码来源:custom_fields.php

示例8: catch

        if (count($item) == 1) {
            $email_details = Support::getEmailDetails(Email_Account::getAccountByEmail($item[0]), $item[0]);
            $tpl->assign(array('issue_summary' => $email_details['sup_subject'], 'issue_description' => $email_details['seb_body']));
            // also auto pre-fill the customer contact text fields
            if (CRM::hasCustomerIntegration($prj_id)) {
                $sender_email = Mail_Helper::getEmailAddress($email_details['sup_from']);
                try {
                    $contact = $crm->getContactByEmail($sender_email);
                    $tpl->assign('contact_details', $contact->getDetails());
                } catch (CRMException $e) {
                }
            }
        }
    }
}
$tpl->assign(array('cats' => Category::getAssocList($prj_id), 'priorities' => Priority::getAssocList($prj_id), 'severities' => Severity::getList($prj_id), 'users' => Project::getUserAssocList($prj_id, 'active', User::getRoleID('Customer')), 'releases' => Release::getAssocList($prj_id), 'custom_fields' => Custom_Field::getListByProject($prj_id, 'report_form'), 'max_attachment_size' => Attachment::getMaxAttachmentSize(), 'max_attachment_bytes' => Attachment::getMaxAttachmentSize(true), 'field_display_settings' => Project::getFieldDisplaySettings($prj_id), 'groups' => Group::getAssocList($prj_id), 'products' => Product::getList(false)));
$prefs = Prefs::get($usr_id);
$tpl->assign('user_prefs', $prefs);
$tpl->assign('zones', Date_Helper::getTimezoneList());
if (Auth::getCurrentRole() == User::getRoleID('Customer')) {
    $crm = CRM::getInstance(Auth::getCurrentProject());
    $customer_contact_id = User::getCustomerContactID($usr_id);
    $contact = $crm->getContact($customer_contact_id);
    $customer_id = Auth::getCurrentCustomerID();
    $customer = $crm->getCustomer($customer_id);
    // TODOCRM: Pull contacts via ajax when user selects contract
    $tpl->assign(array('customer_id' => $customer_id, 'contact_id' => $customer_contact_id, 'customer' => $customer, 'contact' => $contact));
}
$clone_iss_id = isset($_GET['clone_iss_id']) ? (int) $_GET['clone_iss_id'] : null;
if ($clone_iss_id && Access::canCloneIssue($clone_iss_id, $usr_id)) {
    $tpl->assign(Issue::getCloneIssueTemplateVariables($clone_iss_id));
开发者ID:korusdipl,项目名称:eventum,代码行数:31,代码来源:new.php

示例9: getAssocUser

 /**
  * Method used to get an associative array of the list of users and the
  * total number of issues associated with each of them.
  *
  * @access  public
  * @return  array List of users
  */
 function getAssocUser()
 {
     $prj_id = Auth::getCurrentProject();
     $list = Project::getUserAssocList($prj_id, 'stats', User::getRoleID('Customer'));
     $stats = array();
     foreach ($list as $usr_id => $usr_full_name) {
         $stmt = "SELECT\n                        COUNT(*) AS total_items\n                     FROM\n                        " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "issue,\n                        " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "issue_user\n                     WHERE\n                        isu_iss_id=iss_id AND\n                        iss_prj_id={$prj_id} AND\n                        isu_usr_id=" . $usr_id;
         $res = (int) $GLOBALS["db_api"]->dbh->getOne($stmt);
         if ($res > 0) {
             $stats[$usr_full_name] = $res;
         }
     }
     arsort($stats);
     return $stats;
 }
开发者ID:juliogallardo1326,项目名称:proc,代码行数:22,代码来源:class.stats.php

示例10: getOptions

 /**
  * Returns the options associated with a specific field
  *
  * @param   string $field_name The name of the field
  * @param   integer $issue_id The ID of the issue
  * @return  array An array of options for the specified field
  */
 private static function getOptions($field_name, $issue_id)
 {
     $prj_id = Issue::getProjectID($issue_id);
     switch ($field_name) {
         case 'assignee':
             $users = Project::getUserAssocList($prj_id, 'active', User::ROLE_CUSTOMER);
             $current_assignees = Issue::getAssignedUserIDs($issue_id);
             foreach ($current_assignees as $usr_id) {
                 if (!isset($users[$usr_id])) {
                     $users[$usr_id] = User::getFullName($usr_id);
                 }
                 asort($users);
             }
             return $users;
         case 'priority':
             return Priority::getAssocList($prj_id);
         case 'severity':
             return Severity::getAssocList($prj_id);
     }
     return array();
 }
开发者ID:dabielkabuto,项目名称:eventum,代码行数:28,代码来源:class.issue_field.php

示例11: array

if (!isset($issue_fields_display['percent_complete']) || $issue_fields_display['percent_complete'] != false) {
    $columns[0][] = array('title' => ev_gettext('Percentage Complete'), 'data' => (empty($details['iss_percent_complete']) ? 0 : $details['iss_percent_complete']) . '%', 'field' => 'percentage_complete');
}
$columns[0][] = array('title' => ev_gettext('Reporter'), 'field' => 'reporter');
$products = Product::getAssocList(false);
if (count($products) > 0) {
    $columns[0][] = array('title' => ev_gettext('Product'), 'field' => 'product');
    $columns[0][] = array('title' => ev_gettext('Product Version'), 'field' => 'product_version');
}
$columns[0][] = array('title' => ev_gettext('Assignment'), 'data' => $details['assignments'], 'field' => 'assignment');
$columns[1][] = array('title' => ev_gettext('Notification List'), 'field' => 'notification_list');
$columns[1][] = array('title' => ev_gettext('Submitted Date'), 'data' => $details['iss_created_date']);
$columns[1][] = array('title' => ev_gettext('Last Updated Date'), 'data' => $details['iss_updated_date']);
$columns[1][] = array('title' => ev_gettext('Associated Issues'), 'field' => 'associated_issues');
if (!isset($issue_fields_display['expected_resolution']) || $issue_fields_display['expected_resolution'] != false) {
    $columns[1][] = array('title' => ev_gettext('Expected Resolution Date'), 'field' => 'expected_resolution');
}
if (!isset($issue_fields_display['estimated_dev_time']) || $issue_fields_display['estimated_dev_time'] != false) {
    $columns[1][] = array('title' => ev_gettext('Estimated Dev. Time'), 'data' => $details['iss_dev_time'] . empty($details['iss_dev_time']) ? '' : ' hours', 'field' => 'estimated_dev_time');
}
if ($role_id > User::getRoleID('Customer')) {
    $columns[1][] = array('title' => ev_gettext('Duplicates'), 'field' => 'duplicates', 'title_bgcolor' => APP_INTERNAL_COLOR);
    $columns[1][] = array('title' => ev_gettext('Authorized Repliers'), 'field' => 'authorized_repliers', 'title_bgcolor' => APP_INTERNAL_COLOR);
}
$groups = Group::getAssocList($prj_id);
if ($role_id > User::getRoleID('Customer') && count($groups) > 0) {
    $columns[1][] = array('title' => ev_gettext('Group'), 'data' => isset($details['group']) ? $details['group']['grp_name'] : '', 'title_bgcolor' => APP_INTERNAL_COLOR);
}
$tpl->assign(array('subscribers' => Notification::getSubscribers($issue_id), 'categories' => $categories, 'priorities' => $priorities, 'severities' => $severities, 'status' => $statuses, 'releases' => $releases, 'resolutions' => Resolution::getAssocList(), 'users' => Project::getUserAssocList($prj_id, 'active', User::getRoleID('Customer')), 'one_week_ts' => time() + 7 * Date_Helper::DAY, 'groups' => Group::getAssocList($prj_id), 'current_year' => date('Y'), 'products' => Product::getList(false), 'grid' => $columns));
$tpl->assign('usr_role_id', User::getRoleByUser($usr_id, $prj_id));
$tpl->displayTemplate();
开发者ID:korusdipl,项目名称:eventum,代码行数:31,代码来源:update.php

示例12: getAssocUser

 /**
  * Method used to get an associative array of the list of users and the
  * total number of issues associated with each of them.
  *
  * @param   boolean $hide_closed If closed issues should be hidden.
  * @return  array List of users
  */
 public static function getAssocUser($hide_closed = false)
 {
     $prj_id = Auth::getCurrentProject();
     $list = Project::getUserAssocList($prj_id, 'stats', User::ROLE_CUSTOMER);
     $stats = array();
     foreach ($list as $usr_id => $usr_full_name) {
         $stmt = 'SELECT
                     COUNT(*) AS total_items
                  FROM
                     {{%issue}},
                     {{%issue_user}},
                     {{%status}}
                  WHERE
                     iss_sta_id = sta_id AND
                     isu_iss_id=iss_id AND
                     iss_prj_id=? AND
                     isu_usr_id=?';
         if ($hide_closed) {
             $stmt .= ' AND
                     sta_is_closed = 0';
         }
         $res = (int) DB_Helper::getInstance()->getOne($stmt, array($prj_id, $usr_id));
         if ($res > 0) {
             $stats[$usr_full_name] = $res;
         }
     }
     arsort($stats);
     return $stats;
 }
开发者ID:dabielkabuto,项目名称:eventum,代码行数:36,代码来源:class.stats.php

示例13: list

        }
        // if we are dealing with just one message, use the subject line as the
        // summary for the issue, and the body as the description
        if (count($HTTP_GET_VARS["item"]) == 1) {
            $email_details = Support::getEmailDetails(Email_Account::getAccountByEmail($HTTP_GET_VARS["item"][0]), $HTTP_GET_VARS["item"][0]);
            $tpl->assign(array('issue_summary' => $email_details['sup_subject'], 'issue_description' => $email_details['message']));
            // also auto pre-fill the customer contact text fields
            if (Customer::hasCustomerIntegration($prj_id)) {
                $sender_email = Mail_API::getEmailAddress($email_details['sup_from']);
                list(, $contact_id) = Customer::getCustomerIDByEmails($prj_id, array($sender_email));
                if (!empty($contact_id)) {
                    $tpl->assign("contact_details", Customer::getContactDetails($prj_id, $contact_id));
                }
            }
        }
    }
}
$tpl->assign(array("cats" => Category::getAssocList($prj_id), "priorities" => Priority::getAssocList($prj_id), "users" => Project::getUserAssocList($prj_id, 'active', User::getRoleID('Customer')), "releases" => Release::getAssocList($prj_id), "custom_fields" => Custom_Field::getListByProject($prj_id, 'report_form'), "max_attachment_size" => Attachment::getMaxAttachmentSize(), "field_display_settings" => Project::getFieldDisplaySettings($prj_id), "groups" => Group::getAssocList($prj_id)));
$setup = Setup::load();
$tpl->assign("allow_unassigned_issues", @$setup["allow_unassigned_issues"]);
$prefs = Prefs::get($usr_id);
$tpl->assign("user_prefs", $prefs);
$tpl->assign("zones", Date_API::getTimezoneList());
if (User::getRole(Auth::getCurrentRole()) == "Customer") {
    $customer_contact_id = User::getCustomerContactID($usr_id);
    $tpl->assign("contact_details", Customer::getContactDetails($prj_id, $customer_contact_id));
    $customer_id = User::getCustomerID($usr_id);
    $tpl->assign("contacts", Customer::getContactEmailAssocList($prj_id, $customer_id));
    $tpl->assign(array("customer_id" => User::getCustomerID($usr_id), "contact_id" => User::getCustomerContactID($usr_id)));
}
$tpl->displayTemplate();
开发者ID:juliogallardo1326,项目名称:proc,代码行数:31,代码来源:new.php

示例14: array

 $columns[1][] = array('title' => ev_gettext('Associated Issues'), 'field' => 'associated_issues');
 if (!isset($issue_fields_display['expected_resolution']) || $issue_fields_display['expected_resolution'] != false) {
     $columns[1][] = array('title' => ev_gettext('Expected Resolution Date'), 'field' => 'expected_resolution');
 }
 if (!isset($issue_fields_display['estimated_dev_time']) || $issue_fields_display['estimated_dev_time'] != false) {
     $columns[1][] = array('title' => ev_gettext('Estimated Dev. Time'), 'data' => empty($details['iss_dev_time']) ? '' : $details['iss_dev_time'] . ' hours', 'field' => 'estimated_dev_time');
 }
 if ($role_id > User::getRoleID('Customer')) {
     $columns[1][] = array('title' => ev_gettext('Duplicates'), 'field' => 'duplicates', 'title_bgcolor' => APP_INTERNAL_COLOR);
     $columns[1][] = array('title' => ev_gettext('Authorized Repliers'), 'field' => 'authorized_repliers', 'title_bgcolor' => APP_INTERNAL_COLOR);
 }
 $groups = Group::getAssocList($prj_id);
 if ($role_id > User::getRoleID('Customer') && count($groups) > 0) {
     $columns[1][] = array('title' => ev_gettext('Group'), 'data' => isset($details['group']) ? $details['group']['grp_name'] : '', 'title_bgcolor' => APP_INTERNAL_COLOR);
 }
 $tpl->assign(array('next_issue' => @$sides['next'], 'previous_issue' => @$sides['previous'], 'subscribers' => Notification::getSubscribers($issue_id), 'custom_fields' => Custom_Field::getListByIssue($prj_id, $issue_id), 'files' => Attachment::getList($issue_id), 'emails' => Support::getEmailsByIssue($issue_id), 'zones' => Date_Helper::getTimezoneList(), 'users' => Project::getUserAssocList($prj_id, 'active', User::getRoleID('Customer')), 'ema_id' => Email_Account::getEmailAccount(), 'max_attachment_size' => Attachment::getMaxAttachmentSize(), 'quarantine' => Issue::getQuarantineInfo($issue_id), 'grid' => $columns, 'can_update' => Issue::canUpdate($issue_id, $usr_id), 'enabled_partners' => Partner::getPartnersByProject($prj_id), 'partners' => Partner::getPartnersByIssue($issue_id), 'issue_access' => Access::getIssueAccessArray($issue_id, $usr_id), 'is_user_notified' => Notification::isUserNotified($issue_id, $usr_id)));
 if ($role_id != User::getRoleID('customer')) {
     if (@$_COOKIE['show_all_drafts'] == 1) {
         $show_all_drafts = true;
     } else {
         $show_all_drafts = false;
     }
     if (Workflow::hasWorkflowIntegration($prj_id)) {
         $statuses = Workflow::getAllowedStatuses($prj_id, $issue_id);
         // if currently selected release is not on list, go ahead and add it.
     } else {
         $statuses = Status::getAssocStatusList($prj_id, false);
     }
     if (!empty($details['iss_sta_id']) && empty($statuses[$details['iss_sta_id']])) {
         $statuses[$details['iss_sta_id']] = Status::getStatusTitle($details['iss_sta_id']);
     }
开发者ID:korusdipl,项目名称:eventum,代码行数:31,代码来源:view.php

示例15: Template_API

// | 59 Temple Place - Suite 330                                          |
// | Boston, MA 02111-1307, USA.                                          |
// +----------------------------------------------------------------------+
// | Authors: João Prado Maia <jpm@mysql.com>                             |
// +----------------------------------------------------------------------+
//
// @(#) $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();
开发者ID:juliogallardo1326,项目名称:proc,代码行数:31,代码来源:searchbar.php


注:本文中的Project::getUserAssocList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。