Add php files

This commit is contained in:
2025-05-12 15:44:39 +00:00
parent c951760058
commit 82d5804ac4
9534 changed files with 2638137 additions and 0 deletions

87
modules/Project/Delete.php Executable file
View 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 Project();
// 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']) ? 'Project'
: $_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");
?>

77
modules/Project/Menu.php Executable file
View File

@@ -0,0 +1,77 @@
<?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;
global $mod_strings, $app_strings;
$module_menu = array();
// Each index of module_menu must be an array of:
// the link url, display text for the link, and the icon name.
// Create Project
if(ACLController::checkAccess('Project', 'edit', true)) {
$module_menu[] = array(
'index.php?module=Project&action=EditView&return_module=Project&return_action=DetailView',
isset($mod_strings['LNK_NEW_PROJECT']) ? $mod_strings['LNK_NEW_PROJECT'] : '',
'CreateProject'
);
}
// Project List
if(ACLController::checkAccess('Project', 'list', true)) {
$module_menu[] = array(
'index.php?module=Project&action=index',
isset($mod_strings['LNK_PROJECT_LIST']) ? $mod_strings['LNK_PROJECT_LIST'] : '',
'Project'
);
}
// Project Tasks
if(ACLController::checkAccess('ProjectTask', 'list', true)) {
$module_menu[] = array(
'index.php?module=ProjectTask&action=index',
isset($mod_strings['LNK_PROJECT_TASK_LIST']) ? $mod_strings['LNK_PROJECT_TASK_LIST'] : '',
'ProjectTask'
);
}
?>

47
modules/Project/Popup.php Executable file
View File

@@ -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".
********************************************************************************/
require_once('include/Popups/Popup_picker.php');
$popup = new Popup_Picker();
echo $popup->process_page();
?>

153
modules/Project/Popup_picker.php Executable file
View File

@@ -0,0 +1,153 @@
<?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 $theme;
class Popup_Picker
{
/*
*
*/
function Popup_Picker()
{
;
}
/*
*
*/
function _get_where_clause()
{
$where = '';
if(isset($_REQUEST['query']))
{
$where_clauses = array();
append_where_clause($where_clauses, "name", "project.name");
$where = generate_where_statement($where_clauses);
}
return $where;
}
/**
*
*/
function process_page()
{
global $theme;
global $mod_strings;
global $app_strings;
global $currentModule;
$output_html = '';
$where = '';
$where = $this->_get_where_clause();
$name = empty($_REQUEST['name']) ? '' : $_REQUEST['name'];
$request_data = empty($_REQUEST['request_data']) ? '' : $_REQUEST['request_data'];
$hide_clear_button = empty($_REQUEST['hide_clear_button']) ? false : true;
$button = "<form action='index.php' method='post' name='form' id='form'>\n";
if(!$hide_clear_button)
{
$button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='"
.$app_strings['LBL_CLEAR_BUTTON_TITLE']."' accesskey='"
.$app_strings['LBL_CLEAR_BUTTON_KEY']."' value=' "
.$app_strings['LBL_CLEAR_BUTTON_LABEL']." ' />\n";
}
$button .= "<input type='submit' name='button' class='button' onclick=\"window.close();\" title='"
.$app_strings['LBL_CANCEL_BUTTON_TITLE']."' accesskey='"
.$app_strings['LBL_CANCEL_BUTTON_KEY']."' value=' "
.$app_strings['LBL_CANCEL_BUTTON_LABEL']." ' />\n";
$button .= "</form>\n";
$form = new XTemplate('modules/Project/Popup_picker.html');
$form->assign('MOD', $mod_strings);
$form->assign('APP', $app_strings);
$form->assign('THEME', $theme);
$form->assign('MODULE_NAME', $currentModule);
$form->assign('NAME', $name);
$form->assign('request_data', $request_data);
ob_start();
insert_popup_header($theme);
$output_html .= ob_get_contents();
ob_end_clean();
$output_html .= get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE'], '', false);
$form->parse('main.SearchHeader');
$output_html .= $form->text('main.SearchHeader');
// Reset the sections that are already in the page so that they do not print again later.
$form->reset('main.SearchHeader');
// create the listview
$seed_bean = new Project();
$ListView = new ListView();
$ListView->show_export_button = false;
$ListView->process_for_popups = true;
$ListView->setXTemplate($form);
$ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']);
$ListView->setHeaderText($button);
$ListView->setQuery($where, '', 'name', 'PROJECT');
$ListView->setModStrings($mod_strings);
ob_start();
$ListView->processListView($seed_bean, 'main', 'PROJECT');
$output_html .= ob_get_contents();
ob_end_clean();
return $output_html;
}
} // end of class Popup_Picker
?>

285
modules/Project/Project.php Executable file
View File

@@ -0,0 +1,285 @@
<?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 Project 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 $deleted;
// related information
var $assigned_user_name;
var $modified_by_name;
var $created_by_name;
var $account_id;
var $contact_id;
var $opportunity_id;
var $email_id;
var $estimated_start_date;
// calculated information
var $total_estimated_effort;
var $total_actual_effort;
var $object_name = 'Project';
var $module_dir = 'Project';
var $new_schema = true;
var $table_name = 'project';
// This is used to retrieve related fields from form posts.
var $additional_column_fields = array(
'account_id',
'contact_id',
'opportunity_id',
);
var $relationship_fields = array(
'account_id' => 'accounts',
'contact_id'=>'contacts',
'opportunity_id'=>'opportunities',
'email_id' => 'emails',
);
//////////////////////////////////////////////////////////////////
// METHODS
//////////////////////////////////////////////////////////////////
/**
*
*/
function Project()
{
parent::SugarBean();
}
/**
* overriding the base class function to do a join with users table
*/
/**
*
*/
function fill_in_additional_detail_fields()
{
parent::fill_in_additional_detail_fields();
$this->assigned_user_name = get_assigned_user_name($this->assigned_user_id);
//$this->total_estimated_effort = $this->_get_total_estimated_effort($this->id);
//$this->total_actual_effort = $this->_get_total_actual_effort($this->id);
}
/**
*
*/
function fill_in_additional_list_fields()
{
parent::fill_in_additional_list_fields();
$this->assigned_user_name = get_assigned_user_name($this->assigned_user_id);
//$this->total_estimated_effort = $this->_get_total_estimated_effort($this->id);
//$this->total_actual_effort = $this->_get_total_actual_effort($this->id);
}
/**
*
*/
function _get_total_estimated_effort($project_id)
{
$return_value = '';
$query = 'SELECT SUM(estimated_effort) total_estimated_effort';
if ($this->db->dbType=='oci8') {
}
$query.= ' FROM project_task';
$query.= " WHERE parent_id='{$project_id}' AND deleted=0";
$result = $this->db->query($query,true," Error filling in additional detail fields: ");
$row = $this->db->fetchByAssoc($result);
if($row != null)
{
$return_value = $row['total_estimated_effort'];
}
return $return_value;
}
/**
*
*/
function _get_total_actual_effort($project_id)
{
$return_value = '';
$query = 'SELECT SUM(actual_effort) total_actual_effort';
if ($this->db->dbType=='oci8') {
}
$query.= ' FROM project_task';
$query.= " WHERE parent_id='{$project_id}' AND deleted=0";
$result = $this->db->query($query,true," Error filling in additional detail fields: ");
$row = $this->db->fetchByAssoc($result);
if($row != null)
{
$return_value = $row['total_actual_effort'];
}
return $return_value;
}
/**
*
*/
function get_summary_text()
{
return $this->name;
}
/**
*
*/
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.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()
{
$field_list = $this->get_list_view_array();
$field_list['USER_NAME'] = empty($this->user_name) ? '' : $this->user_name;
$field_list['ASSIGNED_USER_NAME'] = $this->assigned_user_name;
return $field_list;
}
function bean_implements($interface){
switch($interface){
case 'ACL':return true;
}
return false;
}
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.*,
users.user_name as assigned_user_name ";
if($custom_join){
$query .= $custom_join['select'];
}
$query .= " FROM project ";
if($custom_join){
$query .= $custom_join['join'];
}
$query .= " LEFT JOIN users
ON project.assigned_user_id=users.id ";
$where_auto = " project.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 getAllProjectTasks(){
$projectTasks = array();
$query = "SELECT * FROM project_task WHERE project_id = '" . $this->id. "' AND deleted = 0 ORDER BY project_task_id";
$result = $this->db->query($query,true,"Error retrieving project tasks");
$row = $this->db->fetchByAssoc($result);
while ($row != null){
$projectTaskBean = new ProjectTask();
$projectTaskBean->id = $row['id'];
$projectTaskBean->retrieve();
array_push($projectTasks, $projectTaskBean);
$row = $this->db->fetchByAssoc($result);
}
return $projectTasks;
}
}
?>

View 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".
********************************************************************************/
require_once('include/EditView/QuickCreate.php');
class ProjectQuickCreate extends QuickCreate {
var $javascript;
function process() {
global $current_user, $timedate, $app_list_strings, $current_language, $mod_strings;
$mod_strings = return_module_language($current_language, 'Project');
parent::process();
if($this->viaAJAX) { // override for ajax call
$this->ss->assign('saveOnclick', "onclick='if(check_form(\"projectQuickCreate\")) return SUGAR.subpanelUtils.inlineSave(this.form.id, \"projects\"); else return false;'");
$this->ss->assign('cancelOnclick', "onclick='return SUGAR.subpanelUtils.cancelCreate(\"subpanel_project\")';");
}
$this->ss->assign('viaAJAX', $this->viaAJAX);
$this->javascript = new javascript();
$this->javascript->setFormName('projectQuickCreate');
$focus = new Project();
$this->javascript->setSugarBean($focus);
$this->javascript->addAllFields('');
//$this->ss->assign("STATUS_OPTIONS", get_select_options_with_id($app_list_strings['project_status_dom'], $focus->status));
$this->ss->assign('additionalScripts', $this->javascript->getScript(false));
$this->ss->assign('CALENDAR_DATEFORMAT', $timedate->get_cal_date_format());
$json = getJSONobj();
$popup_request_data = array(
'call_back_function' => 'set_return',
'form_name' => 'projectsQuickCreate',
'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);
}
}
?>

122
modules/Project/Save.php Executable file
View File

@@ -0,0 +1,122 @@
<?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/formbase.php');
global $current_user;
$sugarbean = new Project();
$sugarbean = populateFromPost('', $sugarbean);
$projectTasks = array();
if (isset($_REQUEST['duplicateSave']) && $_REQUEST['duplicateSave'] === "true"){
$base_project_id = $_REQUEST['relate_id'];
}
else{
$base_project_id = $sugarbean->id;
}
$query = "SELECT id FROM project_task WHERE project_id = '" . $base_project_id . "' AND deleted = 0";
$result = $sugarbean->db->query($query,true,"Error retrieving project tasks");
$row = $sugarbean->db->fetchByAssoc($result);
while ($row != null){
$projectTaskBean = new ProjectTask();
$projectTaskBean->id = $row['id'];
$projectTaskBean->retrieve();
$projectTaskBean->date_entered = '';
$projectTaskBean->date_modified = '';
array_push($projectTasks, $projectTaskBean);
$row = $sugarbean->db->fetchByAssoc($result);
}
if (isset($_REQUEST['save_type'])){
$sugarbean->id = '';
$sugarbean->assigned_user_id = $current_user->id;
if ($_REQUEST['save_type'] == 'TemplateToProject'){
$sugarbean->name = $_REQUEST['project_name'];
$sugarbean->is_template = 0;
}
else if ($_REQUEST['save_type'] == 'ProjectToTemplate'){
$sugarbean->name = $_REQUEST['template_name'];
$sugarbean->is_template = true;
}
}
else{
if (isset($_REQUEST['is_template']) && $_REQUEST['is_template'] == '1'){
$sugarbean->is_template = true;
}
else{
$sugarbean->is_template = 0;
}
}
if(isset($_REQUEST['email_id'])) $sugarbean->email_id = $_REQUEST['email_id'];
if(!$sugarbean->ACLAccess('Save')){
ACLController::displayNoAccess(true);
sugar_cleanup(true);
}
$sugarbean->save(false);
$return_id = $sugarbean->id;
for ($i = 0; $i < count($projectTasks); $i++){
if (isset($_REQUEST['save_type']) || (isset($_REQUEST['duplicateSave']) && $_REQUEST['duplicateSave'] === "true")){
$projectTasks[$i]->id = '';
$projectTasks[$i]->project_id = $sugarbean->id;
}
if ($sugarbean->is_template){
$projectTasks[$i]->assigned_user_id = '';
}
$projectTasks[$i]->team_id = $sugarbean->team_id;
if(empty( $projectTasks[$i]->duration_unit)) $projectTasks[$i]->duration_unit = " "; //Since duration_unit cannot be null.
$projectTasks[$i]->save(false);
}
if ($sugarbean->is_template){
header("Location: index.php?action=ProjectTemplatesDetailView&module=Project&record=$return_id&return_module=Project&return_action=ProjectTemplatesEditView");
}
else{
handleRedirect($return_id,'Project');
}
?>

102
modules/Project/SubPanelView.php Executable file
View File

@@ -0,0 +1,102 @@
<?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;
//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, 'Project');
global $currentModule;
global $theme;
global $focus;
global $action;
// focus_list is the means of passing data to a SubPanelView.
global $focus_list;
$button = "<form action='index.php' method='post' name='form' id='form'>\n";
$button .= "<input type='hidden' name='module' value='Project'>\n";
$button .= "<input type='hidden' name='relation_id' value='$focus->id'>\n";
$button .= "<input type='hidden' name='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";
if (!empty($focus->object_name) && $focus->object_name == 'Opportunity') {
$button .= "<input type='hidden' name='account_id' value='$focus->account_id'>\n";
$button .= "<input type='hidden' name='opportunity_name' value='$focus->name'>\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/Project/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);
$ListView->setHeaderTitle($current_module_strings['LBL_PROJECT_SUBPANEL_TITLE'] );
$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="
.$_REQUEST['action']
."&from_module=".$_REQUEST['module'] ."&record="
.$_REQUEST['record']. "'>"
.SugarThemeRegistry::current()->getImage("EditLayout", "border='0' alt='Edit Layout' align='bottom'")."</a>";
}
$ListView->setHeaderTitle($current_module_strings['LBL_PROJECT_SUBPANEL_TITLE'] . $header_text);
$ListView->processListView($focus_list, "main", "PROJECT");
?>

View File

@@ -0,0 +1,40 @@
<?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".
********************************************************************************/
$action_view_map['projecttemplateseditview']= 'templatesedit';
$action_view_map['projecttemplatesdetailview']= 'templatesdetail';
?>

View File

@@ -0,0 +1,76 @@
<?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['Project'] = array ('column_fields' => array(
'id',
'date_entered',
'date_modified',
'assigned_user_id',
'modified_user_id',
'created_by',
'name',
'description',
'deleted',
'priority',
'status',
'estimated_start_date',
'estimated_end_date',
),
'list_fields' => array(
'id',
'assigned_user_id',
'assigned_user_name',
'name',
'relation_id',
'relation_name',
'relation_type',
'total_estimated_effort',
'total_actual_effort',
'status',
'priority',
),
'required_fields' => array('name'=>1, 'estimated_start_date'=>2, 'estimated_end_date'=>3),
);
?>

View File

@@ -0,0 +1,142 @@
<?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',
'LBL_MODULE_TITLE' => 'Projects: Home',
'LBL_SEARCH_FORM_TITLE' => 'Project Search',
'LBL_LIST_FORM_TITLE' => 'Project List',
'LBL_HISTORY_TITLE' => 'History',
'LBL_ID' => 'Id:',
'LBL_DATE_ENTERED' => 'Date Created:',
'LBL_DATE_MODIFIED' => 'Date Modified:',
'LBL_ASSIGNED_USER_ID' => 'Assigned To:',
'LBL_ASSIGNED_USER_NAME' => 'Assigned to:',
'LBL_MODIFIED_USER_ID' => 'Modified User Id:',
'LBL_CREATED_BY' => 'Created By:',
'LBL_TEAM_ID' => 'Team:',
'LBL_NAME' => 'Name:',
'LBL_PDF_PROJECT_NAME' => 'Project Name:',
'LBL_DESCRIPTION' => 'Description:',
'LBL_DELETED' => 'Deleted:',
'LBL_DATE' => 'Date:',
'LBL_DATE_START' => 'Start Date:',
'LBL_DATE_END' => 'End Date:',
'LBL_PRIORITY' => 'Priority:',
'LBL_STATUS' => 'Status:',
'LBL_MY_PROJECTS' => 'My Projects',
'LBL_MY_PROJECT_TASKS' => 'My Project Tasks',
'LBL_TOTAL_ESTIMATED_EFFORT' => 'Total Estimated Effort (hrs):',
'LBL_TOTAL_ACTUAL_EFFORT' => 'Total Actual Effort (hrs):',
'LBL_LIST_NAME' => 'Name',
'LBL_LIST_DAYS' => 'days',
'LBL_LIST_ASSIGNED_USER_ID' => 'Assigned To',
'LBL_LIST_TOTAL_ESTIMATED_EFFORT' => 'Total Estimated Effort (hrs)',
'LBL_LIST_TOTAL_ACTUAL_EFFORT' => 'Total Actual Effort (hrs)',
'LBL_LIST_UPCOMING_TASKS' => 'Upcoming Tasks (1 Week)',
'LBL_LIST_OVERDUE_TASKS' => 'Overdue Tasks',
'LBL_LIST_OPEN_CASES' => 'Open Cases',
'LBL_LIST_END_DATE' => 'End Date',
'LBL_LIST_TEAM_ID' => 'Team',
'LBL_PROJECT_SUBPANEL_TITLE' => 'Projects',
'LBL_PROJECT_TASK_SUBPANEL_TITLE' => 'Project Tasks',
'LBL_CONTACT_SUBPANEL_TITLE' => 'Contacts',
'LBL_ACCOUNT_SUBPANEL_TITLE' => 'Accounts',
'LBL_OPPORTUNITY_SUBPANEL_TITLE' => 'Opportunities',
'LBL_QUOTE_SUBPANEL_TITLE' => 'Quotes',
// quick create label
'LBL_NEW_FORM_TITLE' => 'New Project',
'CONTACT_REMOVE_PROJECT_CONFIRM' => 'Are you sure you want to remove this contact from this project?',
'LNK_NEW_PROJECT' => 'Create Project',
'LNK_PROJECT_LIST' => 'View Project List',
'LNK_NEW_PROJECT_TASK' => 'Create Project Task',
'LNK_PROJECT_TASK_LIST' => 'View Project Tasks',
'LBL_DEFAULT_SUBPANEL_TITLE' => 'Projects',
'LBL_ACTIVITIES_TITLE'=>'Activities',
'LBL_ACTIVITIES_SUBPANEL_TITLE'=>'Activities',
'LBL_HISTORY_SUBPANEL_TITLE'=>'History',
'LBL_QUICK_NEW_PROJECT' => 'New Project',
'LBL_PROJECT_TASKS_SUBPANEL_TITLE' => 'Project Tasks',
'LBL_CONTACTS_SUBPANEL_TITLE' => 'Contacts',
'LBL_ACCOUNTS_SUBPANEL_TITLE' => 'Accounts',
'LBL_OPPORTUNITIES_SUBPANEL_TITLE' => 'Opportunities',
'LBL_CASES_SUBPANEL_TITLE' => 'Cases',
'LBL_BUGS_SUBPANEL_TITLE' => 'Bugs',
'LBL_PRODUCTS_SUBPANEL_TITLE' => 'Products',
'LBL_TASK_ID' => 'ID',
'LBL_TASK_NAME' => 'Task Name',
'LBL_DURATION' => 'Duration',
'LBL_ACTUAL_DURATION' => 'Actual Duration',
'LBL_START' => 'Start',
'LBL_FINISH' => 'Finish',
'LBL_PREDECESSORS' => 'Predecessors',
'LBL_PERCENT_COMPLETE' => '% Complete',
'LBL_MORE' => 'More...',
'LBL_PERCENT_BUSY' => '% Busy',
'LBL_TASK_ID_WIDGET' => 'id',
'LBL_TASK_NAME_WIDGET' => 'description',
'LBL_DURATION_WIDGET' => 'duration',
'LBL_START_WIDGET' => 'date_start',
'LBL_FINISH_WIDGET' => 'date_finish',
'LBL_PREDECESSORS_WIDGET' => 'predecessors_',
'LBL_PERCENT_COMPLETE_WIDGET' => 'percent_complete',
'LBL_EDIT_PROJECT_TASKS_TITLE'=> 'Edit Project Tasks',
'LBL_OPPORTUNITIES' => 'Opportunities',
'LBL_LAST_WEEK' => 'Previous',
'LBL_NEXT_WEEK' => 'Next',
'LBL_PROJECTRESOURCES_SUBPANEL_TITLE' => 'Project Resources',
'LBL_PROJECTTASK_SUBPANEL_TITLE' => 'Project Task',
'LBL_HOLIDAYS_SUBPANEL_TITLE' => 'Holidays',
'LBL_PROJECT_INFORMATION' => 'Project Overview',
);
?>

View File

@@ -0,0 +1,271 @@
<?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-->>
* Translator: Krzysztof Morawski
* All Rights Reserved.
* Any bugs report welcome: krzysiek<at>mojsklepik<dot>net
* Contributor(s): ______________________________________..
********************************************************************************/
$mod_strings = array (
'LBL_MODULE_NAME' => 'Projekty',
'LBL_NOTEST_SUB' =>'Notatki',
'LBL_DOCUMENT_SUB'=>'Dokumenty',
'LBL_MODULE_TITLE' => 'Projekty: Strona główna',
'LBL_SEARCH_FORM_TITLE' => 'Szukaj projektu',
'LBL_LIST_FORM_TITLE' => 'Lista projektów',
'LBL_HISTORY_TITLE' => 'Historia',
'LBL_ID' => 'Id:',
'LBL_DATE_ENTERED' => 'Data rozpoczęcia:',
'LBL_DATE_MODIFIED' => 'Data modyfikacji:',
'LBL_ASSIGNED_USER_ID' => 'Przydzielony do:',
'LBL_ASSIGNED_USER_NAME' => 'Przydzielony do:',
'LBL_MODIFIED_USER_ID' => 'Id Użytkownika modyfikującego:',
'LBL_CREATED_BY' => 'Stworzony przez:',
'LBL_TEAM_ID' => 'Zespół:',
'LBL_NAME' => 'Nazwa:',
'LBL_PDF_PROJECT_NAME' => 'Nazwa projektu:',
'LBL_DESCRIPTION' => 'Opis:',
'LBL_DELETED' => 'Usunięty:',
'LBL_DATE' => 'Data:',
'LBL_DATE_START' => 'Data rozpoczęcia:',
'LBL_DATE_END' => 'Data zakończenia:',
'LBL_PRIORITY' => 'Priorytet:',
'LBL_STATUS' => 'Status:',
'LBL_MY_PROJECTS' => 'Moje Projekty',
'LBL_MY_PROJECT_TASKS' => 'Moje elementy projektu',
'LBL_TOTAL_ESTIMATED_EFFORT' => 'Całkowita liczba roboczogodzin (hrs):',
'LBL_TOTAL_ACTUAL_EFFORT' => 'Aktualna liczba roboczogodzin (hrs):',
'LBL_LIST_NAME' => 'Nazwa',
'LBL_LIST_DAYS' => 'dni',
'LBL_LIST_ASSIGNED_USER_ID' => 'Przydzielony do',
'LBL_LIST_TOTAL_ESTIMATED_EFFORT' => 'Całkowita liczba roboczogodzin (hrs)',
'LBL_LIST_TOTAL_ACTUAL_EFFORT' => 'Aktualna liczba roboczogodzin (hrs)',
'LBL_LIST_UPCOMING_TASKS' => 'Nadchodzące zadania (1 Tydzień)',
'LBL_LIST_OVERDUE_TASKS' => 'Przeterminowane zadania',
'LBL_LIST_OPEN_CASES' => 'Otwarte sprawy',
'LBL_LIST_END_DATE' => 'Data zakończenia',
'LBL_LIST_TEAM_ID' => 'Zespół',
'LBL_PROJECT_SUBPANEL_TITLE' => 'Projekty',
'LBL_PROJECT_TASK_SUBPANEL_TITLE' => 'Elementy projektu',
'LBL_CONTACT_SUBPANEL_TITLE' => 'Kontakty',
'LBL_ACCOUNT_SUBPANEL_TITLE' => 'Klienci',
'LBL_OPPORTUNITY_SUBPANEL_TITLE' => 'Projekty',
'LBL_QUOTE_SUBPANEL_TITLE' => 'Oferty',
// quick create label
'LBL_NEW_FORM_TITLE' => 'Nowy Projekt',
'CONTACT_REMOVE_PROJECT_CONFIRM' => 'Czy na pewno chcesz usunąć ten kontakt z tej projektu?',
'LNK_NEW_PROJECT' => 'Utwórz projekt',
'LNK_PROJECT_LIST' => 'Lista projektów',
'LNK_NEW_PROJECT_TASK' => 'Utwórz element projektu',
'LNK_PROJECT_TASK_LIST' => 'Elementy projektu',
'LNK_PROJECT_DASHBOARD' => 'Zestawienia moich projektów',
'LNK_PROJECT_TASKS_DASHBOARD' => 'Zestawienia moich etapów projektu',
'LNK_NEW_PROJECT_TEMPLATES' => 'Utwórz szkic projektu',
'LNK_PROJECT_TEMPLATES_LIST' => 'Szkice projektu',
'LNK_PROJECT_RESOURCE_REPORT' => 'Raport źródeł',
'LBL_DEFAULT_SUBPANEL_TITLE' => 'Projekty',
'LBL_ACTIVITIES_TITLE'=>'Działania',
'LBL_ACTIVITIES_SUBPANEL_TITLE'=>'Działania',
'LBL_HISTORY_SUBPANEL_TITLE'=>'Historia',
'LBL_QUICK_NEW_PROJECT' => 'Nowy projekt',
'LBL_PROJECT_TASKS_SUBPANEL_TITLE' => 'Elementy projektu',
'LBL_CONTACTS_SUBPANEL_TITLE' => 'Kontakty',
'LBL_ACCOUNTS_SUBPANEL_TITLE' => 'Klienci',
'LBL_OPPORTUNITIES_SUBPANEL_TITLE' => 'Tematy',
'LBL_CASES_SUBPANEL_TITLE' => 'Sprawy',
'LBL_BUGS_SUBPANEL_TITLE' => 'Błędy',
'LBL_PRODUCTS_SUBPANEL_TITLE' => 'Produkty',
'LBL_QUOTES_SUBPANEL_TITLE' => 'Wyceny',
'LBL_RESOURCES_SUBPANEL_TITLE' => 'Źródła',
'LBL_RESOURCE_NAME' => 'Nazwa źródła',
'LBL_RESOURCE_TYPE' => 'Typ źródła',
'LBL_TASK_ID' => 'ID',
'LBL_TASK_NAME' => 'Nazwa Etapu',
'LBL_DURATION' => 'Czas Trwania',
'LBL_ACTUAL_DURATION' => 'Aktualny czas zaawansowania',
'LBL_START' => 'Start',
'LBL_FINISH' => 'Zakończenie',
'LBL_PREDECESSORS' => 'Poprzednie',
'LBL_PERCENT_COMPLETE' => '% Zaawansowania',
'LBL_RESOURCE_NAMES' => 'Źródło',
'LBL_PERCENT_BUSY' => '% Zaangażowania',
'LBL_MORE' => 'Więcej...',
'LBL_USER_RESOURCE' => 'Źródła użytkownika',
'LBL_CONTACTS_RESOURCE' => 'Źródła kontaktu',
'LBL_LIST_RESOURCE' => 'Źródło:',
'LBL_PROJECT_HOLIDAYS' => 'Przerwa',
'LBL_TASK_ID_WIDGET' => 'id',
'LBL_TASK_NAME_WIDGET' => 'opis',
'LBL_DURATION_WIDGET' => 'czas trwania',
'LBL_START_WIDGET' => 'data_rozpoczęcia',
'LBL_FINISH_WIDGET' => 'data_zakończenia',
'LBL_PREDECESSORS_WIDGET' => 'poprzednie_',
'LBL_PERCENT_COMPLETE_WIDGET' => 'procent_zaawansowania',
'LBL_RESOURCE_NAMES_WIDGET' => 'źródło',
'LBL_EDIT_PROJECT_TASKS_TITLE'=> 'Edytuj elementy projektu',
'LBL_VIEW_GANTT_TITLE' => 'Zobacz schemat Gantta',
'LBL_INSERT_BUTTON' => 'Wstaw wiersz',
'LBL_INDENT_BUTTON' => 'Akapit',
'LBL_OUTDENT_BUTTON' => 'Wcięcie z prawej',
'LBL_SAVE_BUTTON' => 'Zapisz',
'LBL_COPY_BUTTON' => 'Kopiuj',
'LBL_PASTE_BUTTON' => 'Wstaw',
'LBL_DELETE_BUTTON' => 'Usuń',
'LBL_EXPAND_ALL_BUTTON' => 'Rozwiń wszystko',
'LBL_COLLAPSE_ALL_BUTTON' => 'Zwiń wszystko',
'LBL_MARK_AS_MILESTONE_BUTTON' => 'Zaznacz jako Milestone',
'LBL_UNMARK_AS_MILESTONE_BUTTON' => 'Odznacz Milestone',
'LBL_HIDE_OPTIONAL_COLUMNS_BUTTON' => 'Ukryj kolumny opcjonalne',
'LBL_SHOW_OPTIONAL_COLUMNS_BUTTON' => 'Pokaż kolumny Opcjonalne',
'LBL_VIEW_TASK_DETAILS_BUTTON' => 'Pokaż szczegóły projektu',
'LBL_RECALCULATE_DATES_BUTTON' => 'Przelicz daty',
'LBL_EXPORT_TO_PDF' => 'Eksportuj do PDF',
'LBL_FILTER_ALL_TASKS' => 'Wszystkie elementy',
'LBL_FILTER_COMPLETED_TASKS' => 'Zakończone elementy',
'LBL_FILTER_INCOMPLETE_TASKS' => 'Elementy niezakończone',
'LBL_FILTER_MILESTONES' => 'Milestones',
'LBL_FILTER_RESOURCE' => 'Elementy korzystające ze źródeł',
'LBL_FILTER_DATE_RANGE' => 'Elementy w zakresie dat',
'LBL_FILTER_VIEW' => 'Zobacz',
'LBL_LIST_FILTER_VIEW' => 'Zobacz:',
'LBL_FILTER_DATE_RANGE_START' => 'Elementy, które kończą się, lub rozpoczynają po',
'LBL_FILTER_DATE_RANGE_FINISH' => 'Dowolny przed',
'LBL_FILTER_MY_TASKS' => 'Moje elementy',
'LBL_FILTER_MY_OVERDUE_TASKS' => 'Moje przeterminowane elementy',
'LBL_FILTER_MY_UPCOMING_TASKS' => 'Moje przyszłe elementy (1 tydzień)',
/*
* Tasks that fall within a date range
* Tasks using a specified resource
*/
'LBL_CUT_BUTTON' => 'Wytnij',
'LBL_WEEK_BUTTON' => 'Tydzień',
'LBL_BIWEEK_BUTTON' => '2 tygodnie',
'LBL_MONTH_BUTTON' => 'Miesiąc',
'ERR_TASK_NAME_FOR_ROW' => 'Nazwa elementu projektu dla wiersza ',
'ERR_IS_EMPTY' => ' nie może być pusty.',
'ERR_PERCENT_COMPLETE' => '% Zaawansowania musi być wartością od 0 do 100',
'ERR_DURATION' => 'Czas trwania musi być wyrażony liczbą.',
'ERR_DATE' => 'Określona data wypada w dniu wolnym od pracy.',
'ERR_FINISH_DATE' => 'Data zakończenia nie może być wcześniejsza, niż data rozpoczęcia.',
'ERR_PREDECESSORS_INPUT' => 'Wprowadzone wartości w polu Poprzednie muszą być w formacie "1" lub "1,2"',
'ERR_PREDECESSORS_OUT_OF_RANGE' => 'Wprowadzone wartości w polu Poprzednie muszą być w większe, ilość wierszy',
'ERR_PREDECESSOR_CYCLE_FAIL' => 'Określony predecessor powoduje cykl zależności.',
'ERR_PREDECESSOR_IS_PARENT_OR_CHILD_FAIL' => 'Określony predecessor jest nie jest nadrzędnym dla elementu bądź etapu elementu.',
'NTC_DELETE_TASK_AND_SUBTASKS' => 'Czy na pewno chcesz usunąć ten element(y)',
'NTC_NO_ACTIVE_PROJECTS' => 'Nie masz żadnych aktywnych projektu lub ich elemtntów.',
'NTC_ASSIGN_RIGHT_TEAM' => 'Upewnij się, że wszystkie źródła projektu są członkami tego zespołu.',
'LBL_RESOURCE_NAME' => 'Nazwa',
'LBL_RESOURCE_TYPE' => 'Typ',
'LBL_GRID_ONLY' => 'Siatka',
'LBL_GANTT_ONLY' => 'Schemat Gantta',
'LBL_GRID_GANTT' => 'Siatka/Schemat Gantt',
'LBL_REPORT' => 'Raport',
'LBL_DAILY_REPORT' => 'Raport',
'LBL_DATE' => 'Data',
'LBL_PROJECT_HOLIDAYS_TITLE' => 'Przerwy w projekcie',
'LBL_HOLIDAYS_TITLE' => 'Przerwy',
'LBL_HOLIDAY' => 'Przerwa',
'LBL_PROJECT_TEMPLATE' => 'Szkice projektu',
'LBL_PROJECT_TEMPLATES_LIST' => 'Lista szkiców projektu',
'LBL_PROJECT_TEMPLATES_TITLE' => 'Szkice projektu: Strona główna',
'LBL_IS_TEMPLATE' => 'Jest Szkicem',
'LBL_SAVE_TEMPLATE_BUTTON_TITLE' => 'Zapisz jako szkic',
'LBL_SAVE_TEMPLATE_BUTTON_LABEL' => 'Zapisz jako szkic',
'LBL_SAVE_AS_PROJECT' => 'Zapisz jako projekt',
'LBL_SAVE_AS_TEMPLATE' => 'Zapisz jako szkic',
'LBL_SAVE_AS_NEW_PROJECT_BUTTON' => 'Zapisz jako nowy projekt',
'LBL_SAVE_AS_NEW_TEMPLATE_BUTTON' => 'Zapisz jako nowy szkic',
'LBL_TEMPLATE_NAME' => 'Nazwa szkicu: ',
'LBL_PROJECT_NAME' => 'Nazwa projektu: ',
'LBL_PROJECT_TEMPLATE_NAME' => 'Nazwa szkicu: ',
'LBL_EXPORT_TO_MS_PROJECT' => 'Eksportuj do MS Project',
'LBL_POPUP_DATE_START' => 'Data rozpoczęcia: ',
'LBL_POPUP_DATE_FINISH' => 'Data zakończenia: ',
'LBL_POPUP_PERCENT_COMPLETE' => '% Zaawansowania: ',
'LBL_POPUP_RESOURCE_NAME' => 'Nazwa źródła: ',
'LBL_MY_PROJECTS_DASHBOARD' => 'Zestawienie moich projektów',
'LBL_RESOURCE_REPORT' => 'Raport o źródłach',
'LBL_PERSONAL_HOLIDAY' => '-- Własny urlop --',
'LBL_OPPORTUNITIES' => 'Tematy',
'LBL_LAST_WEEK' => 'Poprzedni',
'LBL_NEXT_WEEK' => 'Następny',
'LBL_PROJECTRESOURCES_SUBPANEL_TITLE' => 'Zasoby projektu',
'LBL_PROJECTTASK_SUBPANEL_TITLE' => 'Zadania projektu',
'LBL_HOLIDAYS_SUBPANEL_TITLE' => 'Ferie',
);
?>

View File

@@ -0,0 +1,42 @@
<?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['Project'] =
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'),
);
?>

View File

@@ -0,0 +1,62 @@
<?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 additionalDetailsProject($fields) {
static $mod_strings;
if(empty($mod_strings)) {
global $current_language;
$mod_strings = return_module_language($current_language, 'Project');
}
$overlib_string = '';
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=Project&return_module=Project&record={$fields['ID']}",
'viewLink' => "index.php?action=DetailView&module=Project&return_module=Project&record={$fields['ID']}");
}
?>

View File

@@ -0,0 +1,130 @@
<?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".
********************************************************************************/
$viewdefs['Project']['DetailView'] = array(
'templateMeta' => array( 'maxColumns' => '2',
'widths' => array( array('label' => '10', 'field' => '30'),
array('label' => '10', 'field' => '30')
),
'includes'=> array(
array('file'=>'modules/Project/Project.js'),
),
'form' => array(
'buttons'=> array(
array( 'customCode' =>'<input title="{$APP.LBL_EDIT_BUTTON_TITLE}" ' .
'accessKey="{$APP.LBL_EDIT_BUTTON_KEY}" class="button" type="submit" ' .
'name="Edit" id="edit_button" value="{$APP.LBL_EDIT_BUTTON_LABEL}"'.
'{if $IS_TEMPLATE}'.
'onclick="this.form.return_module.value=\'Project\'; this.form.return_action.value=\'ProjectTemplatesDetailView\'; this.form.return_id.value=\'{$id}\'; this.form.action.value=\'ProjectTemplatesEditView\';"'.
'{else}'.
'onclick="this.form.return_module.value=\'Project\'; this.form.return_action.value=\'DetailView\'; this.form.return_id.value=\'{$id}\'; this.form.action.value=\'EditView\';" {/if}'.
'"/>',
),
array( 'customCode' =>'<input title="{$APP.LBL_DELETE_BUTTON_TITLE}" ' .
'accessKey="{$APP.LBL_DELETE_BUTTON_KEY}" class="button" type="submit" ' .
'name="Delete" id="delete_button" value="{$APP.LBL_DELETE_BUTTON_LABEL}"'.
'{if $IS_TEMPLATE}'.
'onclick="this.form.return_module.value=\'Project\'; this.form.return_action.value=\'ProjectTemplatesListView\'; this.form.action.value=\'Delete\'; return confirm(\'{$APP.NTC_DELETE_CONFIRMATION}\');"'.
'{else}'.
'onclick="this.form.return_module.value=\'Project\'; this.form.return_action.value=\'ListView\'; this.form.action.value=\'Delete\'; return confirm(\'{$APP.NTC_DELETE_CONFIRMATION}\');" {/if}'.
'"/>',
),
array( 'customCode' =>'<input title="{$APP.LBL_DUPLICATE_BUTTON_TITLE}" ' .
'accessKey="{$APP.LBL_DUPLICATE_BUTTON_KEY}" class="button" type="submit" ' .
'name="Duplicate" id="duplicate_button" value="{$APP.LBL_DUPLICATE_BUTTON_LABEL}"'.
'{if $IS_TEMPLATE}'.
'onclick="this.form.return_module.value=\'Project\'; this.form.return_action.value=\'ProjectTemplatesDetailView\'; this.form.isDuplicate.value=true; this.form.action.value=\'projecttemplateseditview\'; this.form.return_id.value=\'{$id}\';"'.
'{else}'.
'onclick="this.form.return_module.value=\'Project\'; this.form.return_action.value=\'DetailView\'; this.form.isDuplicate.value=true; this.form.action.value=\'EditView\'; this.form.return_id.value=\'{$id}\';" {/if}'.
'"/>',
),
),
),
),
'panels' => array (
'lbl_project_information' =>
array (
array (
'name',
'status', ),
array (
array ( 'name' => 'estimated_start_date',
'label' => 'LBL_DATE_START',
),
array (
'name' => 'estimated_end_date',
'label' => 'LBL_DATE_END',
),
),
array (
'priority',
),
array (
array (
'name' => 'description',
),
),
),
'LBL_PANEL_ASSIGNMENT' =>
array (
array (
array (
'name' => 'assigned_user_name',
'label' => 'LBL_ASSIGNED_TO',
),
),
array (
array (
'name' => 'created_by_name',
'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value}&nbsp;',
'label' => 'LBL_DATE_ENTERED',
),
array (
'name' => 'modified_by_name',
'customCode' => '{$fields.date_modified.value} {$APP.LBL_BY} {$fields.modified_by_name.value}&nbsp;',
'label' => 'LBL_DATE_MODIFIED',
),
),
),
),
);
?>

View File

@@ -0,0 +1,77 @@
<?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".
********************************************************************************/
$viewdefs['Project']['EditView'] =
array( 'templateMeta' =>
array( 'maxColumns' => '2',
'widths' => array (
array('label' => '10', 'field' => '30'),
array('label' => '10', 'field' => '30')
),
'form' => array('hidden'=>'<input type="hidden" name="is_template" value="{$is_template}" />',
'buttons'=> array(
'SAVE',
array( 'customCode' =>'{if !empty($smarty.request.return_action) && $smarty.request.return_action == "ProjectTemplatesDetailView" && (!empty($fields.id.value) || !empty($smarty.request.return_id)) }'.
'<input title="{$APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="this.form.action.value=\'ProjectTemplatesDetailView\'; this.form.module.value=\'{$smarty.request.return_module}\'; this.form.record.value=\'{$smarty.request.return_id}\';" type="submit" name="button" value="{$APP.LBL_CANCEL_BUTTON_LABEL}"> '.
'{elseif !empty($smarty.request.return_action) && $smarty.request.return_action == "DetailView" && (!empty($fields.id.value) || !empty($smarty.request.return_id)) }'.
'<input title="{$APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="this.form.action.value=\'DetailView\'; this.form.module.value=\'{$smarty.request.return_module}\'; this.form.record.value=\'{$smarty.request.return_id}\';" type="submit" name="button" value="{$APP.LBL_CANCEL_BUTTON_LABEL}"> '.
'{elseif $is_template}'.
'<input title="{$APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="this.form.action.value=\'ProjectTemplatesListView\'; this.form.module.value=\'{$smarty.request.return_module}\'; this.form.record.value=\'{$smarty.request.return_id}\';" type="submit" name="button" value="{$APP.LBL_CANCEL_BUTTON_LABEL}"> '.
'{else}'.
'<input title="{$APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="this.form.action.value=\'index\'; this.form.module.value=\'{$smarty.request.return_module}\'; this.form.record.value=\'{$smarty.request.return_id}\';" type="submit" name="button" value="{$APP.LBL_CANCEL_BUTTON_LABEL}"> '.
'{/if}',
),
),
)
),
'panels' => array( 'lbl_project_information' =>
array(
array('name','status',),
array('estimated_start_date','estimated_end_date',),
array('priority',),
array('assigned_user_name',
),
array(
array (
'name' => 'description',
),
),
),
)
);
?>

View 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".
********************************************************************************/
$listViewDefs['Project'] = array(
'NAME' => array(
'width' => '40',
'label' => 'LBL_LIST_NAME',
'link' => true,
'default' => true),
'ESTIMATED_START_DATE' => array(
'width' => '20',
'label' => 'LBL_DATE_START',
'link' => false,
'default' => true),
'ESTIMATED_END_DATE' => array(
'width' => '20',
'label' => 'LBL_DATE_END',
'link' => false,
'default' => true),
'STATUS' => array(
'width' => '20',
'label' => 'LBL_STATUS',
'link' => false,
'default' => true),
'ASSIGNED_USER_NAME' => array(
'width' => '10',
'label' => 'LBL_LIST_ASSIGNED_USER_ID',
'default' => true),
);
$listViewDefs['ProjectTemplates'] = array(
'NAME' => array(
'width' => '40',
'label' => 'LBL_LIST_NAME',
'link' => true,
'default' => true,
'customCode'=>'<a href="index.php?record={$ID}&action=ProjectTemplatesDetailView&module=Project" >{$NAME}</a>'),
'ESTIMATED_START_DATE' => array(
'width' => '20',
'label' => 'LBL_DATE_START',
'link' => false,
'default' => true),
'ESTIMATED_END_DATE' => array(
'width' => '20',
'label' => 'LBL_DATE_END',
'link' => false,
'default' => true),
);
?>

View File

@@ -0,0 +1,46 @@
<?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".
********************************************************************************/
$metafiles['Project'] = array(
'detailviewdefs' => 'modules/Project/metadata/detailviewdefs.php',
'editviewdefs' => 'modules/Project/metadata/editviewdefs.php',
'listviewdefs' => 'modules/Project/metadata/listviewdefs.php',
'searchdefs' => 'modules/Project/metadata/searchdefs.php',
'popupdefs' => 'modules/Project/metadata/popupdefs.php',
'searchfields' => 'modules/Project/metadata/SearchFields.php',
);
?>

View 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' => 'Project',
'varName' => 'PROJECT',
'orderBy' => 'name',
'whereClauses' =>
array('name' => 'project.name'),
'searchInputs' =>
array('name')
);
?>

View File

@@ -0,0 +1,71 @@
<?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['Project']['QuickCreate'] = array(
'templateMeta' => array('maxColumns' => '2',
'widths' => array(
array('label' => '10', 'field' => '30'),
array('label' => '10', 'field' => '30')
),
),
'panels' =>
array (
array (
'name',
'status'
),
array (
'estimated_start_date',
'estimated_end_date'
),
array('priority',),
array('assigned_user_name',
),
array (
array (
'name' => 'description',
),
),
),
);
?>

View File

@@ -0,0 +1,56 @@
<?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['Project'] = 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',
'estimated_start_date',
'estimated_end_date',
'status',
'priority',
),
),
);
?>

View 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']['Project'] = array(
'LBL_DETAILVIEW'=>array(
'template'=>'xtpl',
'template_file'=>'modules/Project/DetailView.html',
'php_file'=>'modules/Project/DetailView.php',
'type'=>'DetailView',
),
'LBL_EDITVIEW'=>array(
'template'=>'xtpl',
'template_file'=>'modules/Project/EditView.html',
'php_file'=>'modules/Project/EditView.php',
'type'=>'EditView',
),
'LBL_LISTVIEW'=>array(
'template'=>'listview',
'meta_file'=>'modules/Project/listviewdefs.php',
'type'=>'ListView',
),
'LBL_SEARCHFORM'=>array(
'template'=>'xtpl',
'template_file'=>'modules/Project/SearchForm.html',
'php_file'=>'modules/Project/ListView.php',
'type'=>'SearchForm',
),
);

View File

@@ -0,0 +1,244 @@
<?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 $modules_exempt_from_availability_check;
$modules_exempt_from_availability_check = array('Holidays'=>'Holidays',
'Tasks'=>'Tasks',
'Calls'=>'Calls',
'Meetings'=>'Meetings',
'History'=>'History',
'Notes'=>'Notes',
'Emails'=>'Emails',
'ProjectTask'=>'ProjectTask',
'Users'=>'Users',
);
$layout_defs['Project'] = array(
// list of what Subpanels to show in the DetailView
'subpanel_setup' => array(
'projecttask' => array(
'order' => 20,
'sort_order' => 'desc',
'sort_by' => 'id',
'module' => 'ProjectTask',
'top_buttons' => array(
array('widget_class' => 'SubPanelTopCreateButton', ),
),
'subpanel_name' => 'default',
'title_key' => 'LBL_PROJECT_TASKS_SUBPANEL_TITLE',
'get_subpanel_data' => 'projecttask',
),
'activities' => array(
'order' => 40,
'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' => 50,
'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'=>'History',
'top_buttons' => array(
array('widget_class' => 'SubPanelTopArchiveEmailButton'),
array('widget_class' => 'SubPanelTopSummaryButton'),
),
'collection_list' => array(
'meetings' => array(
'module' => 'Meetings',
'subpanel_name' => 'ForHistory',
'get_subpanel_data' => 'meetings',
),
'calls' => array(
'module' => 'Calls',
'subpanel_name' => 'ForHistory',
'get_subpanel_data' => 'calls',
),
'tasks' => array(
'module' => 'Tasks',
'subpanel_name' => 'ForHistory',
'get_subpanel_data' => 'tasks',
),
'emails' => array(
'module' => 'Emails',
'subpanel_name' => 'ForHistory',
'get_subpanel_data' => 'emails',
),
)
),
'documents' => array(
'order' => 130,
'module' => 'Documents',
'subpanel_name' => 'default',
'get_subpanel_data' => 'documents',
'title_key' => 'LBL_DOCUMENT_SUB',
),
'notes' => array(
'order' => 140,
'module' => 'Notes',
'subpanel_name' => 'default',
'get_subpanel_data' => 'notes',
'title_key' => 'LBL_NOTEST_SUB',
),
'contacts' => array(
'top_buttons' => array(
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Contacts'),
),
'order' => 60,
'module' => 'Contacts',
'sort_order' => 'asc',
'sort_by' => 'last_name, first_name',
'subpanel_name' => 'default',
'get_subpanel_data' => 'contacts',
'add_subpanel_data' => 'contact_id',
'title_key' => 'LBL_CONTACTS_SUBPANEL_TITLE',
),
'accounts' => array(
'top_buttons' => array(
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Accounts'),
),
'order' => 70,
'module' => 'Accounts',
'sort_order' => 'asc',
'sort_by' => 'name',
'subpanel_name' => 'default',
'get_subpanel_data' => 'accounts',
'add_subpanel_data' => 'account_id',
'title_key' => 'LBL_ACCOUNTS_SUBPANEL_TITLE',
),
'opportunities' => array(
'top_buttons' => array(
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Opportunities'),
),
'order' => 80,
'module' => 'Opportunities',
'sort_order' => 'desc',
'sort_by' => 'date_closed',
'subpanel_name' => 'default',
'get_subpanel_data' => 'opportunities',
'add_subpanel_data' => 'opportunity_id',
'title_key' => 'LBL_OPPORTUNITIES_SUBPANEL_TITLE',
),
'cases' => array(
'top_buttons' => array(
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Cases'),
),
'order' => 110,
'module' => 'Cases',
'sort_order' => 'desc',
'sort_by' => 'case_number',
'subpanel_name' => 'default',
'get_subpanel_data' => 'cases',
'add_subpanel_data' => 'case_id',
'title_key' => 'LBL_CASES_SUBPANEL_TITLE',
),
'bugs' => array(
'top_buttons' => array(
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Bugs'),
),
'order' => 120,
'module' => 'Bugs',
'sort_order' => 'desc',
'sort_by' => 'bug_number',
'subpanel_name' => 'default',
'get_subpanel_data' => 'bugs',
'add_subpanel_data' => 'bug_id',
'title_key' => 'LBL_BUGS_SUBPANEL_TITLE',
),
),
);
$layout_defs['ProjectTemplates'] = array(
// list of what Subpanels to show in the DetailView
'subpanel_setup' => array(
'projecttask' => array(
'top_buttons' => array(
array('widget_class' => 'SubPanelEditProjectTasksButton', ),
),
'order' => 10,
'sort_order' => 'desc',
'sort_by' => 'id',
'module' => 'ProjectTask',
'subpanel_name' => 'default',
'title_key' => 'LBL_PROJECT_TASKS_SUBPANEL_TITLE',
'get_subpanel_data' => 'projecttask',
),
),
);
?>

View 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".
********************************************************************************/
$subpanel_layout = array(
'top_buttons' => array(
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Accounts'),
),
'where' => '',
'fill_in_additional_fields'=>true,
'list_fields' => array(
'name'=>array(
'vname' => 'LBL_LIST_NAME',
'widget_class' => 'SubPanelDetailViewLink',
'width' => '35%',
),
'assigned_user_name'=>array(
'vname' => 'LBL_LIST_ASSIGNED_USER_ID',
'widget_class' => 'SubPanelDetailViewLink',
'module' => 'Users',
'target_record_key' => 'assigned_user_id',
'target_module' => 'Users',
'width' => '15%',
'sortable'=>false,
),
'estimated_start_date' => array(
'vname' => 'LBL_DATE_START',
'width' => '22%',
'sortable' => true,
),
'estimated_end_date' => array(
'vname' => 'LBL_DATE_END',
'width' => '22%',
'sortable' => true,
),
'edit_button'=>array(
'vname' => 'LBL_EDIT_BUTTON',
'widget_class' => 'SubPanelEditButton',
'module' => 'Project',
'width' => '3%',
),
'remove_button'=>array(
'vname' => 'LBL_REMOVE',
'widget_class' => 'SubPanelRemoveButton',
'module' => 'Project',
'width' => '3%',
),
),
);
?>

View File

@@ -0,0 +1,89 @@
<?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(
array('widget_class' => 'SubPanelTopCreateButton'),
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Accounts'),
),
'where' => '',
'fill_in_additional_fields'=>true,
'list_fields' => array(
'name'=>array(
'vname' => 'LBL_LIST_NAME',
'widget_class' => 'SubPanelDetailViewLink',
'width' => '35%',
),
'assigned_user_name'=>array(
'vname' => 'LBL_LIST_ASSIGNED_USER_ID',
'widget_class' => 'SubPanelDetailViewLink',
'module' => 'Users',
'target_record_key' => 'assigned_user_id',
'target_module' => 'Users',
'width' => '15%',
'sortable'=>false,
),
'estimated_start_date' => array(
'vname' => 'LBL_DATE_START',
'width' => '25%',
'sortable' => true,
),
'estimated_end_date' => array(
'vname' => 'LBL_DATE_END',
'width' => '25%',
'sortable' => true,
),
'edit_button'=>array(
'vname' => 'LBL_EDIT_BUTTON',
'widget_class' => 'SubPanelEditButton',
'module' => 'Project',
'width' => '3%',
),
'remove_button'=>array(
'vname' => 'LBL_REMOVE',
'widget_class' => 'SubPanelRemoveButton',
'module' => 'Project',
'width' => '3%',
),
),
);
?>

444
modules/Project/vardefs.php Executable file
View File

@@ -0,0 +1,444 @@
<?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['Project'] = array(
'table' => 'project',
'unified_search' => true,
'unified_search_default_enabled' => false,
'comment' => 'Project',
'fields' => array(
'id' => array(
'name' => 'id',
'vname' => 'LBL_ID',
'required' => true,
'type' => 'id',
'reportable'=>true,
'comment' => 'Unique identifier'
),
'date_entered' => array(
'name' => 'date_entered',
'vname' => 'LBL_DATE_ENTERED',
'type' => 'datetime',
'required' => true,
'comment' => 'Date record created'
),
'date_modified' => array(
'name' => 'date_modified',
'vname' => 'LBL_DATE_MODIFIED',
'type' => 'datetime',
'required' => true,
'comment' => 'Date record last modified'
),
'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,
'len' => 36,
'dbType' => 'id',
'table' => 'users',
'isnull' => false,
'reportable'=>true,
'comment' => 'User assigned to this record'
),
'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,
'comment' => 'User who last modified record'
),
'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'
),
'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',
'comment' => 'User who created record',
),
'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',
),
'name' => array(
'name' => 'name',
'vname' => 'LBL_NAME',
'required' => true,
'dbType' => 'varchar',
'type' => 'name',
'len' => 50,
'unified_search' => true,
'comment' => 'Project name',
'importable' => 'required',
'required' => true,
),
'description' => array(
'name' => 'description',
'vname' => 'LBL_DESCRIPTION',
'required' => false,
'type' => 'text',
'comment' => 'Project description'
),
'deleted' => array(
'name' => 'deleted',
'vname' => 'LBL_DELETED',
'type' => 'bool',
'required' => false,
'reportable'=>false,
'default' => '0',
'comment' => 'Record deletion indicator'
),
'estimated_start_date' =>
array(
'name' => 'estimated_start_date',
'vname' => 'LBL_DATE_START',
'required' => true,
'validation' => array('type' => 'isbefore', 'compareto' => 'estimated_end_date', 'blank' => true),
'type' => 'date',
'importable' => 'required',
'required' => true,
),
'estimated_end_date' =>
array(
'name' => 'estimated_end_date',
'vname' => 'LBL_DATE_END',
'required' => true,
'type' => 'date',
'importable' => 'required',
'required' => true,
),
'status' =>
array(
'name' => 'status',
'vname' => 'LBL_STATUS',
'type' => 'enum',
'options' => 'project_status_dom',
),
'priority' =>
array(
'name' => 'priority',
'vname' => 'LBL_PRIORITY',
'type' => 'enum',
'options' => 'projects_priority_options',
),
'total_estimated_effort' =>
array (
'name' => 'total_estimated_effort',
'type' => 'int',
'source'=>'non-db',
'vname'=>'LBL_LIST_TOTAL_ESTIMATED_EFFORT',
),
'total_actual_effort' =>
array (
'name' => 'total_actual_effort',
'type' => 'int',
'source'=>'non-db',
'vname'=>'LBL_LIST_TOTAL_ACTUAL_EFFORT',
),
'accounts' =>
array (
'name' => 'accounts',
'type' => 'link',
'relationship' => 'projects_accounts',
'source'=>'non-db',
'ignore_role'=>true,
'vname'=>'LBL_ACCOUNTS',
),
'quotes' =>
array (
'name' => 'quotes',
'type' => 'link',
'relationship' => 'projects_quotes',
'source'=>'non-db',
'ignore_role'=>true,
'vname'=>'LBL_QUOTES',
),
'contacts' =>
array (
'name' => 'contacts',
'type' => 'link',
'relationship' => 'projects_contacts',
'source'=>'non-db',
'ignore_role'=>true,
'vname'=>'LBL_CONTACTS',
),
'opportunities' =>
array (
'name' => 'opportunities',
'type' => 'link',
'relationship' => 'projects_opportunities',
'source'=>'non-db',
'ignore_role'=>true,
'vname'=>'LBL_OPPORTUNITIES',
),
'notes' =>
array (
'name' => 'notes',
'type' => 'link',
'relationship' => 'projects_notes',
'source'=>'non-db',
'vname'=>'LBL_NOTES',
),
'tasks' =>
array (
'name' => 'tasks',
'type' => 'link',
'relationship' => 'projects_tasks',
'source'=>'non-db',
'vname'=>'LBL_TASKS',
),
'meetings' =>
array (
'name' => 'meetings',
'type' => 'link',
'relationship' => 'projects_meetings',
'source'=>'non-db',
'vname'=>'LBL_MEETINGS',
),
'calls' =>
array (
'name' => 'calls',
'type' => 'link',
'relationship' => 'projects_calls',
'source'=>'non-db',
'vname'=>'LBL_CALLS',
),
'emails' =>
array (
'name' => 'emails',
'type' => 'link',
'relationship' => 'emails_projects_rel',
'source'=>'non-db',
'vname'=>'LBL_EMAILS',
),
'projecttask' =>
array (
'name' => 'projecttask',
'type' => 'link',
'relationship' => 'projects_project_tasks',
'source'=>'non-db',
'vname'=>'LBL_PROJECT_TASKS',
),
'created_by_link' =>
array (
'name' => 'created_by_link',
'type' => 'link',
'relationship' => 'projects_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' => 'projects_modified_user',
'vname' => 'LBL_MODIFIED_BY_USER',
'link_type' => 'one',
'module'=>'Users',
'bean_name'=>'User',
'source'=>'non-db',
),
'assigned_user_link' =>
array (
'name' => 'assigned_user_link',
'type' => 'link',
'relationship' => 'projects_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',
),
'cases' =>
array (
'name' => 'cases',
'type' => 'link',
'relationship' => 'projects_cases',
'side' => 'right',
'source'=>'non-db',
'vname'=>'LBL_CASES',
),
'bugs' =>
array (
'name' => 'bugs',
'type' => 'link',
'relationship' => 'projects_bugs',
'side' => 'right',
'source'=>'non-db',
'vname'=>'LBL_BUGS',
),
'documents' => array (
'name' => 'documents',
'type' => 'link',
'relationship' => 'project_documents',
'source' => 'non-db',
'vname' => 'LBL_NOTES'
),
'products' =>
array (
'name' => 'products',
'type' => 'link',
'relationship' => 'projects_products',
'side' => 'right',
'source'=>'non-db',
'vname'=>'LBL_PRODUCTS',
),
),
'indices' => array(
array('name' =>'projects_primary_key_index',
'type' =>'primary',
'fields'=>array('id')
),
),
'relationships' => array(
'projects_notes' => array(
'lhs_module'=> 'Project', 'lhs_table'=> 'project', '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'=>'Project'),
'projects_tasks' => array(
'lhs_module'=> 'Project', 'lhs_table'=> 'project', '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'=>'Project'),
'projects_meetings' => array(
'lhs_module'=> 'Project', 'lhs_table'=> 'project', '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'=>'Project'),
'projects_calls' => array(
'lhs_module'=> 'Project', 'lhs_table'=> 'project', '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'=>'Project'),
'projects_emails' => array(
'lhs_module'=> 'Project', 'lhs_table'=> 'project', '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'=>'Project'),
'projects_project_tasks' => array(
'lhs_module'=> 'Project', 'lhs_table'=> 'project', 'lhs_key' => 'id',
'rhs_module'=> 'ProjectTask', 'rhs_table'=> 'project_task', 'rhs_key' => 'project_id',
'relationship_type'=>'one-to-many'),
'project_documents' => array (
'lhs_module' => 'Project',
'lhs_table' => 'project',
'lhs_key' => 'id',
'rhs_module' => 'Documents',
'rhs_table' => 'documents',
'rhs_key' => 'parent_id',
'relationship_type' => 'one-to-many',
'relationship_role_column' => 'parent_type',
'relationship_role_column_value' => 'Project'
),
'projects_assigned_user' =>
array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
'rhs_module'=> 'Project', 'rhs_table'=> 'project', 'rhs_key' => 'assigned_user_id',
'relationship_type'=>'one-to-many')
,'projects_modified_user' =>
array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
'rhs_module'=> 'Project', 'rhs_table'=> 'project', 'rhs_key' => 'modified_user_id',
'relationship_type'=>'one-to-many')
,'projects_created_by' =>
array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
'rhs_module'=> 'Project', 'rhs_table'=> 'project', 'rhs_key' => 'created_by',
'relationship_type'=>'one-to-many')
),
);
VardefManager::createVardef('Project','Project', array(
));
?>

View 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".
********************************************************************************/
/*********************************************************************************
* 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.detail.php');
class ProjectViewDetail extends ViewDetail
{
/**
* @see SugarView::display()
*/
public function display()
{
global $beanFiles;
require_once($beanFiles['Project']);
$focus = new Project();
$focus->retrieve($_REQUEST['record']);
global $app_list_strings, $current_user, $mod_strings;
$this->ss->assign('APP_LIST_STRINGS', $app_list_strings);
if($current_user->id == $focus->assigned_user_id || $current_user->is_admin){
$this->ss->assign('OWNER_ONLY', true);
}
else{
$this->ss->assign('OWNER_ONLY', false);
}
$this->ss->assign("IS_TEMPLATE", 0);
parent::display();
}
}

View File

@@ -0,0 +1,52 @@
<?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".
********************************************************************************/
require_once('include/MVC/View/views/view.edit.php');
class ProjectViewEdit extends ViewEdit {
function ProjectViewEdit(){
parent::ViewEdit();
}
function display() {
$this->bean->is_template = 0;
$this->ev->ss->assign("is_template", 0);
parent::display();
}
}
?>

View File

@@ -0,0 +1,78 @@
<?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 ProjectViewList extends ViewList{
function ProjectViewList()
{
parent::ViewList();
}
/*
* Override listViewProcess with addition to where clause to exclude project templates
*/
function listViewProcess()
{
$this->processSearchForm();
$this->lv->searchColumns = $this->searchForm->searchColumns;
if(!$this->headers)
return;
if(empty($_REQUEST['search_form_only']) || $_REQUEST['search_form_only'] == false)
{
$this->lv->setup($this->seed, 'include/ListView/ListViewGeneric.tpl', $this->where, $this->params);
$savedSearchName = empty($_REQUEST['saved_search_select_name']) ? '' : (' - ' . $_REQUEST['saved_search_select_name']);
echo $this->lv->display();
}
}
}
?>

View File

@@ -0,0 +1,86 @@
<?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".
********************************************************************************/
require_once('include/MVC/View/views/view.detail.php');
class ProjectViewTemplatesDetail extends ViewDetail
{
/**
* @see SugarView::_getModuleTitleParams()
*/
protected function _getModuleTitleParams()
{
global $mod_strings;
return array(
$this->_getModuleTitleListParam(),
"<a href='index.php?module=Project&action=EditView&record={$this->bean->id}'>{$this->bean->name}</a>",
$mod_strings['LBL_PROJECT_TEMPLATE']
);
}
function display()
{
global $beanFiles;
require_once($beanFiles['Project']);
$focus = new Project();
$focus->retrieve($_REQUEST['record']);
global $app_list_strings, $current_user, $mod_strings;
$this->ss->assign('APP_LIST_STRINGS', $app_list_strings);
if($current_user->id == $focus->assigned_user_id || $current_user->is_admin){
$this->ss->assign('OWNER_ONLY', true);
}
else{
$this->ss->assign('OWNER_ONLY', false);
}
parent::display();
}
/**
* @see SugarView::_displaySubPanels()
*/
protected function _displaySubPanels()
{
require_once ('include/SubPanel/SubPanelTiles.php');
$subpanel = new SubPanelTiles( $this->bean, 'ProjectTemplates' );
echo $subpanel->display( true, true );
}
}

View File

@@ -0,0 +1,65 @@
<?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".
********************************************************************************/
require_once('include/MVC/View/views/view.edit.php');
class ProjectViewTemplatesEdit extends ViewEdit
{
/**
* @see SugarView::_getModuleTitleParams()
*/
protected function _getModuleTitleParams()
{
global $mod_strings;
$crumbs = array();
$crumbs[] = $this->_getModuleTitleListParam();
if(!empty($this->bean->id)){
$crumbs[] = "<a href='index.php?module=Project&action=EditView&record={$this->bean->id}'>{$this->bean->name}</a>";
}
$crumbs[] = $mod_strings['LBL_PROJECT_TEMPLATE'];
return $crumbs;
}
function display()
{
$this->bean->is_template = 1;
$this->ev->ss->assign("is_template", 1);
parent::display();
}
}