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


PHP util_translate_name_ugroup函数代码示例

本文整理汇总了PHP中util_translate_name_ugroup函数的典型用法代码示例。如果您正苦于以下问题:PHP util_translate_name_ugroup函数的具体用法?PHP util_translate_name_ugroup怎么用?PHP util_translate_name_ugroup使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: getUserGroupDisplayName

 public static function getUserGroupDisplayName($name)
 {
     switch ($name) {
         case self::NOBODY:
             return $GLOBALS['Language']->getText('project_ugroup', 'ugroup_nobody');
         case self::ANON:
             return $GLOBALS['Language']->getText('project_ugroup', 'ugroup_anonymous_users');
         case self::AUTHENTICATED:
             $label = ForgeConfig::get(self::CONFIG_AUTHENTICATED_LABEL);
             if ($label == false) {
                 $label = $GLOBALS['Language']->getText('project_ugroup', 'ugroup_authenticated_users');
             }
             return $label;
         case self::REGISTERED:
             $label = ForgeConfig::get(self::CONFIG_REGISTERED_LABEL);
             if ($label == false) {
                 $label = $GLOBALS['Language']->getText('project_ugroup', 'ugroup_registered_users');
             }
             return $label;
         case self::PROJECT_MEMBERS:
             return $GLOBALS['Language']->getText('project_ugroup', 'ugroup_project_members');
         case self::PROJECT_ADMINS:
             return $GLOBALS['Language']->getText('project_ugroup', 'ugroup_project_admins');
         default:
             return util_translate_name_ugroup($name);
     }
 }
开发者ID:uniteddiversity,项目名称:tuleap,代码行数:27,代码来源:ForgeUGroup.php

示例2: getUgroups

 public function getUgroups()
 {
     if ($this->ugroups === null) {
         $result = ugroup_db_get_existing_ugroups($this->group->getId(), array($GLOBALS['UGROUP_ANONYMOUS'], $GLOBALS['UGROUP_REGISTERED'], $GLOBALS['UGROUP_PROJECT_MEMBERS'], $GLOBALS['UGROUP_PROJECT_ADMIN']));
         while ($row = db_fetch_array($result)) {
             $this->ugroups[$row['ugroup_id']] = util_translate_name_ugroup($row['name']);
         }
     }
     return $this->ugroups;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:10,代码来源:Docman_PermissionsExport.class.php

示例3: getContent

 public function getContent()
 {
     $content = '';
     // Import very long user group may takes very long time.
     ini_set('max_execution_time', 0);
     $ugroupName = util_translate_name_ugroup($this->row['name']);
     $ldapGroup = $this->ldap_user_group_manager->getLdapGroupByGroupId($this->ugroup->getId());
     $clean_ugroupName = $this->purifier->purify($ugroupName);
     $clean_ldapGroupName = $this->purifyLDAPGroupName($ldapGroup);
     $btn_update = $GLOBALS['Language']->getText('plugin_ldap', 'ugroup_edit_btn_update');
     $btn_unlink = $GLOBALS['Language']->getText('plugin_ldap', 'ugroup_edit_btn_unlink');
     $content .= '<h2>' . $GLOBALS['Language']->getText('project_admin_editugroup', 'ug_admin', $clean_ugroupName) . '</h2>';
     if ($ldapGroup !== null) {
         $content .= '<p>' . $GLOBALS['Language']->getText('plugin_ldap', 'ugroup_edit_ugroup_linked', array($clean_ugroupName, $clean_ldapGroupName)) . '</p>';
     }
     $content .= '<p>' . $GLOBALS['Language']->getText('plugin_ldap', 'ugroup_edit_group_you_can') . '</p>';
     $content .= '<ul>';
     if ($ldapGroup !== null) {
         $content .= '<li>' . $GLOBALS['Language']->getText('plugin_ldap', 'ugroup_edit_group_resync') . '</li>';
         $content .= '<li>' . $GLOBALS['Language']->getText('plugin_ldap', 'ugroup_edit_group_remove') . '</li>';
     }
     $content .= '<li>' . $GLOBALS['Language']->getText('plugin_ldap', 'ugroup_edit_group_link') . '</li>';
     $content .= '</ul>';
     $content .= '<p>' . $GLOBALS['Language']->getText('plugin_ldap', 'ugroup_edit_group_synchro') . '</p>';
     $content .= '<ul>';
     $content .= '<li>' . $GLOBALS['Language']->getText('plugin_ldap', 'ugroup_edit_group_synchro_del', $GLOBALS['sys_name']) . '</li>';
     $content .= '<li>' . $GLOBALS['Language']->getText('plugin_ldap', 'ugroup_edit_group_synchro_add', $GLOBALS['sys_name']) . '</li>';
     $content .= '</ul>';
     $content .= '<form name="plugin_ldap_edit_ugroup" method="post" action="">';
     $content .= '<input type="hidden" name="ugroup_id" value="' . $this->ugroup->getId() . '" />';
     $content .= '<input type="hidden" name="action" value="edit_directory" />';
     $content .= '<p>' . $GLOBALS['Language']->getText('plugin_ldap', 'ugroup_edit_group_bind_with_group') . ' <input type="text" name="bind_with_group" id="group_add" value="' . $clean_ldapGroupName . '"  size="60" /></p>';
     $preservingChecked = '';
     if ($this->ldap_user_group_manager->isMembersPreserving($this->ugroup->getId()) || $this->bindOption === LDAP_GroupManager::PRESERVE_MEMBERS_OPTION) {
         $preservingChecked = 'checked';
     }
     $content .= '<p>';
     $content .= '<label class="checkbox" for="preserve_members"><input type="checkbox" id="preserve_members" name="preserve_members" ' . $preservingChecked . '/>' . $GLOBALS['Language']->getText('plugin_ldap', 'ugroup_edit_group_preserve_members_option') . ' (' . $GLOBALS['Language']->getText('plugin_ldap', 'ugroup_edit_group_preserve_members_info') . ')</label></p>';
     $synchroChecked = '';
     if ($this->ldap_user_group_manager->isSynchronizedUgroup($this->ugroup->getId()) || $this->synchro === LDAP_GroupManager::AUTO_SYNCHRONIZATION) {
         $synchroChecked = 'checked';
     }
     $content .= '<p>';
     $content .= '<label class="checkbox" for="synchronize"><input type="checkbox" id="synchronize" name="synchronize" ' . $synchroChecked . '/>' . $GLOBALS['Language']->getText('plugin_ldap', 'ugroup_edit_group_synchronize_option') . ' (' . $GLOBALS['Language']->getText('plugin_ldap', 'ugroup_edit_group_synchronize_info') . ')</label></p>';
     $content .= '<input type="submit" name="submit" value="' . $btn_update . '" />';
     if ($ldapGroup !== null) {
         $content .= '&nbsp;&nbsp;';
         $content .= '<input type="submit" name="submit" value="' . $btn_unlink . '" />';
     }
     $GLOBALS['Response']->includeFooterJavascriptFile($this->pluginPath . '/scripts/autocomplete.js');
     $js = "new LdapGroupAutoCompleter('group_add',\n            '" . $this->pluginPath . "',\n            '" . util_get_dir_image_theme() . "',\n            'group_add',\n            false);";
     $GLOBALS['Response']->includeFooterJavascriptSnippet($js);
     $content .= '</form>';
     return $content;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:55,代码来源:EditDirectoryGroup.class.php

示例4: fetchCriteriaValue

 public function fetchCriteriaValue($criteria)
 {
     $hp = Codendi_HTMLPurifier::instance();
     $html = '';
     $criteria_value = $this->getCriteriaValue($criteria);
     $multiple = ' ';
     $size = ' ';
     $name = "criteria[{$this->id}][values][]";
     //Field values
     $permission_type = 'PLUGIN_TRACKER_ARTIFACT_ACCESS';
     $object_id = 0;
     $group_id = $this->getTracker()->getGroupId();
     //TODO :From permissions.php
     // Get ugroups already defined for this permission_type
     $res_ugroups = permission_db_authorized_ugroups($permission_type, $object_id);
     $nb_set = db_numrows($res_ugroups);
     // Now retrieve all possible ugroups for this project, as well as the default values
     $sql = "SELECT ugroup_id,is_default FROM permissions_values WHERE permission_type='{$permission_type}'";
     $res = db_query($sql);
     $predefined_ugroups = '';
     $default_values = array();
     if (db_numrows($res) < 1) {
         $html .= "<p><b>" . $GLOBALS['Language']->getText('global', 'error') . "</b>: " . $GLOBALS['Language']->getText('project_admin_permissions', 'perm_type_not_def', $permission_type);
         return $html;
     } else {
         while ($row = db_fetch_array($res)) {
             if ($predefined_ugroups) {
                 $predefined_ugroups .= ' ,';
             }
             $predefined_ugroups .= $row['ugroup_id'];
             if ($row['is_default']) {
                 $default_values[] = $row['ugroup_id'];
             }
         }
     }
     $sql = "SELECT * FROM ugroup WHERE group_id=" . $group_id . " OR ugroup_id IN (" . $predefined_ugroups . ") ORDER BY ugroup_id";
     $res = db_query($sql);
     $array = array();
     while ($row = db_fetch_array($res)) {
         $name_ugroup = util_translate_name_ugroup($row[1]);
         $array[] = array('value' => $row[0], 'text' => $name_ugroup);
     }
     //end permissions.php
     if ($criteria->is_advanced) {
         $multiple = ' multiple="multiple" ';
         $size = ' size="' . min(7, count($array) + 2) . '" ';
     }
     $html .= '<select id="tracker_report_criteria_' . ($criteria->is_advanced ? 'adv_' : '') . $this->id . '" 
                       name="' . $name . '" ' . $size . $multiple . '>';
     //Any value
     $selected = count($criteria_value) ? '' : 'selected="selected"';
     $html .= '<option value="" ' . $selected . '>' . $GLOBALS['Language']->getText('global', 'any') . '</option>';
     //None value
     $selected = isset($criteria_value[100]) ? 'selected="selected"' : '';
     $html .= '<option value="100" ' . $selected . '>' . $GLOBALS['Language']->getText('global', 'none') . '</option>';
     foreach ($array as $value) {
         $id = $value['value'];
         $selected = isset($criteria_value[$id]) ? 'selected="selected"' : '';
         $html .= '<option value="' . $value['value'] . '">';
         $html .= $value['text'];
         $html .= '</option>';
     }
     $html .= '</select>';
     return $html;
 }
开发者ID:nterray,项目名称:tuleap,代码行数:65,代码来源:Tracker_FormElement_Field_PermissionsOnArtifact.class.php

示例5: array

    echo $Language->getText('project_admin_index', 'member_request_delegation_desc_private_group');
} else {
    echo $Language->getText('project_admin_index', 'member_request_delegation_desc_restricted_user');
}
echo '</p></td></tr>';
//Retrieve the saved ugroups for notification from DB
$dar = $pm->getMembershipRequestNotificationUGroup($group_id);
if ($dar && !$dar->isError() && $dar->rowCount() > 0) {
    $selectedUgroup = array();
    foreach ($dar as $row) {
        $selectedUgroup[] = $row['ugroup_id'];
    }
} else {
    $selectedUgroup = array($GLOBALS['UGROUP_PROJECT_ADMIN']);
}
$ugroupList = array(array('value' => $GLOBALS['UGROUP_PROJECT_ADMIN'], 'text' => util_translate_name_ugroup('project_admin')));
$res = ugroup_db_get_existing_ugroups($group_id);
while ($row = db_fetch_array($res)) {
    $ugroupList[] = array('value' => $row['ugroup_id'], 'text' => $row['name']);
}
echo '<tr><td colspan="2" style="text-align: center;">';
echo '<form method="post" action="permission_request.php">';
echo '<input type="hidden" name="func" value="member_req_notif_group" />';
echo '<input type="hidden" name="group_id" value="' . $group_id . '">';
echo html_build_multiple_select_box_from_array($ugroupList, "ugroups[]", $selectedUgroup, 8, false, '', false, '', false, '', false);
echo '<br />';
echo '<input type="submit" name="submit" value="' . $Language->getText('global', 'btn_update') . '" />';
echo '</form>';
echo '</td></tr>';
echo '<tr><td colspan="2"><p>';
echo $Language->getText('project_admin_index', 'member_request_delegation_msg_desc');
开发者ID:pombredanne,项目名称:tuleap,代码行数:31,代码来源:permission_request.php

示例6: getAllowedNotifiedForTracker

 /**
  * Build a multi-select box of ugroups and roles selectable to fill the new date field reminder.
  * It contains: all dynamic ugroups plus project members and admins and the defined tracker roles
  *
  * @params Integer $reminderId Id of the date reminder we want to customize its notified
  *
  * @return String
  */
 protected function getAllowedNotifiedForTracker($reminderId = Null)
 {
     $res = ugroup_db_get_existing_ugroups($this->tracker->group_id, array($GLOBALS['UGROUP_PROJECT_MEMBERS'], $GLOBALS['UGROUP_PROJECT_ADMIN']));
     $selectedUgroups = '';
     $ugroups = array();
     $roles = array();
     if (!empty($reminderId)) {
         $reminder = $this->dateReminderFactory->getReminder($reminderId);
         $ugroups = $reminder->getUgroups(true);
         $roles = $reminder->getRoles();
         if ($roles) {
             foreach ($roles as $role) {
                 $selected[] = $role->getIdentifier();
             }
         }
     }
     $output = '<select name="reminder_notified[]" multiple size=7 >';
     $output .= '<optgroup label="' . $GLOBALS['Language']->getText('project_admin_utils', 'tracker_date_reminder_optgroup_label_ugroup') . '" >';
     while ($row = db_fetch_array($res)) {
         if ($ugroups && in_array($row['ugroup_id'], $ugroups)) {
             $output .= '<option value="u_' . intval($row['ugroup_id']) . '" selected>' . util_translate_name_ugroup($row['name']) . '</option>';
         } else {
             $output .= '<option value="u_' . intval($row['ugroup_id']) . '">' . util_translate_name_ugroup($row['name']) . '</option>';
         }
     }
     $output .= '</optgroup>';
     $output .= '<optgroup label="' . $GLOBALS['Language']->getText('project_admin_utils', 'tracker_date_reminder_optgroup_label_role') . '">';
     $all_possible_roles = array(new Tracker_DateReminder_Role_Submitter(), new Tracker_DateReminder_Role_Assignee(), new Tracker_DateReminder_Role_Commenter());
     $purifier = Codendi_HTMLPurifier::instance();
     foreach ($all_possible_roles as $role) {
         if ($roles && in_array($role, $roles)) {
             $output .= '<option value="r_' . $purifier->purify($role->getIdentifier()) . '" selected>' . $purifier->purify($role->getLabel()) . '</option>';
         } else {
             $output .= '<option value="r_' . $purifier->purify($role->getIdentifier()) . '">' . $purifier->purify($role->getLabel()) . '</option>';
         }
     }
     $output .= '</optgroup>';
     $output .= '</select>';
     return $output;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:48,代码来源:Tracker_DateReminderRenderer.class.php

示例7: header

            header('Content-Disposition: filename=' . $name);
            header('Content-Type: text/csv');
            echo build_csv_header($col_list, $lbl_list) . $eol;
            $ugs = ugroup_db_get_existing_ugroups($group_id, array($GLOBALS['UGROUP_PROJECT_MEMBERS'], $GLOBALS['UGROUP_PROJECT_ADMIN']));
            while ($ugrp = db_fetch_array($ugs)) {
                if ($ugrp['ugroup_id'] <= 100) {
                    $sqlUsers = ugroup_db_get_dynamic_members($ugrp['ugroup_id'], false, $group_id);
                } else {
                    $sqlUsers = ugroup_db_get_members($ugrp['ugroup_id']);
                }
                $users = db_query($sqlUsers);
                while ($user = db_fetch_array($users)) {
                    $r = array('group' => util_translate_name_ugroup($ugrp['name']), 'username' => $user['user_name'], 'realname' => $um->getUserById($user['user_id'])->getRealname());
                    echo build_csv_record($col_list, $r) . $eol;
                }
            }
            break;
        case 'user_groups_format':
            echo '<h3>' . $Language->getText('project_export_user_groups', 'exp_format') . '</h3>';
            echo '<p>' . $Language->getText('project_export_user_groups', 'exp_format_msg') . '</p>';
            // Pick-up a random project member
            $sqlUsers = ugroup_db_get_dynamic_members($GLOBALS['UGROUP_PROJECT_MEMBERS'], false, $group_id);
            $users = db_query($sqlUsers);
            $uRow = db_fetch_array($users);
            $user = $um->getUserById($uRow['user_id']);
            $dsc_list = array('group' => $GLOBALS['Language']->getText('project_export_user_groups', 'user_group_desc'), 'username' => $GLOBALS['Language']->getText('project_export_user_groups', 'user_username_desc', array($GLOBALS['sys_name'])), 'realname' => $GLOBALS['Language']->getText('project_export_user_groups', 'user_realname_desc'));
            $record = array('group' => util_translate_name_ugroup('project_members'), 'username' => $user->getName(), 'realname' => $user->getRealName());
            display_exported_fields($col_list, $lbl_list, $dsc_list, $record);
            break;
    }
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:31,代码来源:user_groups_export.php

示例8: getUgroupLabel

 protected function getUgroupLabel($ugroup_id)
 {
     return util_translate_name_ugroup($this->getUgroupName($ugroup_id));
 }
开发者ID:uniteddiversity,项目名称:tuleap,代码行数:4,代码来源:Tracker_Artifact_ChangesetValue_PermissionsOnArtifact.class.php

示例9: while

while ($row = db_fetch_array($result)) {
    if ($project->usesDocman() || $row['name'] != 'ugroup_document_tech_name_key' && $row['name'] != 'ugroup_document_admin_name_key') {
        $ugroupRow[100] = util_translate_name_ugroup($row['name']) . ' *';
        $ugroupRow[200] = util_translate_desc_ugroup($row['description']);
        $ugroupRow[300] = array('value' => '-', 'html_attrs' => 'align="center"');
        $ugroupRow[400] = array('value' => '-', 'html_attrs' => 'align="center"');
        $em->processEvent('ugroup_table_row', array('row' => $row, 'html_array' => &$ugroupRow));
        ksort($ugroupRow);
        format_html_row($ugroupRow, $row_num);
    }
}
if ($group_id != 100) {
    $result = db_query("SELECT * FROM ugroup WHERE group_id={$group_id} ORDER BY name");
    if (db_numrows($result) > 0) {
        while ($row = db_fetch_array($result)) {
            $ugroupRow[100] = '<a href="/project/admin/editugroup.php?group_id=' . $group_id . '&ugroup_id=' . $row['ugroup_id'] . '&func=edit">' . util_translate_name_ugroup($row['name']);
            $ugroupRow[200] = util_translate_desc_ugroup($row['description']);
            $res2 = db_query("SELECT count(*) FROM ugroup_user WHERE ugroup_id=" . $row['ugroup_id']);
            $nb_members = db_result($res2, 0, 0);
            if ($nb_members) {
                $ugroupRow[300] = array('value' => $nb_members, 'html_attrs' => 'align="center"');
            } else {
                $ugroupRow[300] = array('value' => 0, 'html_attrs' => 'align="center"');
            }
            $token = $csrf->getTokenName() . '=' . $csrf->getToken();
            $link = '?group_id=' . $group_id . '&ugroup_id=' . $row['ugroup_id'] . '&func=delete&' . $token;
            $warn = $Language->getText('project_admin_ugroup', 'del_ug');
            $alt = $Language->getText('project_admin_servicebar', 'del');
            $ugroupRow[400] = html_trash_link($link, $warn, $alt);
            $em->processEvent('ugroup_table_row', array('row' => $row, 'html_array' => &$ugroupRow));
            ksort($ugroupRow);
开发者ID:nterray,项目名称:tuleap,代码行数:31,代码来源:ugroup.php

示例10: ugroup_get_all_dynamic_members

/**
 * Retrieve all dynamic groups' members except ANONYMOUS, NONE, REGISTERED
 * @param Integer $group_id
 * @param Integer $atid
 * @return Array
 */
function ugroup_get_all_dynamic_members($group_id, $atid = 0)
{
    $members = array();
    $sql = array();
    $ugroups = array();
    //retrieve dynamic ugroups id and name
    $rs = db_query("SELECT ugroup_id, name FROM ugroup WHERE ugroup_id IN (" . implode(',', $GLOBALS['UGROUPS']) . ") ");
    while ($row = db_fetch_array($rs)) {
        $ugroups[$row['ugroup_id']] = $row['name'];
    }
    foreach ($GLOBALS['UGROUPS'] as $ugroup_id) {
        if ($ugroup_id == $GLOBALS['UGROUP_ANONYMOUS'] || $ugroup_id == $GLOBALS['UGROUP_REGISTERED'] || $ugroup_id == $GLOBALS['UGROUP_NONE']) {
            continue;
        }
        $sql = ugroup_db_get_dynamic_members($ugroup_id, $atid, $group_id);
        $rs = db_query($sql);
        while ($row = db_fetch_array($rs)) {
            $members[] = array('ugroup_id' => $ugroup_id, 'name' => util_translate_name_ugroup($ugroups[$ugroup_id]), 'user_id' => $row['user_id'], 'user_name' => $row['user_name']);
        }
    }
    return $members;
}
开发者ID:pdaniel-frk,项目名称:tuleap,代码行数:28,代码来源:ugroup_utils.php

示例11: displayDateFieldNotificationSettings

 /**
  *  Display Date Field Notification Settings form
  *
  * @param
  * @return void
  */
 function displayDateFieldNotificationSettings(ArtifactType $at, ArtifactField $field)
 {
     //get date field reminder settings from database
     $tdrArtifactField = new TrackerDateReminder_ArtifactField();
     $res = $tdrArtifactField->getDateFieldReminderSettings($field->getID(), $at->getID());
     $enabled = db_numrows($res) == 1;
     $start = db_result($res, 0, 'notification_start');
     $frequency = db_result($res, 0, 'frequency');
     $recurse = db_result($res, 0, 'recurse');
     $notified_people = db_result($res, 0, 'notified_people');
     $notified_groups = array();
     $notified_users = array();
     if (trim($notified_people) != "") {
         $notif = explode(",", $notified_people);
         foreach ($notif as $value) {
             if (preg_match("/^g/", $value)) {
                 array_push($notified_groups, $value);
             } else {
                 array_push($notified_users, $value);
             }
         }
     }
     if (count($notified_groups) == 0) {
         $notified_groups[] = '100';
     }
     if (count($notified_users) == 0) {
         $notified_users[] = '100';
     }
     $notif_type = db_result($res, 0, 'notification_type');
     if ($notif_type == 1) {
         $after = "selected";
         $before = "";
     } else {
         $after = "";
         $before = "selected";
     }
     $out = '';
     $baseActionUrl = '/tracker/admin/index.php?func=date_field_notification&group_id=' . $at->Group->getID() . '&atid=' . $at->getID() . '&field_id=' . $field->getID();
     if ($enabled) {
         $out .= '<H3>' . $GLOBALS['Language']->getText('plugin_tracker_date_reminder', 'notif_settings_del_title') . '</H3>';
         $out .= '<FORM ACTION="' . $baseActionUrl . '&delete_reminder=true" METHOD="POST">';
         $out .= '<P>' . $GLOBALS['Language']->getText('plugin_tracker_date_reminder', 'notif_settings_del_desc') . '</P>';
         $out .= '<INPUT TYPE="SUBMIT" NAME="reminder" VALUE="' . $GLOBALS['Language']->getText('plugin_tracker_date_reminder', 'notif_settings_del_button') . '" />';
         $out .= '</FORM>';
     }
     $out .= '<FORM ACTION="' . $baseActionUrl . '" METHOD="POST" name="date_field_notification_settings_form">
         <INPUT TYPE="HIDDEN" NAME="field_id" VALUE="' . $field->getID() . '">
         <INPUT TYPE="HIDDEN" NAME="group_id" VALUE="' . $at->Group->getID() . '">
         <INPUT TYPE="HIDDEN" NAME="atid" VALUE="' . $at->getID() . '">';
     $out .= '<h3>' . $GLOBALS['Language']->getText('plugin_tracker_date_reminder', 'notif_settings_field', array($field->getLabel())) . '</h3>';
     $out .= '<fieldset>
         <TABLE BORDER="0" WIDTH="930px"><TR height="30"><TD>' . $GLOBALS['Language']->getText('plugin_tracker_date_reminder', 'reminder_form_part1', array($field->getLabel())) . '</TD><TD> <INPUT TYPE="TEXT" NAME="start" SIZE="5" VALUE="' . $start . '"> ' . $GLOBALS['Language']->getText('plugin_tracker_date_reminder', 'days') . '</TD><TD colspan=3">
         <SELECT NAME="notif_type">
             <OPTION VALUE="0" ' . $before . '>' . $GLOBALS['Language']->getText('plugin_tracker_date_reminder', 'notify_before') . '
             <OPTION VALUE="1" ' . $after . '>' . $GLOBALS['Language']->getText('plugin_tracker_date_reminder', 'notify_after') . '
         </SELECT> ' . $GLOBALS['Language']->getText('plugin_tracker_date_reminder', 'reminder_form_part2') . '</TD></TR><TR><TD valign="top">' . $GLOBALS['Language']->getText('plugin_tracker_date_reminder', 'reminder_form_part3') . ' <INPUT TYPE="TEXT" NAME="recurse" SIZE="5" VALUE="' . $recurse . '"> ' . $GLOBALS['Language']->getText('plugin_tracker_date_reminder', 'reminder_form_part4') . '</TD><TD valign="top"> ';
     $artRoleNames = array(array('value' => '1', 'text' => $GLOBALS['Language']->getText('tracker_common_types', 'role_SUBMITTER_short_desc')), array('value' => '2', 'text' => $GLOBALS['Language']->getText('tracker_common_types', 'role_ASSIGNEE_short_desc')), array('value' => '3', 'text' => $GLOBALS['Language']->getText('tracker_common_types', 'role_CC_short_desc')), array('value' => '4', 'text' => $GLOBALS['Language']->getText('tracker_common_types', 'role_COMMENTER_short_desc')));
     $out .= html_build_multiple_select_box_from_array($artRoleNames, 'notified_users[]', $notified_users, 4, true, '', false, '', false, '', false);
     $out .= '</TD><TD valign="top">' . $GLOBALS['Language']->getText('global', 'and') . ' </TD>
         <TD valign="top">';
     $qry = sprintf('SELECT ugroup_id, name FROM ugroup' . ' WHERE (group_id = %d || group_id = 100)' . ' AND ugroup_id <> 1' . ' AND ugroup_id <> 2' . ' AND ugroup_id <> 100', db_ei($at->Group->getID()));
     $res = db_query($qry);
     while ($rows = db_fetch_array($res)) {
         $groupNames[] = array('value' => 'g' . $rows['ugroup_id'], 'text' => util_translate_name_ugroup($rows['name']));
     }
     $out .= html_build_multiple_select_box_from_array($groupNames, 'notified_groups[]', $notified_groups, 8, true, '', false, '', false, '', false);
     $out .= '</SELECT></TD><TD valign="top">' . $GLOBALS['Language']->getText('plugin_tracker_date_reminder', 'reminder_form_part5') . ' <INPUT TYPE="TEXT" NAME="frequency" SIZE="5" VALUE="' . $frequency . '"> ' . $GLOBALS['Language']->getText('plugin_tracker_date_reminder', 'days') . '.</TD></TR></TABLE><INPUT TYPE="SUBMIT" NAME="submit_notif_settings" value="' . $GLOBALS['Language']->getText('global', 'btn_update') . '"></P></FORM></fieldset><P>' . $GLOBALS['Language']->getText('plugin_tracker_date_reminder', 'reminder_form_part6', array($field->getLabel())) . '<P>' . $GLOBALS['Language']->getText('plugin_tracker_date_reminder', 'reminder_form_part7', array($field->getLabel())) . '</P>' . '<P>';
     echo $out;
 }
开发者ID:nterray,项目名称:tuleap,代码行数:75,代码来源:TrackerDateReminder_ArtifactFieldHtml.class.php

示例12: array

	Delegate notifications
*/
$HTML->box1_top($Language->getText('project_admin_index', 'member_request_delegation_title'));
//Retrieve the saved ugroups for notification from DB
$selectedUgroup = array();
$dar = $pm->getMembershipRequestNotificationUGroup($group_id);
if ($dar && !$dar->isError() && $dar->rowCount() > 0) {
    foreach ($dar as $row) {
        if ($row['ugroup_id'] == $GLOBALS['UGROUP_PROJECT_ADMIN']) {
            $selectedUgroup[] = util_translate_name_ugroup('project_admin');
        } else {
            $selectedUgroup[] = ugroup_get_name_from_id($row['ugroup_id']);
        }
    }
} else {
    $selectedUgroup = array(util_translate_name_ugroup('project_admin'));
}
echo '<b>' . $Language->getText('project_admin_utils', 'selected_ugroups_title') . '</b>';
echo '<ul>';
foreach ($selectedUgroup as $ugroup) {
    echo '<li>' . $ugroup . '</li>';
}
echo '</ul>';
$message = $GLOBALS['Language']->getText('project_admin_index', 'member_request_delegation_msg_to_requester');
$pm = ProjectManager::instance();
$dar = $pm->getMessageToRequesterForAccessProject($group_id);
if ($dar && !$dar->isError() && $dar->rowCount() == 1) {
    $row = $dar->current();
    if ($row['msg_to_requester'] != "member_request_delegation_msg_to_requester") {
        $message = $row['msg_to_requester'];
    }
开发者ID:pombredanne,项目名称:tuleap,代码行数:31,代码来源:index.php

示例13: permission_display_selection_frs

function permission_display_selection_frs($permission_type, $object_id = null, $group_id)
{
    $html = '';
    // Get ugroups already defined for this permission_type
    $res_ugroups = permission_db_authorized_ugroups($permission_type, $object_id);
    $nb_set = db_numrows($res_ugroups);
    // Now retrieve all possible ugroups for this project, as well as the default values
    $sql = "SELECT ugroup_id,is_default FROM permissions_values WHERE permission_type='" . db_es($permission_type) . "'";
    $res = db_query($sql);
    $predefined_ugroups = '';
    $default_values = array();
    if (db_numrows($res) < 1) {
        $html .= "<p><b>" . $GLOBALS['Language']->getText('global', 'error') . "</b>: " . $GLOBALS['Language']->getText('project_admin_permissions', 'perm_type_not_def', $permission_type);
        return $html;
    } else {
        while ($row = db_fetch_array($res)) {
            if ($predefined_ugroups) {
                $predefined_ugroups .= ' ,';
            }
            $predefined_ugroups .= $row['ugroup_id'];
            if ($row['is_default']) {
                $default_values[] = $row['ugroup_id'];
            }
        }
    }
    $sql = "SELECT * FROM ugroup WHERE group_id=" . db_ei($group_id) . " OR ugroup_id IN (" . $predefined_ugroups . ") ORDER BY ugroup_id";
    $res = db_query($sql);
    $array = array();
    while ($row = db_fetch_array($res)) {
        $name = util_translate_name_ugroup($row[1]);
        $array[] = array('value' => $row[0], 'text' => $name);
    }
    $html .= html_build_multiple_select_box($array, "ugroups[]", $nb_set ? util_result_column_to_array($res_ugroups) : $default_values, 8, false, util_translate_name_ugroup('ugroup_nobody_name_key'), false, '', false, '', false);
    $html .= '<p>' . $GLOBALS['Language']->getText('project_admin_permissions', 'admins_create_modify_ug', array("/project/admin/editugroup.php?func=create&group_id={$group_id}", "/project/admin/ugroup.php?group_id={$group_id}"));
    echo $html;
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:36,代码来源:permissions.php

示例14: getUgroupLabel

 protected function getUgroupLabel($u_group)
 {
     $row = $this->getDao()->searchByUGroupId($u_group)->getRow();
     return util_translate_name_ugroup($row['name']);
 }
开发者ID:pdaniel-frk,项目名称:tuleap,代码行数:5,代码来源:Tracker_Artifact_ChangesetValue_PermissionsOnArtifact.class.php

示例15: displayProjectHistoryResults

/**
 * Display the retrieved reult set
 *
 * @param Integer $group_id Id of the project
 * @param Array   $res      Contains the retrieved results
 * @param Boolean $export   Switch CSV export mode or HTML display
 * @param unknown_type $i   Line number indicator
 *
 * @return string html
 */
function displayProjectHistoryResults($group_id, $res, $export = false, &$i = 1)
{
    global $Language;
    $html = '';
    $hp = Codendi_HTMLPurifier::instance();
    while ($row = $res['history']->getRow()) {
        $field = $row['field_name'];
        // see if there are any arguments after the message key
        // format is "msg_key ## arg1||arg2||...
        // If msg_key cannot be found in the localized message
        // catalog then display the msg has is because this is very
        // likely a legacy message (pre-localization version)
        if (strpos($field, " %% ") !== false) {
            list($msg_key, $args) = explode(" %% ", $field);
            if ($args) {
                $arr_args = explode('||', $args);
            }
        } else {
            $msg_key = $field;
            $arr_args = "";
        }
        $msg = $Language->getText('project_admin_utils', $msg_key, $arr_args);
        if (!(strpos($msg, "*** Unkown msg") === false)) {
            $msg = $field;
        }
        if (!$export) {
            $html .= '<TR class="' . html_get_alt_row_color($i++) . '"><TD>' . $hp->purify($msg, CODENDI_PURIFIER_BASIC, $group_id) . '</TD><TD>';
        }
        $val = $row['old_value'];
        //Translate dynamic ugroup name for permission entries
        if (strstr($msg_key, "perm_granted_for_") || strstr($msg_key, "perm_reset_for_") || strstr($msg_key, "membership_request_updated")) {
            $ugroupList = explode(",", $val);
            $val = '';
            foreach ($ugroupList as $ugroup) {
                if ($val) {
                    $val .= ', ';
                }
                $val .= util_translate_name_ugroup($ugroup);
            }
        } else {
            if ($msg_key == "group_type") {
                $template =& TemplateSingleton::instance();
                $val = $template->getLabel($val);
            }
        }
        if ($export) {
            $documents_body = array('event' => $hp->purify($msg, CODENDI_PURIFIER_BASIC, $group_id), 'val' => $hp->purify($val), 'date' => format_date($GLOBALS['Language']->getText('system', 'datefmt'), $row['date']), 'by' => UserHelper::instance()->getDisplayNameFromUserName($row['user_name']));
            $html .= build_csv_record(array('event', 'val', 'date', 'by'), $documents_body) . "\n";
        } else {
            $html .= $hp->purify($val);
            $user = UserManager::instance()->getUserByUserName($row['user_name']);
            $html .= '</TD><TD>' . format_date($GLOBALS['Language']->getText('system', 'datefmt'), $row['date']) . '</TD><TD>' . UserHelper::instance()->getLinkOnUser($user) . '</TD></TR>';
        }
    }
    return $html;
}
开发者ID:rinodung,项目名称:tuleap,代码行数:66,代码来源:project_admin_utils.php


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