* adjust the project-view page.

This commit is contained in:
wangchunsheng
2012-12-17 06:09:31 +00:00
parent 335c8e5159
commit ecad94a7de
2 changed files with 84 additions and 86 deletions

View File

@@ -29,7 +29,7 @@
</tr>
<?php foreach($projectStats as $project):?>
<tr class='a-center'>
<td class='a-left'><?php echo html::a($this->createLink('project', 'task', 'project=' . $project->id), $project->name, '_parent');?></td>
<td class='a-left'><?php echo html::a($this->createLink('project', 'view', 'project=' . $project->id), $project->name);?></td>
<td><?php echo $project->code;?></td>
<td><?php echo $project->end;?></td>
<td><?php echo $lang->project->statusList[$project->status];?></td>

View File

@@ -11,39 +11,37 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<div id='titlebar'>
<div id='main' <?php if($project->deleted) echo "class='deleted'";?>>PROJECT #<?php echo $project->id . ' ' . $project->name;?></div>
<div>
<?php
$params = "project=$project->id";
$browseLink = $this->session->projectList ? $this->session->projectList : inlink('browse', "projectID=$project->id");
if(!$project->deleted)
{
ob_start();
common::printDivider();
common::printIcon('project', 'edit', $params);
common::printIcon('project', 'delete', $params, '', 'button', '', 'hiddenwin');
common::printRPN($browseLink);
$actionLinks = ob_get_contents();
ob_end_clean();
echo $actionLinks;
}
?>
</div>
</div>
<table class='cont-rt5'>
<caption>
<?php echo $project->name;?>
<div class='f-right f-16px strong'>
<?php
$browseLink = $this->session->projectList ? $this->session->projectList : inlink('task', "projectID=$project->id");
if(!$project->deleted)
{
common::printLink('project', 'edit', "projectID=$project->id", $lang->project->edit);
common::printLink('project', 'delete', "projectID=$project->id", $lang->project->delete, 'hiddenwin');
}
echo html::a($browseLink, $lang->goback);
?>
</div>
</caption>
<tr valign='top'>
<td>
<fieldset>
<legend><?php echo $lang->project->desc;?></legend>
<div class='content'><?php echo $project->desc;?></div>
</fieldset>
<?php include '../../common/view/action.html.php';?>
<div class='a-center f-16px strong'>
<?php
$browseLink = $this->session->projectList ? $this->session->projectList : inlink('task', "projectID=$project->id");
if(!$project->deleted)
{
common::printLink('project', 'edit', "projectID=$project->id", $lang->project->edit);
common::printLink('project', 'delete', "projectID=$project->id", $lang->project->delete, 'hiddenwin');
}
echo html::a($browseLink, $lang->goback);
?>
</div>
<tr valign='top'>
<td>
<fieldset>
<legend><?php echo $lang->project->desc;?></legend>
<div class='content'><?php echo $project->desc;?></div>
</fieldset>
<?php include '../../common/view/action.html.php';?>
<div class='a-center actionLink'> <?php if(!$project->deleted) echo $actionLinks;?></div>
</td>
<td class="divider"></td>
<td class="side">
@@ -56,7 +54,7 @@
</tr>
<tr>
<th class='rowhead'><?php echo $lang->project->code;?></th>
<td><?php echo $project->code;?></td>
<td><?php echo $project->code;?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->project->beginAndEnd;?></th>
@@ -70,57 +68,57 @@
<th class='rowhead'><?php echo $lang->project->goal;?></th>
<td class='content'><?php echo $project->goal;?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->project->status;?></th>
<td class='<?php echo $project->status;?>'><?php $lang->show($lang->project->statusList, $project->status);?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->project->PM;?></th>
<td><?php echo $users[$project->PM];?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->project->PO;?></th>
<td><?php echo $users[$project->PO];?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->project->QM;?></th>
<td><?php echo $users[$project->QM];?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->project->RM;?></th>
<td><?php echo $users[$project->RM];?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->project->products;?></th>
<td>
<?php foreach($products as $productID => $productName) echo html::a($this->createLink('product', 'browse', "productID=$productID"), $productName) . '<br />';?>
</td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->project->acl;?></th>
<td><?php echo $lang->project->aclList[$project->acl];?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->project->whitelist;?></th>
<td>
<?php
$whitelist = explode(',', $project->whitelist);
foreach($whitelist as $groupID) if(isset($groups[$groupID])) echo $groups[$groupID] . '&nbsp;';
?>
</td>
</tr>
</table>
</fieldset>
<fieldset>
<legend><?php echo $lang->project->otherInfo?></legend>
<table class='table-1 a-left'>
<tr>
<th class='rowhead'><?php echo $lang->project->lblStats;?></th>
<td><?php printf($lang->project->stats, $project->totalHours, $project->totalEstimate, $project->totalConsumed, $project->totalLeft, 10)?></td>
</tr>
</table>
</fieldset>
</td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->project->status;?></th>
<td class='<?php echo $project->status;?>'><?php $lang->show($lang->project->statusList, $project->status);?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->project->PM;?></th>
<td><?php echo $users[$project->PM];?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->project->PO;?></th>
<td><?php echo $users[$project->PO];?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->project->QM;?></th>
<td><?php echo $users[$project->QM];?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->project->RM;?></th>
<td><?php echo $users[$project->RM];?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->project->products;?></th>
<td>
<?php foreach($products as $productID => $productName) echo html::a($this->createLink('product', 'browse', "productID=$productID"), $productName) . '<br />';?>
</td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->project->acl;?></th>
<td><?php echo $lang->project->aclList[$project->acl];?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->project->whitelist;?></th>
<td>
<?php
$whitelist = explode(',', $project->whitelist);
foreach($whitelist as $groupID) if(isset($groups[$groupID])) echo $groups[$groupID] . '&nbsp;';
?>
</td>
</tr>
</table>
</fieldset>
<fieldset>
<legend><?php echo $lang->project->otherInfo?></legend>
<table class='table-1 a-left'>
<tr>
<th class='rowhead'><?php echo $lang->project->lblStats;?></th>
<td><?php printf($lang->project->stats, $project->totalHours, $project->totalEstimate, $project->totalConsumed, $project->totalLeft, 10)?></td>
</tr>
</table>
</fieldset>
</td>
</tr>
</table>
<?php include '../../common/view/footer.html.php';?>