[evolvis-commits] r17719: //Backup commit

papel at evolvis.org papel at evolvis.org
Thu Nov 24 11:45:42 CET 2011


Author: papel
Date: 2011-11-24 11:45:42 +0100 (Thu, 24 Nov 2011)
New Revision: 17719

Added:
   branches/papel-51/www/themes/css/tasks.css
Modified:
   branches/papel-51/common/include/datepick.php
   branches/papel-51/common/pm/ProjectController.class.php
   branches/papel-51/common/pm/ProjectModel.class.php
   branches/papel-51/translations/de.po
   branches/papel-51/translations/fusionforge.pot
   branches/papel-51/www/include/Layout.class.php
   branches/papel-51/www/include/html.php
   branches/papel-51/www/pm/include/ProjectTaskHTML.class.php
   branches/papel-51/www/pm/include/ProjectView.class.php
   branches/papel-51/www/pm/pm_task.php
   branches/papel-51/www/pm/task.php
   branches/papel-51/www/pm/templates/detail_template.php
Log:
//Backup commit

Modified: branches/papel-51/common/include/datepick.php
===================================================================
--- branches/papel-51/common/include/datepick.php	2011-11-17 15:16:30 UTC (rev 17718)
+++ branches/papel-51/common/include/datepick.php	2011-11-24 10:45:42 UTC (rev 17719)
@@ -236,8 +236,9 @@
 
 	if ($type == 'default' && isset($G_SESSION) && $G_SESSION) {
 		$v = $G_SESSION->getPreference('datepick_format');
-		if (isset($v))
+		if (isset($v)) {
 			$type = $v;
+		}
 	}
 	if (!isset($datepick_locales[$type])) {
 		$type = 'locdef';

Modified: branches/papel-51/common/pm/ProjectController.class.php
===================================================================
--- branches/papel-51/common/pm/ProjectController.class.php	2011-11-17 15:16:30 UTC (rev 17718)
+++ branches/papel-51/common/pm/ProjectController.class.php	2011-11-24 10:45:42 UTC (rev 17719)
@@ -26,6 +26,7 @@
  */
 
 require_once $gfwww.'pm/include/ProjectView.class.php';
+require_once $gfcommon.'pm/ProjectModel.class.php';
 
 if (getStringFromRequest('commentsort') == 'anti') {
        $sort_comments_chronologically = false;
@@ -93,7 +94,7 @@
 					 $category_id, $priority,
 					 $percent_complete, $hours, $duration, $parent_id));
 	if (!$result || db_affected_rows($result) < 1) {
-		$this->setError( 'ProjectTask::create() Posting Failed '.db_error().$sql );
+		$this->setError( 'projectTaskHTML::create() Posting Failed '.db_error().$sql );
 		db_rollback();
 		return false; //no return here. Needs a walkaround
 	} else {
@@ -112,7 +113,7 @@
 	
 	var $projectGroupHTML;
 	
-	var $projectTask;
+	var $projectTaskHTML; //extends class ProjectTask
 	
 	var $boolManager = false;
 	
@@ -144,12 +145,12 @@
 		return $this->projectGroupHTML;
 	}
 	
-	private function setProjectTask($pt) {
-		$this->projectTask = $pt;
+	private function setprojectTaskHTML($pt) {
+		$this->projectTaskHTML = $pt;
 	}
 	
-	public function getProjectTask() {
-		return $this->projectTask;
+	public function getProjectTaskHTML() {
+		return $this->projectTaskHTML;
 	}
 	
 	private function setManager($boolManager) {
@@ -171,15 +172,18 @@
 	function __construct($uri, $pg, $pt, $pageView, $boolManager, $HTML) {
 		$this->setUri($uri);
 		$this->setProjectGroupHTML($pg);
-		$this->setProjectTask($pt);
+		$this->setprojectTaskHTML($pt);
 		$this->setPageView($pageView);
 		$this->setManager($boolManager);
 		$this->setHTML($HTML);
 	}
 	
 	function display() {
-		$pmView = new ProjectView($this->getUri(), $this->getProjectGroupHTML(), 
-			$this->getProjectTask(), $this->getPageView(), $this->isManager(), $this->getHTML());
+		
+		$pmModel = new ProjectModel($this->getProjectTaskHTML());
+		
+		$pmView = new ProjectView($this->getUri(), $this->getProjectGroupHTML(),
+			$this->getProjectTaskHTML(), $this->getPageView(), $this->isManager(), $this->getHTML(), $pmModel);	
 			
 		switch($this->getPageView()) {
 			case 'postmodtask':

Modified: branches/papel-51/common/pm/ProjectModel.class.php
===================================================================
--- branches/papel-51/common/pm/ProjectModel.class.php	2011-11-17 15:16:30 UTC (rev 17718)
+++ branches/papel-51/common/pm/ProjectModel.class.php	2011-11-24 10:45:42 UTC (rev 17719)
@@ -26,7 +26,33 @@
  
 
 class ProjectModel {
+	/*
+	 * 		$result2=db_query("SELECT project_task.summary FROM project_dependencies,project_task 
+			WHERE is_dependent_on_task_id=project_task.project_task_id 
+			AND project_dependencies.project_task_id='$project_task_id'");
+		ShowResultSet($result2,_('Dependent on task'), false, false);
+	 */
+	 
+	var $projectTask;
 	
+	private function setProjectTask($pt) {
+		$this->projectTask = $pt;
+	}
+	
+	public function getProjectTask() {
+		return $this->projectTask;
+	}
+	 
+	function __construct($pt) {	
+	 	$this->setProjectTask($pt);
+	}
+	 
+	public function getAssignedTo() {
+		$result=db_query_params("SELECT project_task.summary FROM project_dependencies,project_task 
+		WHERE is_dependent_on_task_id=project_task.project_task_id 
+		AND project_dependencies.project_task_id=$1", array($this->getProjectTask()->getID()));
+	}
+ 
 }
 
 ?>

Modified: branches/papel-51/translations/de.po
===================================================================
--- branches/papel-51/translations/de.po	2011-11-17 15:16:30 UTC (rev 17718)
+++ branches/papel-51/translations/de.po	2011-11-24 10:45:42 UTC (rev 17719)
@@ -2700,6 +2700,10 @@
 msgid "Could not call TOIlet"
 msgstr "Konnte die Rolle nicht bekommen"
 
+#: common/include/datepick.php:251
+msgid "locale-dependent-default-datepick-format"
+msgstr "dmy_de"
+
 #: common/include/exit.php:32
 msgid "Exiting with error"
 msgstr "Beendigung mit Fehler"

Modified: branches/papel-51/translations/fusionforge.pot
===================================================================
--- branches/papel-51/translations/fusionforge.pot	2011-11-17 15:16:30 UTC (rev 17718)
+++ branches/papel-51/translations/fusionforge.pot	2011-11-24 10:45:42 UTC (rev 17719)
@@ -2423,6 +2423,10 @@
 msgid "Could not call TOIlet"
 msgstr ""
 
+#: common/include/datepick.php:251
+msgid "locale-dependent-default-datepick-format"
+msgstr ""
+
 #: common/include/exit.php:32
 msgid "Exiting with error"
 msgstr ""

Modified: branches/papel-51/www/include/Layout.class.php
===================================================================
--- branches/papel-51/www/include/Layout.class.php	2011-11-17 15:16:30 UTC (rev 17718)
+++ branches/papel-51/www/include/Layout.class.php	2011-11-24 10:45:42 UTC (rev 17719)
@@ -154,6 +154,8 @@
 		}
 
 		$this->addStylesheet('/themes/css/fusionforge.css');
+		$this->addStylesheet('/themes/css/datepicker.css');
+		$this->addStylesheet('/themes/css/tasks.css');
 
 		$this->addJavascript("/scripts/prototype/prototype.js");
 		$this->addJavascript("/scripts/scriptaculous/scriptaculous.js");
@@ -162,6 +164,7 @@
 		$this->addJavascript("/scripts/codendi/ReorderColumns.js");
 		$this->addJavascript("/scripts/codendi/validate.js");
 		$this->addJavascript('/js/common.js');
+		$this->addJavascript('/js/datepicker.js');
 	}
 
 	function addJavascript($js) {

Modified: branches/papel-51/www/include/html.php
===================================================================
--- branches/papel-51/www/include/html.php	2011-11-17 15:16:30 UTC (rev 17718)
+++ branches/papel-51/www/include/html.php	2011-11-24 10:45:42 UTC (rev 17719)
@@ -610,6 +610,36 @@
 }
 
 /**
+ * html_build_multiple_checkbox_from_arrays() - Takes two arrays and builds checkboxes with the same name
+ *
+ * @param	array	$values of the checkboxes
+ * @param	array	$texts of the checkboxes
+ * @param	string	$name of the checkbox
+ * @param	array	$arrCheckedValues of all checked checkboxes
+ * @param	bool	$show_100 true if values 100
+ * @param	string	$text_100 
+ */
+ 
+function html_build_multiple_checkbox_from_arrays($values, $texts, $name, $checked_array, $show_100=true, $text_100='none', $tagId='default') {
+	
+	$checkboxes = '';
+	
+	if($show_100) {
+		$checkboxes = '<label height="20px" for="'.$tagId.'-0"><input id="'.$tagId.'-0" type="checkbox" name="'.$name.'" value="100" />'._('None').'</label><br />';
+	}
+	
+	for($i = 0; $i < count($values); $i++) {
+		$checkboxes .= '<label for="'.$tagId.'-'.($i+1).'"><input id="'.$tagId.'-'.($i+1).'" type="checkbox" name="'.$name.'" value="'.$values[$i].'"';
+		if(in_array($values[$i], $checked_array)) {
+			$checkboxes .= ' checked="checked"';
+		}
+		$checkboxes .=' />'.$texts[$i].'</label><br />';
+	}
+	
+	return $checkboxes;
+}
+
+/**
  *	html_build_checkbox() - Render checkbox control
  *
  *	@param name - name of control
@@ -887,6 +917,11 @@
 	return '<input type="hidden" name="'.$name.'" value="'.$value.'" />';
 }
 
+
+function html_build_submit_button($name, $value) {
+	return '<input type="submit" name="'.$name.'" value="'.$value.'" />';
+}
+
 /**
  *	html_build_form_start_tag() - Render form start tag control. The variables $encrypt and 
  *	$acceptCharset have already the default value that will be used if the attributes are not added
@@ -913,7 +948,7 @@
 	if(!empty($accept)) {
 		$form .='accept="'.$accept.'" ';
 	}
-	$form .= 'action="'.$action.'" method="'.$method.'" ';
+	$form .= 'action="'.$action.'" method="'.$method.'" enctype="'.$enctype.'" accept-charset="'.$acceptCharset.'">';
 	
 	return $form;
 }

Modified: branches/papel-51/www/pm/include/ProjectTaskHTML.class.php
===================================================================
--- branches/papel-51/www/pm/include/ProjectTaskHTML.class.php	2011-11-17 15:16:30 UTC (rev 17718)
+++ branches/papel-51/www/pm/include/ProjectTaskHTML.class.php	2011-11-24 10:45:42 UTC (rev 17719)
@@ -39,7 +39,7 @@
 		return html_build_multiple_select_box ($result,$name,$arr2);
 	}
 
-	function multipleAssignedBox ($name='assigned_to[]') {
+	function multipleAssignedBox ($name='assigned_to[]', $control='select', $tagId='default') {
 		$engine = RBACEngine::getInstance () ;
 		$techs = $engine->getUsersByAllowedAction ('pm', $this->ProjectGroup->getID(), 'tech') ;
 
@@ -53,7 +53,14 @@
 		
 		//get the data so we can mark items as SELECTED
 		$arr2 = $this->getAssignedTo();
-		return html_build_multiple_select_box_from_arrays ($tech_id_arr,$tech_name_arr,$name,$arr2);
+		
+		switch($control) {
+			case 'select': 
+			return html_build_multiple_select_box_from_arrays($tech_id_arr,$tech_name_arr,$name,$arr2);
+			case 'checkbox':
+			//($id_prefix, $values, $texts, $name, $checked_array, $show_100=true, $text_100='none') 
+			return html_build_multiple_checkbox_from_arrays($tech_id_arr,$tech_name_arr,$name,$arr2,$tagId);
+		}
 	}
 
 

Modified: branches/papel-51/www/pm/include/ProjectView.class.php
===================================================================
--- branches/papel-51/www/pm/include/ProjectView.class.php	2011-11-17 15:16:30 UTC (rev 17718)
+++ branches/papel-51/www/pm/include/ProjectView.class.php	2011-11-24 10:45:42 UTC (rev 17719)
@@ -26,6 +26,7 @@
 
 // require_once $gfwww.'include/html.php';
 require_once $gfcommon.'include/datepick.php';
+require_once $gfcommon.'include/utils.php';
 
 class ProjectView {
 	
@@ -35,8 +36,10 @@
 	
 	var $projectGroupHTML;
 	
-	var $projectTask;
+	var $projectTaskHTML; //Extends class ProjectTask
 	
+	var $projectModel;
+	
 	var $tplDir;
 	
 	var $templateFile;
@@ -69,12 +72,12 @@
 		return $this->projectGroupHTML;
 	}
 	
-	private function setProjectTask($pt) {
-		$this->projectTask = $pt;
+	private function setProjectTaskHTML($pt) {
+		$this->projectTaskHTML = $pt;
 	}
 	
-	public function getProjectTask() {
-		return $this->projectTask;
+	public function getProjectTaskHTML() {
+		return $this->projectTaskHTML;
 	}
 	
 	public function setTemplateFile($templateFile = 'detailtask_template') {
@@ -108,15 +111,24 @@
 	public function getHTML() {
 		return $this->HTML;
 	}
+	
+	private function setProjectModel($pmModel) {
+		$this->projectModel = $pmModel;
+	}
+	
+	public function getProjectModel() {
+		return $this->projectModel;
+	}
 
-	function __construct($uri, $pg, $pt, $pageView, $boolManager, $HTML) {
+	function __construct($uri, $pg, $pt, $pageView, $boolManager, $HTML, $pmModel) {
 		$this->setUri($uri);
 		$this->setProjectGroupHTML($pg);
-		$this->setProjectTask($pt);
+		$this->setProjectTaskHTML($pt);
 		$this->setPageView($pageView);
 		
 		$this->setManager($boolManager);
 		$this->setHTML($HTML);
+		$this->setProjectModel($pmModel);
 		
 		global $gfwww;
 		$this->setTemplateDir($gfwww.'pm/templates/');
@@ -136,7 +148,7 @@
 	public function showStartForm() {
 		switch($this->getPageView()) {
 			case 'postmodtask':	
-			return  html_build_form_start_tag($this->getUri(),'modtaskform');
+			return  html_build_form_start_tag($this->getUri().'?group_id='.$this->getProjectTaskHTML()->getProjectGroup()->getGroup()->getID().'&group_project_id='.$this->getProjectTaskHTML()->getProjectGroup()->getID().'&project_task_id='.$this->getProjectTaskHTML()->getID(),'modtaskform');
 			case 'detailtask':
 			return '';
 			case 'postaddtask':
@@ -155,10 +167,21 @@
 		}
 	}
 	
+	public function showSubmitButton() {
+		switch($this->getPageView()) {
+			case 'postmodtask':
+			return html_build_submit_button('submit', _('Submit'));
+			case 'detailtask':
+			return html_build_submit_button('submit', _('Submit'));
+			case 'postaddtask':
+			return '';
+		}	
+	}
+	
 	public function showHiddenBox() {
 		switch($this->getPageView()) {
 			case 'postmodtask':
-			$nameFunc = array('func' => 'postpostmodtasktask', 'project_task_id' => $this->getProjectTask()->getID()); 
+			$nameFunc = array('func' => 'postmodtask', 'project_task_id' => $this->getProjectTaskHTML()->getID()); 
 			break;
 			case 'detailtask':
 			$nameFunc = null;
@@ -168,10 +191,12 @@
 			break;
 		}
 		
-		if(!empty($nameFunc))	{
+		if(is_array($nameFunc))	{
 			$hiddenBoxes = '';
-			for($i = 0; $i < count($nameFunc); $i++) {
-				$hiddenBoxes .= html_build_hiddenBox(key($nameFunc[$i]), $nameFunc[$i]);
+
+			while ($value = current($nameFunc)) {
+        		$hiddenBoxes .= html_build_hiddenBox(key($nameFunc), $value);
+    			next($nameFunc);	
 			}
 			return $hiddenBoxes;
 		} else {
@@ -180,26 +205,37 @@
 	}
 	
 	public function showTaskId() {
-		return $this->getProjectTask()->getID();
+		return $this->getProjectTaskHTML()->getID();
 	}
 	
 	public function showSummary() {
 		switch($this->getPageView()) {
 			case 'postmodtask':
-			return html_build_textbox('summary', $this->getProjectTask()->getSummary());
+			return html_build_textbox('summary', $this->getProjectTaskHTML()->getSummary());
 			case 'detailtask':
-			return $this->getProjectTask()->getSummary();
+			return $this->getProjectTaskHTML()->getSummary();
 			case 'postaddtask':
 			return;
 		}
 	}
 	
-	public function showPercentComplete() {		
+	public function showComments() {
 		switch($this->getPageView()) {
+			case 'postmodtask':
+			return html_build_textbox('details', $this->getProjectTaskHTML()->getDetails());
+			case 'detailtask':
+			return $this->getProjectTaskHTML()->getDetails();
+			case 'postaddtask':
+			return;
+		}
+	}
+	
+	public function showPercentComplete() {
+		switch($this->getPageView()) {
 			case 'postmodtask': 
-			return $this->getProjectGroupHTML()->percentCompleteBox('percent_complete',$this->getProjectTask()->getPercentComplete()); 
+			return $this->getProjectGroupHTML()->percentCompleteBox('percent_complete',$this->getProjectTaskHTML()->getPercentComplete()); 
 			case 'detailtask': 
-			return $this->getProjectTask()->getPercentComplete();
+			return $this->getProjectTaskHTML()->getPercentComplete();
 			case 'postaddtask':
 			return '';
 		}
@@ -208,9 +244,9 @@
 	public function showStatus() {
 		switch($this->getPageView()) {
 			case 'postmodtask':
-			return $this->getProjectGroupHTML()->statusBox('status_id', $this->getProjectTask()->getStatusID(), false);
+			return $this->getProjectGroupHTML()->statusBox('status_id', $this->getProjectTaskHTML()->getStatusID(), false);
 			case 'detailtask':
-			return $this->getProjectTask()->getStatusName();
+			return $this->getProjectTaskHTML()->getStatusName();
 			case 'postaddtask':
 			return '';
 		}
@@ -219,32 +255,32 @@
 	public function showPriority() {
 		switch($this->getPageView()) {
 			case 'postmodtask':
-			return build_priority_select_box('priority',$this->getProjectTask()->getPriority());
+			return build_priority_select_box('priority',$this->getProjectTaskHTML()->getPriority());
 			case 'detailtask':
-			return $this->getProjectTask()->getPriority();
+			return $this->getProjectTaskHTML()->getPriority();
 			case 'postaddtask':
 			return;
-		} 
+		}
 	}
 	
 	//needs to be redesigned in html.php?
 	public function showAssignedTo() {
 		switch($this->getPageView()) {
 			case 'postmodtask':
-			return;
+			return $this->getProjectTaskHTML()->multipleAssignedBox('assigned_to[]', 'checkbox');
 			case 'detailtask':
-			return;
+			return ShowResultSet($this->getProjectModel()->getAssignedTo(),_('Dependent on task'), false, false);
 			case 'postaddtask':
-			return;
+			return '';
 		}
 	}
 	
 	public function showStartDate() {
 		switch($this->getPageView()) {
 			case 'postmodtask':
-			return datepick_emit('start_dt', datepick_format($this->getProjectTask()->getStartDate(), true), true);
+			return datepick_emit('start_dt', datepick_format($this->getProjectTaskHTML()->getStartDate(), true), true);
 			case 'detailtask':
-			return datepick_format($this->getProjectTask()->getStartDate());
+			return datepick_format($this->getProjectTaskHTML()->getStartDate());
 			case 'postaddtask':
 			return;
 		}
@@ -253,9 +289,9 @@
 	public function showEndDate() {
 		switch($this->getPageView()) {
 			case 'postmodtask':
-			return datepick_emit('end_dt', datepick_format($this->getProjectTask()->getEndDate(),true), true);
+			return datepick_emit('end_dt', datepick_format($this->getProjectTaskHTML()->getEndDate(),true), true);
 			case 'detailtask':
-			return datepick_format($this->getProjectTask()->getEndDate());
+			return datepick_format($this->getProjectTaskHTML()->getEndDate());
 			case 'postaddtask':
 			return;
 		}
@@ -276,16 +312,16 @@
 	public function showEstimatedHours() {
 		switch($this->getPageView()) {
 			case 'postmodtask':
-			return html_build_textbox('hours', $this->getProjectTask()->getHours());
+			return html_build_textbox('hours', $this->getProjectTaskHTML()->getHours());
 			case 'detailtask':
-			return $this->getProjectTask()->getHours();
+			return $this->getProjectTaskHTML()->getHours();
 			case 'postaddtask':
 			return;
 		}
 	}
 	
 	public function showSubmittedBy() {
-		return $this->getProjectTask()->getSubmittedRealName() . ' ('.$this->getProjectTask()->getSubmittedUnixName().')';
+		return $this->getProjectTaskHTML()->getSubmittedRealName() . ' ('.$this->getProjectTaskHTML()->getSubmittedUnixName().')';
 	}
 	
 	public function showPermaLink() {
@@ -313,9 +349,9 @@
 	public function showSubproject() {
 		switch($this->getPageView()) {
 			case 'postmodtask':
-			return $this->getProjectGroupHTML()->groupProjectBox('new_group_project_id', $this->getProjectTask()->getProjectGroup()->getID(), false);
+			return $this->getProjectGroupHTML()->groupProjectBox('new_group_project_id', $this->getProjectTaskHTML()->getProjectGroup()->getID(), false);
 			case 'detailtask':
-			return $this->getProjectTask()->getProjectGroup()->getName();
+			return $this->getProjectTaskHTML()->getProjectGroup()->getName();
 			case 'postaddtask':
 			return '';
 		}
@@ -325,10 +361,9 @@
 	 * Field only available for managers
 	 */
 	public function showCopyTaskFunc() {
-		/*
-			<strong><?php echo _('Copy to another Subproject'); ?>:</strong><br />
+		/*	<strong><?php echo _('Copy to another Subproject'); ?>:</strong><br />
 			<?php echo $pg->groupProjectBox('copy_group_project_id',$group_project_id,false); ?> 
-			<?php echo '<input type="submit" name="CopySubproject" value="'._('Copy').'" onclick="document.forms[0].func.value = \'copytask\';" />'; ?>  
+			<?php echo '<input type="submit" name="CopySubproject" value="'._('Copy').'" onclick="document.forms[0].func.value = \'copytask\';" />'; ?>
 		 */
 		switch($this->getPageView()) {
 			case 'postmodtask':
@@ -365,9 +400,9 @@
 	public function showCategory() {
 		switch($this->getPageView()) {
 			case 'postmodtask':
-			return $this->getProjectGroupHTML()->categoryBox('category_id',$this->getProjectTask()->getCategoryID());
+			return $this->getProjectGroupHTML()->categoryBox('category_id',$this->getprojectTaskHTML()->getCategoryID());
 			case 'detailtask':
-			return $this->getProjectTask()->getCategoryName();
+			return $this->getProjectTaskHTML()->getCategoryName();
 			case 'postaddtask':
 			return;
 		}
@@ -383,10 +418,10 @@
 
              ob_start();  
              include $file;  
-             $output = ob_get_contents();  
+             $output = ob_get_contents(); 
              ob_end_clean();  
+             
                
-               
              // Output zur├╝ckgeben.  
              return $output;
          } else {

Modified: branches/papel-51/www/pm/pm_task.php
===================================================================
--- branches/papel-51/www/pm/pm_task.php	2011-11-17 15:16:30 UTC (rev 17718)
+++ branches/papel-51/www/pm/pm_task.php	2011-11-24 10:45:42 UTC (rev 17719)
@@ -56,7 +56,6 @@
 	$pageView = 'postmodtask';
 }
 
-
 $pmController = new ProjectController($uri, $pg, $pt, $pageView, $boolManager, $HTML);
 echo $pmController->display();
 
@@ -64,7 +63,7 @@
 
 if (forge_get_config('pm_timetracking')) {
 	include $gfwww.'templates/time_tracking.php';
-}	
+}
 
 
 pm_footer(array());

Modified: branches/papel-51/www/pm/task.php
===================================================================
--- branches/papel-51/www/pm/task.php	2011-11-17 15:16:30 UTC (rev 17718)
+++ branches/papel-51/www/pm/task.php	2011-11-24 10:45:42 UTC (rev 17719)
@@ -252,12 +252,15 @@
 			} elseif ($pt->isError()) {
 				exit_error('Error',$pt->getErrorMessage());
 			}
-
+			
 			if (forge_check_perm('pm', $pg->getID(), 'manager')) {
 				include $gfwww.'pm/mod_task.php';
 			} else {
 				include $gfwww.'pm/detail_task.php';
-			}	
+			}
+			
+			//include $gfwww.'pm/pm_task.php';
+				
 		}
 		break;
 	}
@@ -546,9 +549,6 @@
 				}
 			}
 			$feedback=_('Task Updated Successfully');
-
-			#Detailtask begin
-                                #include $gfwww.'pm/browse_task.php'; OLD
 									      $pt=new ProjectTaskHTML($pg,$project_task_id);
 			if (!$pt || !is_object($pt)) {
 				exit_error('Error','Could Not Get ProjectTask');
@@ -561,7 +561,6 @@
 			} else {
 				include $gfwww.'pm/detail_task.php';
 			}
-			#detailtask end
 
 				}
 	} else {

Modified: branches/papel-51/www/pm/templates/detail_template.php
===================================================================
--- branches/papel-51/www/pm/templates/detail_template.php	2011-11-17 15:16:30 UTC (rev 17718)
+++ branches/papel-51/www/pm/templates/detail_template.php	2011-11-24 10:45:42 UTC (rev 17719)
@@ -1,56 +1,128 @@
 <?php echo $this->showStartForm(); ?>
-<?php echo $this->getHTML()->boxTop(_('Details'), 'details', false, 'toplev_about'); ?>
-<div>
-	<div><?php echo _('Percent Complete'); ?></div>
-	<div><?php echo $this->showPercentComplete(); ?></div>
-	<div><?php echo _('Status'); ?></div>
-	<div><?php echo $this->showStatus(); ?></div>
-	<div><?php echo _('Priority'); ?></div>
-	<div><?php echo $this->showPriority(); ?></div>
-	<div><?php echo _('Assigned to'); ?></div>
-	<div><?php echo $this->showAssignedTo(); ?></div>
-</div>
+<?php echo $this->showHiddenBox(); ?>
 
-<div>
-	<div><?php echo _('Start Date'); ?></div>
-	<div><?php echo $this->showStartDate(); ?></div>
-	<div><?php echo _('End Date'); ?></div>
-	<div><?php echo $this->showEndDate(); ?></div>
-	<div><?php echo _('View Calendar'); ?></div>
-	<div><?php echo $this->showCalendar(); ?></div>
-	<div><?php echo _('Estimated Hours'); ?></div>
-	<div><?php echo $this->showEstimatedHours()?></div>
-</div>
+<div id="detailTaskContainer">
+	<?php echo $this->getHTML()->boxTop(_('Details'), 'details', false, 'toplev_about'); ?>
+		<div class="bigTaskContainer">
+			<div class="smallTaskContainer">
+				<?php echo _('Percent Complete'); ?>
+					<br />
+				<?php echo $this->showPercentComplete(); ?>
+			</div>
+			<div class="smallTaskContainer">
+				<?php echo _('Status'); ?>
+					<br />
+				<?php echo $this->showStatus(); ?>
+			</div>
+			<div class="smallTaskContainer">
+				<?php echo _('Priority'); ?>
+					<br />
+				<?php echo $this->showPriority(); ?>
+			</div>
+			<div class="smallTaskContainer">
+				<?php echo _('Assigned to'); ?>
+					<br />
+					<div class="checkBoxTaskContainer">
+						<div class="checkBoxInnerContainer">
+							<?php echo $this->showAssignedTo(); ?>
+						</div>
+					</div>	
+			</div>
+		</div>
 
-<?php if($this->isThirdDetailColumnLayer()) {?>
-	<div>
-		<div><?php echo _('Submitted by'); ?></div>
-		<div><?php echo $this->showSubmittedBy(); ?></div>
-		<div><?php echo _('Permalink'); ?></div>
-		<div><?php echo $this->showPermaLink(); ?></div>
-		<div><?php echo _('Task Detail Information'); ?></div>
-		<div><?php echo $this->showTaskdetailtaskInfo(); ?></div>
-		<div><?php echo _('Subproject'); ?></div>
-		<div><?php echo $this->showSubproject(); ?></div>
+		<div class="bigTaskContainer">
+			<div class="smallTaskContainer">
+				<?php echo _('Start Date'); ?>
+					<br />
+				<?php echo $this->showStartDate(); ?>
+			</div>
+			<div class="smallTaskContainer">
+				<?php echo _('End Date'); ?>
+					<br />
+				<?php echo $this->showEndDate(); ?>
+			</div>	
+			<div class="smallTaskContainer">
+				<?php echo _('View Calendar'); ?>
+					<br />
+				<?php echo $this->showCalendar(); ?>
+			</div>
+			<div class="smallTaskContainer">
+				<?php echo _('Estimated Hours'); ?>
+					<br />
+				<?php echo $this->showEstimatedHours()?>
+			</div>
+		</div>
+
+		<?php if($this->isThirdDetailColumnLayer()) {?>
+			<div class="bigTaskContainer">
+				<div class="smallTaskContainer">
+					<?php echo _('Submitted by'); ?>
+						<br />
+					<?php echo $this->showSubmittedBy(); ?>
+				</div>
+				<div class="smallTaskContainer">
+					<?php echo _('Permalink'); ?>
+						<br />
+					<?php echo $this->showPermaLink(); ?>
+				</div>
+				<div class="smallTaskContainer">
+					<?php echo _('Task Detail Information'); ?>
+						<br />
+					<?php echo $this->showTaskdetailtaskInfo(); ?>
+				</div>
+				<div class="smallTaskContainer">
+					<?php echo _('Subproject'); ?>
+						<br />
+					<?php echo $this->showSubproject(); ?>
+				</div>
+				<div class="smallTaskContainer">
+					<?php echo $this->showSubscribeLink(); ?>
+				</div>
 	
-		<div><?php echo $this->showSubscribeLink(); ?></div>
-	
-		<?php if($this->getPageView()=='postmodtask') {?>
-			<div><?php echo _('Copy to another Subproject'); ?></div>
-			<div><?php echo $this->showCopyTaskFunc(); ?></div>
+				<?php if($this->getPageView()=='postmodtask') {?>
+					<div class="smallTaskContainer">
+						<?php echo _('Copy to another Subproject'); ?></div>
+					<div class="smallTaskContainer">
+						<?php echo $this->showCopyTaskFunc(); ?></div>
+				<?php }?>
+		
+				<br /><br />
+				<div class="taskSubmitButtonContainer"><?php echo $this->showSubmitButton(); ?></div>
+			</div>
 		<?php }?>
-	</div>
-<?php }?>
-<?php echo $this->getHTML()->boxBottom(); ?>
+	<?php echo $this->getHTML()->boxBottom(); ?>
+</div>		
 
+<div class="descriptionTaskContainer">
+	<?php echo $this->getHTML()->boxTop(_('Description'), 'description', false, 'toplev_about'); ?>
+		<div class="bigTaskContainer">
+			<div class="smallTaskContainer">
+				<?php echo _('Task Summary') ?>
+					<br />
+				<?php echo $this->showSummary(); ?>
+			</div>
+		</div>
+		
+		<div class="bigTaskContainer">
+			<div class="smallTaskContainer">
+				<?php echo _('Summary'); ?>
+					<br />
+				<?php echo $this->showComments(); ?>
+			</div>
+		</div>	
+	<?php echo $this->getHTML()->boxBottom(); ?>
+</div>
 
+<div class="linkTaskContainer">
+	<?php echo $this->getHTML()->boxTop(_('Link'), 'link', false, 'toplev_about'); ?>
+		<div></div>
+	<?php echo $this->getHTML()->boxBottom(); ?>
+</div>
 
-<?php echo $this->getHTML()->boxTop(_('Description'), 'description', false, 'toplev_about'); ?>
-<div></div>
-<?php echo $this->getHTML()->boxBottom(); ?>
+<div class="protocolTaskContainer">
+	<?php echo $this->getHTML()->boxTop(_('Change protocol'), 'protocol', false, 'toplev_about'); ?>
+		<div></div>
+	<?php echo $this->getHTML()->boxBottom(); ?>
+</div>
 
-
-<?php echo $this->getHTML()->boxTop(_('Details'), 'details', false, 'toplev_about'); ?>
-<div></div>
-<?php echo $this->getHTML()->boxBottom(); ?>
 <?php echo $this->showEndForm(); ?>
\ No newline at end of file

Added: branches/papel-51/www/themes/css/tasks.css
===================================================================
--- branches/papel-51/www/themes/css/tasks.css	                        (rev 0)
+++ branches/papel-51/www/themes/css/tasks.css	2011-11-24 10:45:42 UTC (rev 17719)
@@ -0,0 +1,45 @@
+#detailTaskContainer {
+	border: 1px solid #c7c7c7;
+	background-color:#f4f4f4;
+}
+
+#descriptionTaskContainer {
+	border: 1px solid #c7c7c7;
+	background-color:#f4f4f4;
+}
+
+#linkTaskContainer {
+	border: 1px solid #c7c7c7;
+	background-color:#f4f4f4;
+}
+
+#protocolTaskContainer {
+	border: 1px solid #c7c7c7;
+	background-color:#f4f4f4;
+}
+
+.checkBoxTaskContainer {
+	border: 1px solid #c7c7c7;
+	overflow:auto;
+	height: 100px;
+	width: 150px;
+}
+
+.checkBoxInnerContainer {
+	width:200px;
+}
+
+.bigTaskContainer {
+	float:left;
+	padding:1em;
+	background-color:#f4f4f4;
+}
+
+.smallTaskContainer {
+	padding:1em;
+	background-color:#ffffff;
+}
+
+.taskSubmitButtonContainer {
+	float:right;
+}
\ No newline at end of file



More information about the evolvis-commits mailing list