Merge branch 'sprint/181_liumengyi_addChildLabel' into 'master'
* Modify print label code of plan list. See merge request easycorp/zentaopms!1212
This commit is contained in:
@@ -68,7 +68,7 @@ class productplan extends control
|
||||
|
||||
if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $planID));
|
||||
if(isonlybody()) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'callback' => 'parent.refreshPlan()'));
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('productplan', 'browse', "productID=$productID&branch=$branchID")));
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('productplan', 'browse', "productID=$productID&branch=$branchID&browseType=wait")));
|
||||
}
|
||||
|
||||
$this->commonAction($productID, $branchID);
|
||||
|
||||
@@ -17,16 +17,18 @@ td.c-branch {overflow: hidden; text-align: left !important; text-overflow: ellip
|
||||
|
||||
.c-title {width: 160px;}
|
||||
.c-branch {width: 100px;}
|
||||
.c-story {width: 80px;}
|
||||
.c-story, .c-status {width: 80px;}
|
||||
.c-execution {width: 50px !important;}
|
||||
.c-bug, .c-hour {width: 60px;}
|
||||
|
||||
.plan-name {position: relative; display: flex; align-items: center;}
|
||||
.plan-name > span {flex: none;}
|
||||
|
||||
.c-title.has-child > .plan-name.has-suffix > a, .c-title.has-child > .plan-name.has-prefix > a {overflow:hidden; max-width: calc(100% - 70px);}
|
||||
.plan-name.has-suffix > a, .plan-name.has-prefix > a {overflow:hidden; max-width: calc(100% - 46px);}
|
||||
#productplanList .plan-name > .label.label-danger {margin-left:3px; }
|
||||
#productplanList .c-title.has-child > .plan-name.expired > a {overflow:hidden; max-width: calc(100% - 62px);}
|
||||
#productplanList .c-title.has-child > .plan-name > a {overflow:hidden; max-width: calc(100% - 16px);}
|
||||
#productplanList .c-title > .plan-name.expired > a {overflow:hidden; max-width: calc(100% - 46px);}
|
||||
#productplanList .plan-name.expired > .label.label-danger {margin-left:3px; }
|
||||
#productplanList .plan-name > .label.label-light {margin-right:3px; }
|
||||
|
||||
.switchButton {background: #fff !important;}
|
||||
.panel-actions {position: relative; padding: 0 0; padding-top: 1px;}
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
</th>
|
||||
<th class='c-title'><?php common::printOrderLink('title', $orderBy, $vars, $lang->productplan->title);?></th>
|
||||
<?php if($browseType == 'all'):?>
|
||||
<th><?php common::printOrderLink('status', $orderBy, $vars, $lang->productplan->status);?></th>
|
||||
<th class='c-status'><?php common::printOrderLink('status', $orderBy, $vars, $lang->productplan->status);?></th>
|
||||
<?php endif;?>
|
||||
<?php if($this->session->currentProductType != 'normal'):?>
|
||||
<th class='c-branch'><?php common::printOrderLink('branch',$orderBy, $vars, $lang->productplan->branch);?></th>
|
||||
@@ -111,17 +111,22 @@
|
||||
<?php echo sprintf('%03d', $plan->id);?>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
<td class='c-title text-left<?php if($plan->parent == '-1') echo ' has-child';?>' title="<?php echo $plan->title?>">
|
||||
<td class='c-title text-left<?php if(isset($plan->children)) echo ' has-child';?>' title="<?php echo $plan->title?>">
|
||||
<?php
|
||||
$prefix = '';
|
||||
$suffix = '';
|
||||
if($plan->parent > 0 and !isset($plans[$plan->parent])) $prefix = "<span class='label label-badge label-light' title='{$this->lang->productplan->children}'>{$this->lang->productplan->childrenAB}</span>";
|
||||
if($plan->end < $today and in_array($plan->status, array('wait', 'doing'))) $suffix = "<span class='label label-danger label-badge'>{$this->lang->productplan->expired}</span>";
|
||||
if($plan->parent == '-1' and isset($plan->children)) $suffix .= '<a class="task-toggle" data-id="' . $plan->id . '"><i class="icon icon-angle-double-right"></i></a>';
|
||||
if(!empty($suffix)) echo '<div class="plan-name has-prefix has-suffix">';
|
||||
if(!empty($prefix)) echo $prefix;
|
||||
$class = '';
|
||||
$expired = '';
|
||||
if($plan->end < $today and in_array($plan->status, array('wait', 'doing')))
|
||||
{
|
||||
$class .= ' expired';
|
||||
$expired = "<span class='label label-danger label-badge'>{$this->lang->productplan->expired}</span>";
|
||||
}
|
||||
|
||||
echo "<div class='plan-name has-prefix {$class}'>";
|
||||
if($plan->parent > 0 and !isset($plans[$plan->parent])) echo "<span class='label label-badge label-light' title='{$this->lang->productplan->children}'>{$this->lang->productplan->childrenAB}</span>";
|
||||
echo html::a(inlink('view', "id=$plan->id"), $plan->title);
|
||||
if(!empty($suffix)) echo $suffix . '</div>';
|
||||
if(!empty($expired)) echo $expired;
|
||||
if(isset($plan->children)) echo '<a class="task-toggle" data-id="' . $plan->id . '"><i class="icon icon-angle-double-right"></i></a>';
|
||||
echo '</div>';
|
||||
?>
|
||||
</td>
|
||||
<?php if($browseType == 'all'):?>
|
||||
|
||||
Reference in New Issue
Block a user