本文整理汇总了PHP中add_page_action函数的典型用法代码示例。如果您正苦于以下问题:PHP add_page_action函数的具体用法?PHP add_page_action怎么用?PHP add_page_action使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了add_page_action函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: wiki_project_overview_page_actions
function wiki_project_overview_page_actions()
{
if (WikiPage::canAdd(logged_user(), active_project())) {
add_page_action(lang('add wiki page'), get_url('wiki', 'add'));
}
// if
}
示例2: tickets_project_overview_page_actions
function tickets_project_overview_page_actions()
{
if (ProjectTicket::canAdd(logged_user(), active_project())) {
add_page_action(lang('add ticket'), get_url('tickets', 'add_ticket'));
}
// if
}
示例3: form_project_overview_page_actions
function form_project_overview_page_actions()
{
if (ProjectForm::canAdd(logged_user(), active_project())) {
add_page_action(lang('add form'), get_url('form', 'add'));
}
// if
}
示例4: links_project_overview_page_actions
function links_project_overview_page_actions()
{
if (ProjectLink::canAdd(logged_user(), active_project())) {
add_page_action(lang('add link'), get_url('links', 'add_link'));
}
// if
}
示例5: times_project_overview_page_actions
function times_project_overview_page_actions()
{
//not_existing_function();
if (ProjectTime::canAdd(logged_user(), active_project())) {
add_page_action(lang('add time'), get_url('time', 'add'));
}
// if
}
示例6: files_project_overview_page_actions
function files_project_overview_page_actions()
{
if (ProjectFile::canAdd(logged_user(), active_project())) {
add_page_action(lang('add file'), get_url('files', 'add_file'));
}
// if
if (ProjectFolder::canAdd(logged_user(), active_project())) {
add_page_action(lang('add folder'), get_url('files', 'add_folder'));
}
// if
}
示例7: card
/**
* View single contact
*
* @access public
* @param void
* @return null
*/
function card() {
$id = get_id();
$contact = Contacts::findById($id);
if(!$contact || !$contact->canView(logged_user())) {
flash_error(lang('no access permissions'));
ajx_current("empty");
return;
} // if
$this->setTemplate('card');
tpl_assign('contact', $contact);
$context = active_context();
$obj_type_types = array('content_object');
if (array_var($_GET, 'include_comments')) $obj_type_types[] = 'comment';
/*
$pagination = Objects::getObjects($context, null, 1, null, null, false, false, null, null, null, $obj_type_types);
$result = $pagination->objects;
$total_items = $pagination->total ;
if(!$result) $result = array();
$info = array();
foreach ($result as $obj ) {
$info_elem = $obj->getArrayInfo();
$instance = Objects::instance()->findObject($info_elem['object_id']);
$info_elem['url'] = $instance->getViewUrl();
if ($instance instanceof Contact ) {
if( $instance->isCompany() ) {
$info_elem['icon'] = 'ico-company';
$info_elem['type'] = 'company';
}
}
$info_elem['isRead'] = $instance->getIsRead(logged_user()->getId()) ;
$info_elem['manager'] = get_class($instance->manager()) ;
$info[] = $info_elem;
}
tpl_assign('feeds', $info);
*/ // Performance Killer
ajx_extra_data(array("title" => $contact->getObjectName(), 'icon'=>'ico-user'));
ajx_set_no_toolbar(true);
if (!$contact->isTrashed()){
if($contact->canEdit(logged_user())) {
add_page_action(lang('edit contact'), $contact->getEditUrl(), 'ico-edit', null, null, true);
}
}
if ($contact->canDelete(logged_user())) {
if ($contact->isTrashed()) {
add_page_action(lang('restore from trash'), "javascript:if(confirm(lang('confirm restore objects'))) og.openLink('" . $contact->getUntrashUrl() ."');", 'ico-restore',null, null, true);
add_page_action(lang('delete permanently'), "javascript:if(confirm(lang('confirm delete permanently'))) og.openLink('" . $contact->getDeletePermanentlyUrl() ."');", 'ico-delete',null, null, true);
} else {
if ($contact->getUserType() ) {
if ($contact->hasReferences()) {
// user-contacts, dont send them to trash, disable them
add_page_action(lang('disable'), "javascript:if(confirm(lang('confirm disable user'))) og.openLink('" . $contact->getDisableUrl() ."',{callback:function(){og.customDashboard('contact','init',{},true)}});", 'ico-trash',null, null, true);
}else {
// user-contacts, dont send them to trash, disable them
add_page_action(lang('delete'), "javascript:if(confirm(lang('confirm delete user'))) og.openLink('" . $contact->getDeleteUrl() ."',{callback:function(){og.customDashboard('contact','init',{},true)}});", 'ico-trash',null, null, true);
add_page_action(lang('disable'), "javascript:if(confirm(lang('confirm disable user'))) og.openLink('" . $contact->getDisableUrl() ."',{callback:function(){og.customDashboard('contact','init',{},true)}});", 'ico-trash',null, null, true);
}
}else{
// Non user contacts, move them to trash
add_page_action(lang('move to trash'), "javascript:if(confirm(lang('confirm move to trash'))) og.openLink('" . $contact->getTrashUrl() ."');", 'ico-trash',null, null, true);
}
}
} // if
if (!$contact->isTrashed()) {
if (can_manage_security(logged_user())) {
if (!$contact->isUser()){
add_page_action(lang('create user from contact'), $contact->getCreateUserUrl() , 'ico-user');
}
}
if (!$contact->isUser() && $contact->canEdit(logged_user())) {
if (!$contact->isArchived()) {
add_page_action(lang('archive'), "javascript:if(confirm(lang('confirm archive object'))) og.openLink('" . $contact->getArchiveUrl() ."');", 'ico-archive-obj');
} else {
add_page_action(lang('unarchive'), "javascript:if(confirm(lang('confirm unarchive object'))) og.openLink('" . $contact->getUnarchiveUrl() ."');", 'ico-unarchive-obj');
}
}
}
//.........这里部分代码省略.........
示例8: set_page_title
<?php
set_page_title(lang('my projects'));
if (Project::canAdd(logged_user())) {
add_page_action(lang('add project'), get_url('project', 'add'), 'ico-add');
}
// if
if (isset($active_projects) && is_array($active_projects) && count($active_projects)) {
foreach ($active_projects as $project) {
?>
<div class="block">
<div class="header"><h2><a class="internalLink" href="<?php
echo $project->getOverviewUrl();
?>
"><?php
echo clean($project->getName());
?>
</a></h2></div>
<div class="content">
<?php
if (trim($project->getDescription())) {
?>
<div class="description"><?php
echo do_textile($project->getDescription());
?>
</div>
<?php
}
// if
if (is_array($project_companies = $project->getCompanies())) {
$project_company_names = array();
示例9: set_page_title
<?php
// Set page title and set crumbs to index
set_page_title(logged_user()->getObjectName());
if ($user->canUpdateProfile(logged_user())) {
add_page_action(lang('update profile'), $user->getEditProfileUrl(), 'ico-edit', null, null, true);
add_page_action(lang('update avatar'), $user->getUpdatePictureUrl(), 'ico-picture');
add_page_action(lang('change password'), $user->getEditPasswordUrl(), 'ico-password', null, null, true);
}
// if
if ($user->canUpdatePermissions(logged_user())) {
add_page_action(lang('permissions'), $user->getUpdatePermissionsUrl(), 'ico-permissions', null, null, true);
}
// if
$this->assign('user', logged_user());
$this->includeTemplate(get_template_path('user_card', 'user'));
示例10: add_page_action
if ($milestone->isTrashed()) {
add_page_action(lang('restore from trash'), "javascript:if(confirm(lang('confirm restore objects'))) og.openLink('" . $milestone->getUntrashUrl() . "');", 'ico-restore', null, null, true);
add_page_action(lang('delete permanently'), "javascript:if(confirm(lang('confirm delete permanently'))) og.openLink('" . $milestone->getDeleteUrl() . "');", 'ico-delete', null, null, true);
} else {
add_page_action(lang('move to trash'), "javascript:if(confirm(lang('confirm move to trash'))) og.openLink('" . $milestone->getTrashUrl() . "');", 'ico-trash', null, null, true);
}
}
}
// if
if (!$milestone->isTrashed() && !logged_user()->isGuest()) {
if ($milestone->getIsTemplate()) {
add_page_action(lang('new milestone from template'), get_url("milestone", "copy_milestone", array("id" => $milestone->getId())), 'ico-copy');
} else {
add_page_action(lang('copy milestone'), get_url("milestone", "copy_milestone", array("id" => $milestone->getId())), 'ico-copy');
if (can_manage_templates(logged_user())) {
add_page_action(lang('add to a template'), get_url("template", "add_to", array("manager" => 'ProjectMilestones', "id" => $milestone->getId())), 'ico-template');
}
}
}
?>
<div style="padding:7px">
<div class="milestone">
<?php
$content = '';
if ($milestone->getDueDate()->getYear() > DateTimeValueLib::now()->getYear()) {
$content = '<div class="dueDate"><b>' . lang('due date') . ':</b> ' . format_date($milestone->getDueDate(), null, 0) . '</div>';
} else {
$content = '<div class="dueDate"><b>' . lang('due date') . ':</b> ' . format_descriptive_date($milestone->getDueDate(), 0) . '</div>';
}
// if
示例11: administration_tabbed_navigation
if ($user->getCompany()->isOwner()) {
administration_tabbed_navigation(ADMINISTRATION_TAB_COMPANY);
administration_crumbs(array(array(lang('company'), $user->getCompany()->getViewUrl()), array(lang('change password'))));
} else {
administration_tabbed_navigation(ADMINISTRATION_TAB_CLIENTS);
administration_crumbs(array(array(lang('clients'), get_url('administration', 'clients')), array($user->getCompany()->getName(), $user->getCompany()->getViewUrl()), array($user->getDisplayName(), $user->getCardUrl()), array(lang('change password'))));
}
// if
}
// if
if ($user->canUpdateProfile(logged_user())) {
add_page_action(array(lang('update profile') => $user->getEditProfileUrl(), lang('change password') => $user->getEditPasswordUrl()));
}
// if
if ($user->canUpdatePermissions(logged_user())) {
add_page_action(array(lang('permissions') => $user->getUpdatePermissionsUrl()));
}
// if
?>
<form action="<?php
echo $user->getEditPasswordUrl($redirect_to);
?>
" method="post">
<?php
tpl_display(get_template_path('form_errors'));
if (!logged_user()->isAdministrator()) {
?>
<div>
<?php
echo label_tag(lang('old password'), 'passwordFormOldPassword', true);
?>
示例12: set_page_title
<?php
set_page_title($task_list->getName());
project_tabbed_navigation(PROJECT_TAB_TASKS);
project_crumbs(array(array(lang('tasks'), get_url('task')), array($task_list->getName())));
if (ProjectTaskList::canAdd(logged_user(), active_project())) {
add_page_action(lang('add task list'), get_url('task', 'add_list'));
}
// if
?>
<script type="text/javascript" src="<?php
echo get_javascript_url('modules/addTaskForm.js');
?>
"></script>
<?php
$this->assign('on_list_page', true);
$this->includeTemplate(get_template_path('task/task_list'));
?>
<script type="text/javascript">
App.modules.addTaskForm.hideAllAddTaskForms();
</script>
示例13: set_page_title
<?php
set_page_title(lang('load values'));
administration_tabbed_navigation('i18n');
administration_crumbs(lang('i18n'), get_url('i18n'));
add_page_action(lang('add locale'), get_url('i18n', 'add_locale', array('status' => '0')));
add_stylesheet_to_page('i18n.css');
$locale = $load_data['locale'];
?>
<h2><?php
echo lang('locale') . ': ' . $locale->getName();
?>
</h2>
<form action="<?php
echo $locale->getLoadValuesUrl();
?>
" method="post">
<?php
tpl_display(get_template_path('form_errors'));
?>
<div>
<?php
echo label_tag(lang('replace'), 'loadFormReplace', false);
?>
<?php
echo yes_no_widget('load[replace]', 'loadFormReplace', array_var($load_data, 'replace'), lang('yes'), lang('no'));
?>
</div>
<div>
示例14: if
} else if ($email->getState() == 4) {
add_page_action(lang('not spam'), get_url('mail', 'change_email_folder', array("id" => $email->getId(), "newf" => 0)), 'ico-unclassify');
}
}
add_page_action(lang('mark as unread'), get_url('mail', 'mark_as_unread', array('id' => $email->getId())), 'ico-mark-as-unread');
//if (count($email->getWorkspaces()) && !logged_user()->isGuest()) { TODO Feng 2 Members
if ( !logged_user()->isGuest()) {
add_page_action(lang('create task from email'), get_url('task', 'add_task', array('from_email' => $email->getId())), 'ico-task', null, null, true);
}
if ($email->getState() < 200) {
$download_url = get_url('mail', 'download', array('id' => $email->getId()));
include_once ROOT . "/library/browser/Browser.php";
if (Browser::instance()->getBrowser() == Browser::BROWSER_IE) {
$download_url = "javascript:location.href = '$download_url';";
}
add_page_action(lang('download email'), $download_url, 'ico-download', '_self');
}
}
$c = 0;
$genid = gen_id();
$use_24_hours = user_config_option('time_format_use_24');
$hide_quoted_text_in_emails = user_config_option('hide_quoted_text_in_emails');
$time_format = $use_24_hours ? 'G:i' : 'g:i a';
?>
<script>
og.showQuotedText = function(genid) {
document.getElementById(genid + 'noQuoteMail').style.display = 'none';
document.getElementById(genid + 'quotedLink').style.display = 'none';
document.getElementById(genid + 'completeMail').style.display = 'block';
}
示例15: administration_tabbed_navigation
if ($company->isOwner()) {
administration_tabbed_navigation(ADMINISTRATION_TAB_COMPANY);
administration_crumbs(lang('company'));
} else {
administration_tabbed_navigation(ADMINISTRATION_TAB_CLIENTS);
administration_crumbs(array(array(lang('clients'), get_url('administration', 'clients')), array($company->getName())));
}
// if
if ($company->canEdit(logged_user())) {
add_page_action(lang('edit company'), $company->getEditUrl());
add_page_action(lang('edit company logo'), $company->getEditLogoUrl());
if (!$company->isOwner()) {
add_page_action(lang('update permissions'), $company->getUpdatePermissionsUrl());
}
// if
}
// if
if (User::canAdd(logged_user(), $company)) {
add_page_action(lang('add user'), $company->getAddUserUrl());
}
// if
$this->includeTemplate(get_template_path('company_card', 'company'));
?>
<h2><?php
echo lang('users');
?>
</h2>
<?php
$this->assign('users', $company->getUsers());
$this->includeTemplate(get_template_path('list_users', 'administration'));