* Finish task #8194.
This commit is contained in:
+17
-12
@@ -1576,6 +1576,10 @@ class project extends control
|
||||
$project = $this->project->getById($projectID, true);
|
||||
if(!$project) die(js::error($this->lang->notFound) . js::locate('back'));
|
||||
|
||||
/* Determines whether an object is editable. */
|
||||
$changeAllowed = true;
|
||||
if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $changeAllowed = false;
|
||||
|
||||
$products = $this->project->getProducts($project->id);
|
||||
$linkedBranches = array();
|
||||
foreach($products as $product)
|
||||
@@ -1600,18 +1604,19 @@ class project extends control
|
||||
$this->view->position[] = html::a($this->createLink('project', 'browse', "projectID=$projectID"), $project->name);
|
||||
$this->view->position[] = $this->view->title;
|
||||
|
||||
$this->view->project = $project;
|
||||
$this->view->products = $products;
|
||||
$this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products), '', $linkedBranches);
|
||||
$this->view->planGroups = $this->project->getPlans($products);
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
$this->view->actions = $this->loadModel('action')->getList('project', $projectID);
|
||||
$this->view->dynamics = $this->loadModel('action')->getDynamic('all', 'all', 'date_desc', $pager, 'all', $projectID);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->teamMembers = $this->project->getTeamMembers($projectID);
|
||||
$this->view->docLibs = $this->loadModel('doc')->getLibsByObject('project', $projectID);
|
||||
$this->view->statData = $this->project->statRelatedData($projectID);
|
||||
$this->view->chartData = $chartData;
|
||||
$this->view->project = $project;
|
||||
$this->view->products = $products;
|
||||
$this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products), '', $linkedBranches);
|
||||
$this->view->planGroups = $this->project->getPlans($products);
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
$this->view->actions = $this->loadModel('action')->getList('project', $projectID);
|
||||
$this->view->dynamics = $this->loadModel('action')->getDynamic('all', 'all', 'date_desc', $pager, 'all', $projectID);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->teamMembers = $this->project->getTeamMembers($projectID);
|
||||
$this->view->docLibs = $this->loadModel('doc')->getLibsByObject('project', $projectID);
|
||||
$this->view->statData = $this->project->statRelatedData($projectID);
|
||||
$this->view->chartData = $chartData;
|
||||
$this->view->changeAllowed = $changeAllowed;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<?php echo !empty($story->verify) ? $story->verify : "<div class='text-center text-muted'>" . $lang->noData . '</div>';?>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo $this->fetch('file', 'printFiles', array('files' => $story->files, 'fieldset' => 'true'));?>
|
||||
<?php echo $this->fetch('file', 'printFiles', array('files' => $story->files, 'fieldset' => 'true', 'object' => $story));?>
|
||||
|
||||
<details class="detail" open>
|
||||
<summary class="detail-title"><?php echo $lang->story->legendBasicInfo;?></summary>
|
||||
@@ -341,7 +341,7 @@
|
||||
</table>
|
||||
</div>
|
||||
</details>
|
||||
<?php $actionFormLink = $this->createLink('action', 'comment', "objectType=story&objectID=$story->id");?>
|
||||
<?php if(common::checkObjectChangeAllowed('story', $story)) $actionFormLink = $this->createLink('action', 'comment', "objectType=story&objectID=$story->id");?>
|
||||
<?php include '../../common/view/action.html.php';?>
|
||||
<script>
|
||||
<?php if(isset($pageJS)) echo $pageJS;?>
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<div class='detail-content article-content'>
|
||||
<?php echo (!empty($task->storySpec) || !empty($task->storyFiles)) ? $task->storySpec : "<div class='text-center text-muted'>" . $lang->noData . '</div>';?>
|
||||
</div>
|
||||
<?php echo $this->fetch('file', 'printFiles', array('files' => $task->storyFiles, 'fieldset' => 'false'));?>
|
||||
<?php echo $this->fetch('file', 'printFiles', array('files' => $task->storyFiles, 'fieldset' => 'false', 'object' => $task));?>
|
||||
</div>
|
||||
<div class='detail' open>
|
||||
<div class='detail-title'><?php echo $lang->task->storyVerify;?></div>
|
||||
@@ -78,8 +78,8 @@
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php endif;?>
|
||||
<?php echo $this->fetch('file', 'printFiles', array('files' => $task->files, 'fieldset' => 'true'));?>
|
||||
<?php $actionFormLink = $this->createLink('action', 'comment', "objectType=task&objectID=$task->id");?>
|
||||
<?php echo $this->fetch('file', 'printFiles', array('files' => $task->files, 'fieldset' => 'true', 'object' => $task));?>
|
||||
<?php if(common::checkObjectChangeAllowed('task', $task)) $actionFormLink = $this->createLink('action', 'comment', "objectType=task&objectID=$task->id");?>
|
||||
<?php include '../../common/view/action.html.php';?>
|
||||
<script>
|
||||
<?php if(isset($pageJS)) echo $pageJS;?>
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
<?php $j++;?>
|
||||
<?php endforeach;?>
|
||||
<div class="col-xs-6">
|
||||
<?php common::printLink('project', 'manageMembers', "projectID=$project->id", "<i class='icon icon-plus hl-primary text-primary'></i> " . $lang->project->manageMembers, '', "class='text-muted'");?>
|
||||
<?php if($changeAllowed) common::printLink('project', 'manageMembers', "projectID=$project->id", "<i class='icon icon-plus hl-primary text-primary'></i> " . $lang->project->manageMembers, '', "class='text-muted'");?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
@@ -133,7 +133,7 @@
|
||||
<?php $i++;?>
|
||||
<?php endforeach;?>
|
||||
<div class="col-xs-6">
|
||||
<?php common::printLink('doc', 'createLib', "type=project&objectID=$project->id", "<i class='icon icon-plus hl-primary text-primary'></i> " . $lang->doc->createLib, '', "class='text-muted iframe' data-width='1000px'");?>
|
||||
<?php if($changeAllowed) common::printLink('doc', 'createLib', "type=project&objectID=$project->id", "<i class='icon icon-plus hl-primary text-primary'></i> " . $lang->doc->createLib, '', "class='text-muted iframe' data-width='1000px'");?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user