本文整理汇总了PHP中w2p_Theme_TitleBlock::addViewLink方法的典型用法代码示例。如果您正苦于以下问题:PHP w2p_Theme_TitleBlock::addViewLink方法的具体用法?PHP w2p_Theme_TitleBlock::addViewLink怎么用?PHP w2p_Theme_TitleBlock::addViewLink使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类w2p_Theme_TitleBlock
的用法示例。
在下文中一共展示了w2p_Theme_TitleBlock::addViewLink方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: submitIt
$projects = $prj->getAllowedProjects($AppUI->user_id, false);
} else {
$projects = $prj->getAllowedProjects($AppUI->user_id, true);
}
foreach ($projects as $project_id => $project_info) {
$projects[$project_id] = $project_info['project_name'];
}
$projects = arrayMerge(array(0 => $AppUI->_('All Projects')), $projects);
// check permissions for this record
$perms =& $AppUI->acl();
$users = $perms->getPermittedUsers('forums');
// setup the title block
$ttl = $object_id > 0 ? 'Edit Forum' : 'Add Forum';
$titleBlock = new w2p_Theme_TitleBlock($ttl, 'icon.png', $m);
$titleBlock->addCrumb('?m=' . $m, $m . ' list');
$titleBlock->addViewLink('forum', $object_id, 'viewer');
$titleBlock->show();
?>
<script language="javascript" type="text/javascript">
function submitIt(){
var form = document.editFrm;
if(form.forum_name.value.search(/^\s*$/) >= 0 ) {
alert("<?php
echo $AppUI->_('forumName', UI_OUTPUT_JS);
?>
");
form.forum_name.focus();
} else if(form.forum_owner.value < 1) {
alert("<?php
echo $AppUI->_('forumSelectOwner', UI_OUTPUT_JS);
?>
示例2: array
if ($obj) {
$object = $obj;
$object_id = $object->getId();
} else {
$object->load($object_id);
}
if (!$object && $object_id > 0) {
$AppUI->setMsg('Company');
$AppUI->setMsg('invalidID', UI_MSG_ERROR, true);
$AppUI->redirect('m=' . $m);
}
// setup the title block
$ttl = $object_id > 0 ? 'Edit Company' : 'Add Company';
$titleBlock = new w2p_Theme_TitleBlock($ttl, 'icon.png', $m);
$titleBlock->addCrumb('?m=' . $m, $m . ' list');
$titleBlock->addViewLink('company', $object_id);
$titleBlock->show();
// load the company types
$types = w2PgetSysVal('CompanyType');
$countries = array('' => $AppUI->_('(Select a Country)')) + w2PgetSysVal('GlobalCountriesPreferred') + array('-' => '----') + w2PgetSysVal('GlobalCountries');
?>
<script language="javascript" type="text/javascript">
function submitIt() {
var form = document.editFrm;
if (form.company_name.value.length < 3) {
alert( "<?php
echo $AppUI->_('companyValidName', UI_OUTPUT_JS);
?>
" );
form.company_name.focus();
} else {
示例3: buildTaskTree
$parents[$sub_task['task_parent']][] = $sub_task['task_id'];
$all_tasks[$sub_task['task_id']] = $sub_task;
build_date_list($projTasksWithEndDates, $sub_task);
}
$task_parent_options = '';
$root_tasks = $object->getRootTasks((int) $task_project);
foreach ($root_tasks as $root_task) {
build_date_list($projTasksWithEndDates, $root_task);
if ($root_task['task_id'] != $object_id) {
$task_parent_options .= buildTaskTree($root_task, 0, array(), $all_tasks, $parents, $task_parent, $object_id);
}
}
// setup the title block
$ttl = $object_id > 0 ? 'Edit Task' : 'Add Task';
$titleBlock = new w2p_Theme_TitleBlock($ttl, 'icon.png', $m);
$titleBlock->addViewLink('project', $task_project);
$titleBlock->addViewLink('task', $object_id);
$titleBlock->show();
// Get contacts list
$selected_contacts = array();
if ($object_id) {
$myContacts = $object->getContacts(null, $object_id);
$selected_contacts = array_keys($myContacts);
}
if ($object_id == 0 && (isset($contact_id) && $contact_id > 0)) {
$selected_contacts[] = '' . $contact_id;
}
$department_selection_list = array();
$department = new CDepartment();
$deptList = $department->departments($project->project_company);
foreach ($deptList as $dept) {
示例4: CContact
if ($contact_id) {
$object = new CContact();
$object->load($contact_id);
} else {
$object = new CUser();
$object->loadFull($object_id);
}
// pull companies
$company = new CCompany();
$companies = $company->getAllowedRecords($AppUI->user_id, 'company_id,company_name', 'company_name');
$companies = arrayMerge(array('0' => ''), $companies);
// setup the title block
$ttl = $object_id ? 'Edit User' : 'Add User';
$titleBlock = new w2p_Theme_TitleBlock($ttl, 'icon.png', $m);
$titleBlock->addCrumb('?m=' . $m, $m . ' list');
$titleBlock->addViewLink('user', $object_id);
$titleBlock->addViewLink('contact', $object->contact_id);
if ($object_id) {
if ($canEdit || $object_id == $AppUI->user_id) {
$titleBlock->addCrumb('?m=system&a=addeditpref&user_id=' . $object_id, 'edit preferences');
}
if ($canDelete) {
$titleBlock->addCrumbDelete('delete User', $canDelete, $msg);
}
}
$titleBlock->show();
$AppUI->getTheme()->addFooterJavascriptFile('js/passwordstrength.js');
?>
<script language="javascript" type="text/javascript">
function submitIt(){
var form = document.editFrm;
示例5: intval
$companies[$object->project_company] = $company->load($object->project_company)->company_name;
}
// get critical tasks (criteria: task_end_date)
$criticalTasks = $object_id > 0 ? $object->getCriticalTasks() : null;
// get ProjectPriority from sysvals
$projectPriority = w2PgetSysVal('ProjectPriority');
// format dates
$df = $AppUI->getPref('SHDATEFORMAT');
$end_date = intval($object->project_end_date) ? new w2p_Utilities_Date($object->project_end_date) : null;
$actual_end_date = intval($criticalTasks[0]['task_end_date']) ? new w2p_Utilities_Date($criticalTasks[0]['task_end_date']) : null;
$style = $actual_end_date > $end_date && !empty($end_date) ? 'style="color:red; font-weight:bold"' : '';
// setup the title block
$ttl = $object_id > 0 ? 'Edit Project' : 'New Project';
$titleBlock = new w2p_Theme_TitleBlock($ttl, 'icon.png', $m);
$titleBlock->addCrumb('?m=' . $m, $m . ' list');
$titleBlock->addViewLink('project', $object_id);
$titleBlock->show();
$canDelete = $object->canDelete();
// Get contacts list
$selected_contacts = array();
if ($object_id) {
$myContacts = $object->getContactList();
$selected_contacts = array_keys($myContacts);
}
if ($object_id == 0 && $contact_id > 0) {
$selected_contacts[] = '' . $contact_id;
}
// Get the users notification options
$tl = $AppUI->getPref('TASKLOGEMAIL');
$ta = $tl & 1;
$tt = $tl & 2;
示例6: CProject
if ($object_id == 0) {
$assigned[$AppUI->user_id] = $AppUI->user_display_name;
} else {
$assigned = $object->getAssigned();
}
//check if the user has view permission over the project
if ($object->event_project && !$perms->checkModuleItem('projects', 'view', $object->event_project)) {
$AppUI->redirect(ACCESS_DENIED);
}
// setup the title block
$titleBlock = new w2p_Theme_TitleBlock($object_id ? 'Edit Event' : 'Add Event', 'icon.png', $m);
$titleBlock->addCrumb('?m=events&a=year_view&date=' . $start_date->format(FMT_TIMESTAMP_DATE), 'year view');
$titleBlock->addCrumb('?m=events&date=' . $start_date->format(FMT_TIMESTAMP_DATE), 'month view');
$titleBlock->addCrumb('?m=events&a=week_view&date=' . $start_date->format(FMT_TIMESTAMP_DATE), 'week view');
$titleBlock->addCrumb('?m=events&a=day_view&date=' . $start_date->format(FMT_TIMESTAMP_DATE) . '&tab=0', 'day view');
$titleBlock->addViewLink('event', $object_id);
$titleBlock->show();
// format dates
$df = $AppUI->getPref('SHDATEFORMAT');
// pull projects
$all_projects = '(' . $AppUI->_('All', UI_OUTPUT_RAW) . ')';
$prj = new CProject();
$projects = $prj->getAllowedProjects($AppUI->user_id);
foreach ($projects as $project_id => $project_info) {
$projects[$project_id] = $project_info['project_name'];
}
$projects = arrayMerge(array(0 => $all_projects), $projects);
$inc = intval(w2PgetConfig('cal_day_increment')) ? intval(w2PgetConfig('cal_day_increment')) : 30;
if (!$object_id && !$is_clash) {
$seldate = new w2p_Utilities_Date($date, $AppUI->getPref('TIMEZONE'));
// If date is today, set start time to now + inc
示例7: testURL
$AppUI->redirect('m=companies');
}
// collect all the departments in the company
if ($company_id) {
$company = new CCompany();
$company->load($company_id);
$companyName = $company->company_name;
$depts = $object->loadOtherDepts(null, $company_id, 0);
$depts = arrayMerge(array('0' => '- ' . $AppUI->_('Select Department') . ' -'), $depts);
}
// setup the title block
$ttl = $object_id > 0 ? 'Edit Department' : 'Add Department';
$titleBlock = new w2p_Theme_TitleBlock($ttl, 'icon.png', $m);
$titleBlock->addCrumb('?m=companies', 'companies list');
$titleBlock->addCrumb('?m=' . $m, $m . ' list');
$titleBlock->addViewLink('company', $company_id);
if ($dept_id) {
$titleBlock->addCrumb('?m=departments&a=view&dept_id=' . $dept_id, 'view this department');
}
$titleBlock->show();
// load the department types
$types = w2PgetSysVal('DepartmentType');
$countries = array('' => $AppUI->_('(Select a Country)')) + w2PgetSysVal('GlobalCountriesPreferred') + array('-' => '----') + w2PgetSysVal('GlobalCountries');
$dept_parent = $object->dept_parent ? $object->dept_parent : $dept_parent;
?>
<script language="javascript" type="text/javascript">
function testURL( x ) {
var test = 'document.editFrm.dept_url.value';
test = eval(test);
if (test.length > 6) {
newwin = window.open( 'http://' + test, 'newwin', '' );
示例8: arrayMerge
$company->load($company_id);
$company_name = $company->company_name;
// get a list of permitted companies
$companies = $company->getAllowedRecords($AppUI->user_id, 'company_id,company_name', 'company_name');
$companies = arrayMerge(array('0' => ''), $companies);
$dept = new CDepartment();
$dept->load($dept_id);
$dept_name = $dept->dept_name;
$is_user = $object->isUser($object_id);
$df = $AppUI->getPref('SHDATEFORMAT');
$df .= ' ' . $AppUI->getPref('TIMEFORMAT');
// setup the title block
$ttl = $object_id > 0 ? 'Edit Contact' : 'Add Contact';
$titleBlock = new w2p_Theme_TitleBlock($ttl, 'icon.png', $m);
$titleBlock->addCrumb('?m=' . $m, $m . ' list');
$titleBlock->addViewLink('contact', $object_id);
$titleBlock->show();
$company_detail = $object->getCompanyDetails();
$dept_detail = $object->getDepartmentDetails();
if ($object_id == 0 && $company_id > 0) {
$company_detail['company_id'] = $company_id;
$company_detail['company_name'] = $company_name;
$dept_detail['dept_id'] = $dept_id;
$dept_detail['dept_name'] = $dept_name;
}
$methods = $object->getContactMethods();
$methodLabels = w2PgetSysVal('ContactMethods');
$countries = array('' => $AppUI->_('(Select a Country)')) + w2PgetSysVal('GlobalCountriesPreferred') + array('-' => '----') + w2PgetSysVal('GlobalCountries');
?>
<script language="javascript" type="text/javascript">