Skip to content

Commit

Permalink
Merge pull request #1080 from joomla/feature/draft-pr-in-ui
Browse files Browse the repository at this point in the history
Show Draft PRs in UI
  • Loading branch information
Michael Babker committed Mar 10, 2020
2 parents 718a68a + a3f2250 commit b57440c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/App/Tracker/Model/IssuesModel.php
Expand Up @@ -76,7 +76,7 @@ protected function getAjaxListQuery()

$query->select(
'a.id, a.priority, a.issue_number, a.title, a.foreign_number, a.opened_date, a.status,
a.closed_date, a.modified_date, a.labels, a.merge_state, a.opened_by'
a.closed_date, a.modified_date, a.labels, a.merge_state, a.opened_by, a.is_draft'
);
$query->from($db->quoteName('#__issues', 'a'));

Expand Down
6 changes: 6 additions & 0 deletions templates/tracker/issue.index.twig
Expand Up @@ -100,6 +100,12 @@
</li>
{% endif %}

{% if item.is_draft %}
<li>
<span class="badge">Draft PR</span>
</li>
{% endif %}

{% if item.tests %}
<li>
<span class="badge"># of Successful Tests: {{ item.tests }}</span>
Expand Down
3 changes: 3 additions & 0 deletions templates/tracker/issues.index.twig
Expand Up @@ -108,6 +108,9 @@
[%= item.title %]
</a>
[% print(item.labelHtml,true); %]
[% if (item.is_draft) { %]
<span class="label">Draft PR</span>
[% } %]
[% if (item.categories.length) { %]
<br/>
[% for (var n=0, category; category=item.categories[n]; n++) { %]
Expand Down

0 comments on commit b57440c

Please sign in to comment.