* Finish task #64967.
This commit is contained in:
@@ -473,7 +473,7 @@ class actionModel extends model
|
||||
$action->extra = '';
|
||||
if($names)
|
||||
{
|
||||
foreach($names as $id => $name) $action->extra .= common::hasPriv('story', 'view') ? html::a(helper::createLink('story', 'view', "storyID=$id"), "#$id " . $name) . ', ' : "#$id " . $name . ', ';
|
||||
foreach($names as $id => $name) $action->extra .= common::hasPriv('requriement', 'view') ? html::a(helper::createLink('story', 'view', "storyID=$id"), "#$id " . $name) . ', ' : "#$id " . $name . ', ';
|
||||
}
|
||||
$action->extra = trim(trim($action->extra), ',');
|
||||
}
|
||||
@@ -1531,6 +1531,12 @@ class actionModel extends model
|
||||
if(!empty($execution) and $execution->type == 'kanban') $action->objectLink = helper::createLink('execution', 'kanban', "executionID={$action->objectID}");
|
||||
}
|
||||
|
||||
if($action->objectType == 'story')
|
||||
{
|
||||
$story = $this->loadModel('story')->getByID($action->objectID);
|
||||
if(!empty($story)) $moduleName = $story->type;
|
||||
}
|
||||
|
||||
if($action->objectType == 'doclib')
|
||||
{
|
||||
$docLib = $this->dao->select('type,product,project,execution,deleted')->from(TABLE_DOCLIB)->where('id')->eq($action->objectID)->fetch();
|
||||
|
||||
@@ -129,9 +129,11 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
$tab = '';
|
||||
$tab = '';
|
||||
$canView = common::hasPriv($module, $methodName);
|
||||
if($action->objectType == 'meeting') $tab = $action->project ? "data-app='project'" : "data-app='my'";
|
||||
echo html::a($this->createLink($module, $methodName, $params), $action->objectName, '_self', "title='{$action->objectName}' $tab");
|
||||
if($module == 'requirement') $module = 'story';
|
||||
echo $canView ? html::a($this->createLink($module, $methodName, $params), $action->objectName, '_self', "title='{$action->objectName}' $tab") : "<span title='$action->objectName'>$action->objectName</span>";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
|
||||
@@ -89,8 +89,8 @@
|
||||
</td>
|
||||
<td class='c-pri'><span class='label-pri <?php echo 'label-pri-' . $story->pri;?>' title='<?php echo zget($lang->story->priList, $story->pri, $story->pri);?>'><?php echo zget($lang->story->priList, $story->pri, $story->pri);?></span></td>
|
||||
<td class='c-name nobr <?php if(!empty($story->children)) echo "has-child" ?>'>
|
||||
<?php echo html::a($storyLink, $story->title, null, "style='color: $story->color' data-group='product'");?>
|
||||
<?php if(!empty($story->children)) echo '<a class="story-toggle" data-id="' . $story->id . '"><i class="icon icon-angle-double-right"></i></a>';;?>
|
||||
<?php echo common::hasPriv('requirement', 'view') ? html::a($storyLink, $story->title, null, "style='color: $story->color' data-group='product'") : "<span title='$story->title'>$story->title</span>";?>
|
||||
<?php if(!empty($story->children)) echo '<a class="story-toggle" data-id="' . $story->id . '"><i class="icon icon-angle-double-right"></i></a>';?>
|
||||
</td>
|
||||
<td class='c-product'><?php echo $story->productTitle;?></td>
|
||||
<td class='c-user'><?php echo zget($users, $story->openedBy);?></td>
|
||||
@@ -102,11 +102,11 @@
|
||||
if($canBeChanged)
|
||||
{
|
||||
$vars = "story={$story->id}";
|
||||
echo common::buildIconButton('story', 'change', $vars, $story, 'list', 'alter', '', 'iframe', true);
|
||||
echo common::buildIconButton('story', 'review', $vars, $story, 'list', 'search', '', 'iframe', true);
|
||||
echo common::buildIconButton('story', 'recall', $vars, $story, 'list', 'undo', 'hiddenwin', '', '', '', $lang->story->recall);
|
||||
echo common::buildIconButton('story', 'close', $vars, $story, 'list', '', '', 'iframe', true);
|
||||
echo common::buildIconButton('story', 'edit', $vars, $story, 'list', '', '', 'iframe', true, "data-width='95%'");
|
||||
if(common::hasPriv('requirement', 'change')) echo common::buildIconButton('story', 'change', $vars, $story, 'list', 'alter', '', 'iframe', true);
|
||||
if(common::hasPriv('requirement', 'review')) echo common::buildIconButton('story', 'review', $vars, $story, 'list', 'search', '', 'iframe', true);
|
||||
if(common::hasPriv('requirement', 'recall')) echo common::buildIconButton('story', 'recall', $vars, $story, 'list', 'undo', 'hiddenwin', '', '', '', $lang->story->recall);
|
||||
if(common::hasPriv('requirement', 'close')) echo common::buildIconButton('story', 'close', $vars, $story, 'list', '', '', 'iframe', true);
|
||||
if(common::hasPriv('requirement', 'edit')) echo common::buildIconButton('story', 'edit', $vars, $story, 'list', '', '', 'iframe', true, "data-width='95%'");
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $storyCount = 0;?>
|
||||
<?php $canViewUR = common::hasPriv('requirement', 'view');;?>
|
||||
<?php foreach($stories2Link as $story2Link):?>
|
||||
<?php $storyLink = $this->createLink('story', 'view', "storyID=$story2Link->id");?>
|
||||
<tr>
|
||||
@@ -55,10 +56,10 @@
|
||||
<input type='checkbox' name='stories[]' value='<?php echo $story2Link->id;?>'/>
|
||||
<label></label>
|
||||
</div>
|
||||
<?php echo html::a($storyLink, sprintf('%03d', $story2Link->id));?>
|
||||
<?php echo $canViewUR ? html::a($storyLink, sprintf('%03d', $story2Link->id)) : sprintf('%03d', $story2Link->id);?>
|
||||
</td>
|
||||
<td class='c-pri'><span class='label-pri <?php echo 'label-pri-' . $story2Link->pri?>' title='<?php echo zget($lang->story->priList, $story2Link->pri, $story2Link->pri);?>'><?php echo zget($lang->story->priList, $story2Link->pri, $story2Link->pri);?></span></td>
|
||||
<td class='text-left nobr' title="<?php echo $story2Link->title?>"><?php echo html::a($storyLink, $story2Link->title, '_blank');?></td>
|
||||
<td class='text-left nobr' title="<?php echo $story2Link->title?>"><?php echo $canViewUR ? html::a($storyLink, $story2Link->title, '_blank') : $story2Link->title;?></td>
|
||||
<td><?php echo $this->processStatus('story', $story2Link);?></td>
|
||||
<?php if($story->type == 'requirement'):?>
|
||||
<td><?php echo zget($lang->story->stageList, $story2Link->stage);?></td>
|
||||
|
||||
@@ -56,15 +56,17 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($tracks as $key => $requirement):?>
|
||||
<?php $track = ($key == 'noRequirement') ? $requirement : $requirement->track;?>
|
||||
<?php $track = ($key == 'noRequirement') ? $requirement : $requirement->track;?>
|
||||
<?php $rowspan = count($track);?>
|
||||
<?php $title = $lang->story->noRequirement;?>
|
||||
<tr>
|
||||
<?php if($config->URAndSR):?>
|
||||
<td <?php if($rowspan != 0) echo "rowspan=" . $rowspan;?> class='requirement' title='<?php echo $key != 'noRequirement' ? $requirement->title : $lang->story->noRequirement;?>'>
|
||||
<?php if($key != 'noRequirement'):?>
|
||||
<span class="label label-primary label-outline"><?php echo zget($lang->story->statusList, $requirement->status);?></span>
|
||||
<?php $title = common::hasPriv($requirement->type, 'view') ? html::a($this->createLink('story', 'view', "storyID=$requirement->id"), $requirement->title, '', "title=$requirement->title data-app='$tab'") : $requirement->title;?>
|
||||
<?php endif;?>
|
||||
<?php echo $key == 'noRequirement' ? $lang->story->noRequirement : html::a($this->createLink($module, 'view', "storyID=$requirement->id"), $requirement->title, '', "title=$requirement->title data-app='$tab'");?>
|
||||
<?php echo $title;?>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
<?php if(count($track) != 0):?>
|
||||
|
||||
@@ -403,10 +403,11 @@
|
||||
<ul class="list-unstyled">
|
||||
<?php
|
||||
$relation = array();
|
||||
$canViewLinkStory = $story->type == 'story' ? common::hasPriv('requirement', 'view') : common::hasPriv('story', 'view');
|
||||
foreach($relations as $item) $relation[$item->id] = $item->title;
|
||||
foreach($relation as $id => $title)
|
||||
{
|
||||
echo "<li title='$title'>" . html::a($this->createLink('story', 'view', "id=$id&version=0¶m=0&storyType=$story->type", '', true), "#$id $title", '', "class='iframe' data-width='80%'");
|
||||
echo "<li title='$title'>" . ($canViewLinkStory ? html::a($this->createLink('story', 'view', "id=$id&version=0¶m=0&storyType=$story->type", '', true), "#$id $title", '', "class='iframe' data-width='80%'") : "#$id $title");
|
||||
echo html::a($this->createLink('story', 'linkStory', "storyID=$story->id&type=remove&linkedID=$id"), '<i class="icon icon-close"></i>', 'hiddenwin', "class='deleter hide removeButton'");
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user