summaryrefslogtreecommitdiffstats
path: root/templates/shared
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2023-05-25 04:31:26 +0200
committerGitHub <noreply@github.com>2023-05-25 02:31:26 +0000
commit27c221aa5db116e2cc90afbfa9b92f2a220af853 (patch)
treecd28eb0b3e8f60c52c9244cc955c68dc8b08acff /templates/shared
parent309354c70ee994a1e8f261d7bc24e7473e601d02 (diff)
downloadgitea-27c221aa5db116e2cc90afbfa9b92f2a220af853.tar.gz
gitea-27c221aa5db116e2cc90afbfa9b92f2a220af853.zip
Rework notifications list (#24812)
- Replace `<table>` with flexbox - Add issue modification time and issue number - Remove big title - Replace tabs with menu items - Add clicked item deletion on back button cache restoration --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'templates/shared')
-rw-r--r--templates/shared/issueicon.tmpl25
-rw-r--r--templates/shared/issuelist.tmpl22
2 files changed, 26 insertions, 21 deletions
diff --git a/templates/shared/issueicon.tmpl b/templates/shared/issueicon.tmpl
new file mode 100644
index 0000000000..2a2e70085a
--- /dev/null
+++ b/templates/shared/issueicon.tmpl
@@ -0,0 +1,25 @@
+{{if .IsPull}}
+ {{if and .PullRequest .PullRequest.HasMerged}}
+ {{svg "octicon-git-merge" 16 "text purple"}}
+ {{else if and .GetPullRequest .GetPullRequest.HasMerged}}
+ {{svg "octicon-git-merge" 16 "text purple"}}
+ {{else}}
+ {{if .IsClosed}}
+ {{svg "octicon-git-pull-request" 16 "text red"}}
+ {{else}}
+ {{if and .PullRequest .PullRequest.IsWorkInProgress}}
+ {{svg "octicon-git-pull-request-draft" 16 "text grey"}}
+ {{else if and .GetPullRequest .GetPullRequest.IsWorkInProgress}}
+ {{svg "octicon-git-pull-request-draft" 16 "text grey"}}
+ {{else}}
+ {{svg "octicon-git-pull-request" 16 "text green"}}
+ {{end}}
+ {{end}}
+ {{end}}
+{{else}}
+ {{if .IsClosed}}
+ {{svg "octicon-issue-closed" 16 "text red"}}
+ {{else}}
+ {{svg "octicon-issue-opened" 16 "text green"}}
+ {{end}}
+{{end}}
diff --git a/templates/shared/issuelist.tmpl b/templates/shared/issuelist.tmpl
index 71d9059c1e..394b4a6918 100644
--- a/templates/shared/issuelist.tmpl
+++ b/templates/shared/issuelist.tmpl
@@ -7,27 +7,7 @@
<input type="checkbox" autocomplete="off" class="issue-checkbox gt-mt-2 gt-mr-4" data-issue-id={{.ID}} aria-label="{{$.locale.Tr "repo.issues.action_check"}} &quot;{{.Title}}&quot;">
{{end}}
<div class="issue-item-icon">
- {{if .IsPull}}
- {{if .PullRequest.HasMerged}}
- {{svg "octicon-git-merge" 16 "text purple"}}
- {{else}}
- {{if .IsClosed}}
- {{svg "octicon-git-pull-request" 16 "text red"}}
- {{else}}
- {{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}}
- {{if .IsClosed}}
- {{svg "octicon-issue-closed" 16 "text red"}}
- {{else}}
- {{svg "octicon-issue-opened" 16 "text green"}}
- {{end}}
- {{end}}
+ {{template "shared/issueicon" .}}
</div>
</div>
<div class="issue-item-main gt-f1 gt-fc gt-df">