mirror of
https://github.com/salesagility/SuiteCRM.git
synced 2025-03-16 06:13:34 +00:00
US 2.1, US 2.4, US2.7
US 2.1 - As a User I want Gantt views to display the appropriate drop down action buttons so that I can access functionality on the Gantt View. US 2.4 - As a User I want to be able inline edit fields on the Gantt views so that it follows generic SuiteCRM functionality. US 2.7 - As a User I want the detail view section of the Gantt view to be consistent with the rest of the CRM so that I can in line edit and access action buttons.
This commit is contained in:
parent
57a43d8810
commit
903af549ce
13 changed files with 145 additions and 64 deletions
include
modules
AM_ProjectTemplates
Project
|
@ -100,7 +100,13 @@ function buildEditField(){
|
|||
$(".inlineEdit").dblclick(function(e) {
|
||||
e.preventDefault();
|
||||
//depending on what view you are using will find the id,module,type of field, and field name from the view
|
||||
if(view == "DetailView"){
|
||||
|
||||
//make the gantt chart view look like the detail view
|
||||
if(view == "view_GanttChart" )
|
||||
view = "DetailView";
|
||||
|
||||
if(view == "DetailView" ){
|
||||
|
||||
var field = $(this).attr( "field" );
|
||||
var type = $(this).attr( "type" );
|
||||
|
||||
|
@ -110,15 +116,17 @@ function buildEditField(){
|
|||
var module = module_sugar_grp1;
|
||||
}
|
||||
|
||||
|
||||
var id = $("input[name=record]").attr( "value" );
|
||||
}else{
|
||||
|
||||
var field = $(this).attr( "field" );
|
||||
var type = $(this).attr( "type" );
|
||||
var module = $("#displayMassUpdate input[name=module]").val();
|
||||
var id = $(this).closest('tr').find('[type=checkbox]').attr( "value" );
|
||||
}
|
||||
|
||||
//If we find all the required variables to do inline editing.
|
||||
//If we find all the required variables to do inline editing.
|
||||
if(field && id && module){
|
||||
|
||||
//Do ajax call to retrieve the validation for the field.
|
||||
|
|
|
@ -3566,6 +3566,8 @@ $app_list_strings['duration_unit_dom']['Days'] = 'Days';
|
|||
$app_list_strings['duration_unit_dom']['Hours'] = 'Hours';
|
||||
$app_strings['LBL_GANTT_BUTTON_LABEL'] = 'View Gantt';
|
||||
$app_strings['LBL_GANTT_BUTTON_TITLE'] = 'View Gantt';
|
||||
$app_strings['LBL_DETAIL_BUTTON_LABEL'] = 'View Detail';
|
||||
$app_strings['LBL_DETAIL_BUTTON_TITLE'] = 'View Detail';
|
||||
$app_strings['LBL_CREATE_PROJECT'] = 'Create Project';
|
||||
|
||||
//gmaps
|
||||
|
|
|
@ -122,11 +122,34 @@
|
|||
font-size:12px;
|
||||
table-layout:fixed;
|
||||
}
|
||||
.main_table th, td {
|
||||
.main_table th, .main_table td {
|
||||
padding: 0px;
|
||||
overflow: hidden;
|
||||
width: 24px;
|
||||
}
|
||||
|
||||
.table_inner th, .table_inner td {
|
||||
padding: 0px;
|
||||
overflow: hidden;
|
||||
width: 24px;
|
||||
}
|
||||
|
||||
.task_td {
|
||||
padding: 0px;
|
||||
overflow: hidden;
|
||||
width: 24px;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
.panelContainer > td {
|
||||
width: auto !important;
|
||||
}*/
|
||||
|
||||
.buttons {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.month_row {
|
||||
border-bottom: 1px solid #DDDDDD;
|
||||
}
|
||||
|
@ -224,7 +247,7 @@
|
|||
position: 'absolute';
|
||||
}
|
||||
.task_td {
|
||||
width:100%;
|
||||
width:100% !important;
|
||||
border-right: 1px solid #DDDDDD;
|
||||
border-bottom: 1px solid #DDDDDD;
|
||||
}
|
||||
|
|
|
@ -105,7 +105,7 @@ $(document).ready(function() {
|
|||
$("#popup_form").validate({
|
||||
|
||||
rules: {
|
||||
name: "required",
|
||||
task_name: "required",
|
||||
Start: {
|
||||
required: true
|
||||
},
|
||||
|
@ -120,7 +120,7 @@ $(document).ready(function() {
|
|||
}
|
||||
},
|
||||
messages: {
|
||||
name: "The task name is required",
|
||||
task_name: "The task name is required",
|
||||
Start: "Start date is required",
|
||||
Duration: {
|
||||
required: "The duration is required",
|
||||
|
@ -165,7 +165,7 @@ $(document).ready(function() {
|
|||
var Project_id = $('#project_template_id').val();
|
||||
var override_business_hours = $('#override_business_hours').val();
|
||||
//var Parent_task = $('#parent_task').val();
|
||||
var Task_name = $('#name').val();
|
||||
var Task_name = $('#task_name').val();
|
||||
var milestone = milestone_flag;
|
||||
var Task_pre = $('#Predecessor').val();
|
||||
var rel_type = $('#relation_type').val();
|
||||
|
@ -182,6 +182,9 @@ $(document).ready(function() {
|
|||
|
||||
var dataString = '&project_id=' + Project_id + '&override_business_hours=' + override_business_hours + '&milestone=' + milestone + '&task_name=' +Task_name + '&predecessor=' + Task_pre + '&rel_type=' + rel_type + '&start=' + Task_Start + '&duration=' + Task_Duration + '&unit=' + Task_Duration_unit + '&resource=' + Task_Resource + '&percent=' + Task_Percent + '¬e=' + Task_Notes;
|
||||
//block();
|
||||
|
||||
var this_dialog = $(this);
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "index.php?module=AM_ProjectTemplates&action=update_GanttChart",
|
||||
|
@ -189,7 +192,7 @@ $(document).ready(function() {
|
|||
success: function() {
|
||||
//close and clear form
|
||||
$("#popup_form").trigger("reset");
|
||||
$( "#dialog" ).dialog( "close" );
|
||||
this_dialog.dialog( "close" );
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -423,9 +426,9 @@ function edit_task(task){
|
|||
|
||||
var data = task.attr('data').split(",");
|
||||
var milestone_flag ='Task';
|
||||
|
||||
//console.log(task.text());
|
||||
$('#task_id').val(data[0]);
|
||||
$('#name').val(task.text());
|
||||
$('#task_name').val(task.text());
|
||||
$('#Start').val(data[3]);
|
||||
if(data[7] == '1'){
|
||||
$('#Subtask').prop('checked', false);
|
||||
|
@ -466,10 +469,10 @@ function edit_task(task){
|
|||
var override_business_hours = $('#override_business_hours').val();
|
||||
var Task_id = $('#task_id').val();
|
||||
//var Parent_task = $('#parent_task').val();
|
||||
var Task_name = $('#name').val();
|
||||
var Task_name = $('#task_name').val();
|
||||
|
||||
if($('[name="Milestone"]:checked').val() == 'Milestone'){
|
||||
milestone_flag = 'Milestone'
|
||||
milestone_flag = 'Milestone';
|
||||
}
|
||||
|
||||
var milestone = milestone_flag;
|
||||
|
@ -481,9 +484,9 @@ function edit_task(task){
|
|||
var Task_Resource = $('#Resources').val();
|
||||
var Task_Percent = $('#Complete').val();
|
||||
var Task_Notes = $('#Notes').val();
|
||||
var Actual_duration = $('#Actual_duration').val();
|
||||
var rowCount = $('#Task_table tr').length -1;
|
||||
var dateStart = "Start_date_"+rowCount ;
|
||||
var Actual_duration = 0;//$('#Actual_duration').val();
|
||||
//var rowCount = $('#Task_table tr').length -1;
|
||||
//var dateStart = "Start_date_"+rowCount ;
|
||||
|
||||
get_predecessors();
|
||||
|
||||
|
@ -491,14 +494,16 @@ function edit_task(task){
|
|||
|
||||
var dataString = '&project_id=' + Project_id + '&override_business_hours=' + override_business_hours + '&task_id=' + Task_id + '&milestone=' + milestone + '&task_name=' +Task_name + '&predecessor=' + Task_pre + '&rel_type=' + rel_type + '&start=' + Task_Start + '&duration=' + Task_Duration + '&unit=' + Task_Duration_unit + '&resource=' + Task_Resource + '&percent=' + Task_Percent + '¬e=' + Task_Notes + '&actual_duration=' + Actual_duration;
|
||||
//block();
|
||||
$.ajax({
|
||||
|
||||
var this_dialog = $(this);
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "index.php?module=AM_ProjectTemplates&action=update_GanttChart",
|
||||
data: dataString,
|
||||
success: function() {
|
||||
//close and clear form
|
||||
$("#popup_form").trigger("reset");
|
||||
$( "#dialog" ).dialog( "close" );
|
||||
this_dialog.dialog( "close" );
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -511,8 +516,8 @@ function edit_task(task){
|
|||
}
|
||||
},
|
||||
close: function () {
|
||||
$(this).parent().promise().done(function () {
|
||||
get_predecessors();
|
||||
$(this).parent().promise().done(function () {
|
||||
get_predecessors();
|
||||
gen_chart(1);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -22,6 +22,10 @@ array (
|
|||
array (
|
||||
'customCode' => '<input title="{$APP.LBL_VIEW_GANTT_TITLE}" class="button" type="button" name="view_gantt" id="view_gantt" value="{$APP.LBL_GANTT_BUTTON_LABEL}" onclick="javascript:window.location.href=\'index.php?module=AM_ProjectTemplates&action=view_GanttChart&record={$id}\'"/>',
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
'customCode' => '<input title="{$APP.LBL_VIEW_DETAIL}" class="button" type="button" name="view_detail" id="view_detail" value="{$APP.LBL_DETAIL_BUTTON_LABEL}" onclick="javascript:window.location.href=\'index.php?module=AM_ProjectTemplates&action=DetailView&record={$id}\'"/>',
|
||||
),
|
||||
),
|
||||
),
|
||||
'maxColumns' => '2',
|
||||
|
|
|
@ -90,7 +90,7 @@ class AM_ProjectTemplatesTable {
|
|||
<td class="project_table_cells"><input class="order_number" name="order_number[]" rel="'.$task->id.'" type="hidden" value="'.$task->order_number.'" />'.$task->task_number.'</td>';
|
||||
|
||||
if(ACLController::checkAccess('AM_ProjectTemplates', 'edit', true)){
|
||||
echo '<td class="project_table_cells" ><span class="Task_name" ><a data = "'.$task->id.','.$task->predecessors.','.$task->relationship_type.','.$timeDate->to_display_date($task->date_start, true).','.$task->duration.','.$task->duration_unit.','.$task->assigned_user_id.','.$task->milestone_flag.','.$task->percent_complete.','.$task->description.'" onclick = "edit_task($(this));"title = "'.$mod_strings['LBL_TASK_TITLE'].'" href = "#" > '.$task->name.'</a ></span ></td>';
|
||||
echo '<td class="project_table_cells" ><span class="Task_name" ><a data = "'.$task->id.','.$task->predecessors.','.$task->relationship_type.','.$timeDate->to_display_date($task->date_start, true).','.$task->duration.','.$task->duration_unit.','.$task->assigned_user_id.','.$task->milestone_flag.','.$task->percent_complete.','.$task->description.'" onclick = "edit_task($(this));"title = "'.$mod_strings['LBL_TASK_TITLE'].'" href = "#" >'.$task->name.'</a ></span ></td>';
|
||||
}
|
||||
else{
|
||||
echo '<td class="project_table_cells" ><span class="Task_name" >'.$task->name.'</span ></td>';
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
if (!defined('sugarEntry') || !sugarEntry)
|
||||
die('Not A Valid Entry Point');
|
||||
|
||||
|
||||
class AM_ProjectTemplatesViewGanttChart extends SugarView {
|
||||
require_once('include/MVC/View/views/view.detail.php');
|
||||
class AM_ProjectTemplatesViewGanttChart extends ViewDetail {
|
||||
|
||||
//Constructor
|
||||
public function __construct() {
|
||||
|
@ -73,6 +73,9 @@ class AM_ProjectTemplatesViewGanttChart extends SugarView {
|
|||
//Get the start and end date of the project in database format
|
||||
$start_date = Date('Y-m-d');
|
||||
$end_date = Date('Y-m-d', strtotime("+30 days"));
|
||||
|
||||
parent::display();
|
||||
|
||||
?>
|
||||
<!--Create task pop-up-->
|
||||
<div style="display: none;">
|
||||
|
@ -87,6 +90,9 @@ class AM_ProjectTemplatesViewGanttChart extends SugarView {
|
|||
|
||||
<input type="hidden" name="project_template_id" id="project_template_id" value="<?php echo $project_template->id; ?>">
|
||||
<input type="hidden" name="override_business_hours" id="override_business_hours" value="<?php echo $project_template->override_business_hours; ?>">
|
||||
<input type="hidden" name="Start" id="Start" value="">
|
||||
<input type="hidden" name="Actual_duration" id="Actual_duration" value="0">
|
||||
|
||||
<input type="text" style="display: none;" name="task_id" id="task_id" value="">
|
||||
<input type="radio" name="Milestone" value="Subtask" checked="checked" id="Subtask" />
|
||||
<label id="Subtask_label" for="Subtask"><?php echo $mod_strings['LBL_SUBTASK'];?></label>
|
||||
|
@ -94,8 +100,8 @@ class AM_ProjectTemplatesViewGanttChart extends SugarView {
|
|||
<label id="Milestone_label" for="Milestone"><?php echo $mod_strings['LBL_MILESTONE_FLAG'];?></label> <br /><br />
|
||||
<label id="parent_task_id" for="parent_task" style="display: none;"><?php echo $mod_strings['LBL_PARENT_TASK_ID']; ?></label>
|
||||
<input id="parent_task" class="text ui-widget-content ui-corner-all" style="display: none;" type="text" name="parent_task" value="" />
|
||||
<label for="name"><?php echo $mod_strings['LBL_TASK_NAME']; ?></label>
|
||||
<input type="text" name="name" id="name" class="text ui-widget-content ui-corner-all" />
|
||||
<label for="task_name"><?php echo $mod_strings['LBL_TASK_NAME']; ?></label>
|
||||
<input type="text" name="task_name" id="task_name" class="text ui-widget-content ui-corner-all" />
|
||||
<label for="Predecessor"><?php echo $mod_strings['LBL_PREDECESSORS'];?></label>
|
||||
<?php
|
||||
echo '<select id="Predecessor" name="Predecessor" class="text ui-widget-content ui-corner-all" />';
|
||||
|
@ -153,7 +159,7 @@ class AM_ProjectTemplatesViewGanttChart extends SugarView {
|
|||
|
||||
<!--Mark-up for the main body of the view-->
|
||||
|
||||
<div class="moduleTitle">
|
||||
<!-- div class="moduleTitle">
|
||||
<h2> <?php echo $project_template->name;?> </h2>
|
||||
<div class="clear"></div><br>
|
||||
<a class="utilsLink" href="index.php?module=AM_ProjectTemplates&action=DetailView&record=<?php echo $_REQUEST["record"];?>&return_module=AM_ProjectTemplates&return_action=view_GanttChart" id="create_link"><?php echo $mod_strings['LBL_VIEW_DETAIL'];?></a></span>
|
||||
|
@ -163,7 +169,7 @@ class AM_ProjectTemplatesViewGanttChart extends SugarView {
|
|||
</div>
|
||||
|
||||
<div class="yui-navset detailview_tabs yui-navset-top" id="Project_detailview_tabs">
|
||||
<!--ul class="yui-nav"-->
|
||||
< !--ul class="yui-nav"-- >
|
||||
<div class="yui-content">
|
||||
<div id="tabcontent0">
|
||||
<div id="detailpanel_1" class="detail view detail508 expanded">
|
||||
|
@ -181,26 +187,27 @@ class AM_ProjectTemplatesViewGanttChart extends SugarView {
|
|||
<td scope="col" width="12.5%"><?php echo $mod_strings['LBL_PRIORITY'];?></td>
|
||||
<td class="" width="37.5%"><?php echo $project_template->priority ;?></td>
|
||||
</tr>
|
||||
<!--tr>
|
||||
< !--tr>
|
||||
<td scope="col" width="12.5%"><?php echo $mod_strings['LBL_DESCRIPTION'];?></td>
|
||||
<td class="inlineEdit" type="text" colspan="3" width="87.5%"><?php echo $project_template->description;?></td>
|
||||
</tr-->
|
||||
</tr-- >
|
||||
</tbody></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<?php
|
||||
if(ACLController::checkAccess('AM_ProjectTemplates', 'edit', true)){
|
||||
echo '<button id="add_button" class="gantt_button">' . $mod_strings['LBL_ADD_NEW_TASK'] . '</button>';
|
||||
echo '<input id="is_editable" name="is_editable" type="hidden" value="1" >';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div -->
|
||||
|
||||
|
||||
<div id="wrapper" >
|
||||
|
||||
<?php
|
||||
if(ACLController::checkAccess('AM_ProjectTemplates', 'edit', true)){
|
||||
echo '<div style="clear:both;padding:10px;"><button id="add_button" class="gantt_button">' . $mod_strings['LBL_ADD_NEW_TASK'] . '</button></div>';
|
||||
echo '<input id="is_editable" name="is_editable" type="hidden" value="1" >';
|
||||
}
|
||||
?>
|
||||
<input id="record" type="hidden" name="record" value="<?php echo $_REQUEST["record"];?>" />
|
||||
<div id="project_wrapper">
|
||||
|
||||
|
|
|
@ -130,7 +130,7 @@ if ($sugarbean->is_template){
|
|||
}
|
||||
else{
|
||||
//customize default retrun view to make it to redirect to GanttChart view
|
||||
$_REQUEST['return_url'] = "index.php?module=Project&action=view_GanttChart&project_id=" . $return_id;
|
||||
$_REQUEST['return_url'] = "index.php?module=Project&action=view_GanttChart&record=" . $return_id;
|
||||
handleRedirect($return_id,'Project');
|
||||
}
|
||||
?>
|
|
@ -122,11 +122,34 @@
|
|||
font-size:12px;
|
||||
table-layout:fixed;
|
||||
}
|
||||
.main_table th, td {
|
||||
.main_table th, .main_table td {
|
||||
padding: 0px;
|
||||
overflow: hidden;
|
||||
width: 24px;
|
||||
}
|
||||
|
||||
.table_inner th, .table_inner td {
|
||||
padding: 0px;
|
||||
overflow: hidden;
|
||||
width: 24px;
|
||||
}
|
||||
|
||||
.task_td {
|
||||
padding: 0px;
|
||||
overflow: hidden;
|
||||
width: 24px;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
.panelContainer > td {
|
||||
width: auto !important;
|
||||
}*/
|
||||
|
||||
.buttons {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.month_row {
|
||||
border-bottom: 1px solid #DDDDDD;
|
||||
}
|
||||
|
@ -224,7 +247,7 @@
|
|||
position: 'absolute';
|
||||
}
|
||||
.task_td {
|
||||
width:100%;
|
||||
width:100% !important;
|
||||
border-right: 1px solid #DDDDDD;
|
||||
border-bottom: 1px solid #DDDDDD;
|
||||
}
|
||||
|
|
|
@ -105,7 +105,7 @@ $(function() {
|
|||
$("#popup_form").validate({
|
||||
|
||||
rules: {
|
||||
name: "required",
|
||||
task_name: "required",
|
||||
Start: {
|
||||
required: true
|
||||
},
|
||||
|
@ -120,7 +120,7 @@ $(function() {
|
|||
}
|
||||
},
|
||||
messages: {
|
||||
name: "The task name is required",
|
||||
task_name: "The task name is required",
|
||||
Start: "Start date is required",
|
||||
Duration: {
|
||||
required: "The duration is required",
|
||||
|
@ -165,7 +165,7 @@ $(function() {
|
|||
var Project_id = $('#project_id').val();
|
||||
var override_business_hours = $('#override_business_hours').val();
|
||||
//var Parent_task = $('#parent_task').val();
|
||||
var Task_name = $('#name').val();
|
||||
var Task_name = $('#task_name').val();
|
||||
var milestone = milestone_flag;
|
||||
var Task_pre = $('#Predecessor').val();
|
||||
var rel_type = $('#relation_type').val();
|
||||
|
@ -422,8 +422,9 @@ function edit_task(task){
|
|||
var data = task.attr('data').split(",");
|
||||
var milestone_flag ='Task';
|
||||
|
||||
|
||||
$('#task_id').val(data[0]);
|
||||
$('#name').val(task.text());
|
||||
$('#task_name').val(task.text());
|
||||
$('#Start').val(data[3]);
|
||||
if(data[7] == '1'){
|
||||
$('#Subtask').prop('checked', false);
|
||||
|
@ -464,7 +465,7 @@ function edit_task(task){
|
|||
var override_business_hours = $('#override_business_hours').val();
|
||||
var Task_id = $('#task_id').val();
|
||||
//var Parent_task = $('#parent_task').val();
|
||||
var Task_name = $('#name').val();
|
||||
var Task_name = $('#task_name').val();
|
||||
|
||||
if($('[name="Milestone"]:checked').val() == 'Milestone'){
|
||||
milestone_flag = 'Milestone'
|
||||
|
|
|
@ -89,7 +89,11 @@ array (
|
|||
),
|
||||
3 =>
|
||||
array (
|
||||
'customCode' => '<input title="{$APP.LBL_VIEW_GANTT_TITLE}" class="button" type="button" name="view_gantt" id="view_gantt" value="{$APP.LBL_GANTT_BUTTON_LABEL}" onclick="javascript:window.location.href=\'index.php?module=Project&action=view_GanttChart&project_id={$id}\'"/>',
|
||||
'customCode' => '<input title="{$APP.LBL_VIEW_GANTT_TITLE}" class="button" type="button" name="view_gantt" id="view_gantt" value="{$APP.LBL_GANTT_BUTTON_LABEL}" onclick="javascript:window.location.href=\'index.php?module=Project&action=view_GanttChart&record={$id}\'"/>',
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
'customCode' => '<input title="{$APP.LBL_VIEW_DETAIL}" class="button" type="button" name="view_detail" id="view_detail" value="{$APP.LBL_DETAIL_BUTTON_LABEL}" onclick="javascript:window.location.href=\'index.php?module=Project&action=DetailView&record={$id}\'"/>',
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -84,7 +84,7 @@ class ProjectTable {
|
|||
<td class="project_table_cells"><input class="order_number" name="order_number[]" rel="'.$task->id.'" type="hidden" value="'.$task->order_number.'" />'.$task->project_task_id.'</td>';
|
||||
|
||||
if(ACLController::checkAccess('Project', 'edit', true)){
|
||||
echo '<td class="project_table_cells" ><span class="Task_name" ><a data = "'.$task->id.','.$task->predecessors.','.$task->relationship_type.','.$timeDate->to_display_date($task->date_start, true).','.$task->duration.','.$task->duration_unit.','.$task->assigned_user_id.','.$task->milestone_flag.','.$task->percent_complete.','.$task->description.','.$task->actual_duration.'" onclick = "edit_task($(this));"title = "'.$mod_strings['LBL_TASK_TITLE'].'" href = "#" > '.$task->name.'</a ></span ></td>';
|
||||
echo '<td class="project_table_cells" ><span class="Task_name" ><a data = "'.$task->id.','.$task->predecessors.','.$task->relationship_type.','.$timeDate->to_display_date($task->date_start, true).','.$task->duration.','.$task->duration_unit.','.$task->assigned_user_id.','.$task->milestone_flag.','.$task->percent_complete.','.$task->description.','.$task->actual_duration.'" onclick = "edit_task($(this));"title = "'.$mod_strings['LBL_TASK_TITLE'].'" href = "#" >'.$task->name.'</a ></span ></td>';
|
||||
}
|
||||
else{
|
||||
echo '<td class="project_table_cells" ><span class="Task_name" >'.$task->name.'</span ></td>';
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
if (!defined('sugarEntry') || !sugarEntry)
|
||||
die('Not A Valid Entry Point');
|
||||
|
||||
|
||||
class ProjectViewGanttChart extends SugarView {
|
||||
require_once('include/MVC/View/views/view.detail.php');
|
||||
class ProjectViewGanttChart extends ViewDetail {
|
||||
|
||||
//Constructor
|
||||
public function __construct() {
|
||||
|
@ -74,6 +74,8 @@ class ProjectViewGanttChart extends SugarView {
|
|||
$start_date = $db->getOne($query);
|
||||
$query = "SELECT estimated_end_date FROM project WHERE id = '{$project->id}'";
|
||||
$end_date = $db->getOne($query);
|
||||
|
||||
parent::display();
|
||||
?>
|
||||
<!--Create task pop-up-->
|
||||
<div style="display: none;">
|
||||
|
@ -95,8 +97,8 @@ class ProjectViewGanttChart extends SugarView {
|
|||
<label id="Milestone_label" for="Milestone"><?php echo $mod_strings['LBL_MILESTONE_FLAG'];?></label> <br /><br />
|
||||
<label id="parent_task_id" for="parent_task" style="display: none;"><?php echo $mod_strings['LBL_PARENT_TASK_ID']; ?></label>
|
||||
<input id="parent_task" class="text ui-widget-content ui-corner-all" style="display: none;" type="text" name="parent_task" value="" />
|
||||
<label for="name"><?php echo $mod_strings['LBL_TASK_NAME']; ?></label>
|
||||
<input type="text" name="name" id="name" class="text ui-widget-content ui-corner-all" />
|
||||
<label for="task_name"><?php echo $mod_strings['LBL_TASK_NAME']; ?></label>
|
||||
<input type="text" name="task_name" id="task_name" class="text ui-widget-content ui-corner-all" />
|
||||
<label for="Predecessor"><?php echo $mod_strings['LBL_PREDECESSORS'];?></label>
|
||||
<?php
|
||||
echo '<select id="Predecessor" name="Predecessor" class="text ui-widget-content ui-corner-all" />';
|
||||
|
@ -178,18 +180,16 @@ class ProjectViewGanttChart extends SugarView {
|
|||
|
||||
|
||||
<!--Mark-up for the main body of the view-->
|
||||
|
||||
<div class="moduleTitle">
|
||||
<!-- div class="moduleTitle">
|
||||
<h2> <?php echo $project->name;?> </h2>
|
||||
<div class="clear"></div>
|
||||
<br><a class="utilsLink" href="index.php?module=Project&action=DetailView&record=<?php echo $_REQUEST["project_id"];?>&return_module=Project&return_action=view_GanttChart" id="create_link"><?php echo $mod_strings['LBL_VIEW_DETAIL'];?></a>
|
||||
<span class="utils">
|
||||
</span>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div class="yui-navset detailview_tabs yui-navset-top" id="Project_detailview_tabs">
|
||||
<!--ul class="yui-nav"-->
|
||||
</div -->
|
||||
<!-- div class="yui-navset detailview_tabs yui-navset-top" id="Project_detailview_tabs">
|
||||
<!--ul class="yui-nav"-- >
|
||||
<div class="yui-content">
|
||||
<div id="tabcontent0">
|
||||
<div id="detailpanel_1" class="detail view detail508 expanded">
|
||||
|
@ -219,27 +219,31 @@ class ProjectViewGanttChart extends SugarView {
|
|||
<td scope="col" width="12.5%"><?php echo ""; ?></td>
|
||||
<td class="inlineEdit" width="37.5%"><?php echo ""; ?></td>
|
||||
</tr>
|
||||
<!--tr >
|
||||
< !--tr >
|
||||
<td scope="col" width="12.5%"><?php echo $mod_strings['LBL_DESCRIPTION'];?></td>
|
||||
<td class="inlineEdit" type="text" colspan="3" width="87.5%"><?php echo $project->description;?></td>
|
||||
</tr -->
|
||||
</tr -- >
|
||||
</tbody></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<?php
|
||||
if(ACLController::checkAccess('Project', 'edit', true)){
|
||||
echo '<button id="add_button" class="gantt_button">' . $mod_strings['LBL_ADD_NEW_TASK'] . '</button>';
|
||||
echo '<input id="is_editable" name="is_editable" type="hidden" value="1" >';
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div -->
|
||||
|
||||
|
||||
|
||||
<div id="wrapper" >
|
||||
|
||||
<input id="project_id" type="hidden" name="project_id" value="<?php echo $_REQUEST["project_id"];?>" />
|
||||
<?php
|
||||
if(ACLController::checkAccess('Project', 'edit', true)){
|
||||
|
||||
echo '<div style="clear:both;padding:10px;"><button id="add_button" class="gantt_button">' . $mod_strings['LBL_ADD_NEW_TASK'] . '</button></div>';
|
||||
echo '<input id="is_editable" name="is_editable" type="hidden" value="1" >';
|
||||
}
|
||||
?>
|
||||
<input id="project_id" type="hidden" name="project_id" value="<?php echo $_REQUEST["record"];?>" />
|
||||
<div id="project_wrapper">
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue