This commit is contained in:
tianshujie98
2020-12-23 13:53:34 +08:00
6 changed files with 3 additions and 24 deletions
+1 -2
View File
@@ -15,6 +15,7 @@
<div class="btn-toolbar pull-left">
<?php foreach($lang->product->featureBar['all'] as $key => $label):?>
<?php $active = $key == $browseType ? 'btn-active-text' : '';?>
<?php if($key == $browseType) $label .= " <span class='label label-light label-badge'>{$pager->recTotal}</span>";?>
<?php echo html::a(inlink("pgmproduct", "programID=$program->id&browseType=$key&orderBy=$orderBy"), "<span class='text'>{$label}</span>", '', "class='btn btn-link $active'");?>
<?php endforeach;?>
</div>
@@ -40,7 +41,6 @@
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<th class="text-left"><?php common::printOrderLink('name', $orderBy, $vars, $lang->product->name);?></th>
<th class='w-200px text-left' title='<?php echo $lang->product->program;?>'><?php echo $lang->product->program;?></th>
<th class='w-120px' title='<?php echo $lang->product->activeStoriesTitle;?>'><?php echo $lang->product->activeStories;?></th>
<th class='w-120px' title='<?php echo $lang->product->changedStoriesTitle;?>'><?php echo $lang->product->changedStories;?></th>
<th class='w-100px' title='<?php echo $lang->product->draftStoriesTitle;?>'><?php echo $lang->product->draftStories;?></th>
@@ -65,7 +65,6 @@
<?php endif;?>
</td>
<td class="c-name" title='<?php echo $product->name?>'><?php echo html::a($this->createLink('product', 'browse', 'product=' . $product->id), $product->name);?></td>
<td class="c-name"><?php echo $program->name;?></td>
<td><?php echo $product->stories['active'];?></td>
<td><?php echo $product->stories['changed'];?></td>
<td><?php echo $product->stories['draft'];?></td>
+1 -1
View File
@@ -3,7 +3,7 @@ $config->release = new stdclass();
$config->release->create = new stdclass();
$config->release->edit = new stdclass();
$config->release->create->requiredFields = 'name,date';
$config->release->edit->requiredFields = 'name,date,build';
$config->release->edit->requiredFields = 'name,date';
$config->release->editor = new stdclass();
$config->release->editor->create = array('id' => 'desc', 'tools' => 'simpleTools');
+1 -10
View File
@@ -77,15 +77,9 @@ class release extends control
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('view', "releaseID=$releaseID")));
}
$builds = $this->loadModel('build')->getProductBuildPairs($productID, $branch, 'notrunk|withbranch', false);
$releaseBuilds = $this->release->getReleaseBuilds($productID, $branch);
foreach($releaseBuilds as $build) unset($builds[$build]);
unset($builds['trunk']);
$this->commonAction($productID, $branch);
$this->view->title = $this->view->product->name . $this->lang->colon . $this->lang->release->create;
$this->view->position[] = $this->lang->release->create;
$this->view->builds = $builds;
$this->view->productID = $productID;
$this->view->lastRelease = $this->release->getLast($productID, $branch);
$this->display();
@@ -119,16 +113,13 @@ class release extends control
$this->loadModel('bug');
$this->loadModel('build');
/* Get release and build. */
/* Get release. */
$release = $this->release->getById((int)$releaseID);
$this->commonAction($release->product, $release->branch);
$build = $this->build->getById($release->build);
$this->view->title = $this->view->product->name . $this->lang->colon . $this->lang->release->edit;
$this->view->position[] = $this->lang->release->edit;
$this->view->release = $release;
$this->view->build = $build;
$this->view->builds = $this->loadModel('build')->getProductBuildPairs($release->product, $release->branch, 'notrunk|withbranch', false);
$this->display();
}
-3
View File
@@ -114,9 +114,6 @@ class releaseModel extends model
$branch = (int)$branch;
$buildID = 0;
/* Check build if build is required. */
if(strpos($this->config->release->create->requiredFields, 'build') !== false and $this->post->build == false) return dao::$errors[] = sprintf($this->lang->error->notempty, $this->lang->release->build);
/* Check date must be not more than today. */
if($this->post->date > date('Y-m-d')) return dao::$errors[] = $this->lang->release->errorDate;
-4
View File
@@ -31,10 +31,6 @@
<?php if($lastRelease) echo '(' . $lang->release->last . ': ' . $lastRelease->name . ')';?>
</td>
</tr>
<tr>
<th><?php echo $lang->release->build;?></th>
<td><?php echo html::select('build', $builds, '', "class='form-control chosen'");?></td><td></td>
</tr>
<tr>
<th><?php echo $lang->release->date;?></th>
<td><?php echo html::input('date', helper::today(), "class='form-control form-date' required");?></td><td></td>
-4
View File
@@ -35,10 +35,6 @@
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->release->build;?></th>
<td><?php echo html::select('build', $builds, $release->build, "class='form-control chosen' required"); ?></td><td></td>
</tr>
<tr>
<th><?php echo $lang->release->date;?></th>
<td><?php echo html::input('date', $release->date, "class='form-control form-date' required");?></td><td></td>