[evolvis-commits] r17773: [#2262] Taskbereich umgestalten

papel at evolvis.org papel at evolvis.org
Mon Dec 5 11:49:55 CET 2011


Author: papel
Date: 2011-12-05 11:49:55 +0100 (Mon, 05 Dec 2011)
New Revision: 17773

Modified:
   branches/papel-51/common/pm/ProjectController.class.php
   branches/papel-51/common/pm/ProjectModel.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/templates/detail_template.php
Log:
[#2262] Taskbereich umgestalten

Modified: branches/papel-51/common/pm/ProjectController.class.php
===================================================================
--- branches/papel-51/common/pm/ProjectController.class.php	2011-12-05 10:24:30 UTC (rev 17772)
+++ branches/papel-51/common/pm/ProjectController.class.php	2011-12-05 10:49:55 UTC (rev 17773)
@@ -206,7 +206,7 @@
 		$pmView = new ProjectView($this->getUri(), $this->getProjectGroupHTML(),
 			$this->getProjectTaskHTML(), $this->getPageView(), $this->isManager(), $this->getHTML(), $pmModel, $this->getCSort());
 				
-		$arrInfo = $pmModel->getRelatedCommits();	
+		$arrInfo = $pmModel->getRelatedCommits();
 		$pmView->assign('commits', $arrInfo);
 			
 		switch($this->getPageView()) {

Modified: branches/papel-51/common/pm/ProjectModel.class.php
===================================================================
--- branches/papel-51/common/pm/ProjectModel.class.php	2011-12-05 10:24:30 UTC (rev 17772)
+++ branches/papel-51/common/pm/ProjectModel.class.php	2011-12-05 10:49:55 UTC (rev 17773)
@@ -48,33 +48,10 @@
 	}
 	 
 	public function getAssignedTo() {
-		return $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()));
+		return $result=db_query_params('SELECT users.realname FROM users,project_assigned_to 
+			WHERE users.user_id=project_assigned_to.assigned_to_id AND project_task_id=$1', array($this->getProjectTask()->getID()));
 	}
- 
- 	/*
- 		$res = db_query_params('SELECT group_name, revision, href
-			FROM tasktracker_scm
-			WHERE id=$1
-			ORDER BY group_name, revision
-		    ', array($project_task_id));
-		if ($res && ($cnt = db_numrows($res)) > 0) {
-			printf(_('Task Item [#%d] was mentioned in the following commits:'),
-			    $project_task_id);
-			for ($i = 0; $i < $cnt; $i++) {
-				$info = db_fetch_array($res, $i);
-				if ($i) echo ",";
-				echo "\n <a href=\"" .
-				    htmlspecialchars($info['href']) . "\">" .
-				    $info['group_name'] . "/" .
-				    $info['revision'] . "</a>";
-			}
-		} else {
-			echo _('No Related Commits');
-		}
- 	*/
- 	
+
  	public function getRelatedCommits() {
  		
  		$result = db_query_params('SELECT group_name, revision, href FROM tasktracker_scm

Modified: branches/papel-51/www/include/html.php
===================================================================
--- branches/papel-51/www/include/html.php	2011-12-05 10:24:30 UTC (rev 17772)
+++ branches/papel-51/www/include/html.php	2011-12-05 10:49:55 UTC (rev 17773)
@@ -630,9 +630,16 @@
 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 for="'.$tagId.'-0"><input id="'.$tagId.'-0" type="checkbox" name="'.$name.'" value="100" />'._('None').'</label><br />';
+		$checkboxes = '<label for="'.$tagId.'-0"><input id="'.$tagId.'-0" type="checkbox" name="'.$name.'" value="100"';
+		
+		for($i = 0; $i < count($values); $i++) {
+			if(in_array($values[$i], $checked_array)) {
+				$checkboxes .= ' checked="checked"';
+			}
+		}
+		
+		$checkboxes.= ' />'._('None').'</label><br />';
 	}
 	
 	for($i = 0; $i < count($values); $i++) {

Modified: branches/papel-51/www/pm/include/ProjectTaskHTML.class.php
===================================================================
--- branches/papel-51/www/pm/include/ProjectTaskHTML.class.php	2011-12-05 10:24:30 UTC (rev 17772)
+++ branches/papel-51/www/pm/include/ProjectTaskHTML.class.php	2011-12-05 10:49:55 UTC (rev 17773)
@@ -71,15 +71,12 @@
 
 	function showDependentTasks () {
 
-		$result=db_query_params ('SELECT project_task.project_task_id,project_task.summary 
-			FROM project_task,project_dependencies 
-			WHERE project_task.project_task_id=project_dependencies.project_task_id 
-			AND project_dependencies.is_dependent_on_task_id=$1',
-			array($this->getID() ));
+		$result=db_query_params ('SELECT pt.project_task_id, pt.summary FROM project_task pt INNER JOIN project_dependencies pd ON (pt.project_task_id = pd.is_dependent_on_task_id) WHERE pd.project_task_id=$1',
+		array($this->getID() )); 
+		
 		$rows=db_numrows($result);
 
 		if ($rows > 0) {
-			echo '<h3>'._('Tasks That Depend on This Task').'</h3>';
 
 			$title_arr=array();
 			$title_arr[]=_('Task Id');
@@ -109,9 +106,9 @@
 		$rows=db_numrows($res);
 		if ($rows > 0) {
 			if (forge_check_perm ('pm_admin', $this->ProjectGroup->Group->getID())) {
-				$is_admin=false;
-			} else {
 				$is_admin=true;
+			} else {
+				$is_admin=false;
 			}
 
 			$title_arr=array();
@@ -149,7 +146,7 @@
 		$rows=db_numrows($result);
 
 		if ($rows > 0) {
-			echo '<h3>'._('Followups: ');
+			echo '<br />';
 
 			if ($asc) {
 				echo '<a href="' .
@@ -160,12 +157,12 @@
 					util_make_url($whereto . '&commentsort=chrono') .
 					'">' . _('Sort comments chronologically') . '</a>';
 			}
-			echo "</h3>\n";
+			echo '<br /><br />';
 
 			$title_arr=array();
 			$title_arr[]=_('Comment');
 			$title_arr[]=_('Date');
-			$title_arr[]=_('By');
+			$title_arr[]=_('Submitted by');
 		
 			echo $GLOBALS['HTML']->listTableTop ($title_arr);
 
@@ -183,7 +180,7 @@
 
 				echo '</td>
 					<td valign="top">'.date(_('Y-m-d H:i'),db_result($result, $i, 'postdate')).'</td>
-					<td valign="top">'.db_result($result, $i, 'user_name').'</td></tr>';
+					<td valign="top">'.db_result($result, $i, 'realname').'</td></tr>';
 			}
 
 			echo $GLOBALS['HTML']->listTableBottom();

Modified: branches/papel-51/www/pm/include/ProjectView.class.php
===================================================================
--- branches/papel-51/www/pm/include/ProjectView.class.php	2011-12-05 10:24:30 UTC (rev 17772)
+++ branches/papel-51/www/pm/include/ProjectView.class.php	2011-12-05 10:49:55 UTC (rev 17773)
@@ -126,7 +126,7 @@
 	}
 	
 	public function setCSort($cSort) {
-		$this->sort = $cSort;
+		$this->cSort = $cSort;
 	}
 	
 	public function getCSort() {
@@ -190,7 +190,7 @@
 			case 'postmodtask':
 			return html_build_submit_button('submit', _('Submit'));
 			case 'detailtask':
-			return html_build_submit_button('submit', _('Submit'));
+			return '';
 			case 'postaddtask':
 			return '';
 		}	
@@ -336,7 +336,7 @@
 			case 'postmodtask':
 			return $this->getProjectTaskHTML()->multipleAssignedBox('assigned_to[]', 'checkbox', 'depentAssignee');
 			case 'detailtask':
-			return ShowResultSet($this->getProjectModel()->getAssignedTo(),_('Assigned to'), false, false);
+			return ShowResultSet($this->getProjectModel()->getAssignedTo(),'',false, false);
 			case 'postaddtask':
 			return '';
 		}
@@ -353,18 +353,6 @@
 		}
 	}
 	
-	/*
-	public function showRelatedCommits() {	 
-		switch($this->getPageView()) {
-			case 'postmodtask':
-			return '';
-			case 'detailtask':
-			return '';
-			case 'postaddtask':
-			return ;
-		}
-	} */
-	
 	public function showRelatedTrackerItems() {
 		switch($this->getPageView()) {
 			case 'postmodtask':

Modified: branches/papel-51/www/pm/templates/detail_template.php
===================================================================
--- branches/papel-51/www/pm/templates/detail_template.php	2011-12-05 10:24:30 UTC (rev 17772)
+++ branches/papel-51/www/pm/templates/detail_template.php	2011-12-05 10:49:55 UTC (rev 17773)
@@ -98,11 +98,10 @@
 						<?php echo $this->showCopyTaskFunc(); ?>
 					</div>
 				<?php }?>
-				<br /><br />
-				<div class="taskSubmitButtonContainer"><?php echo $this->showSubmitButton(); ?></div>
-				<br /><br />
+
 			</div>
 		<?php }?>
+		<div class="taskSubmitButtonContainer"><?php echo $this->showSubmitButton(); ?></div>
 	<?php echo $this->getHTML()->boxBottom(); ?>
 </div>		
 
@@ -131,11 +130,8 @@
 			<div class="smallTaskContainer">
 				<?php echo $this->showAddCommentBox(); ?>
 			</div>
-			
-			<br /><br />
-			<div class="taskSubmitButtonContainer"><?php echo $this->showSubmitButton(); ?></div>
-			<br /><br />
-		</div>	
+		</div>
+		<div class="taskSubmitButtonContainer"><?php echo $this->showSubmitButton(); ?></div>
 	<?php echo $this->getHTML()->boxBottom(); ?>
 </div>
 
@@ -164,8 +160,8 @@
 			<div class="smallTaskContainer">
 				<span class="taskHeading"><?php echo _('Dependent on task'); ?>:</span>
 					<br /><br />
-					<div class="checkBoxTaskContainer">
-						<div class="checkBoxInnerContainer">	
+					<div class="checkBoxTaskContainer dependentContainer">
+						<div class="checkBoxInnerContainer dependentContainer">	
 							<?php echo $this->showDependentTaskBox(); ?>
 					</div>
 				</div>
@@ -178,10 +174,8 @@
 					<br /><br />
 				<?php echo $this->showRelatedTrackerItems(); ?>	
 			</div>
-			<br /><br />
-			<div class="taskSubmitButtonContainer"><?php echo $this->showSubmitButton(); ?></div>
-			<br /><br />
 		</div>
+		<div class="taskSubmitButtonContainer"><?php echo $this->showSubmitButton(); ?></div>
 	<?php echo $this->getHTML()->boxBottom(); ?>
 </div>
 



More information about the evolvis-commits mailing list