init
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
global $current_user;
|
||||
|
||||
$dashletData['MyProjectTaskDashlet']['searchFields'] = array(
|
||||
'date_entered' => array('default' => ''),
|
||||
'priority' => array('default' => ''),
|
||||
'date_start' => array('default' => ''),
|
||||
'date_finish' => array('default' => ''),
|
||||
'assigned_user_id' => array('type' => 'assigned_user_name',
|
||||
'label' => 'LBL_ASSIGNED_TO',
|
||||
'default' => $current_user->name),
|
||||
|
||||
);
|
||||
$dashletData['MyProjectTaskDashlet']['columns'] = array('name' => array('width' => '45',
|
||||
'label' => 'LBL_NAME',
|
||||
'link' => true,
|
||||
'default' => true),
|
||||
'priority' => array('width' => '15',
|
||||
'label' => 'LBL_PRIORITY',
|
||||
'default' => true,
|
||||
),
|
||||
'date_start' => array('width' => '15',
|
||||
'label' => 'LBL_DATE_START',
|
||||
'default' => true),
|
||||
'time_start' => array('width' => '15',
|
||||
'label' => 'LBL_TIME_START'),
|
||||
'date_finish' => array('width' => '15',
|
||||
'label' => 'LBL_DATE_FINISH',
|
||||
'default' => true),
|
||||
'time_finish' => array('width' => '15',
|
||||
'label' => 'LBL_TIME_FINISH'),
|
||||
'percent_complete' => array('width' => '10',
|
||||
'label' => 'LBL_PERCENT_COMPLETE',
|
||||
'default' => true),
|
||||
'project_name' => array('width' => '30',
|
||||
'label' => 'LBL_PROJECT_NAME',
|
||||
'related_fields' => array('project_id')),
|
||||
'milestone_flag' => array('width' => '10',
|
||||
'label' => 'LBL_MILESTONE_FLAG'),
|
||||
'date_entered' => array('width' => '15',
|
||||
'label' => 'LBL_DATE_ENTERED'),
|
||||
'date_modified' => array('width' => '15',
|
||||
'label' => 'LBL_DATE_MODIFIED'),
|
||||
'created_by' => array('width' => '8',
|
||||
'label' => 'LBL_CREATED'),
|
||||
'assigned_user_name' => array('width' => '8',
|
||||
'label' => 'LBL_LIST_ASSIGNED_USER'),
|
||||
);
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
global $app_strings;
|
||||
|
||||
$dashletMeta['MyProjectTaskDashlet'] = array('module' => 'ProjectTask',
|
||||
'title' => translate('LBL_LIST_MY_PROJECT_TASKS', 'ProjectTask'),
|
||||
'description' => 'A customizable view into Project Tasks',
|
||||
'category' => 'Module Views',
|
||||
'hidden' => true);
|
||||
?>
|
||||
69
modules/ProjectTask/Dashlets/MyProjectTaskDashlet/MyProjectTaskDashlet.php
Executable file
69
modules/ProjectTask/Dashlets/MyProjectTaskDashlet/MyProjectTaskDashlet.php
Executable file
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
require_once('include/Dashlets/DashletGeneric.php');
|
||||
|
||||
|
||||
class MyProjectTaskDashlet extends DashletGeneric {
|
||||
function MyProjectTaskDashlet($id, $def = null) {
|
||||
global $current_user, $app_strings;
|
||||
require('modules/ProjectTask/Dashlets/MyProjectTaskDashlet/MyProjectTaskDashlet.data.php');
|
||||
|
||||
parent::DashletGeneric($id, $def);
|
||||
|
||||
if(empty($def['title'])) $this->title = translate('LBL_LIST_MY_PROJECT_TASKS', 'ProjectTask');
|
||||
|
||||
$this->searchFields = $dashletData['MyProjectTaskDashlet']['searchFields'];
|
||||
$this->columns = $dashletData['MyProjectTaskDashlet']['columns'];
|
||||
|
||||
$this->seedBean = new ProjectTask();
|
||||
}
|
||||
|
||||
function buildWhere()
|
||||
{
|
||||
$resultArray = parent::buildWhere();
|
||||
|
||||
$resultArray[] = $this->seedBean->table_name . '.' . "percent_complete != 100";
|
||||
|
||||
return $resultArray;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
87
modules/ProjectTask/Delete.php
Executable file
87
modules/ProjectTask/Delete.php
Executable file
@@ -0,0 +1,87 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$sugarbean = new ProjectTask();
|
||||
|
||||
// perform the delete if given a record to delete
|
||||
|
||||
if(empty($_REQUEST['record']))
|
||||
{
|
||||
$GLOBALS['log']->info('delete called without a record id specified');
|
||||
}
|
||||
else
|
||||
{
|
||||
$record = $_REQUEST['record'];
|
||||
$sugarbean->retrieve($record);
|
||||
if(!$sugarbean->ACLAccess('Delete')){
|
||||
ACLController::displayNoAccess(true);
|
||||
sugar_cleanup(true);
|
||||
}
|
||||
$GLOBALS['log']->info("deleting record: $record");
|
||||
$sugarbean->mark_deleted($record);
|
||||
}
|
||||
|
||||
// handle the return location variables
|
||||
|
||||
$return_module = empty($_REQUEST['return_module']) ? 'ProjectTask'
|
||||
: $_REQUEST['return_module'];
|
||||
|
||||
$return_action = empty($_REQUEST['return_action']) ? 'index'
|
||||
: $_REQUEST['return_action'];
|
||||
|
||||
$return_id = empty($_REQUEST['return_id']) ? ''
|
||||
: $_REQUEST['return_id'];
|
||||
|
||||
$return_location = "index.php?module=$return_module&action=$return_action";
|
||||
|
||||
// append the return_id if given
|
||||
|
||||
if(!empty($return_id))
|
||||
{
|
||||
$return_location .= "&record=$return_id";
|
||||
}
|
||||
|
||||
// now that the delete has been performed, return to given location
|
||||
|
||||
header("Location: $return_location");
|
||||
?>
|
||||
66
modules/ProjectTask/Forms.html
Executable file
66
modules/ProjectTask/Forms.html
Executable file
@@ -0,0 +1,66 @@
|
||||
<!--
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
-->
|
||||
|
||||
<!-- BEGIN: main -->
|
||||
<script type="text/javascript" src="include/javascript/popup_parent_helper.js?s={SUGAR_VERSION}&c={JS_CUSTOM_VERSION}"></script>
|
||||
<form action="index.php" method="post" id="quick_save" name="quick_save"
|
||||
onsubmit="return check_form('quick_save');">
|
||||
<input type="hidden" name="module" value="ProjectTask" />
|
||||
<input type="hidden" name="action" value="Save" />
|
||||
<input type="hidden" name="return_action" value="index" />
|
||||
<input type="hidden" name="return_module" value="ProjectTask" />
|
||||
<input type="hidden" name="project_id" value="{project_id}" />
|
||||
<input type="hidden" name="parent_id" value="{parent_id}" />
|
||||
<input type="hidden" name="status" value="Not Started" />
|
||||
<input type="hidden" name="record" value="" />
|
||||
<p>
|
||||
{mod.LBL_NAME} <span class="required">{app.LBL_REQUIRED_SYMBOL}</span><br />
|
||||
<input type="text" name="name" value="" /><br />
|
||||
{mod.LBL_PARENT_ID} <span class="required">{app.LBL_REQUIRED_SYMBOL}</span><br />
|
||||
<input readonly="readonly" name="project_name" type="text" size="16"
|
||||
value="" /> <input title="{app.LBL_SELECT_BUTTON_TITLE}"
|
||||
accessKey="{app.LBL_SELECT_BUTTON_KEY}" type="button" class="button"
|
||||
value='{app.LBL_SELECT_BUTTON_LABEL}' name="btn1"
|
||||
onclick='open_popup("Project", 600, 400, "", true, false, {encoded_popup_request_data});' /><br />
|
||||
{mod.LBL_ASSIGNED_USER_ID}<br />
|
||||
<select name="assigned_user_id">{ASSIGNED_USER_OPTIONS}</select><br />
|
||||
</p>
|
||||
<p><input class="button" title="{app.LBL_SAVE_BUTTON_TITLE}"
|
||||
type="submit" name="button" value="{app.LBL_SAVE_BUTTON_LABEL}"
|
||||
accessKey="{app.LBL_SAVE_BUTTON_KEY}" /></p>
|
||||
</form>
|
||||
<!-- END: main -->
|
||||
58
modules/ProjectTask/Menu.php
Executable file
58
modules/ProjectTask/Menu.php
Executable file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
$module_menu = array();
|
||||
global $mod_strings;
|
||||
|
||||
// Each index of module_menu must be an array of:
|
||||
// the link url, display text for the link, and the icon name.
|
||||
|
||||
if(ACLController::checkAccess('Project', 'edit', true))$module_menu[] = array("index.php?module=Project&action=EditView&return_module=Project&return_action=DetailView",
|
||||
$mod_strings['LNK_NEW_PROJECT'], 'CreateProject');
|
||||
if(ACLController::checkAccess('Project', 'list', true))$module_menu[] = array('index.php?module=Project&action=index',
|
||||
$mod_strings['LNK_PROJECT_LIST'], 'Project');
|
||||
/*
|
||||
if(ACLController::checkAccess('ProjectTask', 'edit', true))$module_menu[] = array("index.php?module=ProjectTask&action=EditView&return_module=ProjectTask&return_action=DetailView",
|
||||
$mod_strings['LNK_NEW_PROJECT_TASK'], 'CreateProjectTask');
|
||||
*/
|
||||
if(ACLController::checkAccess('ProjectTask', 'list', true))$module_menu[] = array('index.php?module=ProjectTask&action=index',
|
||||
$mod_strings['LNK_PROJECT_TASK_LIST'], 'ProjectTask');
|
||||
|
||||
|
||||
?>
|
||||
65
modules/ProjectTask/MyProjectTasks.html
Executable file
65
modules/ProjectTask/MyProjectTasks.html
Executable file
@@ -0,0 +1,65 @@
|
||||
<!--
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
-->
|
||||
|
||||
<!-- BEGIN: main -->
|
||||
<table cellpadding="0" cellspacing="0" width="100%" border="0" class="list view">
|
||||
<!-- BEGIN: list_nav_row -->
|
||||
{PAGINATION}
|
||||
<!-- END: list_nav_row -->
|
||||
<tr height="20">
|
||||
<td scope="col" align="left" nowrap="nowrap">{CHECKALL}</td>
|
||||
<td scope="col" width="3%" align="center" nowrap="nowrap"><slot><a href="{ORDER_BY}status" class="listViewThLinkS1">{MOD.LBL_LIST_CLOSE}{arrow_start}{status_arrow}{arrow_end}</a></slot></td>
|
||||
<td scope="col" width="57%" align="left" nowrap="nowrap"><slot><a href="{ORDER_BY}name" class="listViewThLinkS1">{MOD.LBL_LIST_NAME}{arrow_start}{name_arrow}{arrow_end}</a></slot></td>
|
||||
<td scope="col" width="20%" nowrap="nowrap"><slot><a href="{ORDER_BY}priority" class="listViewThLinkS1">{MOD.LBL_LIST_PRIORITY}{arrow_start}{priority_arrow}{arrow_end}</a></slot></td>
|
||||
<td scope="col" width="20%" nowrap="nowrap"><slot><a href="{ORDER_BY}date_due" class="listViewThLinkS1">{MOD.LBL_LIST_DATE_DUE}{arrow_start}{date_due_arrow}{arrow_end}</a></slot></td>
|
||||
</tr>
|
||||
|
||||
<!-- BEGIN: row -->
|
||||
<tr height="20" class="{ROW_COLOR}S1">
|
||||
<td valign="top">{PREROW}</td>
|
||||
<td nowrap="nowrap" align="center" valign="top"><slot>{PROJECT_TASK.SET_COMPLETE}</slot></td>
|
||||
<td scope="row" valign="top"><slot><{TAG.MAIN} href="{URL_PREFIX}index.php?module=ProjectTask&action=DetailView&record={PROJECT_TASK.ID}" >{PROJECT_TASK.NAME}</{TAG.MAIN}></slot></td>
|
||||
<td nowrap="nowrap" valign="top"><slot>{PROJECT_TASK.PRIORITY}</slot></td>
|
||||
<td nowrap="nowrap" valign="top"><slot>{PROJECT_TASK.DATE_DUE}</slot></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="20" class="listViewHRS1"></td>
|
||||
</tr>
|
||||
<!-- END: row -->
|
||||
</table>
|
||||
<!-- END: main -->
|
||||
75
modules/ProjectTask/MyProjectTasks.php
Executable file
75
modules/ProjectTask/MyProjectTasks.php
Executable file
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
global $timedate;
|
||||
global $app_strings;
|
||||
global $app_list_strings;
|
||||
global $current_language, $current_user;
|
||||
$current_module_strings = return_module_language($current_language, 'ProjectTask');
|
||||
|
||||
$today = date($GLOBALS['timedate']->dbDayFormat);
|
||||
$today = $timedate->handle_offset($today, $timedate->dbDayFormat, false);
|
||||
|
||||
$ListView = new ListView();
|
||||
$seedProjectTask = new ProjectTask();
|
||||
$where = "project_task.assigned_user_id='{$current_user->id}'"
|
||||
. " AND (project_task.status IS NULL OR (project_task.status!='Completed' AND project_task.status!='Deferred'))"
|
||||
. " AND (project_task.date_start IS NULL OR project_task.date_start <= '$today')";
|
||||
$ListView->initNewXTemplate('modules/ProjectTask/MyProjectTasks.html',
|
||||
$current_module_strings);
|
||||
$header_text = '';
|
||||
|
||||
if(is_admin($current_user)
|
||||
&& $_REQUEST['module'] != 'DynamicLayout'
|
||||
&& !empty($_SESSION['editinplace']))
|
||||
{
|
||||
$header_text = " <a href='index.php?action=index&module=DynamicLayout&from_action=MyTasks&from_module=Tasks'>"
|
||||
. SugarThemeRegistry::current()->getImage("EditLayout","border='0' alt='Edit Layout' align='bottom'")
|
||||
. '</a>';
|
||||
}
|
||||
$ListView->setHeaderTitle($current_module_strings['LBL_LIST_MY_PROJECT_TASKS'].$header_text);
|
||||
$ListView->setQuery($where, "", "date_due,priority desc", "PROJECT_TASK");
|
||||
$ListView->processListView($seedProjectTask, "main", "PROJECT_TASK");
|
||||
?>
|
||||
115
modules/ProjectTask/Popup.html
Executable file
115
modules/ProjectTask/Popup.html
Executable file
@@ -0,0 +1,115 @@
|
||||
<!--
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
-->
|
||||
|
||||
<!-- BEGIN: main -->
|
||||
<!-- BEGIN: SearchHeader -->
|
||||
|
||||
{SET_RETURN_JS}
|
||||
|
||||
<script type="text/javascript">
|
||||
function toggleDisplay(id){
|
||||
|
||||
if(this.document.getElementById( id).style.display=='none'){
|
||||
this.document.getElementById( id).style.display='inline'
|
||||
if(this.document.getElementById(id+"link") != undefined){
|
||||
this.document.getElementById(id+"link").style.display='none';
|
||||
}
|
||||
|
||||
}else{
|
||||
this.document.getElementById( id).style.display='none'
|
||||
if(this.document.getElementById(id+"link") != undefined){
|
||||
this.document.getElementById(id+"link").style.display='inline';
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="edit view">
|
||||
<tr>
|
||||
<td>
|
||||
<div id='divsearchform' style='display:inline'>
|
||||
<form>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td scope="row" nowrap="nowrap" width="40%">{MOD.LBL_NAME} <input type="text" name="name" size="20" value="{NAME}" /></td>
|
||||
<td width="10%" align="right">
|
||||
<input type="hidden" name="module" value="{MODULE_NAME}" />
|
||||
<input type="hidden" name="action" value="Popup"/>
|
||||
<input type="hidden" name="query" value="true"/>
|
||||
<input type="hidden" name="form_submit" value="{FORM_SUBMIT}" />
|
||||
<input type="hidden" name="form" value="{FORM}" />
|
||||
<input type="hidden" name="parent_id" value="{parent_id}" />
|
||||
<input type="hidden" name="parent_name" value="{parent_name}" />
|
||||
<input type="submit" name="button" class="button"
|
||||
title="{APP.LBL_SEARCH_BUTTON_TITLE}"
|
||||
accesskey="{APP.LBL_SEARCH_BUTTON_KEY}"
|
||||
value="{APP.LBL_SEARCH_BUTTON_LABEL}" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form></div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<!-- END: SearchHeader -->
|
||||
|
||||
<!-- BEGIN: SearchHeaderEnd -->
|
||||
|
||||
<!-- END: SearchHeaderEnd -->
|
||||
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="list view">
|
||||
<!-- BEGIN: list_nav_row -->
|
||||
{PAGINATION}
|
||||
<!-- END: list_nav_row -->
|
||||
<tr height="20" >
|
||||
<td scope="col" width="65%" ><a href="{ORDER_BY}name" class="listViewThLinkS1">{MOD.LBL_LIST_NAME}{arrow_start}{name_arrow}{arrow_end}</a></td>
|
||||
<td scope="col" width="35%" ><a href="{ORDER_BY}assigned_user_name" class="listViewThLinkS1">{MOD.LBL_LIST_ASSIGNED_USER_ID}{arrow_start}{assigned_user_name_arrow}{arrow_end}</a></td>
|
||||
</tr>
|
||||
|
||||
<!-- BEGIN: row -->
|
||||
<tr height="20" class="{ROW_COLOR}S1">
|
||||
<td scope="row"><a href="#"
|
||||
onclick="set_return('{project_task.ID}', '{project_task.NAME}'); window.close();">{project_task.NAME}</a></td>
|
||||
<td valign="top">{project_task.ASSIGNED_USER_NAME}</td>
|
||||
</tr>
|
||||
|
||||
<!-- END: row -->
|
||||
|
||||
</table>
|
||||
|
||||
<!-- END: main -->
|
||||
46
modules/ProjectTask/Popup.php
Executable file
46
modules/ProjectTask/Popup.php
Executable file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
require_once('include/Popups/Popup_picker.php');
|
||||
|
||||
$popup = new Popup_Picker();
|
||||
|
||||
echo $popup->process_page();
|
||||
|
||||
?>
|
||||
102
modules/ProjectTask/Popup_picker.html
Executable file
102
modules/ProjectTask/Popup_picker.html
Executable file
@@ -0,0 +1,102 @@
|
||||
<!--
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
-->
|
||||
|
||||
<!-- BEGIN: main -->
|
||||
<!-- BEGIN: SearchHeader -->
|
||||
<script type="text/javascript" src="include/JSON.js?s={SUGAR_VERSION}&c={JS_CUSTOM_VERSION}"></script>
|
||||
<script type="text/javascript" src="include/javascript/popup_helper.js?s={SUGAR_VERSION}&c={JS_CUSTOM_VERSION}"></script>
|
||||
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="edit view">
|
||||
<tr>
|
||||
<td>
|
||||
<form action="index.php" method="post" name="popup_query_form" id="popup_query_form">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td scope="row" nowrap="nowrap" width="40%">{MOD.LBL_NAME} <input type="text" name="name" size="20" value="{NAME}" /></td>
|
||||
<td width="10%" align="right">
|
||||
<input type="hidden" name="module" value="{MODULE_NAME}" />
|
||||
<input type="hidden" name="action" value="Popup" />
|
||||
<input type="hidden" name="query" value="true" />
|
||||
<input type="hidden" name="func_name" value="" />
|
||||
<input type="hidden" name="request_data" value="{request_data}" />
|
||||
<input type="hidden" name="populate_parent" value="false" />
|
||||
<input type="hidden" name="record_id" value="" />
|
||||
<input type="submit" name="button" class="button"
|
||||
title="{APP.LBL_SEARCH_BUTTON_TITLE}"
|
||||
accessKey="{APP.LBL_SEARCH_BUTTON_KEY}"
|
||||
value="{APP.LBL_SEARCH_BUTTON_LABEL}" />
|
||||
<input type="hidden" name="mode" value="{MULTI_SELECT}" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
/* initialize the popup request from the parent */
|
||||
|
||||
if(window.document.forms['popup_query_form'].request_data.value == "")
|
||||
{
|
||||
window.document.forms['popup_query_form'].request_data.value
|
||||
= JSON.stringify(window.opener.get_popup_request_data());
|
||||
}
|
||||
-->
|
||||
</script>
|
||||
<!-- END: SearchHeader -->
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="list view">
|
||||
<!-- BEGIN: list_nav_row -->
|
||||
{PAGINATION}
|
||||
<!-- END: list_nav_row -->
|
||||
<tr height="20" >
|
||||
<td scope="col" NOWRAP>{CHECKALL}</td>
|
||||
<td scope="col" width="65%" ><a href="{ORDER_BY}name" class="listViewThLinkS1">{MOD.LBL_LIST_NAME}{arrow_start}{name_arrow}{arrow_end}</a></td>
|
||||
<td scope="col" width="35%" ><a href="{ORDER_BY}assigned_user_name" class="listViewThLinkS1">{MOD.LBL_LIST_ASSIGNED_USER_ID}{arrow_start}{assigned_user_name_arrow}{arrow_end}</a></td>
|
||||
</tr>
|
||||
<!-- BEGIN: row -->
|
||||
<tr height="20" class="{ROW_COLOR}S1">
|
||||
<td valign="top">{PREROW}</td>
|
||||
<td scope="row"><a href="#"
|
||||
onclick="send_back('ProjectTask','{PROJECT_TASK.ID}');">{PROJECT_TASK.NAME}</a></td>
|
||||
<td valign="top">{PROJECT_TASK.ASSIGNED_USER_NAME}</td>
|
||||
</tr>
|
||||
|
||||
<!-- END: row -->
|
||||
</table>
|
||||
{ASSOCIATED_JAVASCRIPT_DATA}
|
||||
<!-- END: main -->
|
||||
42
modules/ProjectTask/ProjectTask.js
Normal file
42
modules/ProjectTask/ProjectTask.js
Normal file
@@ -0,0 +1,42 @@
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
function update_status(percent_complete){if(percent_complete=='0'){document.getElementById('status').value='Not Started';}
|
||||
else if(percent_complete=='100'){document.getElementById('status').value='Completed';}
|
||||
else if(isNaN(percent_complete)||(percent_complete<0||percent_complete>100)){document.getElementById('percent_complete').value='';}
|
||||
else{document.getElementById('status').value='In Progress';}}
|
||||
function update_percent_complete(status){if(status=='In Progress'){percent_value='50';}
|
||||
else if(status=='Completed'){percent_value='100';}
|
||||
else{percent_value='0';}
|
||||
document.getElementById('percent_complete').value=percent_value;}
|
||||
370
modules/ProjectTask/ProjectTask.php
Executable file
370
modules/ProjectTask/ProjectTask.php
Executable file
@@ -0,0 +1,370 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class ProjectTask extends SugarBean {
|
||||
// database table columns
|
||||
var $id;
|
||||
var $date_entered;
|
||||
var $date_modified;
|
||||
//var $assigned_user_id;
|
||||
//var $modified_user_id;
|
||||
//var $created_by;
|
||||
var $name;
|
||||
var $description;
|
||||
var $project_id;
|
||||
var $project_task_id;
|
||||
var $date_start;
|
||||
var $date_finish;
|
||||
var $duration;
|
||||
var $duration_unit;
|
||||
var $percent_complete;
|
||||
var $parent_task_id;
|
||||
var $predecessors;
|
||||
var $priority;
|
||||
|
||||
// related information
|
||||
var $assigned_user_name;
|
||||
var $parent_name;
|
||||
var $depends_on_name;
|
||||
var $email_id;
|
||||
|
||||
var $table_name = 'project_task';
|
||||
var $object_name = 'ProjectTask';
|
||||
var $module_dir = 'ProjectTask';
|
||||
|
||||
var $field_name_map;
|
||||
var $new_schema = true;
|
||||
|
||||
var $relationship_fields = array(
|
||||
'email_id' => 'emails',
|
||||
);
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// METHODS
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
function ProjectTask($init=true)
|
||||
{
|
||||
parent::SugarBean();
|
||||
if ($init) {
|
||||
// default value for a clean instantiation
|
||||
$this->utilization = 100;
|
||||
|
||||
global $current_user;
|
||||
if(empty($current_user))
|
||||
{
|
||||
$this->assigned_user_id = 1;
|
||||
$admin_user = new User();
|
||||
$admin_user->retrieve($this->assigned_user_id);
|
||||
$this->assigned_user_name = $admin_user->user_name;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->assigned_user_id = $current_user->id;
|
||||
$this->assigned_user_name = $current_user->user_name;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function save($check_notify = FALSE){
|
||||
$id = parent::save($check_notify);
|
||||
return $id;
|
||||
}
|
||||
|
||||
/**
|
||||
* overriding the base class function to do a join with users table
|
||||
*/
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
function fill_in_additional_detail_fields()
|
||||
{
|
||||
$this->assigned_user_name = get_assigned_user_name($this->assigned_user_id);
|
||||
$this->project_name = $this->_get_project_name($this->project_id);
|
||||
/*
|
||||
$this->depends_on_name = $this->_get_depends_on_name($this->depends_on_id);
|
||||
if(empty($this->depends_on_name))
|
||||
{
|
||||
$this->depends_on_id = '';
|
||||
}
|
||||
$this->parent_name = $this->_get_parent_name($this->parent_id);
|
||||
if(empty($this->parent_name))
|
||||
{
|
||||
$this->parent_id = '';
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
function fill_in_additional_list_fields()
|
||||
{
|
||||
$this->assigned_user_name = get_assigned_user_name($this->assigned_user_id);
|
||||
//$this->parent_name = $this->_get_parent_name($this->parent_id);
|
||||
$this->project_name = $this->_get_project_name($this->project_id);
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
function get_summary_text()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
function _get_depends_on_name($depends_on_id)
|
||||
{
|
||||
$return_value = '';
|
||||
|
||||
$query = "SELECT name, assigned_user_id FROM {$this->table_name} WHERE id='{$depends_on_id}'";
|
||||
$result = $this->db->query($query,true," Error filling in additional detail fields: ");
|
||||
$row = $this->db->fetchByAssoc($result);
|
||||
if($row != null)
|
||||
{
|
||||
$this->depends_on_name_owner = $row['assigned_user_id'];
|
||||
$this->depends_on_name_mod = 'ProjectTask';
|
||||
$return_value = $row['name'];
|
||||
}
|
||||
|
||||
return $return_value;
|
||||
}
|
||||
|
||||
function _get_project_name($project_id)
|
||||
{
|
||||
$return_value = '';
|
||||
|
||||
$query = "SELECT name, assigned_user_id FROM project WHERE id='{$project_id}'";
|
||||
$result = $this->db->query($query,true," Error filling in additional detail fields: ");
|
||||
$row = $this->db->fetchByAssoc($result);
|
||||
if($row != null)
|
||||
{
|
||||
//$this->parent_name_owner = $row['assigned_user_id'];
|
||||
//$this->parent_name_mod = 'Project';
|
||||
$return_value = $row['name'];
|
||||
}
|
||||
|
||||
return $return_value;
|
||||
}
|
||||
/*
|
||||
*
|
||||
*/
|
||||
function _get_parent_name($parent_id)
|
||||
{
|
||||
$return_value = '';
|
||||
|
||||
$query = "SELECT name, assigned_user_id FROM project WHERE id='{$parent_id}'";
|
||||
$result = $this->db->query($query,true," Error filling in additional detail fields: ");
|
||||
$row = $this->db->fetchByAssoc($result);
|
||||
if($row != null)
|
||||
{
|
||||
$this->parent_name_owner = $row['assigned_user_id'];
|
||||
$this->parent_name_mod = 'Project';
|
||||
$return_value = $row['name'];
|
||||
}
|
||||
|
||||
return $return_value;
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
function build_generic_where_clause ($the_query_string)
|
||||
{
|
||||
$where_clauses = array();
|
||||
$the_query_string = $GLOBALS['db']->quote($the_query_string);
|
||||
array_push($where_clauses, "project_task.name like '$the_query_string%'");
|
||||
|
||||
$the_where = "";
|
||||
foreach($where_clauses as $clause)
|
||||
{
|
||||
if($the_where != "") $the_where .= " or ";
|
||||
$the_where .= $clause;
|
||||
}
|
||||
|
||||
return $the_where;
|
||||
}
|
||||
|
||||
function get_list_view_data(){
|
||||
global $action, $currentModule, $focus, $current_module_strings, $app_list_strings, $timedate, $locale;
|
||||
$today = $timedate->handle_offset(date($GLOBALS['timedate']->get_db_date_time_format(), time()), $timedate->dbDayFormat, true);
|
||||
$task_fields =$this->get_list_view_array();
|
||||
//$date_due = $timedate->to_db_date($task_fields['DATE_DUE'],false);
|
||||
if (isset($this->parent_type))
|
||||
$task_fields['PARENT_MODULE'] = $this->parent_type;
|
||||
/*
|
||||
if ($this->status != "Completed" && $this->status != "Deferred" ) {
|
||||
$task_fields['SET_COMPLETE'] = "<a href='index.php?return_module=$currentModule&return_action=$action&return_id=" . ((!empty($focus->id)) ? $focus->id : "") . "&module=ProjectTask&action=EditView&record={$this->id}&status=Completed'>".SugarThemeRegistry::current()->getImage("close_inline","alt='Close' border='0'")."</a>";
|
||||
}
|
||||
|
||||
if( $date_due < $today){
|
||||
$task_fields['DATE_DUE']= "<font class='overdueTask'>".$task_fields['DATE_DUE']."</font>";
|
||||
}else if( $date_due == $today ){
|
||||
$task_fields['DATE_DUE'] = "<font class='todaysTask'>".$task_fields['DATE_DUE']."</font>";
|
||||
}else{
|
||||
$task_fields['DATE_DUE'] = "<font class='futureTask'>".$task_fields['DATE_DUE']."</font>";
|
||||
}
|
||||
*/
|
||||
|
||||
if ( !isset($task_fields["FIRST_NAME"]) )
|
||||
$task_fields["FIRST_NAME"] = '';
|
||||
if ( !isset($task_fields["LAST_NAME"]) )
|
||||
$task_fields["LAST_NAME"] = '';
|
||||
$task_fields['CONTACT_NAME']= $locale->getLocaleFormattedName($task_fields["FIRST_NAME"],$task_fields["LAST_NAME"]);
|
||||
$task_fields['TITLE'] = '';
|
||||
if (!empty($task_fields['CONTACT_NAME'])) {
|
||||
$task_fields['TITLE'] .= $current_module_strings['LBL_LIST_CONTACT'].": ".$task_fields['CONTACT_NAME'];
|
||||
}
|
||||
|
||||
return $task_fields;
|
||||
}
|
||||
|
||||
function bean_implements($interface){
|
||||
switch($interface){
|
||||
case 'ACL':return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function listviewACLHelper(){
|
||||
$array_assign = parent::listviewACLHelper();
|
||||
$is_owner = false;
|
||||
if(!empty($this->parent_name)){
|
||||
|
||||
if(!empty($this->parent_name_owner)){
|
||||
global $current_user;
|
||||
$is_owner = $current_user->id == $this->parent_name_owner;
|
||||
}
|
||||
}
|
||||
if(ACLController::checkAccess('Project', 'view', $is_owner)){
|
||||
$array_assign['PARENT'] = 'a';
|
||||
}else{
|
||||
$array_assign['PARENT'] = 'span';
|
||||
}
|
||||
$is_owner = false;
|
||||
if(!empty($this->depends_on_name)){
|
||||
|
||||
if(!empty($this->depends_on_name_owner)){
|
||||
global $current_user;
|
||||
$is_owner = $current_user->id == $this->depends_on_name_owner;
|
||||
}
|
||||
}
|
||||
if( ACLController::checkAccess('ProjectTask', 'view', $is_owner)){
|
||||
$array_assign['PARENT_TASK'] = 'a';
|
||||
}else{
|
||||
$array_assign['PARENT_TASK'] = 'span';
|
||||
}
|
||||
|
||||
return $array_assign;
|
||||
}
|
||||
|
||||
function create_export_query(&$order_by, &$where, $relate_link_join='')
|
||||
{
|
||||
$custom_join = $this->custom_fields->getJOIN(true, true,$where);
|
||||
if($custom_join)
|
||||
$custom_join['join'] .= $relate_link_join;
|
||||
$query = "SELECT
|
||||
project_task.*,
|
||||
users.user_name as assigned_user_name ";
|
||||
if($custom_join){
|
||||
$query .= $custom_join['select'];
|
||||
}
|
||||
$query .= " FROM project_task ";
|
||||
|
||||
if($custom_join){
|
||||
$query .= $custom_join['join'];
|
||||
}
|
||||
$query .= " LEFT JOIN users
|
||||
ON project_task.assigned_user_id=users.id ";
|
||||
|
||||
$where_auto = " project_task.deleted=0 ";
|
||||
|
||||
if($where != "")
|
||||
$query .= "where ($where) AND ".$where_auto;
|
||||
else
|
||||
$query .= "where ".$where_auto;
|
||||
|
||||
if(!empty($order_by)){
|
||||
//check to see if order by variable already has table name by looking for dot "."
|
||||
$table_defined_already = strpos($order_by, ".");
|
||||
|
||||
if($table_defined_already === false){
|
||||
//table not defined yet, define accounts to avoid "ambigous column" SQL error
|
||||
$query .= " ORDER BY $order_by";
|
||||
}else{
|
||||
//table already defined, just add it to end of query
|
||||
$query .= " ORDER BY $order_by";
|
||||
}
|
||||
}
|
||||
return $query;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function getUtilizationDropdown($focus, $field, $value, $view) {
|
||||
global $app_list_strings;
|
||||
|
||||
if($view == 'EditView') {
|
||||
global $app_list_strings;
|
||||
$html = '<select name="'.$field.'">';
|
||||
$html .= get_select_options_with_id($app_list_strings['project_task_utilization_options'], $value);
|
||||
$html .= '</select>';
|
||||
return $html;
|
||||
}
|
||||
|
||||
return translate('project_task_utilization_options', '', $focus->$field);
|
||||
}
|
||||
?>
|
||||
101
modules/ProjectTask/ProjectTaskQuickCreate.php
Executable file
101
modules/ProjectTask/ProjectTaskQuickCreate.php
Executable file
@@ -0,0 +1,101 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
require_once('include/EditView/QuickCreate.php');
|
||||
|
||||
|
||||
|
||||
class ProjectTaskQuickCreate extends QuickCreate {
|
||||
|
||||
var $javascript;
|
||||
|
||||
function process() {
|
||||
global $current_user, $timedate, $app_list_strings, $current_language, $mod_strings;
|
||||
$mod_strings = return_module_language($current_language, 'ProjectTask');
|
||||
|
||||
parent::process();
|
||||
|
||||
if($this->viaAJAX) { // override for ajax call
|
||||
$this->ss->assign('saveOnclick', "onclick='if(check_form(\"projectTaskQuickCreate\")) return SUGAR.subpanelUtils.inlineSave(this.form.id, \"projecttask\"); else return false;'");
|
||||
$this->ss->assign('cancelOnclick', "onclick='return SUGAR.subpanelUtils.cancelCreate(\"subpanel_projecttask\")';");
|
||||
}
|
||||
|
||||
$this->ss->assign('viaAJAX', $this->viaAJAX);
|
||||
|
||||
$this->javascript = new javascript();
|
||||
$this->javascript->setFormName('projectTaskQuickCreate');
|
||||
|
||||
$focus = new ProjectTask();
|
||||
$this->javascript->setSugarBean($focus);
|
||||
$this->javascript->addAllFields('');
|
||||
|
||||
$this->ss->assign('additionalScripts', $this->javascript->getScript(false));
|
||||
|
||||
$json = getJSONobj();
|
||||
|
||||
///////////////////////////////////////
|
||||
///
|
||||
/// SETUP PARENT POPUP
|
||||
|
||||
$popup_request_data = array(
|
||||
'call_back_function' => 'set_return',
|
||||
'form_name' => 'projectTypeQuickCreate',
|
||||
'field_to_name_array' => array(
|
||||
'id' => 'parent_id',
|
||||
'name' => 'parent_name',
|
||||
),
|
||||
);
|
||||
|
||||
$encoded_parent_popup_request_data = $json->encode($popup_request_data);
|
||||
$this->ss->assign('encoded_parent_popup_request_data', $encoded_parent_popup_request_data);
|
||||
|
||||
$popup_request_data = array(
|
||||
'call_back_function' => 'set_return',
|
||||
'form_name' => 'projectTaskQuickCreate',
|
||||
'field_to_name_array' => array(
|
||||
'id' => 'account_id',
|
||||
'name' => 'account_name',
|
||||
),
|
||||
);
|
||||
|
||||
$encoded_popup_request_data = $json->encode($popup_request_data);
|
||||
$this->ss->assign('encoded_popup_request_data', $encoded_popup_request_data);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
99
modules/ProjectTask/Save.php
Executable file
99
modules/ProjectTask/Save.php
Executable file
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
$project = new ProjectTask();
|
||||
if(!empty($_POST['record']))
|
||||
{
|
||||
$project->retrieve($_POST['record']);
|
||||
}
|
||||
////
|
||||
//// save the fields to the ProjectTask object
|
||||
////
|
||||
|
||||
if(isset($_REQUEST['email_id'])) $project->email_id = $_REQUEST['email_id'];
|
||||
|
||||
require_once('include/formbase.php');
|
||||
$project = populateFromPost('', $project);
|
||||
if(!isset($_REQUEST['milestone_flag']))
|
||||
{
|
||||
$project->milestone_flag = '0';
|
||||
}
|
||||
|
||||
|
||||
$GLOBALS['check_notify'] = false;
|
||||
if (!empty($_POST['assigned_user_id']) && ($project->assigned_user_id != $_POST['assigned_user_id']) && ($_POST['assigned_user_id'] != $current_user->id)) {
|
||||
$GLOBALS['check_notify'] = true;
|
||||
}
|
||||
|
||||
if(!$project->ACLAccess('Save')){
|
||||
ACLController::displayNoAccess(true);
|
||||
sugar_cleanup(true);
|
||||
}
|
||||
|
||||
if( empty($project->project_id) ) $project->project_id = $_POST['relate_id']; //quick for 5.1 till projects are revamped for 5.5 nsingh- 7/3/08
|
||||
$project->save($GLOBALS['check_notify']);
|
||||
|
||||
if(isset($_REQUEST['form']))
|
||||
{
|
||||
// we are doing the save from a popup window
|
||||
echo '<script>opener.window.location.reload();self.close();</script>';
|
||||
die();
|
||||
}
|
||||
else
|
||||
{
|
||||
// need to refresh the page properly
|
||||
|
||||
$return_module = empty($_REQUEST['return_module']) ? 'ProjectTask'
|
||||
: $_REQUEST['return_module'];
|
||||
|
||||
$return_action = empty($_REQUEST['return_action']) ? 'index'
|
||||
: $_REQUEST['return_action'];
|
||||
|
||||
$return_id = empty($_REQUEST['return_id']) ? $project->id
|
||||
: $_REQUEST['return_id'];
|
||||
|
||||
//if this navigation is going to list view, do not show the bean id, it will populate the mass update.
|
||||
if($return_action == 'index') {
|
||||
$return_id ='';
|
||||
}
|
||||
header("Location: index.php?module=$return_module&action=$return_action&record=$return_id");
|
||||
|
||||
}
|
||||
?>
|
||||
69
modules/ProjectTask/SubPanelView.html
Executable file
69
modules/ProjectTask/SubPanelView.html
Executable file
@@ -0,0 +1,69 @@
|
||||
<!--
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
-->
|
||||
|
||||
<!-- BEGIN: main -->
|
||||
<table cellpadding="0" cellspacing="0" width="100%" border="0" class="list view">
|
||||
|
||||
<tr height="20" >
|
||||
<td scope="col" ><slot>{MOD.LBL_LIST_NAME}</slot></td>
|
||||
<td scope="col" ><slot>{MOD.LBL_LIST_PERCENT_COMPLETE}</slot></td>
|
||||
<td scope="col" ><slot>{MOD.LBL_LIST_STATUS}</slot></td>
|
||||
<td scope="col" ><slot>{MOD.LBL_LIST_ASSIGNED_USER_ID}</slot></td>
|
||||
<td scope="col" ><slot>{MOD.LBL_LIST_DATE_DUE}</slot></td>
|
||||
<td scope="col" ><slot> </slot></td>
|
||||
</tr>
|
||||
|
||||
<!-- BEGIN: row -->
|
||||
<tr height="20" class="{ROW_COLOR}S1">
|
||||
|
||||
<td scope="row"><slot><a
|
||||
href="{URL_PREFIX}index.php?module=ProjectTask&action=DetailView&record={project_task.ID}&return_module=Project&return_action=DetailView&return_id={project_task.PARENT_ID}"
|
||||
>{project_task.NAME}</a></slot></td>
|
||||
<td><slot>{project_task.PERCENT_COMPLETE}</slot></td>
|
||||
<td><slot>{project_task.STATUS}</slot></td>
|
||||
<td><slot>{project_task.ASSIGNED_USER_NAME}</slot></td>
|
||||
<td><slot>{project_task.DATE_DUE}</slot></td>
|
||||
<td nowrap align="right"><slot><a class="listViewTdToolsS1"
|
||||
href="{URL_PREFIX}index.php?module=ProjectTask&action=EditView&record={project_task.ID}{RETURN_URL}"
|
||||
>{EDIT_INLINE_PNG}</a> <a class="listViewTdToolsS1"
|
||||
href="{URL_PREFIX}index.php?module=ProjectTask&action=EditView&record={project_task.ID}{RETURN_URL}"
|
||||
>{APP.LNK_EDIT}</a></slot></td>
|
||||
</tr>
|
||||
<!-- END: row -->
|
||||
|
||||
</table>
|
||||
<!-- END: main -->
|
||||
104
modules/ProjectTask/SubPanelView.php
Executable file
104
modules/ProjectTask/SubPanelView.php
Executable file
@@ -0,0 +1,104 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
global $app_strings;
|
||||
global $currentModule;
|
||||
global $theme;
|
||||
global $focus;
|
||||
global $action;
|
||||
global $focus_list;
|
||||
|
||||
//we don't want the parent module's string file, but rather the string file specifc to this subpanel
|
||||
global $current_language;
|
||||
|
||||
$current_module_strings = return_module_language($current_language, 'ProjectTask');
|
||||
$project_module_strings = return_module_language($current_language, 'Project');
|
||||
|
||||
|
||||
|
||||
|
||||
// focus_list is the means of passing data to a SubPanelView.
|
||||
|
||||
$button = "<form action='index.php' method='post' name='form' id='form'>\n";
|
||||
$button .= "<input type='hidden' name='module' value='ProjectTask' />\n";
|
||||
$button .= "<input type='hidden' name='parent_id' value='{$focus->id}' />\n";
|
||||
$button .= "<input type='hidden' name='parent_name' value='{$focus->name}' />\n";
|
||||
$button .= "<input type='hidden' name='project_relation_id' value='{$focus->id}' />\n";
|
||||
$button .= "<input type='hidden' name='project_relation_type' value='$currentModule' />\n";
|
||||
$button .= "<input type='hidden' name='return_module' value='$currentModule' />\n";
|
||||
$button .= "<input type='hidden' name='return_action' value='$action' />\n";
|
||||
$button .= "<input type='hidden' name='return_id' value='{$focus->id}' />\n";
|
||||
$button .= "<input type='hidden' name='action' />\n";
|
||||
|
||||
$button .= "<input title='"
|
||||
. $app_strings['LBL_NEW_BUTTON_TITLE']
|
||||
. "' accessyKey='".$app_strings['LBL_NEW_BUTTON_KEY']
|
||||
. "' class='button' onclick=\"this.form.action.value='EditView'\" type='submit' name='New' value=' "
|
||||
. $app_strings['LBL_NEW_BUTTON_LABEL']." ' />\n";
|
||||
|
||||
$button .= "</form>\n";
|
||||
|
||||
$ListView = new ListView();
|
||||
$ListView->initNewXTemplate( 'modules/ProjectTask/SubPanelView.html',$current_module_strings);
|
||||
$ListView->xTemplateAssign("EDIT_INLINE_PNG",
|
||||
SugarThemeRegistry::current()->getImage('edit_inline','align="absmiddle" alt="'.$app_strings['LNK_EDIT'].'" border="0"'));
|
||||
$ListView->xTemplateAssign("RETURN_URL",
|
||||
"&return_module=".$currentModule."&return_action=DetailView&return_id=".$focus->id);
|
||||
|
||||
$header_text = '';
|
||||
if(is_admin($current_user)
|
||||
&& $_REQUEST['module'] != 'DynamicLayout'
|
||||
&& !empty($_SESSION['editinplace']))
|
||||
{
|
||||
$header_text = " <a href='index.php?action=index"
|
||||
. "&module=DynamicLayout"
|
||||
. "&from_action=SubPanelView"
|
||||
. "&from_module=ProjectTask"
|
||||
. "'>"
|
||||
.SugarThemeRegistry::current()->getImage("EditLayout", "border='0' alt='Edit Layout' align='bottom'")."</a>";
|
||||
}
|
||||
$ListView->setHeaderTitle($project_module_strings['LBL_PROJECT_TASK_SUBPANEL_TITLE'] . $header_text);
|
||||
|
||||
$ListView->setHeaderText($button);
|
||||
$ListView->setQuery('', '', 'order_number', 'project_task');
|
||||
$ListView->processListView($focus_list, 'main', 'project_task');
|
||||
|
||||
?>
|
||||
85
modules/ProjectTask/field_arrays.php
Executable file
85
modules/ProjectTask/field_arrays.php
Executable file
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: Contains field arrays that are used for caching
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
$fields_array['ProjectTask'] = array ('column_fields' => array(
|
||||
'id',
|
||||
'date_entered',
|
||||
'date_modified',
|
||||
'assigned_user_id',
|
||||
'modified_user_id',
|
||||
'created_by',
|
||||
'name',
|
||||
'date_start',
|
||||
'date_finish',
|
||||
'project_id',
|
||||
'duration',
|
||||
'duration_unit',
|
||||
'priority',
|
||||
'status',
|
||||
'description',
|
||||
'project_task_id',
|
||||
'actual_duration',
|
||||
'milestone_flag',
|
||||
'percent_complete',
|
||||
'estimated_effort',
|
||||
'utilization',
|
||||
'order_number',
|
||||
'task_number',
|
||||
'deleted',
|
||||
),
|
||||
'list_fields' => array(
|
||||
'id',
|
||||
'parent_id',
|
||||
'parent_name',
|
||||
'priority',
|
||||
'name',
|
||||
'date_start',
|
||||
'date_finish',
|
||||
'percent_complete',
|
||||
'status',
|
||||
'assigned_user_id',
|
||||
'assigned_user_name',
|
||||
),
|
||||
'required_fields' => array('name'=>1, 'project_id'=>2, 'project_task_id'=>3, 'duration'=>4, 'duration_unit'=>5),
|
||||
);
|
||||
?>
|
||||
119
modules/ProjectTask/language/en_us.lang.php
Executable file
119
modules/ProjectTask/language/en_us.lang.php
Executable file
@@ -0,0 +1,119 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
$mod_strings = array (
|
||||
'LBL_MODULE_NAME' => 'Project Tasks',
|
||||
'LBL_MODULE_TITLE' => 'Project Task: Home',
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Project Task Search',
|
||||
'LBL_LIST_FORM_TITLE'=> 'Project Task List',
|
||||
'LBL_EDIT_TASK_IN_GRID_TITLE'=> 'Edit Task In Grid',
|
||||
|
||||
'LBL_ID' => 'Id:',
|
||||
'LBL_PROJECT_TASK_ID' => 'Project Task Id:',
|
||||
'LBL_PROJECT_ID' => 'Project Id:',
|
||||
'LBL_DATE_ENTERED' => 'Date Created:',
|
||||
'LBL_DATE_MODIFIED' => 'Date Modified:',
|
||||
'LBL_ASSIGNED_USER_ID' => 'Assigned To:',
|
||||
'LBL_MODIFIED_USER_ID' => 'Modified User Id:',
|
||||
'LBL_CREATED_BY' => 'Created By:',
|
||||
'LBL_TEAM_ID' => 'Team:',
|
||||
'LBL_NAME' => 'Name:',
|
||||
'LBL_STATUS' => 'Status:',
|
||||
'LBL_DATE_DUE' => 'Due Date:',
|
||||
'LBL_TIME_DUE' => 'Due Time:',
|
||||
'LBL_RESOURCE' => 'Resource:',
|
||||
'LBL_PREDECESSORS' => 'Predecessors:',
|
||||
'LBL_DATE_START' => 'Start Date:',
|
||||
'LBL_DATE_FINISH' => 'Finish Date:',
|
||||
'LBL_TIME_START' => 'Start Time:',
|
||||
'LBL_TIME_FINISH' => 'Finish Time:',
|
||||
'LBL_DURATION' => 'Duration:',
|
||||
'LBL_DURATION_UNIT' => 'Duration Unit:',
|
||||
'LBL_ACTUAL_DURATION' => 'Actual Duration:',
|
||||
'LBL_PARENT_ID' => 'Project:',
|
||||
'LBL_PARENT_TASK_ID' => 'Parent Task Id:',
|
||||
'LBL_PERCENT_COMPLETE' => '% Complete:',
|
||||
'LBL_PRIORITY' => 'Priority:',
|
||||
'LBL_DESCRIPTION' => 'Description:',
|
||||
'LBL_ORDER_NUMBER' => 'Order:',
|
||||
'LBL_TASK_NUMBER' => 'Task Number:',
|
||||
'LBL_TASK_ID' => 'Task ID:',
|
||||
'LBL_DEPENDS_ON_ID' => 'Depends On:',
|
||||
'LBL_MILESTONE_FLAG' => 'Milestone:',
|
||||
'LBL_ESTIMATED_EFFORT' => 'Estimated Effort (hrs):',
|
||||
'LBL_ACTUAL_EFFORT' => 'Actual Effort (hrs):',
|
||||
'LBL_UTILIZATION' => 'Utilization (%):',
|
||||
'LBL_DELETED' => 'Deleted:',
|
||||
|
||||
'LBL_LIST_ORDER_NUMBER' => 'Order',
|
||||
'LBL_LIST_NAME' => 'Name',
|
||||
'LBL_LIST_DAYS' => 'days',
|
||||
'LBL_LIST_PARENT_NAME' => 'Project',
|
||||
'LBL_LIST_PERCENT_COMPLETE' => '% Complete',
|
||||
'LBL_LIST_STATUS' => 'Status',
|
||||
'LBL_LIST_DURATION' => 'Duration',
|
||||
'LBL_LIST_ACTUAL_DURATION' => 'Actual Duration',
|
||||
'LBL_LIST_ASSIGNED_USER_ID' => 'Assigned To',
|
||||
'LBL_LIST_DATE_DUE' => 'Date Due',
|
||||
'LBL_LIST_DATE_START' => 'Start Date',
|
||||
'LBL_LIST_DATE_FINISH' => 'Finish Date',
|
||||
'LBL_LIST_PRIORITY' => 'Priority',
|
||||
'LBL_LIST_CLOSE' => 'Close',
|
||||
'LBL_PROJECT_NAME' => 'Project Name',
|
||||
|
||||
'LNK_NEW_PROJECT' => 'Create Project',
|
||||
'LNK_PROJECT_LIST' => 'Project List',
|
||||
'LNK_NEW_PROJECT_TASK' => 'Create Project Task',
|
||||
'LNK_PROJECT_TASK_LIST' => 'Project Tasks',
|
||||
|
||||
'LBL_LIST_MY_PROJECT_TASKS' => 'My Project Tasks',
|
||||
'LBL_DEFAULT_SUBPANEL_TITLE' => 'Project Tasks',
|
||||
'LBL_NEW_FORM_TITLE' => 'New Project Task',
|
||||
|
||||
'LBL_ACTIVITIES_TITLE'=>'Activities',
|
||||
'LBL_HISTORY_TITLE'=>'History',
|
||||
'LBL_ACTIVITIES_SUBPANEL_TITLE'=>'Activities',
|
||||
'LBL_HISTORY_SUBPANEL_TITLE'=>'History',
|
||||
'DATE_JS_ERROR' => 'Please enter a date corresponding to the time entered',
|
||||
|
||||
'LBL_ASSIGNED_USER_NAME' => 'Assigned To',
|
||||
'LBL_PARENT_NAME' => 'Project Name',
|
||||
'LBL_LIST_PROJECT_NAME' => 'Projects',
|
||||
);
|
||||
?>
|
||||
54
modules/ProjectTask/language/pl_pl.help.DetailView.html
Executable file
54
modules/ProjectTask/language/pl_pl.help.DetailView.html
Executable file
@@ -0,0 +1,54 @@
|
||||
<!--
|
||||
|
||||
/*********************************************************************************
|
||||
* LICENSE: The contents of this file are subject to the SugarCRM Professional
|
||||
* End User License Agreement ("License") which can be viewed at
|
||||
* http://www.sugarcrm.com/EULA. By installing or using this file, You have
|
||||
* unconditionally agreed to the terms and conditions of the License, and You
|
||||
* may not use this file except in compliance with the License. Under the
|
||||
* terms of the license, You shall not, among other things: 1) sublicense,
|
||||
* resell, rent, lease, redistribute, assign or otherwise transfer Your
|
||||
* rights to the Software, and 2) use the Software for timesharing or service
|
||||
* bureau purposes such as hosting the Software for commercial gain and/or for
|
||||
* the benefit of a third party. Use of the Software may be subject to
|
||||
* applicable fees and any use of the Software without first paying applicable
|
||||
* fees is strictly prohibited. You do not have the right to remove SugarCRM
|
||||
* copyrights from the source code or user interface.
|
||||
*
|
||||
* All copies of the Covered Code must include on each user interface screen:
|
||||
* (i) the "Powered by SugarCRM" logo and
|
||||
* (ii) the SugarCRM copyright notice
|
||||
* in the same form as they appear in the distribution. See full license for
|
||||
* requirements.
|
||||
*
|
||||
* Your Warranty, Limitations of liability and Indemnity are expressly stated
|
||||
* in the License. Please refer to the License for the specific language
|
||||
* governing these rights and limitations under the License. Portions created
|
||||
* by SugarCRM are Copyright (C) 2006 SugarCRM, Inc.; All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
/*********************************************************************************
|
||||
|
||||
********************************************************************************/
|
||||
|
||||
-->
|
||||
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
|
||||
<h1>Elementy Realizacji</h1>
|
||||
|
||||
<p> Użyj tej strony aby zobaczyć i edytować szczegóły Elementów Realizacji. </p>
|
||||
|
||||
<ul>
|
||||
<li>Aby edytować szczegóły, kliknij <span class="helpButton">Edytuj</span>, dokonaj niezbędnych zmian i kliknij <span class="helpButton">Zapisz</span>.
|
||||
<li>To edit the task in grid view, click <span class="helpButton">Edit Task in Grid</span>.
|
||||
<li>To schedule a meeting, a call, or compose email, click the appropriate button in the Activities sub-panel.
|
||||
</ul>
|
||||
<p>The History sub-panel lists existing notes and files attached to the project task.
|
||||
<ul>
|
||||
<li>To attach a note or a file, click <span class="helpButton">Create Note or Attachment</span>.
|
||||
<li>To create an archived email, click Archive Email, copy the email contents in the Body field and save it.
|
||||
<li>To view a summary of the history, click <span class="helpButton">View Summary</span>.
|
||||
</ul>
|
||||
65
modules/ProjectTask/language/pl_pl.help.EditView.html
Executable file
65
modules/ProjectTask/language/pl_pl.help.EditView.html
Executable file
@@ -0,0 +1,65 @@
|
||||
<!--
|
||||
|
||||
/*********************************************************************************
|
||||
* LICENSE: The contents of this file are subject to the SugarCRM Professional
|
||||
* End User License Agreement ("License") which can be viewed at
|
||||
* http://www.sugarcrm.com/EULA. By installing or using this file, You have
|
||||
* unconditionally agreed to the terms and conditions of the License, and You
|
||||
* may not use this file except in compliance with the License. Under the
|
||||
* terms of the license, You shall not, among other things: 1) sublicense,
|
||||
* resell, rent, lease, redistribute, assign or otherwise transfer Your
|
||||
* rights to the Software, and 2) use the Software for timesharing or service
|
||||
* bureau purposes such as hosting the Software for commercial gain and/or for
|
||||
* the benefit of a third party. Use of the Software may be subject to
|
||||
* applicable fees and any use of the Software without first paying applicable
|
||||
* fees is strictly prohibited. You do not have the right to remove SugarCRM
|
||||
* copyrights from the source code or user interface.
|
||||
*
|
||||
* All copies of the Covered Code must include on each user interface screen:
|
||||
* (i) the "Powered by SugarCRM" logo and
|
||||
* (ii) the SugarCRM copyright notice
|
||||
* in the same form as they appear in the distribution. See full license for
|
||||
* requirements.
|
||||
*
|
||||
* Your Warranty, Limitations of liability and Indemnity are expressly stated
|
||||
* in the License. Please refer to the License for the specific language
|
||||
* governing these rights and limitations under the License. Portions created
|
||||
* by SugarCRM are Copyright (C) 2006 SugarCRM, Inc.; All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
/*********************************************************************************
|
||||
|
||||
********************************************************************************/
|
||||
|
||||
-->
|
||||
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
|
||||
<h1>Project Tasks</h1>
|
||||
|
||||
<p>After you create a project, you can create tasks associated with it. </p>
|
||||
<p>To create a project task, enter the following information:</p>
|
||||
<ul>
|
||||
<li><span class="helpButton">Name</span>. Enter a name for the task.
|
||||
<li><span class="helpButton">Assigned to</span>. Enter the name of the user who has ownership of the task. By default it is assigned to you.
|
||||
|
||||
<li><span class="helpButton">Team</span>. Enter the name of the team that is allowed to view the task; to select one from the Team list, click <span class="helpButton">Select</span> and click the team name.
|
||||
|
||||
<li><span class="helpButton">Status</span>. From the drop-down list, select the current status of the task.
|
||||
<li><span class="helpButton">Task Number</span>. Enter a number for the task. A task number uniquely identifies the task. You can refer to a task by its number instead of its name.
|
||||
<li><span class="helpButton">Depends on</span>. From the drop-down list, select another task that will need to be completed before proceeding with this task.
|
||||
<li><span class="helpButton">Priority</span>. From the drop-down list, select a priority level that reflects the importance of completing this task.
|
||||
<li><span class="helpButton">Milestone</span>. Check this box if the completion on this task is considered a milestone for project completion.
|
||||
<li><span class="helpButton">Order</span>. Enter a number to specify the sequence of the task in the list of project tasks. Specifying the order is useful when a task does not have any dependencies assigned to it.
|
||||
<li><span class="helpButton">Project</span>. From the drop-down list, select the project associated with the task.
|
||||
<li><span class="helpButton">Progress</span>. Enter the percentage of the task that has been completed.
|
||||
<li><span class="helpButton">Utilization</span>. From the drop-down list, select the number of work hours that a user should dedicate their work hours towards the assigned task. Only one person can be assigned to a given project task.
|
||||
<li><span class="helpButton">Start Date</span>. Click the Calender icon and select a start date for the task; enter the start time in the adjoining field.
|
||||
<li><span class="helpButton">Estimated Efforts</span>. Enter the sum of estimated efforts for all project tasks.
|
||||
<li><span class="helpButton">Due Date</span>. Click the Calender icon and select the due date for task completion; enter the end time in the adjoining field.
|
||||
<li><span class="helpButton">Actual Efforts</span>. Enter the sum of actual efforts for all project tasks.
|
||||
<li><span class="helpButton">Description</span>. Enter a brief description of the task.
|
||||
</ul>
|
||||
<p>Click <span class="helpButton">Save<span> to create the task; click <span class="helpButton">Cancel</span> to return to the project detail page without creating the task.
|
||||
59
modules/ProjectTask/language/pl_pl.help.index.html
Executable file
59
modules/ProjectTask/language/pl_pl.help.index.html
Executable file
@@ -0,0 +1,59 @@
|
||||
<!--
|
||||
|
||||
/*********************************************************************************
|
||||
* LICENSE: The contents of this file are subject to the SugarCRM Professional
|
||||
* End User License Agreement ("License") which can be viewed at
|
||||
* http://www.sugarcrm.com/EULA. By installing or using this file, You have
|
||||
* unconditionally agreed to the terms and conditions of the License, and You
|
||||
* may not use this file except in compliance with the License. Under the
|
||||
* terms of the license, You shall not, among other things: 1) sublicense,
|
||||
* resell, rent, lease, redistribute, assign or otherwise transfer Your
|
||||
* rights to the Software, and 2) use the Software for timesharing or service
|
||||
* bureau purposes such as hosting the Software for commercial gain and/or for
|
||||
* the benefit of a third party. Use of the Software may be subject to
|
||||
* applicable fees and any use of the Software without first paying applicable
|
||||
* fees is strictly prohibited. You do not have the right to remove SugarCRM
|
||||
* copyrights from the source code or user interface.
|
||||
*
|
||||
* All copies of the Covered Code must include on each user interface screen:
|
||||
* (i) the "Powered by SugarCRM" logo and
|
||||
* (ii) the SugarCRM copyright notice
|
||||
* in the same form as they appear in the distribution. See full license for
|
||||
* requirements.
|
||||
*
|
||||
* Your Warranty, Limitations of liability and Indemnity are expressly stated
|
||||
* in the License. Please refer to the License for the specific language
|
||||
* governing these rights and limitations under the License. Portions created
|
||||
* by SugarCRM are Copyright (C) 2006 SugarCRM, Inc.; All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
/*********************************************************************************
|
||||
|
||||
********************************************************************************/
|
||||
|
||||
-->
|
||||
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
|
||||
<h1>Project Task Home</h1>
|
||||
<p>A project can consist of multiple tasks. After you create a project, you can create tasks associated with it.</p>
|
||||
<p>This page displays the following information:</p>
|
||||
<ul>
|
||||
<li>A Search sub-panel where you can enter the task name and project name to search for project tasks. To find only project tasks assigned to you, select the <span class="helpButton">Only my items</span> box.
|
||||
To perform an advanced search using additional fields, click the <span class="helpButton">Advanced Search</span> tab. To customize and save the search layout and results, click the <span class="helpButton">Saved Search & Layout</span> tab.
|
||||
|
||||
<li>A list of existing project tasks along with related information such as project name and status.
|
||||
<ul>
|
||||
<li>To view the details of a task, click the name in the Project Task list.
|
||||
<li>To update or delete multiple projects, select the tasks from the list and use the Mass Update sub-panel.
|
||||
</ul>
|
||||
<li>A Shortcuts section that displays the following options:
|
||||
<ul>
|
||||
<li><span class="helpShortcut">Create Project</span>. Click this option to create a new project. Alternatively, you can use the New Project quick form to create the project and add enter additional information after you save it.
|
||||
<li><span class="helpShortcut">Project List</span>. Click this option to navigate back to the Projects Home page from a project's detail page.
|
||||
<li><span class="helpShortcut">Project Tasks</span>. Click this option to view a list of tasks for all your projects.
|
||||
</ul>
|
||||
<p>A New Project Task quick form that you can use to create a task with only the required fields. You can enter additional information after you save the project task.
|
||||
|
||||
124
modules/ProjectTask/language/pl_pl.lang.php
Executable file
124
modules/ProjectTask/language/pl_pl.lang.php
Executable file
@@ -0,0 +1,124 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* Default English language strings
|
||||
*
|
||||
* LICENSE: The contents of this file are subject to the SugarCRM Professional
|
||||
* End User License Agreement ("License") which can be viewed at
|
||||
* http://www.sugarcrm.com/EULA. By installing or using this file, You have
|
||||
* unconditionally agreed to the terms and conditions of the License, and You
|
||||
* may not use this file except in compliance with the License. Under the
|
||||
* terms of the license, You shall not, among other things: 1) sublicense,
|
||||
* resell, rent, lease, redistribute, assign or otherwise transfer Your
|
||||
* rights to the Software, and 2) use the Software for timesharing or service
|
||||
* bureau purposes such as hosting the Software for commercial gain and/or for
|
||||
* the benefit of a third party. Use of the Software may be subject to
|
||||
* applicable fees and any use of the Software without first paying applicable
|
||||
* fees is strictly prohibited. You do not have the right to remove SugarCRM
|
||||
* copyrights from the source code or user interface.
|
||||
*
|
||||
* All copies of the Covered Code must include on each user interface screen:
|
||||
* (i) the "Powered by SugarCRM" logo and
|
||||
* (ii) the SugarCRM copyright notice
|
||||
* in the same form as they appear in the distribution. See full license for
|
||||
* requirements.
|
||||
*
|
||||
* Your Warranty, Limitations of liability and Indemnity are expressly stated
|
||||
* in the License. Please refer to the License for the specific language
|
||||
* governing these rights and limitations under the License. Portions created
|
||||
* by SugarCRM are Copyright (C) 2005 SugarCRM, Inc.; All Rights Reserved.
|
||||
*/
|
||||
/*********************************************************************************
|
||||
* pl_pl.lang.php,v for SugarCRM 4.5.1-->>
|
||||
* Translator: Krzysztof Morawski
|
||||
* All Rights Reserved.
|
||||
* Any bugs report welcome: krzysiek<at>kmmgroup<dot>pl
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
$mod_strings = array (
|
||||
'LBL_MODULE_NAME' => 'Elementy Projektu',
|
||||
'LBL_MODULE_TITLE' => 'Elementy Projektu: Strona główna',
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Szukaj elementu Projektu',
|
||||
'LBL_LIST_FORM_TITLE'=> 'Lista elementów Projektu',
|
||||
'LBL_EDIT_TASK_IN_GRID_TITLE'=> 'Edytuj elementy w siatce',
|
||||
|
||||
'LBL_ID' => 'ID:',
|
||||
'LBL_PROJECT_TASK_ID' => 'ID elementu Projektu:',
|
||||
'LBL_PROJECT_ID' => 'ID Projektu:',
|
||||
'LBL_DATE_ENTERED' => 'Data rozpoczęcia:',
|
||||
'LBL_DATE_MODIFIED' => 'Data modyfikacji:',
|
||||
'LBL_ASSIGNED_USER_ID' => 'Przydzielony do:',
|
||||
'LBL_MODIFIED_USER_ID' => 'ID użytkownika modyfikującego:',
|
||||
'LBL_CREATED_BY' => 'Stworzony przez:',
|
||||
'LBL_TEAM_ID' => 'Zespół:',
|
||||
'LBL_NAME' => 'Nazwa:',
|
||||
'LBL_STATUS' => 'Status:',
|
||||
'LBL_DATE_DUE' => 'Data zakończenia:',
|
||||
'LBL_TIME_DUE' => 'Czas trwania:',
|
||||
'LBL_RESOURCE' => 'Źródło:',
|
||||
'LBL_PREDECESSORS' => 'Poprzednik:',
|
||||
'LBL_DATE_START' => 'Data rozpoczęcia:',
|
||||
'LBL_DATE_FINISH' => 'Data zakończenia:',
|
||||
'LBL_TIME_START' => 'Czas rozpoczęcia:',
|
||||
'LBL_TIME_FINISH' => 'Czas zakończenia:',
|
||||
'LBL_DURATION' => 'Czas Trwania:',
|
||||
'LBL_DURATION_UNIT' => 'Jednostka czasu trwania:',
|
||||
'LBL_ACTUAL_DURATION' => 'Stan zaawansowania:',
|
||||
'LBL_PARENT_ID' => 'Realizacja:',
|
||||
'LBL_PARENT_TASK_ID' => 'ID nadrzędnego elementu:',
|
||||
'LBL_PERCENT_COMPLETE' => 'Procent zaawansowania (%):',
|
||||
'LBL_PRIORITY' => 'Priorytet:',
|
||||
'LBL_DESCRIPTION' => 'Opis:',
|
||||
'LBL_ORDER_NUMBER' => 'Kolejność:',
|
||||
'LBL_TASK_NUMBER' => 'Numer Projektu:',
|
||||
'LBL_TASK_ID' => 'ID elementu:',
|
||||
'LBL_DEPENDS_ON_ID' => 'Zależy od:',
|
||||
'LBL_MILESTONE_FLAG' => 'Kamień milowy:',
|
||||
'LBL_ESTIMATED_EFFORT' => 'Spodziewana liczba roboczogodzin:',
|
||||
'LBL_ACTUAL_EFFORT' => 'Aktualna liczba roboczogodzin:',
|
||||
'LBL_UTILIZATION' => 'Użycie (%):',
|
||||
'LBL_DELETED' => 'Usunięty:',
|
||||
|
||||
'LBL_LIST_ORDER_NUMBER' => 'Kolejność',
|
||||
'LBL_LIST_NAME' => 'Nazwa',
|
||||
'LBL_LIST_DAYS' => 'dni',
|
||||
'LBL_LIST_PARENT_NAME' => 'Projekt',
|
||||
'LBL_LIST_PERCENT_COMPLETE' => 'Zaawansowanie (%)',
|
||||
'LBL_LIST_STATUS' => 'Status',
|
||||
'LBL_LIST_DURATION' => 'Czas trwania',
|
||||
'LBL_LIST_ACTUAL_DURATION' => 'Aktualny stan zaawansowania',
|
||||
'LBL_LIST_ASSIGNED_USER_ID' => 'Przydzielony do',
|
||||
'LBL_LIST_DATE_DUE' => 'Okres trwania',
|
||||
'LBL_LIST_DATE_START' => 'Data rozpoczęcia',
|
||||
'LBL_LIST_DATE_FINISH' => 'Data zakończenia',
|
||||
'LBL_LIST_PRIORITY' => 'Priorytet',
|
||||
'LBL_LIST_CLOSE' => 'Zamknij',
|
||||
'LBL_PROJECT_NAME' => 'Nazwa Projektu',
|
||||
|
||||
'LNK_NEW_PROJECT' => 'Utwórz Projekt',
|
||||
'LNK_PROJECT_LIST' => 'Lista Projektu',
|
||||
'LNK_NEW_PROJECT_TASK' => 'Utwórz element Projektu',
|
||||
'LNK_PROJECT_TASK_LIST' => 'Elementy Projektu',
|
||||
|
||||
'LBL_LIST_MY_PROJECT_TASKS' => 'Moje otwarte elementy Projektu',
|
||||
'LBL_DEFAULT_SUBPANEL_TITLE' => 'elementy Projektu',
|
||||
'LBL_NEW_FORM_TITLE' => 'Nowy element Projektu',
|
||||
|
||||
'LBL_ACTIVITIES_TITLE'=>'Działania',
|
||||
'LBL_HISTORY_TITLE'=>'Historia',
|
||||
'LBL_ACTIVITIES_SUBPANEL_TITLE'=>'Działania',
|
||||
'LBL_HISTORY_SUBPANEL_TITLE'=>'Historia',
|
||||
'DATE_JS_ERROR' => 'Wprowadź datę odpowiednią dla wprowadzonej godziny',
|
||||
|
||||
'LBL_ASSIGNED_USER_NAME' => 'Przydzielone do',
|
||||
'LBL_PARENT_NAME' => 'Nazwa Projektu',
|
||||
'LBL_LIST_PROJECT_NAME' => 'Projekty',
|
||||
// 'LBL_MODIFIED_NAME'=>'Nazwa modyfikującego',
|
||||
// 'LBL_CREATED' => 'Utworzone przez',
|
||||
|
||||
// 'LBL_LIST_TEAM' => 'Zespół',
|
||||
// 'LBL_TEAM' => 'Zespół:',
|
||||
);
|
||||
?>
|
||||
46
modules/ProjectTask/metadata/SearchFields.php
Executable file
46
modules/ProjectTask/metadata/SearchFields.php
Executable file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
$searchFields['ProjectTask'] =
|
||||
array (
|
||||
'name' => array( 'query_type'=>'default'),
|
||||
'current_user_only'=> array('query_type'=>'default','db_field'=>array('assigned_user_id'),'my_items'=>true, 'vname' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'),
|
||||
'project_name' => array('query_type'=>'default','db_field'=>array('project.name')),
|
||||
'assigned_user_id' => array('query_type'=>'default'),
|
||||
//'status'=> array('query_type'=>'default', 'options' => 'project_task_status_options', 'template_var' => 'STATUS_FILTER')
|
||||
|
||||
);
|
||||
?>
|
||||
67
modules/ProjectTask/metadata/acldefs.php
Executable file
67
modules/ProjectTask/metadata/acldefs.php
Executable file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
// created: 2005-11-04 15:39:46
|
||||
$acldefs['ProjectTask'] = array (
|
||||
'forms' =>
|
||||
array (
|
||||
'by_name' =>
|
||||
array (
|
||||
'change_project' =>
|
||||
array (
|
||||
'display_option' => 'disabled',
|
||||
'action_option' => 'list',
|
||||
'app_action' => 'EditView',
|
||||
'module' => 'Project',
|
||||
),
|
||||
'change_parent' =>
|
||||
array (
|
||||
'display_option' => 'disabled',
|
||||
'action_option' => 'list',
|
||||
'app_action' => 'EditView',
|
||||
'module' => 'ProjectTask',
|
||||
),
|
||||
),
|
||||
),
|
||||
'form_names' =>
|
||||
array (
|
||||
'by_id' => 'by_id',
|
||||
'by_name' => 'by_name',
|
||||
'DetailView' => 'DetailView',
|
||||
'EditView' => 'EditView',
|
||||
),
|
||||
);
|
||||
?>
|
||||
68
modules/ProjectTask/metadata/additionalDetails.php
Executable file
68
modules/ProjectTask/metadata/additionalDetails.php
Executable file
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
function additionalDetailsProjectTask($fields) {
|
||||
static $mod_strings;
|
||||
if(empty($mod_strings)) {
|
||||
global $current_language;
|
||||
$mod_strings = return_module_language($current_language, 'ProjectTask');
|
||||
}
|
||||
|
||||
$overlib_string = '';
|
||||
if(!empty($fields['PRIORITY'])) $overlib_string .= '<b>' . $mod_strings['LBL_PRIORITY'] . '</b> ' . $fields['PRIORITY'] . '<br>';
|
||||
if(!empty($fields['PERCENT_COMPLETE'])) $overlib_string .= '<b>' . $mod_strings['LBL_PERCENT_COMPLETE'] . '</b> ' . $fields['PERCENT_COMPLETE'] . '%<br>';
|
||||
if(!empty($fields['ESTIMATED_EFFORT'])) $overlib_string .= '<b>' . $mod_strings['LBL_ESTIMATED_EFFORT'] . '</b> ' . $fields['ESTIMATED_EFFORT'] . '<br>';
|
||||
if(!empty($fields['ACTUAL_EFFORT'])) $overlib_string .= '<b>' . $mod_strings['LBL_ACTUAL_EFFORT'] . '</b> ' . $fields['ACTUAL_EFFORT'] . '<br>';
|
||||
if(!empty($fields['TASK_NUMBER'])) $overlib_string .= '<b>' . $mod_strings['LBL_TASK_NUMBER'] . '</b> ' . $fields['TASK_NUMBER'] . '<br>';
|
||||
if(!empty($fields['DATE_START'])) $overlib_string .= '<b>' . $mod_strings['LBL_DATE_START'] . '</b> ' . $fields['DATE_START'] . ' ' . $fields['TIME_START'] . '<br>';
|
||||
|
||||
if(!empty($fields['DESCRIPTION'])) {
|
||||
$overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300);
|
||||
if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...';
|
||||
}
|
||||
|
||||
return array('fieldToAddTo' => 'NAME',
|
||||
'string' => $overlib_string,
|
||||
'editLink' => "index.php?action=EditView&module=ProjectTask&return_module=ProjectTask&record={$fields['ID']}",
|
||||
'viewLink' => "index.php?action=DetailView&module=ProjectTask&return_module=ProjectTask&record={$fields['ID']}");
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
128
modules/ProjectTask/metadata/detailviewdefs.php
Executable file
128
modules/ProjectTask/metadata/detailviewdefs.php
Executable file
@@ -0,0 +1,128 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
$viewdefs['ProjectTask']['DetailView'] = array(
|
||||
'templateMeta' => array('maxColumns' => '2',
|
||||
'widths' => array(
|
||||
array('label' => '10', 'field' => '30'),
|
||||
array('label' => '10', 'field' => '30')
|
||||
),
|
||||
'includes'=> array(
|
||||
array('file'=>'modules/ProjectTask/ProjectTask.js'),
|
||||
),
|
||||
'form' => array(
|
||||
'buttons' => array( 'EDIT',
|
||||
'DUPLICATE', 'DELETE',
|
||||
),
|
||||
'hideAudit' => true,
|
||||
),
|
||||
|
||||
),
|
||||
'panels' =>array (
|
||||
'default' =>
|
||||
array (
|
||||
|
||||
array (
|
||||
'name',
|
||||
|
||||
array (
|
||||
'name' => 'project_task_id',
|
||||
'label' => 'LBL_TASK_ID',
|
||||
),
|
||||
),
|
||||
|
||||
array (
|
||||
'date_start',
|
||||
'date_finish',
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'assigned_user_name',
|
||||
'label' => 'LBL_ASSIGNED_USER_ID',
|
||||
),
|
||||
array (
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
array (
|
||||
'status',
|
||||
'priority',
|
||||
),
|
||||
|
||||
array (
|
||||
'percent_complete',
|
||||
array (
|
||||
'name' => 'milestone_flag',
|
||||
'label' => 'LBL_MILESTONE_FLAG',
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
array (
|
||||
|
||||
array (
|
||||
'name' => 'project_name',
|
||||
'customCode' => '<a href="index.php?module=Project&action=DetailView&record={$fields.project_id.value}">{$fields.project_name.value} </a>',
|
||||
'label' => 'LBL_PARENT_ID',
|
||||
),
|
||||
),
|
||||
|
||||
array (
|
||||
|
||||
'task_number',
|
||||
'order_number',
|
||||
),
|
||||
|
||||
array (
|
||||
'estimated_effort',
|
||||
'utilization',
|
||||
),
|
||||
|
||||
array (
|
||||
|
||||
array (
|
||||
'name' => 'description',
|
||||
),
|
||||
),
|
||||
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
);
|
||||
?>
|
||||
143
modules/ProjectTask/metadata/editviewdefs.php
Executable file
143
modules/ProjectTask/metadata/editviewdefs.php
Executable file
@@ -0,0 +1,143 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
$viewdefs['ProjectTask']['EditView'] = array(
|
||||
'templateMeta' => array('maxColumns' => '2',
|
||||
|
||||
'widths' => array(
|
||||
array('label' => '10', 'field' => '30'),
|
||||
array('label' => '10', 'field' => '30')
|
||||
),
|
||||
'includes'=> array(
|
||||
array('file'=>'modules/ProjectTask/ProjectTask.js'),
|
||||
),
|
||||
),
|
||||
'panels' =>array (
|
||||
'default' =>
|
||||
array (
|
||||
|
||||
array (
|
||||
array (
|
||||
'name' => 'name',
|
||||
'label' => 'LBL_NAME',
|
||||
),
|
||||
|
||||
array (
|
||||
'name' => 'project_task_id',
|
||||
'label' => 'LBL_TASK_ID',
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
array (
|
||||
array (
|
||||
'name' => 'date_start',
|
||||
),
|
||||
|
||||
array (
|
||||
'name' => 'date_finish',
|
||||
),
|
||||
),
|
||||
array (
|
||||
'name' => 'assigned_user_name',
|
||||
),
|
||||
|
||||
array (
|
||||
array(
|
||||
'name' => 'status',
|
||||
'customCode' => '<select name="{$fields.status.name}" id="{$fields.status.name}" title="" tabindex="s" onchange="update_percent_complete(this.value);">{if isset($fields.status.value) && $fields.status.value != ""}{html_options options=$fields.status.options selected=$fields.status.value}{else}{html_options options=$fields.status.options selected=$fields.status.default}{/if}</select>',
|
||||
),
|
||||
'priority',
|
||||
),
|
||||
|
||||
|
||||
array(
|
||||
|
||||
array (
|
||||
'name' => 'percent_complete',
|
||||
'customCode' => '<input type="text" name="{$fields.percent_complete.name}" id="{$fields.percent_complete.name}" size="30" value="{$fields.percent_complete.value}" title="" tabindex="0" onChange="update_status(this.value);" /></tr>',
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
|
||||
array (
|
||||
'milestone_flag',
|
||||
),
|
||||
|
||||
array (
|
||||
|
||||
array (
|
||||
'name' => 'project_name',
|
||||
'label' => 'LBL_PROJECT_NAME',
|
||||
),
|
||||
),
|
||||
array (
|
||||
|
||||
'task_number',
|
||||
'order_number',
|
||||
),
|
||||
|
||||
array (
|
||||
'estimated_effort',
|
||||
'utilization',
|
||||
),
|
||||
|
||||
array (
|
||||
array (
|
||||
'name' => 'description',
|
||||
),
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'duration',
|
||||
'hideLabel' => true,
|
||||
'customCode' => '<input type="hidden" name="duration" id="projectTask_duration" value="0" />',
|
||||
),
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'duration_unit',
|
||||
'hideLabel' => true,
|
||||
'customCode' => '<input type="hidden" name="duration_unit" id="projectTask_durationUnit" value="Days" />',
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
);
|
||||
?>
|
||||
83
modules/ProjectTask/metadata/listviewdefs.php
Executable file
83
modules/ProjectTask/metadata/listviewdefs.php
Executable file
@@ -0,0 +1,83 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
$listViewDefs['ProjectTask'] = array(
|
||||
'NAME' => array(
|
||||
'width' => '40',
|
||||
'label' => 'LBL_LIST_NAME',
|
||||
'link' => true,
|
||||
'default' => true,
|
||||
'sortable' => true),
|
||||
'PROJECT_NAME' => array(
|
||||
'width' => '25',
|
||||
'label' => 'LBL_PROJECT_NAME',
|
||||
'id'=>'PROJECT_ID',
|
||||
'link' => true,
|
||||
'default' => true,
|
||||
'sortable' => true,
|
||||
'module' => 'Project',
|
||||
'ACLTag' => 'PROJECT',
|
||||
'related_fields' => array('project_id')),
|
||||
'DATE_START' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_DATE_START',
|
||||
'default' => true,
|
||||
'sortable' => true),
|
||||
'DATE_FINISH' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_DATE_FINISH',
|
||||
'default' => true,
|
||||
'sortable' => true),
|
||||
'PRIORITY' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_LIST_PRIORITY',
|
||||
'default' => true,
|
||||
'sortable' => true),
|
||||
'PERCENT_COMPLETE' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_LIST_PERCENT_COMPLETE',
|
||||
'default' => true,
|
||||
'sortable' => true),
|
||||
'ASSIGNED_USER_NAME' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_LIST_ASSIGNED_USER_ID',
|
||||
'default' => true),
|
||||
);
|
||||
|
||||
?>
|
||||
49
modules/ProjectTask/metadata/popupdefs.php
Executable file
49
modules/ProjectTask/metadata/popupdefs.php
Executable file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
$popupMeta = array('moduleMain' => 'ProjectTask',
|
||||
'varName' => 'PROJECT_TASK',
|
||||
'orderBy' => 'name',
|
||||
'whereClauses' =>
|
||||
array('name' => 'project_task.name'),
|
||||
'searchInputs' =>
|
||||
array('name')
|
||||
);
|
||||
|
||||
|
||||
?>
|
||||
|
||||
54
modules/ProjectTask/metadata/searchdefs.php
Executable file
54
modules/ProjectTask/metadata/searchdefs.php
Executable file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
$searchdefs['ProjectTask'] = array(
|
||||
'templateMeta' => array(
|
||||
'maxColumns' => '3',
|
||||
'widths' => array('label' => '10', 'field' => '30'),
|
||||
),
|
||||
'layout' => array(
|
||||
'basic_search' => array(
|
||||
'name',
|
||||
array('name'=>'current_user_only', 'label'=>'LBL_CURRENT_USER_FILTER', 'type'=>'bool'),
|
||||
),
|
||||
'advanced_search' => array(
|
||||
'name',
|
||||
array('name' => 'project_name', 'label'=>'LBL_PROJECT_NAME' ),
|
||||
array('name' => 'assigned_user_id', 'type' => 'enum', 'label' => 'LBL_ASSIGNED_TO', 'function' => array('name' => 'get_user_array', 'params' => array(false))),
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
65
modules/ProjectTask/metadata/studio.php
Executable file
65
modules/ProjectTask/metadata/studio.php
Executable file
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
$GLOBALS['studioDefs']['ProjectTask'] = array(
|
||||
'LBL_DETAILVIEW'=>array(
|
||||
'template'=>'xtpl',
|
||||
'template_file'=>'modules/ProjectTask/DetailView.html',
|
||||
'php_file'=>'modules/ProjectTask/DetailView.php',
|
||||
'type'=>'DetailView',
|
||||
),
|
||||
'LBL_EDITVIEW'=>array(
|
||||
'template'=>'xtpl',
|
||||
'template_file'=>'modules/ProjectTask/EditView.html',
|
||||
'php_file'=>'modules/ProjectTask/EditView.php',
|
||||
'type'=>'EditView',
|
||||
),
|
||||
'LBL_LISTVIEW'=>array(
|
||||
'template'=>'listview',
|
||||
'meta_file'=>'modules/ProjectTask/listviewdefs.php',
|
||||
'type'=>'ListView',
|
||||
),
|
||||
'LBL_SEARCHFORM'=>array(
|
||||
'template'=>'xtpl',
|
||||
'template_file'=>'modules/ProjectTask/SearchForm.html',
|
||||
'php_file'=>'modules/ProjectTask/ListView.php',
|
||||
'type'=>'SearchForm',
|
||||
),
|
||||
|
||||
);
|
||||
124
modules/ProjectTask/metadata/subpaneldefs.php
Executable file
124
modules/ProjectTask/metadata/subpaneldefs.php
Executable file
@@ -0,0 +1,124 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
$layout_defs['ProjectTask'] = array(
|
||||
// list of what Subpanels to show in the DetailView
|
||||
'subpanel_setup' => array(
|
||||
|
||||
'activities' => array(
|
||||
'order' => 20,
|
||||
'sort_order' => 'desc',
|
||||
'sort_by' => 'date_start',
|
||||
'title_key' => 'LBL_ACTIVITIES_SUBPANEL_TITLE',
|
||||
'type' => 'collection',
|
||||
'subpanel_name' => 'activities', //this values is not associated with a physical file.
|
||||
'module'=>'Activities',
|
||||
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateTaskButton'),
|
||||
array('widget_class' => 'SubPanelTopScheduleMeetingButton'),
|
||||
array('widget_class' => 'SubPanelTopScheduleCallButton'),
|
||||
array('widget_class' => 'SubPanelTopComposeEmailButton'),
|
||||
),
|
||||
|
||||
'collection_list' => array(
|
||||
'meetings' => array(
|
||||
'module' => 'Meetings',
|
||||
'subpanel_name' => 'ForActivities',
|
||||
'get_subpanel_data' => 'meetings',
|
||||
),
|
||||
'tasks' => array(
|
||||
'module' => 'Tasks',
|
||||
'subpanel_name' => 'ForActivities',
|
||||
'get_subpanel_data' => 'tasks',
|
||||
),
|
||||
'calls' => array(
|
||||
'module' => 'Calls',
|
||||
'subpanel_name' => 'ForActivities',
|
||||
'get_subpanel_data' => 'calls',
|
||||
),
|
||||
)
|
||||
),
|
||||
|
||||
'history' => array(
|
||||
'order' => 30,
|
||||
'sort_order' => 'desc',
|
||||
'sort_by' => 'date_modified',
|
||||
'title_key' => 'LBL_HISTORY_SUBPANEL_TITLE',
|
||||
'type' => 'collection',
|
||||
'subpanel_name' => 'history', //this values is not associated with a physical file.
|
||||
'module'=>'Activities',
|
||||
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateNoteButton'),
|
||||
array('widget_class' => 'SubPanelTopArchiveEmailButton'),
|
||||
array('widget_class' => 'SubPanelTopSummaryButton'),
|
||||
),
|
||||
|
||||
'collection_list' => array(
|
||||
'meetings' => array(
|
||||
'module' => 'Meetings',
|
||||
'subpanel_name' => 'ForHistory',
|
||||
'get_subpanel_data' => 'meetings',
|
||||
),
|
||||
'tasks' => array(
|
||||
'module' => 'Tasks',
|
||||
'subpanel_name' => 'ForHistory',
|
||||
'get_subpanel_data' => 'tasks',
|
||||
),
|
||||
'calls' => array(
|
||||
'module' => 'Calls',
|
||||
'subpanel_name' => 'ForHistory',
|
||||
'get_subpanel_data' => 'calls',
|
||||
),
|
||||
'notes' => array(
|
||||
'module' => 'Notes',
|
||||
'subpanel_name' => 'ForHistory',
|
||||
'get_subpanel_data' => 'notes',
|
||||
),
|
||||
'emails' => array(
|
||||
'module' => 'Emails',
|
||||
'subpanel_name' => 'ForHistory',
|
||||
'get_subpanel_data' => 'emails',
|
||||
),
|
||||
)
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
64
modules/ProjectTask/metadata/subpanels/default.php
Executable file
64
modules/ProjectTask/metadata/subpanels/default.php
Executable file
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
$subpanel_layout = array(
|
||||
|
||||
'top_buttons' => array(
|
||||
),
|
||||
|
||||
'where' => '',
|
||||
|
||||
|
||||
'list_fields' => array(
|
||||
'name'=>array(
|
||||
'vname' => 'LBL_LIST_NAME',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '70%',
|
||||
),
|
||||
'date_start'=>array(
|
||||
'vname' => 'LBL_DATE_START',
|
||||
'width' => '15%',
|
||||
),
|
||||
'date_finish'=>array(
|
||||
'vname' => 'LBL_DATE_FINISH',
|
||||
'width' => '15%',
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
103
modules/ProjectTask/tpls/QuickCreate.tpl
Executable file
103
modules/ProjectTask/tpls/QuickCreate.tpl
Executable file
@@ -0,0 +1,103 @@
|
||||
{*
|
||||
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
*}
|
||||
|
||||
|
||||
<form name="projectTaskQuickCreate" id="projectTaskQuickCreate" method="POST" action="index.php">
|
||||
<input type="hidden" name="module" value="ProjectTask">
|
||||
<input type="hidden" name="project_id" value="{$REQUEST.project_id}">
|
||||
<input type="hidden" name="contact_name" value="{$REQUEST.contact_name}">
|
||||
<input type="hidden" name="email_id" value="{$REQUEST.email_id}">
|
||||
<input type="hidden" name="bug_id" value="{$REQUEST.bug_id}">
|
||||
<input type="hidden" name="return_action" value="{$REQUEST.return_action}">
|
||||
<input type="hidden" name="return_module" value="{$REQUEST.return_module}">
|
||||
<input type="hidden" name="return_id" value="{$REQUEST.return_id}">
|
||||
<input type="hidden" name="action" value='Save'>
|
||||
<input type="hidden" name="duplicate_parent_id" value="{$REQUEST.duplicate_parent_id}">
|
||||
<input id='assigned_user_id' name='assigned_user_id' type="hidden" value="{$ASSIGNED_USER_ID}" />
|
||||
<input type="hidden" name="to_pdf" value='1'>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td align="left" style="padding-bottom: 2px;">
|
||||
<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button" type="submit" name="button" {$saveOnclick|default:"onclick=\"return check_form('ProjectTaskQuickCreate');\""} value=" {$APP.LBL_SAVE_BUTTON_LABEL} " >
|
||||
<input title="{$APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button" type="submit" name="button" {$cancelOnclick|default:"onclick=\"this.form.action.value='$RETURN_ACTION'; this.form.module.value='$RETURN_MODULE'; this.form.record.value='$RETURN_ID'\""} value=" {$APP.LBL_CANCEL_BUTTON_LABEL} ">
|
||||
<input title="{$APP.LBL_FULL_FORM_BUTTON_TITLE}" accessKey="{$APP.LBL_FULL_FORM_BUTTON_KEY}" class="button" type="submit" name="button" onclick="this.form.to_pdf.value='0';this.form.action.value='EditView'; this.form.module.value='ProjectTask';" value=" {$APP.LBL_FULL_FORM_BUTTON_LABEL} "></td>
|
||||
<td align="right" nowrap><span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span> {$APP.NTC_REQUIRED}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="edit view">
|
||||
<tr>
|
||||
<td>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<th align="left" scope="row" colspan="4"><h4><slot>{$MOD.LBL_PROJECTTYPE_INFORMATION}</slot></h4></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" scope="row"><slot>{$MOD.LBL_NAME} <span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></slot></td>
|
||||
<td><slot><input name="name" tabindex="1" size="35" maxlength="50" type="text" value=""></slot></td>
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" scope="row" rowspan="2"><slot>{$MOD.LBL_DESCRIPTION}</slot></td>
|
||||
<td rowspan="2"><slot><textarea name='description' tabindex='3' cols="50" rows="4">{$DESCRIPTION}</textarea></slot></td>
|
||||
<td scope="row"><slot>{$MOD.LBL_PERCENT_COMPLETE}</slot></td>
|
||||
<td ><slot><input name="percent_complete" type="text" tabindex="2" size="4" maxlength="3"
|
||||
/></slot></td>
|
||||
</tr>
|
||||
<tr>
|
||||
{if $REQUEST.project_id != ''}
|
||||
<td scope="row"><slot>{$MOD.LBL_PARENT_ID}</slot></td>
|
||||
<td ><slot>{$REQUEST.parent_name}<input id='project_name' name='project_name' type="hidden" value='{$REQUEST.parent_name}'><input id='project_id' name='project_id' type="hidden" value='{$REQUEST.project_id}'> </slot></td>
|
||||
{else}
|
||||
<td scope="row"><slot>{$MOD.LBL_PARENT_ID}</slot></td>
|
||||
<td ><slot><input type="text" class="sqsEnabled" tabindex="2" autocomplete="off" name="parent_name" id="parent_name"
|
||||
value="{$parent_name}" tabindex="16" /><input type="hidden" name="project_id" id="project_id"
|
||||
value="{$project_id}" /> <input
|
||||
title="{$APP.LBL_SELECT_BUTTON_TITLE}"
|
||||
accessKey="{$APP.LBL_SELECT_BUTTON_KEY}" type="button" class="button"
|
||||
value="{$APP.LBL_SELECT_BUTTON_LABEL}" name="change_parent" tabindex="2"
|
||||
onclick='open_popup("Project", 600, 400, "", true, false, {$encoded_parent_popup_request_data});'
|
||||
/></slot></td> {/if}
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<script>
|
||||
{$additionalScripts}
|
||||
</script>
|
||||
465
modules/ProjectTask/vardefs.php
Executable file
465
modules/ProjectTask/vardefs.php
Executable file
@@ -0,0 +1,465 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
$dictionary['ProjectTask'] = array('audited'=>true,
|
||||
'table' => 'project_task',
|
||||
'unified_search' => true,
|
||||
'unified_search_default_enabled' => false,
|
||||
'fields' => array(
|
||||
'id' => array(
|
||||
'name' => 'id',
|
||||
'vname' => 'LBL_ID',
|
||||
'required' => true,
|
||||
'type' => 'id',
|
||||
'reportable'=>true,
|
||||
),
|
||||
'date_entered' => array(
|
||||
'name' => 'date_entered',
|
||||
'vname' => 'LBL_DATE_ENTERED',
|
||||
'type' => 'datetime',
|
||||
),
|
||||
'date_modified' => array(
|
||||
'name' => 'date_modified',
|
||||
'vname' => 'LBL_DATE_MODIFIED',
|
||||
'type' => 'datetime',
|
||||
),
|
||||
'project_id' => array(
|
||||
'name' => 'project_id',
|
||||
'vname' => 'LBL_PROJECT_ID',
|
||||
'required' => false,
|
||||
'type' => 'id',
|
||||
'reportable' => false,
|
||||
'importable' => 'required',
|
||||
'required' => true,
|
||||
),
|
||||
'project_task_id' => array(
|
||||
'name' => 'project_task_id',
|
||||
'vname' => 'LBL_PROJECT_TASK_ID',
|
||||
'required' => true,
|
||||
'type' => 'int',
|
||||
'reportable' => false,
|
||||
|
||||
),
|
||||
'name' => array(
|
||||
'name' => 'name',
|
||||
'vname' => 'LBL_NAME',
|
||||
'required' => true,
|
||||
'dbType' => 'varchar',
|
||||
'type' => 'name',
|
||||
'len' => 50,
|
||||
'unified_search' => true,
|
||||
'importable' => 'required',
|
||||
'required' => true,
|
||||
),
|
||||
'status' => array(
|
||||
'name' => 'status',
|
||||
'vname' => 'LBL_STATUS',
|
||||
'type' => 'enum',
|
||||
'required' => false,
|
||||
'options' => 'project_task_status_options',
|
||||
'audited'=>true,
|
||||
),
|
||||
'description' => array(
|
||||
'name' => 'description',
|
||||
'vname' => 'LBL_DESCRIPTION',
|
||||
'required' => false,
|
||||
'type' => 'text',
|
||||
),
|
||||
'predecessors' => array(
|
||||
'name' => 'predecessors',
|
||||
'vname' => 'LBL_PREDECESSORS',
|
||||
'required' => false,
|
||||
'type' => 'text',
|
||||
),
|
||||
'date_start' => array(
|
||||
'name' => 'date_start',
|
||||
'vname' => 'LBL_DATE_START',
|
||||
'type' => 'date',
|
||||
'validation'=>array('type' => 'isbefore', 'compareto'=>'date_finish', 'blank' => true),
|
||||
'audited'=>true,
|
||||
),
|
||||
'time_start' => array(
|
||||
'name' => 'time_start',
|
||||
'vname' => 'LBL_TIME_START',
|
||||
'type' => 'int',
|
||||
'reportable'=>false,
|
||||
//'validation'=>array('type' => 'isbefore', 'compareto'=>'date_due', 'blank' => true),
|
||||
//'audited'=>true,
|
||||
),
|
||||
'time_finish' => array(
|
||||
'name' => 'time_finish',
|
||||
'vname' => 'LBL_TIME_FINISH',
|
||||
'type' => 'int',
|
||||
'reportable'=>false,
|
||||
// 'validation'=>array('type' => 'isbefore', 'compareto'=>'date_due', 'blank' => true),
|
||||
// 'audited'=>true,
|
||||
),
|
||||
'date_finish' => array(
|
||||
'name' => 'date_finish',
|
||||
'vname' => 'LBL_DATE_FINISH',
|
||||
'type' => 'date',
|
||||
'validation'=>array('type' => 'isafter', 'compareto'=>'date_start', 'blank' => true),
|
||||
'audited'=>true,
|
||||
|
||||
),
|
||||
'duration' => array(
|
||||
'name' => 'duration',
|
||||
'vname' => 'LBL_DURATION',
|
||||
'required' => true,
|
||||
'type' => 'int',
|
||||
),
|
||||
'duration_unit' => array(
|
||||
'name' => 'duration_unit',
|
||||
'vname' => 'LBL_DURATION_UNIT',
|
||||
'options' => 'project_duration_units_dom',
|
||||
'type' => 'text',
|
||||
),
|
||||
'actual_duration' => array(
|
||||
'name' => 'actual_duration',
|
||||
'vname' => 'LBL_ACTUAL_DURATION',
|
||||
'required' => false,
|
||||
'type' => 'int',
|
||||
),
|
||||
'percent_complete' => array(
|
||||
'name' => 'percent_complete',
|
||||
'vname' => 'LBL_PERCENT_COMPLETE',
|
||||
'type' => 'int',
|
||||
'required' => false,
|
||||
'audited'=>true,
|
||||
),
|
||||
'parent_task_id' => array(
|
||||
'name' => 'parent_task_id',
|
||||
'vname' => 'LBL_PARENT_TASK_ID',
|
||||
'required' => false,
|
||||
'type' => 'int',
|
||||
'reportable'=>true,
|
||||
),
|
||||
|
||||
'assigned_user_id' => array(
|
||||
'name' => 'assigned_user_id',
|
||||
'rname' => 'user_name',
|
||||
'id_name' => 'assigned_user_id',
|
||||
'type' => 'assigned_user_name',
|
||||
'vname' => 'LBL_ASSIGNED_USER_ID',
|
||||
'required' => false,
|
||||
'dbType' => 'id',
|
||||
'table' => 'users',
|
||||
'isnull' => false,
|
||||
'reportable'=>true,
|
||||
'audited'=>true,
|
||||
),
|
||||
'modified_user_id' => array(
|
||||
'name' => 'modified_user_id',
|
||||
'rname' => 'user_name',
|
||||
'id_name' => 'modified_user_id',
|
||||
'vname' => 'LBL_MODIFIED_USER_ID',
|
||||
'type' => 'assigned_user_name',
|
||||
'table' => 'users',
|
||||
'isnull' => 'false',
|
||||
'dbType' => 'id',
|
||||
'reportable'=>true,
|
||||
),
|
||||
'modified_by_name' =>
|
||||
array (
|
||||
'name' => 'modified_by_name',
|
||||
'vname' => 'LBL_MODIFIED_NAME',
|
||||
'type' => 'relate',
|
||||
'reportable'=>false,
|
||||
'source'=>'non-db',
|
||||
'rname'=>'user_name',
|
||||
'table' => 'users',
|
||||
'id_name' => 'modified_user_id',
|
||||
'module'=>'Users',
|
||||
'link'=>'modified_user_link',
|
||||
'duplicate_merge'=>'disabled'
|
||||
),
|
||||
'priority' => array(
|
||||
'name' => 'priority',
|
||||
'vname' => 'LBL_PRIORITY',
|
||||
'type' => 'enum',
|
||||
'options' => 'project_task_priority_options',
|
||||
),
|
||||
'created_by' => array(
|
||||
'name' => 'created_by',
|
||||
'rname' => 'user_name',
|
||||
'id_name' => 'modified_user_id',
|
||||
'vname' => 'LBL_CREATED_BY',
|
||||
'type' => 'assigned_user_name',
|
||||
'table' => 'users',
|
||||
'isnull' => 'false',
|
||||
'dbType' => 'id',
|
||||
'reportable'=>true,
|
||||
),
|
||||
'created_by_name' =>
|
||||
array (
|
||||
'name' => 'created_by_name',
|
||||
'vname' => 'LBL_CREATED',
|
||||
'type' => 'relate',
|
||||
'reportable'=>false,
|
||||
'link' => 'created_by_link',
|
||||
'rname' => 'user_name',
|
||||
'source'=>'non-db',
|
||||
'table' => 'users',
|
||||
'id_name' => 'created_by',
|
||||
'module'=>'Users',
|
||||
'duplicate_merge'=>'disabled',
|
||||
'importable' => 'false',
|
||||
),
|
||||
'milestone_flag' => array(
|
||||
'name' => 'milestone_flag',
|
||||
'vname' => 'LBL_MILESTONE_FLAG',
|
||||
'type' =>'bool',
|
||||
'required' => false,
|
||||
),
|
||||
'order_number' => array(
|
||||
'name' => 'order_number',
|
||||
'vname' => 'LBL_ORDER_NUMBER',
|
||||
'required' => false,
|
||||
'type' => 'int',
|
||||
'default' => '1',
|
||||
),
|
||||
'task_number' => array(
|
||||
'name' => 'task_number',
|
||||
'vname' => 'LBL_TASK_NUMBER',
|
||||
'required' => false,
|
||||
'type' => 'int',
|
||||
),
|
||||
'estimated_effort' => array(
|
||||
'name' => 'estimated_effort',
|
||||
'vname' => 'LBL_ESTIMATED_EFFORT',
|
||||
'required' => false,
|
||||
'type' => 'int',
|
||||
),
|
||||
'actual_effort' => array(
|
||||
'name' => 'actual_effort',
|
||||
'vname' => 'LBL_ACTUAL_EFFORT',
|
||||
'required' => false,
|
||||
'type' => 'int',
|
||||
),
|
||||
'deleted' => array(
|
||||
'name' => 'deleted',
|
||||
'vname' => 'LBL_DELETED',
|
||||
'type' => 'bool',
|
||||
'required' => false,
|
||||
'default' => '0',
|
||||
'reportable'=>false,
|
||||
),
|
||||
'utilization' => array(
|
||||
'name' => 'utilization',
|
||||
'vname' => 'LBL_UTILIZATION',
|
||||
'required' => false,
|
||||
'type' => 'int',
|
||||
'validation' => array('type' => 'range', 'min' => 0, 'max' => 100),
|
||||
//'function' => 'getUtilizationDropdown',
|
||||
'function' => array('name'=>'getUtilizationDropdown', 'returns'=>'html', 'include'=>'modules/ProjectTask/ProjectTask.php'),
|
||||
'default' => 100,
|
||||
),
|
||||
|
||||
'project_name'=> array(
|
||||
'name'=>'project_name',
|
||||
'rname'=>'name',
|
||||
'id_name'=>'project_id',
|
||||
'vname'=>'LBL_PARENT_NAME',
|
||||
'type'=>'relate',
|
||||
'join_name'=>'project',
|
||||
'table'=>'project',
|
||||
'isnull'=>'true',
|
||||
'module'=>'Project',
|
||||
'link'=>'project_name_link',
|
||||
'massupdate'=>false,
|
||||
'source'=>'non-db'),
|
||||
|
||||
'notes' =>
|
||||
array (
|
||||
'name' => 'notes',
|
||||
'type' => 'link',
|
||||
'relationship' => 'project_tasks_notes',
|
||||
'source'=>'non-db',
|
||||
'vname'=>'LBL_NOTES',
|
||||
),
|
||||
'tasks' =>
|
||||
array (
|
||||
'name' => 'tasks',
|
||||
'type' => 'link',
|
||||
'relationship' => 'project_tasks_tasks',
|
||||
'source'=>'non-db',
|
||||
'vname'=>'LBL_TASKS',
|
||||
),
|
||||
'meetings' =>
|
||||
array (
|
||||
'name' => 'meetings',
|
||||
'type' => 'link',
|
||||
'relationship' => 'project_tasks_meetings',
|
||||
'source'=>'non-db',
|
||||
'vname'=>'LBL_MEETINGS',
|
||||
),
|
||||
'calls' =>
|
||||
array (
|
||||
'name' => 'calls',
|
||||
'type' => 'link',
|
||||
'relationship' => 'project_tasks_calls',
|
||||
'source'=>'non-db',
|
||||
'vname'=>'LBL_CALLS',
|
||||
),
|
||||
|
||||
'emails' =>
|
||||
array (
|
||||
'name' => 'emails',
|
||||
'type' => 'link',
|
||||
'relationship' => 'emails_project_task_rel',/* reldef in emails */
|
||||
'source'=>'non-db',
|
||||
'vname'=>'LBL_EMAILS',
|
||||
),
|
||||
'projects' =>
|
||||
array (
|
||||
'name' => 'projects',
|
||||
'type' => 'link',
|
||||
'relationship' => 'projects_project_tasks',
|
||||
'source'=>'non-db',
|
||||
'vname'=>'LBL_LIST_PARENT_NAME',
|
||||
),
|
||||
'created_by_link' =>
|
||||
array (
|
||||
'name' => 'created_by_link',
|
||||
'type' => 'link',
|
||||
'relationship' => 'project_tasks_created_by',
|
||||
'vname' => 'LBL_CREATED_BY_USER',
|
||||
'link_type' => 'one',
|
||||
'module'=>'Users',
|
||||
'bean_name'=>'User',
|
||||
'source'=>'non-db',
|
||||
),
|
||||
'modified_user_link' =>
|
||||
array (
|
||||
'name' => 'modified_user_link',
|
||||
'type' => 'link',
|
||||
'relationship' => 'project_tasks_modified_user',
|
||||
'vname' => 'LBL_MODIFIED_BY_USER',
|
||||
'link_type' => 'one',
|
||||
'module'=>'Users',
|
||||
'bean_name'=>'User',
|
||||
'source'=>'non-db',
|
||||
),
|
||||
'project_name_link' =>
|
||||
array (
|
||||
'name' => 'project_name_link',
|
||||
'type' => 'link',
|
||||
'relationship' => 'projects_project_tasks',
|
||||
'vname' => 'LBL_PROJECT_NAME',
|
||||
'link_type' => 'one',
|
||||
'module'=>'Projects',
|
||||
'bean_name'=>'Project',
|
||||
'source'=>'non-db',
|
||||
),
|
||||
'assigned_user_link' =>
|
||||
array (
|
||||
'name' => 'assigned_user_link',
|
||||
'type' => 'link',
|
||||
'relationship' => 'project_tasks_assigned_user',
|
||||
'vname' => 'LBL_ASSIGNED_TO_USER',
|
||||
'link_type' => 'one',
|
||||
'module'=>'Users',
|
||||
'bean_name'=>'User',
|
||||
'source'=>'non-db',
|
||||
),
|
||||
'assigned_user_name' =>
|
||||
array (
|
||||
'name' => 'assigned_user_name',
|
||||
'rname' => 'user_name',
|
||||
'id_name' => 'assigned_user_id',
|
||||
'vname' => 'LBL_ASSIGNED_USER_NAME',
|
||||
'type' => 'relate',
|
||||
'table' => 'users',
|
||||
'module' => 'Users',
|
||||
'dbType' => 'varchar',
|
||||
'link'=>'users',
|
||||
'len' => '255',
|
||||
'source'=>'non-db',
|
||||
),
|
||||
|
||||
),
|
||||
'indices' => array(
|
||||
array(
|
||||
'name' =>'proj_tasks_primary_key_idx',
|
||||
'type' =>'primary',
|
||||
'fields'=>array('id')
|
||||
),
|
||||
),
|
||||
|
||||
'relationships' => array (
|
||||
'project_tasks_notes' => array('lhs_module'=> 'ProjectTask', 'lhs_table'=> 'project_task', 'lhs_key' => 'id',
|
||||
'rhs_module'=> 'Notes', 'rhs_table'=> 'notes', 'rhs_key' => 'parent_id',
|
||||
'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
|
||||
'relationship_role_column_value'=>'ProjectTask')
|
||||
,'project_tasks_tasks' => array('lhs_module'=> 'ProjectTask', 'lhs_table'=> 'project_task', 'lhs_key' => 'id',
|
||||
'rhs_module'=> 'Tasks', 'rhs_table'=> 'tasks', 'rhs_key' => 'parent_id',
|
||||
'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
|
||||
'relationship_role_column_value'=>'ProjectTask')
|
||||
,'project_tasks_meetings' => array('lhs_module'=> 'ProjectTask', 'lhs_table'=> 'project_task', 'lhs_key' => 'id',
|
||||
'rhs_module'=> 'Meetings', 'rhs_table'=> 'meetings', 'rhs_key' => 'parent_id',
|
||||
'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
|
||||
'relationship_role_column_value'=>'ProjectTask')
|
||||
,'project_tasks_calls' => array('lhs_module'=> 'ProjectTask', 'lhs_table'=> 'project_task', 'lhs_key' => 'id',
|
||||
'rhs_module'=> 'Calls', 'rhs_table'=> 'calls', 'rhs_key' => 'parent_id',
|
||||
'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
|
||||
'relationship_role_column_value'=>'ProjectTask')
|
||||
,'project_tasks_emails' => array('lhs_module'=> 'ProjectTask', 'lhs_table'=> 'project_task', 'lhs_key' => 'id',
|
||||
'rhs_module'=> 'Emails', 'rhs_table'=> 'emails', 'rhs_key' => 'parent_id',
|
||||
'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
|
||||
'relationship_role_column_value'=>'ProjectTask')
|
||||
|
||||
,'project_tasks_assigned_user' =>
|
||||
array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
|
||||
'rhs_module'=> 'ProjectTask', 'rhs_table'=> 'project_task', 'rhs_key' => 'assigned_user_id',
|
||||
'relationship_type'=>'one-to-many')
|
||||
|
||||
,'project_tasks_modified_user' =>
|
||||
array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
|
||||
'rhs_module'=> 'ProjectTask', 'rhs_table'=> 'project_task', 'rhs_key' => 'modified_user_id',
|
||||
'relationship_type'=>'one-to-many')
|
||||
|
||||
,'project_tasks_created_by' =>
|
||||
array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
|
||||
'rhs_module'=> 'ProjectTask', 'rhs_table'=> 'project_task', 'rhs_key' => 'created_by',
|
||||
'relationship_type'=>'one-to-many')
|
||||
),
|
||||
);
|
||||
|
||||
VardefManager::createVardef('ProjectTask','ProjectTask', array(
|
||||
));
|
||||
?>
|
||||
268
modules/ProjectTask/views/view.list.php
Executable file
268
modules/ProjectTask/views/view.list.php
Executable file
@@ -0,0 +1,268 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: This file is used to override the default Meta-data EditView behavior
|
||||
* to provide customization specific to the Calls module.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
require_once('include/MVC/View/views/view.list.php');
|
||||
|
||||
class ProjectTaskViewList extends ViewList{
|
||||
function ProjectTaskViewList(){
|
||||
parent::ViewList();
|
||||
|
||||
}
|
||||
|
||||
function display(){
|
||||
if(!$this->bean->ACLAccess('list')){
|
||||
ACLController::displayNoAccess();
|
||||
return;
|
||||
}
|
||||
$module = $GLOBALS['module'];
|
||||
$metadataFile = null;
|
||||
$foundViewDefs = false;
|
||||
if(file_exists('custom/modules/' . $module. '/metadata/listviewdefs.php')){
|
||||
$metadataFile = 'custom/modules/' . $module . '/metadata/listviewdefs.php';
|
||||
$foundViewDefs = true;
|
||||
}else{
|
||||
if(file_exists('custom/modules/'.$module.'/metadata/metafiles.php')){
|
||||
require_once('custom/modules/'.$module.'/metadata/metafiles.php');
|
||||
if(!empty($metafiles[$module]['listviewdefs'])){
|
||||
$metadataFile = $metafiles[$module]['listviewdefs'];
|
||||
$foundViewDefs = true;
|
||||
}
|
||||
}elseif(file_exists('modules/'.$module.'/metadata/metafiles.php')){
|
||||
require_once('modules/'.$module.'/metadata/metafiles.php');
|
||||
if(!empty($metafiles[$module]['listviewdefs'])){
|
||||
$metadataFile = $metafiles[$module]['listviewdefs'];
|
||||
$foundViewDefs = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!$foundViewDefs && file_exists('modules/'.$module.'/metadata/listviewdefs.php')){
|
||||
$metadataFile = 'modules/'.$module.'/metadata/listviewdefs.php';
|
||||
}
|
||||
require_once($metadataFile);
|
||||
|
||||
$seed = $this->bean;
|
||||
if(!empty($this->bean->object_name) && isset($_REQUEST[$module.'2_'.strtoupper($this->bean->object_name).'_offset'])) {//if you click the pagination button, it will poplate the search criteria here
|
||||
if(!empty($_REQUEST['current_query_by_page'])) {//The code support multi browser tabs pagination
|
||||
$blockVariables = array('mass', 'uid', 'massupdate', 'delete', 'merge', 'selectCount', 'request_data', 'current_query_by_page', $module.'2_'.strtoupper($this->bean->object_name).'_ORDER_BY');
|
||||
if(isset($_REQUEST['lvso'])){
|
||||
$blockVariables[] = 'lvso';
|
||||
}
|
||||
|
||||
$current_query_by_page = unserialize(base64_decode($_REQUEST['current_query_by_page']));
|
||||
foreach($current_query_by_page as $search_key=>$search_value) {
|
||||
if($search_key != $module.'2_'.strtoupper($this->bean->object_name).'_offset' && !in_array($search_key, $blockVariables)) {
|
||||
if (!is_array($search_value)) {
|
||||
$_REQUEST[$search_key] = $GLOBALS['db']->quoteForEmail($search_value);
|
||||
}
|
||||
else {
|
||||
foreach ($search_value as $key=>&$val) {
|
||||
$val = $GLOBALS['db']->quoteForEmail($val);
|
||||
}
|
||||
$_REQUEST[$search_key] = $search_value;
|
||||
} }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($_REQUEST['saved_search_select']) && $_REQUEST['saved_search_select']!='_none') {
|
||||
if(empty($_REQUEST['button']) && (empty($_REQUEST['clear_query']) || $_REQUEST['clear_query']!='true')) {
|
||||
$this->saved_search = loadBean('SavedSearch');
|
||||
$this->saved_search->retrieveSavedSearch($_REQUEST['saved_search_select']);
|
||||
$this->saved_search->populateRequest();
|
||||
}
|
||||
elseif(!empty($_REQUEST['button'])) { // click the search button, after retrieving from saved_search
|
||||
$_SESSION['LastSavedView'][$_REQUEST['module']] = '';
|
||||
unset($_REQUEST['saved_search_select']);
|
||||
unset($_REQUEST['saved_search_select_name']);
|
||||
}
|
||||
}
|
||||
|
||||
$lv = new ListViewSmarty();
|
||||
$displayColumns = array();
|
||||
if(!empty($_REQUEST['displayColumns'])) {
|
||||
foreach(explode('|', $_REQUEST['displayColumns']) as $num => $col) {
|
||||
if(!empty($listViewDefs[$module][$col]))
|
||||
$displayColumns[$col] = $listViewDefs[$module][$col];
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($listViewDefs[$module] as $col => $params) {
|
||||
if(!empty($params['default']) && $params['default'])
|
||||
$displayColumns[$col] = $params;
|
||||
}
|
||||
}
|
||||
|
||||
global $current_user;
|
||||
|
||||
if (!is_admin($current_user)){
|
||||
$params = array( 'massupdate' => false );
|
||||
$lv->export = false;
|
||||
}
|
||||
else{
|
||||
$params = array( 'massupdate' => true, 'export' => true);
|
||||
}
|
||||
|
||||
if(!empty($_REQUEST['orderBy'])) {
|
||||
$params['orderBy'] = $_REQUEST['orderBy'];
|
||||
$params['overrideOrder'] = true;
|
||||
if(!empty($_REQUEST['sortOrder'])) $params['sortOrder'] = $_REQUEST['sortOrder'];
|
||||
}
|
||||
$lv->displayColumns = $displayColumns;
|
||||
|
||||
$this->seed = $seed;
|
||||
$this->module = $module;
|
||||
|
||||
$searchForm = null;
|
||||
$storeQuery = new StoreQuery();
|
||||
if(!isset($_REQUEST['query'])){
|
||||
$storeQuery->loadQuery($this->module);
|
||||
$storeQuery->populateRequest();
|
||||
}else{
|
||||
$storeQuery->saveFromRequest($this->module);
|
||||
}
|
||||
|
||||
//search
|
||||
$view = 'basic_search';
|
||||
if(!empty($_REQUEST['search_form_view']))
|
||||
$view = $_REQUEST['search_form_view'];
|
||||
$headers = true;
|
||||
if(!empty($_REQUEST['search_form_only']) && $_REQUEST['search_form_only'])
|
||||
$headers = false;
|
||||
elseif(!isset($_REQUEST['search_form']) || $_REQUEST['search_form'] != 'false') {
|
||||
if(isset($_REQUEST['searchFormTab']) && $_REQUEST['searchFormTab'] == 'advanced_search') {
|
||||
$view = 'advanced_search';
|
||||
}else {
|
||||
$view = 'basic_search';
|
||||
}
|
||||
}
|
||||
|
||||
$use_old_search = true;
|
||||
if(file_exists('modules/'.$this->module.'/SearchForm.html')){
|
||||
require_once('include/SearchForm/SearchForm.php');
|
||||
$searchForm = new SearchForm($this->module, $this->seed);
|
||||
}else{
|
||||
$use_old_search = false;
|
||||
require_once('include/SearchForm/SearchForm2.php');
|
||||
|
||||
|
||||
if (file_exists('custom/modules/'.$this->module.'/metadata/searchdefs.php'))
|
||||
{
|
||||
require_once('custom/modules/'.$this->module.'/metadata/searchdefs.php');
|
||||
}
|
||||
elseif (!empty($metafiles[$this->module]['searchdefs']))
|
||||
{
|
||||
require_once($metafiles[$this->module]['searchdefs']);
|
||||
}
|
||||
elseif (file_exists('modules/'.$this->module.'/metadata/searchdefs.php'))
|
||||
{
|
||||
require_once('modules/'.$this->module.'/metadata/searchdefs.php');
|
||||
}
|
||||
|
||||
|
||||
if(!empty($metafiles[$this->module]['searchfields']))
|
||||
require_once($metafiles[$this->module]['searchfields']);
|
||||
elseif(file_exists('modules/'.$this->module.'/metadata/SearchFields.php'))
|
||||
require_once('modules/'.$this->module.'/metadata/SearchFields.php');
|
||||
|
||||
|
||||
$searchForm = new SearchForm($this->seed, $this->module, $this->action);
|
||||
$searchForm->setup($searchdefs, $searchFields, 'include/SearchForm/tpls/SearchFormGeneric.tpl', $view, $listViewDefs);
|
||||
$searchForm->lv = $lv;
|
||||
}
|
||||
|
||||
if(isset($this->options['show_title']) && $this->options['show_title']) {
|
||||
$moduleName = isset($this->seed->module_dir) ? $this->seed->module_dir : $GLOBALS['mod_strings']['LBL_MODULE_NAME'];
|
||||
echo get_module_title($moduleName, $GLOBALS['mod_strings']['LBL_MODULE_TITLE'], true);
|
||||
}
|
||||
|
||||
$where = '';
|
||||
if(isset($_REQUEST['query']))
|
||||
{
|
||||
// we have a query
|
||||
if(!empty($_SERVER['HTTP_REFERER']) && preg_match('/action=EditView/', $_SERVER['HTTP_REFERER'])) { // from EditView cancel
|
||||
$searchForm->populateFromArray($storeQuery->query);
|
||||
}
|
||||
else {
|
||||
$searchForm->populateFromRequest();
|
||||
}
|
||||
$where_clauses = $searchForm->generateSearchWhere(true, $this->seed->module_dir);
|
||||
if (count($where_clauses) > 0 )$where = '('. implode(' ) AND ( ', $where_clauses) . ')';
|
||||
$GLOBALS['log']->info("List View Where Clause: $where");
|
||||
}
|
||||
if($use_old_search){
|
||||
switch($view) {
|
||||
case 'basic_search':
|
||||
$searchForm->setup();
|
||||
$searchForm->displayBasic($headers);
|
||||
break;
|
||||
case 'advanced_search':
|
||||
$searchForm->setup();
|
||||
$searchForm->displayAdvanced($headers);
|
||||
break;
|
||||
case 'saved_views':
|
||||
echo $searchForm->displaySavedViews($listViewDefs, $lv, $headers);
|
||||
break;
|
||||
}
|
||||
}else{
|
||||
echo $searchForm->display($headers);
|
||||
}
|
||||
if(!$headers)
|
||||
return;
|
||||
|
||||
if(empty($_REQUEST['search_form_only']) || $_REQUEST['search_form_only'] == false){
|
||||
if (!is_admin($current_user)){
|
||||
$lv->setup($seed, 'include/ListView/ListViewNoMassUpdate.tpl', $where, $params);
|
||||
}
|
||||
else {
|
||||
$lv->setup($seed, 'include/ListView/ListViewGeneric.tpl', $where, $params);
|
||||
}
|
||||
$savedSearchName = empty($_REQUEST['saved_search_select_name']) ? '' : (' - ' . $_REQUEST['saved_search_select_name']);
|
||||
echo $lv->display();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user