Merge branch '15.0.beta3' of http://gitlab.zcorp.cc/easycorp/zentaopms into 15.0.beta3
This commit is contained in:
@@ -59,23 +59,28 @@ class projectrelease extends control
|
||||
* Browse releases.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param int $executionID
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function browse($projectID, $type = 'all')
|
||||
public function browse($projectID = 0, $executionID = 0, $type = 'all')
|
||||
{
|
||||
$this->session->set('releaseList', $this->app->getURI(true));
|
||||
$execution = $this->loadModel('execution')->getById($this->session->PRJ);
|
||||
commonModel::setAppObjectID('project', $projectID);
|
||||
|
||||
$this->view->title = $execution->name . $this->lang->colon . $this->lang->release->browse;
|
||||
$this->view->position[] = $this->lang->release->browse;
|
||||
$this->view->execution = $execution;
|
||||
$this->view->products = $this->loadModel('product')->getProducts($this->session->PRJ);
|
||||
$this->view->releases = $this->projectrelease->getList($projectID, $type);
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->type = $type;
|
||||
if($projectID) commonModel::setAppObjectID('project', $projectID);
|
||||
if($executionID) commonModel::setAppObjectID('execution', $executionID);
|
||||
|
||||
$this->view->title = $execution->name . $this->lang->colon . $this->lang->release->browse;
|
||||
$this->view->position[] = $this->lang->release->browse;
|
||||
$this->view->execution = $execution;
|
||||
$this->view->products = $this->loadModel('product')->getProducts($this->session->PRJ);
|
||||
$this->view->releases = $this->projectrelease->getList($projectID, $type);
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->executionID = $executionID;
|
||||
$this->view->type = $type;
|
||||
$this->view->from = $this->app->openApp;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div class="btn-toolbar pull-left">
|
||||
<?php
|
||||
echo html::a(inlink('browse', "projectID=$projectID&type=all"), "<span class='text'>{$lang->release->all}</span>" . ($type == 'all' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='allTab' class='btn btn-link" . ('all' == $type ? ' btn-active-text' : '') . "'");
|
||||
echo html::a(inlink('browse', "projectID=$projectID&type=normal"), "<span class='text'>{$lang->release->statusList['normal']}</span>" . ($type == 'normal' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='normalTab' class='btn btn-link" . ('normal' == $type ? ' btn-active-text' : '') . "'");
|
||||
echo html::a(inlink('browse', "projectID=$projectID&type=terminate"), "<span class='text'>{$lang->release->statusList['terminate']}</span>" . ($type == 'terminate' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='terminateTab' class='btn btn-link" . ('terminate' == $type ? ' btn-active-text' : '') . "'");
|
||||
echo html::a(inlink('browse', "projectID=$projectID&executionID=$executionID&type=all"), "<span class='text'>{$lang->release->all}</span>" . ($type == 'all' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='allTab' class='btn btn-link" . ('all' == $type ? ' btn-active-text' : '') . "' data-app='$from'");
|
||||
echo html::a(inlink('browse', "projectID=$projectID&executionID=$executionID&type=normal"), "<span class='text'>{$lang->release->statusList['normal']}</span>" . ($type == 'normal' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='normalTab' class='btn btn-link" . ('normal' == $type ? ' btn-active-text' : '') . "' data-app='$from'");
|
||||
echo html::a(inlink('browse', "projectID=$projectID&executionID=$executionID&type=terminate"), "<span class='text'>{$lang->release->statusList['terminate']}</span>" . ($type == 'terminate' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='terminateTab' class='btn btn-link" . ('terminate' == $type ? ' btn-active-text' : '') . "' data-app='$from'");
|
||||
?>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
@@ -33,7 +33,7 @@
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $lang->release->noRelease;?></span>
|
||||
<?php if(common::canModify('execution', $execution) and common::hasPriv('projectrelease', 'create')):?>
|
||||
<?php echo html::a($this->createLink('projectrelease', 'create'), "<i class='icon icon-plus'></i> " . $lang->release->create, '', "class='btn btn-info'");?>
|
||||
<?php echo html::a($this->createLink('projectrelease', 'create', "projectID=$projectID"), "<i class='icon icon-plus'></i> " . $lang->release->create, '', "class='btn btn-info'");?>
|
||||
<?php endif;?>
|
||||
</p>
|
||||
</div>
|
||||
@@ -63,7 +63,7 @@
|
||||
<td>
|
||||
<?php
|
||||
$flagIcon = $release->marker ? "<icon class='icon icon-flag red' title='{$lang->release->marker}'></icon> " : '';
|
||||
echo html::a(inlink('view', "release=$release->id"), $release->name) . $flagIcon;
|
||||
echo html::a(inlink('view', "release=$release->id"), $release->name, '', "data-app='$from'") . $flagIcon;
|
||||
?>
|
||||
</td>
|
||||
<td title='<?php echo $release->productName?>'><?php echo $release->productName?></td>
|
||||
|
||||
Reference in New Issue
Block a user