Example #1
0
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
}
Example #2
0
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
}
Example #3
0
function form_project_overview_page_actions()
{
    if (ProjectForm::canAdd(logged_user(), active_project())) {
        add_page_action(lang('add form'), get_url('form', 'add'));
    }
    // if
}
Example #4
0
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
}
Example #5
0
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
}
Example #6
0
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
}
	/**
	 * 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');
				}
			}
		}

		
		if ($contact->isUser()   ){
			if ($contact->canChangePassword(logged_user())) {
				add_page_action(lang('change password'), $contact->getEditPasswordUrl(), 'ico-password', null, null, true);
			}
			if($contact->getId() == logged_user()->getId()){
				add_page_action(lang('edit preferences'), $contact->getEditPreferencesUrl(), 'ico-administration', null, null, true);
			}
			if($contact->canUpdatePermissions(logged_user())) {
				add_page_action(lang('permissions'), $contact->getUpdatePermissionsUrl(), 'ico-permissions', null, null, true);
			} 
		}
    
   		tpl_assign('company', $contact->getCompany());
		ApplicationReadLogs::createLog($contact, ApplicationReadLogs::ACTION_READ);
	} // view
<?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();
Example #9
0
<?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'));
Example #10
0
            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
    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);
    ?>
Example #12
0
<?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>
Example #13
0
<?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>
Example #14
0
		} 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';
	}
Example #15
0
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'));
Example #16
0
<?php
  set_page_title(lang('members'));
  
 if(Contact::canAddUser(logged_user())) {
    add_page_action(lang('add user'), owner_company()->getAddUserUrl(), 'ico-add',null,null,true);
  } // if
?>

<div class="adminUsersList" style="height:100%;background-color:white">
  <div class="adminHeader">
  	<div class="adminTitle"><?php echo lang('users') . (config_option('max_users')?(' (' . Contacts::count() .' / ' .  config_option('max_users') . ')'):'') ?></div>
  </div>
  <div class="adminSeparator"></div>
  <div class="adminMainBlock">
  <?php
  		foreach ($users_by_company as $company_row){
  			$company = $company_row['details'];
			$users = $company_row['users'];
			if (count($users) == 0) continue;
			tpl_assign('users', $users);
			tpl_assign('company', $company);
	?>
<div style='padding-bottom:20px;max-width:700px'>
<div style="padding:10px;padding-bottom:13px;background-color:#D7E5F5">
	<h1 style="font-size:140%;font-weight:bold"><a class="internalLink" href="<?php echo ($company instanceof Contact ? $company->getCardUrl() : "#") ?>"><?php echo ($company instanceof Contact ? clean($company->getObjectName()) : lang('without company')) ?></a></h1>
	<div style="float:right;" id="companypagination<?php echo ($company instanceof Contact ? $company->getId() : "0"); ?>"></div>
</div>
<div id="usersList" style="border:1px solid #DDD">

  <?php $this->includeTemplate(get_template_path('list_users', 'administration')); ?>
  </div></div>
Example #17
0
<?php

set_page_title(lang('time manager'));
administration_tabbed_navigation(ADMINISTRATION_TAB_TIME);
administration_crumbs(lang('time manager'));
add_page_action(lang('unbilled time'), get_url('administration', 'time', array('status' => '0')));
add_page_action(lang('billed time'), get_url('administration', 'time', array('status' => '1')));
add_page_action(lang('view by user'), get_url('user', 'time'));
add_page_action(lang('view by project'), get_url('project', 'time'));
add_stylesheet_to_page('project/time.css');
?>
<div id="time">

<h2><?php 
echo $user->getDisplayName();
?>
's <?php 
echo lang('unbilled time');
?>
</h2>

<form action="<?php 
echo get_url('time', 'setstatus', array('status' => '0', 'redirect_to' => $redirect_to));
?>
" method="post">

<table class="timeLogs blank">
  <tr>
    <th></th>
    <th><?php 
echo lang('date');
Example #18
0
<?php

set_page_title(lang('milestones'));
project_tabbed_navigation(PROJECT_TAB_MILESTONES);
project_crumbs(lang('milestones'));
if (ProjectMilestone::canAdd(logged_user(), active_project())) {
    add_page_action(lang('add milestone'), get_url('milestone', 'add'));
}
// if
add_page_action(lang('view calendar'), get_url('milestone', 'calendar'));
if ($late_milestones || $today_milestones || $upcoming_milestones) {
    ?>
<div id="milestones">
<?php 
    if (is_array($late_milestones) && count($late_milestones)) {
        ?>
  <div id="lateMilestones">
  <h2><?php 
        echo lang('late milestones');
        ?>
</h2>
<?php 
        foreach ($late_milestones as $milestone) {
            $this->assign('milestone', $milestone);
            $this->includeTemplate(get_template_path('view_milestone', 'milestone'));
        }
        // foreach
        ?>
  </div>
<?php 
    }
Example #19
0
<?php

trace(__FILE__, 'ProjectMessage::project_tabbed_navigation()');
project_tabbed_navigation();
trace(__FILE__, 'ProjectMessage::canAdd');
if (ProjectMessage::canAdd(logged_user(), active_project())) {
    add_page_action(lang('add message'), get_url('message', 'add'));
}
// if
trace(__FILE__, 'ProjectTaskList::canAdd');
if (ProjectTaskList::canAdd(logged_user(), active_project())) {
    add_page_action(lang('add task list'), get_url('task', 'add_list'));
}
// if
trace(__FILE__, 'ProjectMilestone::canAdd');
if (ProjectMilestone::canAdd(logged_user(), active_project())) {
    add_page_action(lang('add milestone'), get_url('milestone', 'add'));
}
// if
//trace(__FILE__,'project.canChangePermissions()');
//if (active_project()->canChangePermissions(logged_user())) {
//  add_page_action(lang('permissions'), get_url('project', 'permissions'));
//} // if
trace(__FILE__, 'plugin hook');
// PLUGIN HOOK
plugin_manager()->do_action('project_overview_page_actions');
// PLUGIN HOOK
if (use_permitted(logged_user(), active_project(), 'tasks')) {
    add_page_action(lang('download task lists'), get_url('project', 'download_task_lists'));
}
Example #20
0
<?php

trace(__FILE__, 'begin');
/**
 * @author Alex Mayhew
 * @copyright 2008
 */
set_page_title(!$iscurrev ? lang('viewing revision of', $revision->getRevision(), $revision->getName()) : $revision->getName() . ' [' . $revision->getPageId() . ']');
project_tabbed_navigation();
project_crumbs(array(array(lang('wiki'), get_url('wiki')), array($revision->getName())));
if ($page->canAdd(logged_user(), active_project())) {
    add_page_action(lang('add wiki page'), $page->getAddUrl());
}
// if
if ($page->canEdit(logged_user(), active_project()) && !$page->isNew()) {
    add_page_action(lang('edit wiki page'), $page->getEditUrl());
    add_page_action(lang('view page history'), $page->getViewHistoryUrl());
}
// if
if ($page->canDelete(logged_user(), active_project()) && !$page->isNew() && $iscurrev) {
    add_page_action(lang('delete wiki page'), $page->getDeleteUrl());
}
add_page_action(lang('wiki public wiki'), externalUrl(ROOT_URL . '/' . PUBLIC_FOLDER . '/wiki'));
?>

<div id="wiki-page-content"><?php 
echo do_textile(plugin_manager()->apply_filters('wiki_text', do_textile($revision->getContent())));
?>
</div>
Example #21
0
<?php
set_page_title(lang('mail accounts'));

if (can_add_mail_accounts(logged_user())) {
	add_page_action(lang('add mail account'), get_url('mail', 'add_account'), 'ico-add');
} // if

$genid = gen_id();
?>

<div id="<?php echo $genid ?>adminContainer" class="adminMailAccounts"
	style="height: 100%; background-color: white">
<div class="adminHeader">
<div class="adminTitle"><?php echo lang('mail accounts') ?></div>
</div>
<div class="adminSeparator"></div>
<div class="adminMainBlock"><?php if(isset($all_accounts) && is_array($all_accounts) && count($all_accounts)) { ?>
<table class="adminListing" style="min-width: 400px; margin-top: 10px;">
	<tr>
		<th><?php echo lang('name') ?></th>
		<th><?php echo lang('email address') ?></th>
		<th><?php echo lang('created by') ?></th>
		<th><?php echo lang('incoming server') ?></th>
		<th><?php echo lang('outgoing server') ?></th>
		<th><?php echo lang('users') ?></th>
		<th><?php echo lang('options') ?></th>
	</tr>
	<?php
	$isAlt = true;
	foreach($all_accounts as $account) {
		$isAlt = !$isAlt;
Example #22
0
<?php

trace(__FILE__, ':begin');
// Set page title and set crumbs to index
set_page_title(lang('dashboard'));
dashboard_tabbed_navigation();
dashboard_crumbs(lang('overview'));
if (logged_user()->canManageProjects()) {
    //if (Project::canAdd(logged_user())) {
    add_page_action(lang('add project'), get_url('project', 'add'));
    add_page_action(lang('copy project'), get_url('project', 'copy'));
}
// if
add_stylesheet_to_page('project/project_log.css');
$lc_in = lc(lang('in'));
if (isset($today_milestones) && is_array($today_milestones) && count($today_milestones) || isset($late_milestones) && is_array($late_milestones) && count($late_milestones)) {
    ?>
<div id="lateOrTodayMilestones" class="important">
<?php 
    if (isset($late_milestones) && is_array($late_milestones) && count($late_milestones)) {
        ?>
  <div class="header"><?php 
        echo lang('late milestones');
        ?>
</div>
  <ul>
<?php 
        foreach ($late_milestones as $milestone) {
            if ($milestone->getAssignedTo() instanceof ApplicationDataObject) {
                ?>
    <li><?php 
Example #23
0
trace(__FILE__, 'begin');
// Set page title and set crumbs to index
set_page_title(lang('my tasks'));
dashboard_tabbed_navigation(DASHBOARD_TAB_MY_TASKS);
dashboard_crumbs(lang('my tasks'));
add_stylesheet_to_page('dashboard/my_tasks.css');
if (logged_user()->canManageProjects()) {
    add_page_action(lang('add project'), get_url('project', 'add'));
    add_page_action(lang('copy project'), get_url('project', 'copy'));
}
// if
add_page_action(lang('group by project'), get_url('dashboard', 'my_tasks'));
add_page_action(lang('order by name'), get_url('dashboard', 'my_tasks_by_name'));
add_page_action(lang('order by priority'), get_url('dashboard', 'my_tasks_by_priority'));
add_page_action(lang('order by milestone'), get_url('dashboard', 'my_tasks_by_milestone'));
// If user have any assigned task or milestone this variable will be changed to TRUE
// else it will remain false
$has_assigned_tasks = false;
if (isset($active_projects) && is_array($active_projects) && count($active_projects)) {
    ?>
<div id="myTasks">
<?php 
    foreach ($active_projects as $active_project) {
        $assigned_milestones = $active_project->getUsersMilestones(logged_user());
        $assigned_tasks = $active_project->getUsersTasks(logged_user());
        if (is_array($assigned_milestones) && count($assigned_milestones) || is_array($assigned_tasks) && count($assigned_tasks)) {
            $has_assigned_tasks = true;
            ?>
  <div class="block">
    <div class="header"><h2><a href="<?php 
Example #24
0
<?php

set_page_title($message->getTitle());
project_tabbed_navigation('messages');
project_crumbs(array(array(lang('messages'), get_url('message', 'index')), array(lang('view message'))));
if (ProjectMessage::canAdd(logged_user(), active_project())) {
    add_page_action(lang('add message'), get_url('message', 'add'));
}
// if
add_stylesheet_to_page('project/messages.css');
$createdBy = $message->getCreatedBy();
?>
<div class="message block">
  <div class="header">
<?php 
if ($message->isPrivate()) {
    ?>
    <div class="private" title="<?php 
    echo lang('private message');
    ?>
"><span><?php 
    echo lang('private message');
    ?>
</span></div>
<?php 
}
// if
if ($message->getCreatedBy() instanceof User) {
    ?>
    <div class="author"><?php 
    echo lang('posted on by', format_datetime($message->getCreatedOn()), $message->getCreatedBy()->getCardUrl(), clean($message->getCreatedBy()->getDisplayName()));
Example #25
0
<?php

trace(__FILE__, 'begin');
set_page_title(lang('project links'));
project_tabbed_navigation(PROJECT_TAB_LINKS);
project_crumbs(array(array(lang('links'), get_url('links', 'index')), array(lang('index'))));
if (ProjectLink::canAdd(logged_user(), active_project())) {
    add_page_action(lang('add link'), get_url('links', 'add_link'));
}
// if
add_stylesheet_to_page('project/files.css');
$counter = 0;
?>
<div id="files">
<?php 
if (isset($links) && is_array($links) && count($links)) {
    ?>
<div class="filesList">
<?php 
    foreach ($links as $link) {
        $counter++;
        ?>
  <div class="listedFile <?php 
        echo $counter % 2 ? 'even' : 'odd';
        ?>
">
  <div class="fileInfo">
      <div class="fileName"><a href="<?php 
        echo $link->asUrl();
        ?>
" title="<?php 
Example #26
0
<?php

  set_page_title(lang('milestones'));
  project_tabbed_navigation(PROJECT_TAB_MILESTONES);
  project_crumbs(lang('milestones'));
  if(ProjectMilestone::canAdd(logged_user(), active_context())) {
    add_page_action(lang('add milestone'), get_url('milestone', 'add'), 'ico-milestone');
  } // if

?>
<?php if($late_milestones || $today_milestones || $upcoming_milestones) { ?>
<div id="milestones">
<?php if(is_array($late_milestones) && count($late_milestones)) { ?>
  <div id="lateMilestones">
  <h2><?php echo lang('late milestones') ?></h2>
<?php 
  foreach($late_milestones as $milestone) {
    $this->assign('milestone', $milestone);
    $this->includeTemplate(get_template_path('view_milestone', 'milestone'));
  } // foreach 
?>
  </div>
<?php } // if ?>

<?php if(is_array($today_milestones) && count($today_milestones)) { ?>
  <div id="todayMilestones">
  <h2><?php echo lang('today milestones') ?></h2>
<?php 
  foreach($today_milestones as $milestone) {
    $this->assign('milestone', $milestone);
    $this->includeTemplate(get_template_path('view_milestone', 'milestone'));
<?php

// Set page title and set crumbs to index
set_page_title(lang('search results for', $search_term));
dashboard_tabbed_navigation(DASHBOARD_TAB_CONTACTS);
dashboard_crumbs(array(array(lang('contacts'), get_url('dashboard', 'contacts')), lang('search results')));
if (logged_user()->isAdministrator(owner_company())) {
    add_page_action(lang('add company'), get_url('company', 'add_client'));
    add_page_action(lang('add contact'), get_url('contacts', 'add'));
}
add_stylesheet_to_page('dashboard/contact_list.css');
if (is_array($contacts) && count($contacts)) {
    ?>
<div id="contactsList">
  <div id="contactsPaginationTop"><?php 
    echo advanced_pagination($contacts_pagination, get_url('dashboard', 'search_contacts', array('search_for' => $search_term, 'page' => '#PAGE#')));
    ?>
</div>

<?php 
    $counter = 0;
    if (is_array($contacts)) {
        foreach ($contacts as $contact) {
            $counter++;
            $company = $contact->getCompany();
            ?>
  <div class="listedContact <?php 
            echo $counter % 2 ? 'even' : 'odd';
            ?>
">
    <div class="contactAvatar"><img src="<?php 
Example #28
0
<?php

set_page_title(lang('forms'));
project_tabbed_navigation(PROJECT_TAB_FORMS);
project_crumbs(lang('forms'));
if (ProjectForm::canAdd(logged_user(), active_project())) {
    add_page_action(lang('add form'), get_url('form', 'add'));
}
// if
if (isset($forms) && is_array($forms) && count($forms)) {
    ?>
<div id="projectForms">
<?php 
    foreach ($forms as $form) {
        ?>
  <div class="block">
    <div class="header"><?php 
        echo clean($form->getName());
        ?>
</div>
    <div class="content">
<?php 
        if (trim($form->getDescription())) {
            ?>
      <div class="description"><?php 
            echo do_textile($form->getDescription());
            ?>
</div>
<?php 
        }
        // if
    $files_crumbs[] = array($folder->getName(), $folder->getBrowseUrl());
}
// if
$files_crumbs[] = lang('file details');
project_crumbs($files_crumbs);
if (ProjectFile::canAdd(logged_user(), active_project())) {
    if ($folder instanceof ProjectFolder) {
        add_page_action(lang('add file'), $folder->getAddFileUrl());
    } else {
        add_page_action(lang('add file'), get_url('files', 'add_file'));
    }
    // if
}
// if
if (ProjectFolder::canAdd(logged_user(), active_project())) {
    add_page_action(lang('add folder'), get_url('files', 'add_folder'));
}
// if
add_stylesheet_to_page('project/files.css');
?>
<div id="fileDetails" class="block">
<?php 
if ($file->isPrivate()) {
    ?>
  <div class="private" title="<?php 
    echo lang('private file');
    ?>
"><span><?php 
    echo lang('private file');
    ?>
</span></div>
Example #30
0
 if (!$event->isTrashed()) {
     if ($event->canEdit(logged_user())) {
         add_page_action(lang('edit'), "javascript:og.render_modal_form('', {c:'event', a:'edit', params: {id:" . $event->getId() . ", view:'{$view}', user_id:'{$user_id}'}});", 'ico-edit', null, null, true);
         if (!$event->isArchived()) {
             add_page_action(lang('archive'), "javascript:if(confirm(lang('confirm archive object'))) og.openLink('" . $event->getArchiveUrl() . "');", 'ico-archive-obj');
         } else {
             add_page_action(lang('unarchive'), "javascript:if(confirm(lang('confirm unarchive object'))) og.openLink('" . $event->getUnarchiveUrl() . "');", 'ico-unarchive-obj');
         }
     }
 }
 if ($event->canDelete(logged_user())) {
     if ($event->isTrashed()) {
         add_page_action(lang('restore from trash'), "javascript:if(confirm(lang('confirm restore objects'))) og.openLink('" . $event->getUntrashUrl() . "');", 'ico-restore', null, null, true);
         add_page_action(lang('delete permanently'), "javascript:if(confirm(lang('confirm delete permanently'))) og.openLink('" . $event->getDeletePermanentlyUrl() . "');", 'ico-delete', null, null, true);
     } else {
         add_page_action(lang('move to trash'), "javascript:if(confirm(lang('confirm move to trash'))) og.openLink('" . $event->getTrashUrl() . "');", 'ico-trash', null, null, true);
     }
 }
 // if
 $modified = "";
 $error = "";
 // Do this if we are MODIFYING a form.
 $id = $_GET['id'];
 if (!is_numeric($id)) {
     $error = lang('CAL_NO_EVENT_SELECTED');
 }
 // get user who submitted the event, subject, event description, etc.
 $username = clean($event->getCreatedByDisplayName());
 $subject = clean($event->getObjectName());
 $alias = clean($event->getCreatedByDisplayName());
 $desc = escape_html_whitespace(convert_to_links(clean($event->getDescription())));