Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Commit

Permalink
Fix bug: Readable of subtasks
Browse files Browse the repository at this point in the history
Fix to show HTML block if subtask is exist,
although not available for viewing.
  • Loading branch information
githubjeka committed May 2, 2017
1 parent 72d23b7 commit 847fe6b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions views/issue/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,16 @@ class="img-rounded tt img_margin"
</div>
<?php endif ?>

<?php if (!empty($issue->subtasks)) : ?>
<?php
$dataProvider = new \yii\data\ActiveDataProvider(['query' => $issue->getSubtasks()->readable()]);
if ($dataProvider->getTotalCount() > 0) : ?>
<div class="panel">
<div class="panel-body">
<?= Yii::t('TrackerIssuesModule.views', 'This issue has subtasks') ?>

<?= $this->render('__gridView', [
'contentContainer' => $issue->content->getContainer(),
'dataProvider' => new \yii\data\ActiveDataProvider(['query' => $issue->getSubtasks()->readable()]),
'dataProvider' => $dataProvider,
'searchModel' => null,
]) ?>

Expand Down

0 comments on commit 847fe6b

Please sign in to comment.