* Adjust edit and delete button in view page of plan, release and build module.
This commit is contained in:
@@ -63,7 +63,6 @@ zentaoxx:
|
||||
cp -r xuanxuan/config/* zentaoxx/config/
|
||||
cp -r xuanxuan/module/* zentaoxx/module/
|
||||
cp -r xuanxuan/www/* zentaoxx/www/
|
||||
mv zentaoxx/www/xuanxuan.php zentaoxx/www/x.php
|
||||
sed -i 's/site,//' zentaoxx/module/chat/model.php
|
||||
sed -i 's/admin, g/g/' zentaoxx/module/chat/model.php
|
||||
sed -i '/password = md5/d' zentaoxx/module/chat/control.php
|
||||
|
||||
@@ -39,8 +39,8 @@ tbody tr td:first-child input{display:none;}
|
||||
<?php
|
||||
if(!$build->deleted)
|
||||
{
|
||||
common::printIcon('build', 'edit', "buildID=$build->id", $build);
|
||||
common::printIcon('build', 'delete', "buildID=$build->id", $build, 'button', 'trash', 'hiddenwin');
|
||||
if(common::hasPriv('build', 'edit')) echo html::a($this->createLink('build', 'edit', "buildID=$build->id"), "<i class='icon-common-edit icon-edit'></i> " . $this->lang->edit, '', "class='btn btn-link' title='{$this->lang->edit}'");
|
||||
if(common::hasPriv('build', 'delete')) echo html::a($this->createLink('build', 'delete', "buildID=$build->id"), "<i class='icon-common-delete icon-trash'></i> " . $this->lang->delete, '', "class='btn btn-link' title='{$this->lang->delete}' target='hiddenwin'");
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
@@ -37,9 +37,9 @@
|
||||
<?php
|
||||
if(!$plan->deleted)
|
||||
{
|
||||
if(common::hasPriv('productplan', 'create') and $plan->parent <= '0') echo html::a($this->createLink('productplan', 'create', "product={$plan->product}&branch={$plan->branch}&parent={$plan->id}"), "<i class='icon-treemap-alt'></i>" . $this->lang->productplan->children , '', "class='btn btn-link' title='{$this->lang->productplan->children}'");
|
||||
common::printIcon('productplan', 'edit', "planID=$plan->id", $plan);
|
||||
common::printIcon('productplan', 'delete', "planID=$plan->id", $plan, 'button', 'trash', 'hiddenwin');
|
||||
if(common::hasPriv('productplan', 'create') and $plan->parent <= '0') echo html::a($this->createLink('productplan', 'create', "product={$plan->product}&branch={$plan->branch}&parent={$plan->id}"), "<i class='icon-treemap-alt'></i> " . $this->lang->productplan->children , '', "class='btn btn-link' title='{$this->lang->productplan->children}'");
|
||||
if(common::hasPriv('productplan', 'edit')) echo html::a($this->createLink('productplan', 'edit', "planID=$plan->id"), "<i class='icon-common-edit icon-edit'></i> " . $this->lang->edit, '', "class='btn btn-link' title='{$this->lang->edit}'");
|
||||
if(common::hasPriv('productplan', 'delete')) echo html::a($this->createLink('productplan', 'delete', "planID=$plan->id"), "<i class='icon-common-delete icon-trash'></i> " . $this->lang->delete, '', "class='btn btn-link' title='{$this->lang->delete}' target='hiddenwin'");
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
@@ -57,16 +57,27 @@
|
||||
<div id='stories' class='tab-pane <?php if($type == 'story') echo 'active'?>'>
|
||||
<?php $canOrder = common::hasPriv('project', 'storySort');?>
|
||||
<div class='actions'>
|
||||
<?php
|
||||
if(!$plan->deleted)
|
||||
{
|
||||
$batchMisc = common::hasPriv('story', 'batchCreate') ? 'btn btn-link' : "disabled";
|
||||
$batchLink = common::hasPriv('story', 'batchCreate') ? $this->createLink('story', 'batchCreate', "productID=$plan->product&branch=$plan->branch&moduleID=0&story=0&project=0&plan={$plan->id}") : '#';
|
||||
echo html::a($batchLink, "<i class='icon icon-sitemap'></i><span class='text'>" . $lang->story->batchCreate . '</span>', '', "class='$batchMisc'");
|
||||
common::printIcon('story', 'create', "productID=$plan->product&branch=$plan->branch&moduleID=0&storyID=0&projectID=0&bugID=0&planID=$plan->id", $plan, 'button', 'plus');
|
||||
}
|
||||
if(common::hasPriv('productplan', 'linkStory')) echo html::a("javascript:showLink($plan->id, \"story\")", '<i class="icon-link"></i> ' . $lang->productplan->linkStory, '', "class='btn btn-primary'");
|
||||
?>
|
||||
<?php if(!$plan->deleted):?>
|
||||
<div class="btn-group">
|
||||
<div class='drop-down dropdown-hover'>
|
||||
<?php
|
||||
$createLink = common::hasPriv('story', 'create') ? $this->createLink('story', 'create', "productID=$plan->product&branch=$plan->branch&moduleID=0&storyID=0&projectID=0&bugID=0&planID=$plan->id") : '#';
|
||||
$createMisc = common::hasPriv('story', 'create') ? 'btn btn-secondary' : " btn btn-secondary disabled";
|
||||
echo html::a($createLink, "<i class='icon icon-plus'></i><span class='text'>" . $lang->story->create . "</span><span class='caret'>", '', "class='$createMisc'");
|
||||
?>
|
||||
<ul class='dropdown-menu'>
|
||||
<?php $disabled = common::hasPriv('story', 'batchCreate') ? '' : "class='disabled'";?>
|
||||
<li <?php echo $disabled?>>
|
||||
<?php
|
||||
$batchLink = common::hasPriv('story', 'batchCreate') ? $this->createLink('story', 'batchCreate', "productID=$plan->product&branch=$plan->branch&moduleID=0&story=0&project=0&plan={$plan->id}") : '#';
|
||||
echo html::a($batchLink, "<span class='text'>" . $lang->story->batchCreate . '</span>', '', "class='btn btn-link'");
|
||||
?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php if(common::hasPriv('productplan', 'linkStory')) echo html::a("javascript:showLink($plan->id, \"story\")", '<i class="icon-link"></i> ' . $lang->productplan->linkStory, '', "class='btn btn-primary'");?>
|
||||
</div>
|
||||
<?php if(common::hasPriv('productplan', 'linkStory')):?>
|
||||
<div class='linkBox cell hidden'></div>
|
||||
|
||||
@@ -36,10 +36,10 @@
|
||||
if(common::hasPriv('release', 'changeStatus', $release))
|
||||
{
|
||||
$changedStatus = $release->status == 'normal' ? 'terminate' : 'normal';
|
||||
echo html::a(inlink('changeStatus', "releaseID=$release->id&status=$changedStatus"), '<i class="icon-' . ($release->status == 'normal' ? 'pause' : 'play') . '"></i> ', 'hiddenwin', "class='btn btn-link' title='{$lang->release->changeStatusList[$changedStatus]}'");
|
||||
echo html::a(inlink('changeStatus', "releaseID=$release->id&status=$changedStatus"), '<i class="icon-' . ($release->status == 'normal' ? 'pause' : 'play') . '"></i> ' . $lang->release->changeStatusList[$changedStatus], 'hiddenwin', "class='btn btn-link' title='{$lang->release->changeStatusList[$changedStatus]}'");
|
||||
}
|
||||
common::printIcon('release', 'edit', "releaseID=$release->id", $release);
|
||||
common::printIcon('release', 'delete', "releaseID=$release->id", $release, 'button', 'trash', 'hiddenwin');
|
||||
if(common::hasPriv('release', 'edit')) echo html::a($this->createLink('release', 'edit', "releaseID=$release->id"), "<i class='icon-common-edit icon-edit'></i> " . $this->lang->edit, '', "class='btn btn-link' title='{$this->lang->edit}'");
|
||||
if(common::hasPriv('release', 'delete')) echo html::a($this->createLink('release', 'delete', "releaseID=$release->id"), "<i class='icon-common-delete icon-trash'></i> " . $this->lang->delete, '', "class='btn btn-link' title='{$this->lang->delete}' target='hiddenwin'");
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
@@ -343,8 +343,20 @@
|
||||
<div class="detail-content">
|
||||
<table class='table table-data'>
|
||||
<?php $widthClass = $app->getClientLang() == 'en' ? 'w-90px' : 'w-70px';?>
|
||||
<tr class='<?php echo $widthClass;?>'>
|
||||
<th><?php echo $lang->task->estimate;?></th>
|
||||
<td><?php echo $task->estimate . $lang->workingHour;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='<?php echo $widthClass;?>'><?php echo $lang->task->estStarted;?></th>
|
||||
<th><?php echo $lang->task->consumed;?></th>
|
||||
<td><?php echo round($task->consumed, 2) . $lang->workingHour;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->left;?></th>
|
||||
<td><?php echo $task->left . $lang->workingHour;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->estStarted;?></th>
|
||||
<td><?php echo $task->estStarted;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -360,18 +372,6 @@
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->estimate;?></th>
|
||||
<td><?php echo $task->estimate . $lang->workingHour;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->consumed;?></th>
|
||||
<td><?php echo round($task->consumed, 2) . $lang->workingHour;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->left;?></th>
|
||||
<td><?php echo $task->left . $lang->workingHour;?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</details>
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
<?php
|
||||
/* Set the error reporting. */
|
||||
error_reporting(E_ALL);
|
||||
|
||||
/* Start output buffer. */
|
||||
ob_start();
|
||||
|
||||
/* Define the run mode as front. */
|
||||
define('RUN_MODE', 'upgrade');
|
||||
|
||||
/* Load the framework. */
|
||||
include '../framework/xuanxuan.class.php';
|
||||
include '../framework/control.class.php';
|
||||
include '../framework/model.class.php';
|
||||
include '../framework/helper.class.php';
|
||||
|
||||
/* Log the time and define the run mode. */
|
||||
$startTime = getTime();
|
||||
|
||||
/* Run the app. */
|
||||
$appName = 'sys';
|
||||
$app = xuanxuan::createApp($appName, dirname(dirname(__FILE__)), 'xuanxuan');
|
||||
$common = $app->loadCommon();
|
||||
$common->loadModel('chat')->upgrade();
|
||||
|
||||
/* Flush the buffer. */
|
||||
echo helper::removeUTF8Bom(ob_get_clean());
|
||||
Reference in New Issue
Block a user