本文整理汇总了PHP中w2p_Theme_TitleBlock::addCrumbDelete方法的典型用法代码示例。如果您正苦于以下问题:PHP w2p_Theme_TitleBlock::addCrumbDelete方法的具体用法?PHP w2p_Theme_TitleBlock::addCrumbDelete怎么用?PHP w2p_Theme_TitleBlock::addCrumbDelete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类w2p_Theme_TitleBlock
的用法示例。
在下文中一共展示了w2p_Theme_TitleBlock::addCrumbDelete方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: void
if ($canAddProject) {
$titleBlock->addCell();
$titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new project') . '">', '', '<form action="?m=projects&a=addedit" method="post" accept-charset="utf-8">', '</form>');
}
if ($canAddTask) {
$titleBlock->addCell();
$titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new task') . '">', '', '<form action="?m=tasks&a=addedit&task_project=' . $project_id . '" method="post" accept-charset="utf-8">', '</form>');
}
if ($canEditProject) {
$titleBlock->addCell();
$titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new event') . '">', '', '<form action="?m=calendar&a=addedit&event_project=' . $project_id . '" method="post" accept-charset="utf-8">', '</form>');
$titleBlock->addCell();
$titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new file') . '">', '', '<form action="?m=files&a=addedit&project_id=' . $project_id . '" method="post" accept-charset="utf-8">', '</form>');
$titleBlock->addCrumb('?m=projects&a=addedit&project_id=' . $project_id, 'edit this project');
if ($canDeleteProject) {
$titleBlock->addCrumbDelete('delete project', $canDelete, $msg);
}
}
$titleBlock->addCell();
$titleBlock->addCell(w2PtoolTip($m, 'print project') . '<a href="javascript: void(0);" onclick ="window.open(\'index.php?m=projectdesigner&a=printproject&dialog=1&suppressHeaders=1&project_id=' . $project_id . '\', \'printproject\',\'width=1200, height=600, menubar=1, scrollbars=1\')">
<img src="' . w2PfindImage('printer.png') . '" border="0" width="22" heigth"22" alt="" />
</a>
' . w2PendTip());
$titleBlock->addCell(w2PtoolTip($m, 'expand all panels') . '<a href="javascript: void(0);" onclick ="expandAll()">
<img src="' . w2PfindImage('down.png', $m) . '" border="0" width="22" heigth="22" alt="" />
</a>
' . w2PendTip());
$titleBlock->addCell(w2PtoolTip($m, 'collapse all panels') . '<a href="javascript: void(0);" onclick ="collapseAll()">
<img src="' . w2PfindImage('up.png', $m) . '" border="0" width="22" heigth="22" alt="" />
</a>
' . w2PendTip());
示例2: delIt
$AppUI->savePlace();
}
$countries = w2PgetSysVal('GlobalCountries');
$types = w2PgetSysVal('DepartmentType');
$titleBlock = new w2p_Theme_TitleBlock('View Department', 'departments.png', $m, $m . '.' . $a);
if ($canEdit) {
$titleBlock->addCell();
$titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new department') . '">', '', '<form action="?m=departments&a=addedit&company_id=' . $department->dept_company . '&dept_parent=' . $dept_id . '" method="post" accept-charset="utf-8">', '</form>');
}
$titleBlock->addCrumb('?m=departments', 'department list');
$titleBlock->addCrumb('?m=companies', 'company list');
$titleBlock->addCrumb('?m=companies&a=view&company_id=' . $department->dept_company, 'view this company');
if ($canEdit) {
$titleBlock->addCrumb('?m=departments&a=addedit&dept_id=' . $dept_id, 'edit this department');
if ($canDelete) {
$titleBlock->addCrumbDelete('delete department', $canDelete, $msg);
}
}
$titleBlock->show();
$htmlHelper = new w2p_Output_HTMLHelper($AppUI);
$htmlHelper->stageRowData((array) $department);
?>
<script language="javascript" type="text/javascript">
<?php
// security improvement:
// some javascript functions may not appear on client side in case of user not having write permissions
// else users would be able to arbitrarily run 'bad' functions
if ($canDelete) {
?>
function delIt() {
if (confirm('<?php
示例3: updateTask
$titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new task') . '">', '', '<form action="?m=tasks&a=addedit&task_project=' . $obj->task_project . '&task_parent=' . $task_id . '" method="post" accept-charset="utf-8">', '</form>');
$titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new file') . '">', '', '<form action="?m=files&a=addedit&project_id=' . $obj->task_project . '&file_task=' . $obj->task_id . '" method="post" accept-charset="utf-8">', '</form>');
}
$titleBlock->addCrumb('?m=tasks', 'tasks list');
if ($canReadProject) {
$titleBlock->addCrumb('?m=projects&a=view&project_id=' . $obj->task_project, 'view this project');
}
if ($canEdit && 0 == $obj->task_represents_project) {
$titleBlock->addCrumb('?m=tasks&a=addedit&task_id=' . $task_id, 'edit this task');
}
//$obj->task_represents_project
if ($obj->task_represents_project) {
$titleBlock->addCrumb('?m=projects&a=view&project_id=' . $obj->task_represents_project, 'view subproject');
}
if ($canDelete) {
$titleBlock->addCrumbDelete('delete task', $canDelete, $msg);
}
$titleBlock->show();
$htmlHelper = new w2p_Output_HTMLHelper($AppUI);
?>
<script language="javascript" type="text/javascript">
function updateTask() {
var f = document.editFrm;
f.submit();
}
<?php
if ($canDelete) {
?>
function delIt() {
if (confirm( '<?php
示例4: array
// load the event recurs types
$recurs = array('Never', 'Hourly', 'Daily', 'Weekly', 'Bi-Weekly', 'Every Month', 'Quarterly', 'Every 6 months', 'Every Year');
$assigned = $event->getAssigned();
$start_date = $event->event_start_date ? new w2p_Utilities_Date($event->event_start_date) : new w2p_Utilities_Date();
$end_date = $event->event_end_date ? new w2p_Utilities_Date($event->event_end_date) : new w2p_Utilities_Date();
if ($event->event_project) {
$project = new CProject();
$event_project = $project->load($event->event_project)->project_name;
}
// setup the title block
$titleBlock = new w2p_Theme_TitleBlock('View 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');
if ($canEdit) {
$titleBlock->addCell();
$titleBlock->addCell('
<form action="?m=events&a=addedit" method="post" accept-charset="utf-8">
<input type="submit" class="button" value="' . $AppUI->_('New event') . '" />
</form>', '', '', '');
$titleBlock->addCrumb('?m=events&a=addedit&event_id=' . $event_id, 'edit this event');
if ($canDelete) {
$titleBlock->addCrumbDelete('delete event', $canDelete, $msg);
}
}
$titleBlock->show();
$view = new w2p_Controllers_View($AppUI, $event, 'Event');
echo $view->renderDelete();
$types = w2PgetSysVal('EventType');
include $AppUI->getTheme()->resolveTemplate('events/view');
示例5:
$countries = w2PgetSysVal('GlobalCountries');
// Get the contact details for company and department
$company_detail = $contact->getCompanyDetails();
$dept_detail = $contact->getDepartmentDetails();
// Get the Contact info (phone, emails, etc) for the contact
$methods = $contact->getContactMethods();
$methodLabels = w2PgetSysVal('ContactMethods');
// setup the title block
$ttl = 'View Contact';
$titleBlock = new w2p_Theme_TitleBlock($ttl, 'monkeychat-48.png', $m, $m . '.' . $a);
$titleBlock->addCrumb('?m=contacts', 'contacts list');
if ($canEdit && $contact_id) {
$titleBlock->addCrumb('?m=contacts&a=addedit&contact_id=' . $contact_id, 'edit this contact');
}
if ($canDelete && $contact_id) {
$titleBlock->addCrumbDelete('delete contact', $canDelete, $msg);
}
$titleBlock->show();
$htmlHelper = new w2p_Output_HTMLHelper($AppUI);
$last_ask = new w2p_Utilities_Date($contact->contact_updateasked);
$lastupdated = new w2p_Utilities_Date($contact->contact_lastupdate);
?>
<form name="changecontact" action="?m=contacts" method="post" accept-charset="utf-8">
<input type="hidden" name="dosql" value="do_contact_aed" />
<input type="hidden" name="del" value="0" />
<input type="hidden" name="contact_id" value="<?php
echo $contact_id;
?>
" />
<input type="hidden" name="contact_owner" value="<?php
echo $contact->contact_owner ? $contact->contact_owner : $AppUI->user_id;
示例6:
$project->load($forum->forum_project);
if (!$forum) {
$AppUI->setMsg('Forum');
$AppUI->setMsg('invalidID', UI_MSG_ERROR, true);
$AppUI->redirect('m=' . $m);
}
// setup the title block
$titleBlock = new w2p_Theme_TitleBlock('Forum', 'icon.png', $m);
$titleBlock->addCrumb('?m=' . $m, $m . ' list');
if ($message_id) {
$titleBlock->addCrumb('?m=forums&a=viewer&forum_id=' . $forum_id, 'topics for this forum');
}
if ($canEdit) {
$titleBlock->addCrumb('?m=forums&a=addedit&forum_id=' . $forum_id, 'edit this forum');
if ($canDelete) {
$titleBlock->addCrumbDelete('delete forum', true, $msg);
}
}
$titleBlock->addCell(arraySelect($filters, 'f', 'size="1" class="text" onchange="document.filterFrm.submit();"', $f, true), '', '<form action="?m=forums&a=viewer&forum_id=' . $forum_id . '" method="post" name="filterFrm" accept-charset="utf-8">', '</form>');
$titleBlock->show();
$view = new w2p_Controllers_View($AppUI, $forum, 'Forum');
echo $view->renderDelete();
include $AppUI->getTheme()->resolveTemplate('forums/view');
echo $AppUI->getTheme()->styleRenderBoxBottom();
if ($post_message) {
include W2P_BASE_DIR . '/modules/forums/post_message.php';
} else {
if ($message_id) {
include W2P_BASE_DIR . '/modules/forums/view_messages.php';
} else {
include W2P_BASE_DIR . '/modules/forums/view_topics.php';
示例7: CHistory
if ($action == 'add') {
$q->clear();
}
$q->addTable('history');
$q->addUpdate('history_item = history_id');
$q->addWhere('history_table = \'history\'');
$okMsg = 'History deleted';
}
$q->clear();
$AppUI->redirect();
}
$history = new CHistory();
$history->load($history_id);
$titleBlock = new w2p_Theme_TitleBlock($history_id ? 'Edit history' : 'New history', 'stock_book_blue_48.png', 'history', 'history.' . $a);
if ($canDelete) {
$titleBlock->addCrumbDelete('delete history', $canDelete, $msg);
}
$titleBlock->show();
?>
<script language="javascript" type="text/javascript">
function delIt() {
document.AddEdit.action.value = 'del';
document.AddEdit.submit();
}
function cancel() {
if (confirm('<?php
echo $AppUI->_('Are you sure you want to cancel?', UI_OUTPUT_JS);
?>
')) {
示例8: w2PgetConfig
// 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;
if (form.user_username.value.length < <?php
echo w2PgetConfig('username_min_len');
?>
&& form.user_username.value != '<?php
echo w2PgetConfig('admin_username');
?>
') {
示例9: CTask
if ($file->file_checkout != $AppUI->user_id) {
$ci = false;
}
if (!$canAdmin) {
$canAdmin = $file->canAdmin();
}
if ($file->file_checkout == 'final' && !$canAdmin) {
$AppUI->redirect('m=public&a=access_denied');
}
// setup the title block
$ttl = $file_id ? 'Edit File' : 'Add File';
$ttl = $ci ? 'Checking in' : $ttl;
$titleBlock = new w2p_Theme_TitleBlock($ttl, 'folder5.png', $m, $m . '.' . $a);
$titleBlock->addCrumb('?m=files', 'files list');
if ($canDelete && $file_id > 0 && !$ci) {
$titleBlock->addCrumbDelete('delete file', $canDelete, $msg);
}
$titleBlock->show();
//Clear the file id if checking out so a new version is created.
if ($ci) {
$file_id = 0;
}
if ($file->file_project) {
$file_project = $file->file_project;
}
if ($file->file_task) {
$file_task = $file->file_task;
$task_name = $file->getTaskName();
} else {
if ($file_task) {
$task = new CTask();
示例10: void
}
// setup the title block
$ttl = 'ProjectDesigner';
$titleBlock = new w2p_Theme_TitleBlock($ttl, 'icon.png', $m);
$titleBlock->addCrumb('?m=projects', 'projects list');
$titleBlock->addCrumb('?m=' . $m, 'select another project');
$titleBlock->addCrumb('?m=projects&a=view&bypass=1&project_id=' . $project_id, 'normal view project');
$titleBlock->addButton('new link', '?m=links&a=addedit&project_id=' . $project_id);
if ($canEditProject) {
$titleBlock->addCell();
$titleBlock->addButton('New event', '?m=events&a=addedit&event_project=' . $project_id);
$titleBlock->addCell();
$titleBlock->addButton('New file', '?m=files&a=addedit&project_id=' . $project_id);
$titleBlock->addCrumb('?m=projects&a=addedit&project_id=' . $project_id, 'edit this project');
if ($canDeleteProject) {
$titleBlock->addCrumbDelete('delete project', false, $msg);
}
}
if ($canAddTasks) {
$titleBlock->addCell();
$titleBlock->addButton('New task', '?m=tasks&a=addedit&task_project=' . $project_id);
}
$titleBlock->addCell();
$titleBlock->addCell(w2PtoolTip($m, 'print project') . '<a href="javascript: void(0);" onclick ="window.open(\'index.php?m=projectdesigner&a=printproject&dialog=1&suppressHeaders=1&project_id=' . $project_id . '\', \'printproject\',\'width=1200, height=600, menubar=1, scrollbars=1\')">
<img src="' . w2PfindImage('printer.png') . '" />
</a>
' . w2PendTip());
$titleBlock->addCell(w2PtoolTip($m, 'expand all panels') . '<a href="javascript: void(0);" onclick ="expandAll()">
<img src="' . w2PfindImage('down.png', $m) . '" />
</a>
' . w2PendTip());
示例11: CContact
$deletable = $canDelete;
//TODO: this should be removed once the $deletable variable is removed
$contact = new CContact();
$canCreateContacts = $contact->canCreate();
// setup the title block
$titleBlock = new w2p_Theme_TitleBlock('View Company', 'icon.png', $m);
$titleBlock->addCrumb('?m=' . $m, $m . ' list');
if ($canCreateContacts) {
$titleBlock->addButton('New contact', '?m=contacts&a=addedit&company_id=' . $company_id);
}
if ($canEdit) {
if ($AppUI->isActiveModule('departments')) {
$titleBlock->addButton('New department', '?m=departments&a=addedit&company_id=' . $company_id);
}
$titleBlock->addButton('New project', '?m=projects&a=addedit&company_id=' . $company_id);
$titleBlock->addCrumb('?m=companies&a=addedit&company_id=' . $company_id, 'edit this company');
if ($canDelete && $deletable) {
$titleBlock->addCrumbDelete('delete company', $deletable, $msg);
}
}
$titleBlock->show();
$view = new w2p_Controllers_View($AppUI, $company, 'Company');
echo $view->renderDelete();
$types = w2PgetSysVal('CompanyType');
include $AppUI->getTheme()->resolveTemplate('companies/view');
// tabbed information boxes
$moddir = W2P_BASE_DIR . '/modules/companies/';
$tabBox = new CTabBox('?m=companies&a=view&company_id=' . $company_id, '', $tab);
$tabBox->add($moddir . 'vw_projects', 'Active Projects');
$tabBox->add($moddir . 'vw_projects', 'Archived Projects');
$tabBox->show();
示例12: die
<?php
if (!defined('W2P_BASE_DIR')) {
die('You should not access this file directly.');
}
// @todo convert to template
$resource_id = (int) w2PgetParam($_GET, 'resource_id', 0);
$obj = new CResource();
if (!$obj->load($resource_id)) {
$AppUI->redirect(ACCESS_DENIED);
}
$canEdit = $obj->canEdit();
$canDelete = $obj->canDelete();
$titleBlock = new w2p_Theme_TitleBlock('View Resource', 'icon.png', $m);
$titleBlock->addCrumb('?m=' . $m, $m . ' list');
if ($canEdit) {
$titleBlock->addCrumb('?m=resources&a=addedit&resource_id=' . $resource_id, 'edit this resource');
if ($canDelete) {
$titleBlock->addCrumbDelete('delete resource', $canDelete, 'no delete permission');
}
}
$titleBlock->show();
$view = new w2p_Controllers_View($AppUI, $obj, 'Resource');
echo $view->renderDelete();
$types = w2PgetSysVal('ResourceTypes');
$types[0] = 'Not Specified';
$customLookups = array('resource_type' => $types);
include $AppUI->getTheme()->resolveTemplate('resources/view');