* finish task 2089.

This commit is contained in:
ChuJilu
2014-10-23 16:42:13 +08:00
parent 4c123e834c
commit 447af821e7
3 changed files with 33 additions and 7 deletions
+17
View File
@@ -1504,6 +1504,23 @@ class project extends control
}
}
/**
* batch unlink story.
*
* @param int $projectID
* @access public
* @return void
*/
public function batchUnlinkStory($projectID)
{
foreach($this->post->storyIDList as $storyID)
{
$this->project->unlinkStory($projectID, $storyID);
}
echo js::locate($this->createLink('project', 'story', "projectID=$projectID"));
exit;
}
/**
* Project dynamic.
*
+14 -5
View File
@@ -47,9 +47,9 @@
</thead>
<tbody>
<?php
$totalEstimate = 0;
$canBatchEdit = common::hasPriv('story', 'batchEdit');
$canBatchClose = common::hasPriv('story', 'batchClose');
$totalEstimate = 0;
$canBatchEdit = common::hasPriv('story', 'batchEdit');
$canBatchClose = common::hasPriv('story', 'batchClose');
?>
<?php foreach($stories as $key => $story):?>
<?php
@@ -114,12 +114,21 @@
$actionLink = $this->createLink('story', 'batchEdit', "productID=0&projectID=$project->id");
echo html::commonButton($lang->edit, "onclick=\"setFormAction('$actionLink')\"");
}
echo "<button id='moreAction' type='button' class='btn dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>";
echo "<ul class='dropdown-menu' id='moreActionMenu'>";
if($canBatchClose)
{
$actionLink = $this->createLink('story', 'batchClose', "productID=0&projectID=$project->id");
echo html::commonButton($lang->close, "onclick=\"setFormAction('$actionLink')\"");
$misc = "onclick=\"setFormAction('$actionLink')\"";
echo '<li>' . html::a('#', $lang->close, '', $misc) . '</li>';
}
echo '</div>';
if(common::hasPriv('story', 'batchUnlinkStory'))
{
$actionLink = $this->createLink('project', 'batchUnlinkStory', "projectID=$project->id");
$misc = "onclick=\"setFormAction('$actionLink')\"";
echo '<li>' . html::a('#', $lang->project->unlinkStory, '', $misc) . '</li>';
}
echo '</ul></div>';
}
echo "<div class='text'>" . $summary . '</div>';
?>
+2 -2
View File
@@ -23,11 +23,11 @@
<table class='table table-fixed table-form'>
<thead>
<tr>
<th class='w-30px'> <?php echo $lang->idAB;?></th>
<th class='w-50px'> <?php echo $lang->idAB;?></th>
<th> <?php echo $lang->story->title;?></th>
<th class='w-80px'> <?php echo $lang->story->status;?></th>
<th class='w-120px'><?php echo $lang->story->closedReason;?></th>
<th class='w-p30 '> <?php echo $lang->story->comment;?></th>
<th class='w-p40 '> <?php echo $lang->story->comment;?></th>
</tr>
</thead>
<?php foreach($storyIDList as $storyID):?>