diff options
author | Gusted <williamzijl7@hotmail.com> | 2022-07-10 00:17:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-09 17:17:04 -0500 |
commit | 87c563b706b11af82968dddaa8100befcf7c9b75 (patch) | |
tree | 2cd37b5030f50256dc86db9393513db2825d5766 | |
parent | 11c074814611adfba9e04839b9743ac58d11871e (diff) | |
download | gitea-87c563b706b11af82968dddaa8100befcf7c9b75.tar.gz gitea-87c563b706b11af82968dddaa8100befcf7c9b75.zip |
Use dedicated draft PR icon when possible (#20303)
* Use dedicated draft PR icon when possible
- Currently the generic pull-request icon is used for draft PR's. This
patch changes that by using the dedicated icon for this.
- Resolves #20296
* Use draft title
-rw-r--r-- | options/locale/locale_en-US.ini | 1 | ||||
-rw-r--r-- | templates/repo/issue/view_title.tmpl | 6 | ||||
-rw-r--r-- | templates/shared/issuelist.tmpl | 6 |
3 files changed, 11 insertions, 2 deletions
diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 464a7d396c..36e2ae677b 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -1303,6 +1303,7 @@ issues.previous = Previous issues.next = Next issues.open_title = Open issues.closed_title = Closed +issues.draft_title = Draft issues.num_comments = %d comments issues.commented_at = `commented <a href="#%s">%s</a>` issues.delete_comment_confirm = Are you sure you want to delete this comment? diff --git a/templates/repo/issue/view_title.tmpl b/templates/repo/issue/view_title.tmpl index 774505a628..456515af33 100644 --- a/templates/repo/issue/view_title.tmpl +++ b/templates/repo/issue/view_title.tmpl @@ -24,7 +24,11 @@ {{else if .Issue.IsClosed}} <div class="ui red large label">{{if .Issue.IsPull}}{{svg "octicon-git-pull-request"}}{{else}}{{svg "octicon-issue-closed"}}{{end}} {{.locale.Tr "repo.issues.closed_title"}}</div> {{else if .Issue.IsPull}} - <div class="ui green large label">{{svg "octicon-git-pull-request"}} {{.locale.Tr "repo.issues.open_title"}}</div> + {{if .IsPullWorkInProgress}} + <div class="ui grey large label">{{svg "octicon-git-pull-request-draft"}} {{.locale.Tr "repo.issues.draft_title"}}</div> + {{else}} + <div class="ui green large label">{{svg "octicon-git-pull-request"}} {{.locale.Tr "repo.issues.open_title"}}</div> + {{end}} {{else}} <div class="ui green large label">{{svg "octicon-issue-opened"}} {{.locale.Tr "repo.issues.open_title"}}</div> {{end}} diff --git a/templates/shared/issuelist.tmpl b/templates/shared/issuelist.tmpl index 0adcc34671..7d0abb689b 100644 --- a/templates/shared/issuelist.tmpl +++ b/templates/shared/issuelist.tmpl @@ -17,7 +17,11 @@ {{if .IsClosed}} {{svg "octicon-git-pull-request" 16 "text red"}} {{else}} - {{svg "octicon-git-pull-request" 16 "text green"}} + {{if .PullRequest.IsWorkInProgress}} + {{svg "octicon-git-pull-request-draft" 16 "text grey"}} + {{else}} + {{svg "octicon-git-pull-request" 16 "text green"}} + {{end}} {{end}} {{end}} {{else}} |