aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorGiteabot <teabot@gitea.io>2023-03-06 14:48:04 -0500
committerGitHub <noreply@github.com>2023-03-06 13:48:04 -0600
commit2f7bbdf8c9cd8c36bfbb39b7cd477d4be09926ba (patch)
treeeb9e27f7c044e76e8ff10b6c666fa1b999c75fec /templates
parentaf4767df5c061a21a68b442e223446303b5d77de (diff)
downloadgitea-2f7bbdf8c9cd8c36bfbb39b7cd477d4be09926ba.tar.gz
gitea-2f7bbdf8c9cd8c36bfbb39b7cd477d4be09926ba.zip
Fix incorrect project links and use symlink icon for org-wide projects (#23325) (#23336)
Backport #23325 Fix displaying same projects icons between user/repo projects. And fix incorrect projects links. A part of https://github.com/go-gitea/gitea/pull/22865. ![image](https://user-images.githubusercontent.com/18380374/223044279-7b620ff1-d88a-4146-97e6-531bbf269761.png) ![image](https://user-images.githubusercontent.com/18380374/223044390-42911e3f-1f6b-439f-8441-4f3ebf99ea13.png) ![image](https://user-images.githubusercontent.com/18380374/223044437-5cad5391-0f95-4c8b-b0a3-32e263e2854f.png) Co-authored-by: yp05327 <576951401@qq.com>
Diffstat (limited to 'templates')
-rw-r--r--templates/org/menu.tmpl2
-rw-r--r--templates/projects/list.tmpl4
-rw-r--r--templates/repo/issue/new_form.tmpl12
-rw-r--r--templates/repo/projects/list.tmpl2
-rw-r--r--templates/shared/issuelist.tmpl4
-rw-r--r--templates/user/overview/header.tmpl2
-rw-r--r--templates/user/profile.tmpl2
7 files changed, 14 insertions, 14 deletions
diff --git a/templates/org/menu.tmpl b/templates/org/menu.tmpl
index 7ca47cd32c..25f459c09c 100644
--- a/templates/org/menu.tmpl
+++ b/templates/org/menu.tmpl
@@ -4,7 +4,7 @@
{{svg "octicon-repo"}} {{.locale.Tr "user.repositories"}}
</a>
<a class="{{if .PageIsViewProjects}}active {{end}}item" href="{{$.Org.HomeLink}}/-/projects">
- {{svg "octicon-project"}} {{.locale.Tr "user.projects"}}
+ {{svg "octicon-project-symlink"}} {{.locale.Tr "user.projects"}}
</a>
{{if .IsPackageEnabled}}
<a class="item" href="{{$.Org.HomeLink}}/-/packages">
diff --git a/templates/projects/list.tmpl b/templates/projects/list.tmpl
index 8d9594e2b4..489189ec45 100644
--- a/templates/projects/list.tmpl
+++ b/templates/projects/list.tmpl
@@ -12,7 +12,7 @@
{{template "base/alert" .}}
<div class="ui compact tiny menu">
<a class="item{{if not .IsShowClosed}} active{{end}}" href="{{$.Link}}?state=open">
- {{svg "octicon-project" 16 "gt-mr-3"}}
+ {{svg "octicon-project-symlink" 16 "gt-mr-3"}}
{{JsPrettyNumber .OpenCount}}&nbsp;{{.locale.Tr "repo.issues.open_title"}}
</a>
<a class="item{{if .IsShowClosed}} active{{end}}" href="{{$.Link}}?state=closed">
@@ -38,7 +38,7 @@
<div class="milestone list">
{{range .Projects}}
<li class="item">
- {{svg "octicon-project"}} <a href="{{$.Link}}/{{.ID}}">{{.Title}}</a>
+ {{svg "octicon-project-symlink"}} <a href="{{.Link}}">{{.Title}}</a>
<div class="meta">
{{$closedDate:= TimeSinceUnix .ClosedDateUnix $.locale}}
{{if .IsClosed}}
diff --git a/templates/repo/issue/new_form.tmpl b/templates/repo/issue/new_form.tmpl
index ac5aaa4801..4ce4ffb8e3 100644
--- a/templates/repo/issue/new_form.tmpl
+++ b/templates/repo/issue/new_form.tmpl
@@ -176,8 +176,8 @@
{{.locale.Tr "repo.issues.new.open_projects"}}
</div>
{{range .OpenProjects}}
- <a class="item muted sidebar-item-link" data-id="{{.ID}}" data-href="{{$.RepoLink}}/projects/{{.ID}}">
- {{svg "octicon-project" 18 "gt-mr-3"}}
+ <a class="item muted sidebar-item-link" data-id="{{.ID}}" data-href="{{.Link}}">
+ {{if .IsOrganizationProject}}{{svg "octicon-project-symlink" 18 "gt-mr-3"}}{{else}}{{svg "octicon-project" 18 "gt-mr-3"}}{{end}}
{{.Title}}
</a>
{{end}}
@@ -188,8 +188,8 @@
{{.locale.Tr "repo.issues.new.closed_projects"}}
</div>
{{range .ClosedProjects}}
- <a class="item muted sidebar-item-link" data-id="{{.ID}}" data-href="{{$.RepoLink}}/projects/{{.ID}}">
- {{svg "octicon-project" 18 "gt-mr-3"}}
+ <a class="item muted sidebar-item-link" data-id="{{.ID}}" data-href="{{.Link}}">
+ {{if .IsOrganizationProject}}{{svg "octicon-project-symlink" 18 "gt-mr-3"}}{{else}}{{svg "octicon-project" 18 "gt-mr-3"}}{{end}}
{{.Title}}
</a>
{{end}}
@@ -201,8 +201,8 @@
<span class="no-select item {{if .Project}}gt-hidden{{end}}">{{.locale.Tr "repo.issues.new.no_projects"}}</span>
<div class="selected">
{{if .Project}}
- <a class="item muted sidebar-item-link" href="{{.RepoLink}}/projects/{{.Project.ID}}">
- {{svg "octicon-project" 18 "gt-mr-3"}}
+ <a class="item muted sidebar-item-link" href="{{.Project.Link}}">
+ {{if .IsOrganizationProject}}{{svg "octicon-project-symlink" 18 "gt-mr-3"}}{{else}}{{svg "octicon-project" 18 "gt-mr-3"}}{{end}}
{{.Project.Title}}
</a>
{{end}}
diff --git a/templates/repo/projects/list.tmpl b/templates/repo/projects/list.tmpl
index fc4770e5d8..929a1b4c6f 100644
--- a/templates/repo/projects/list.tmpl
+++ b/templates/repo/projects/list.tmpl
@@ -40,7 +40,7 @@
<div class="milestone list">
{{range .Projects}}
<li class="item">
- {{svg "octicon-project"}} <a href="{{$.RepoLink}}/projects/{{.ID}}">{{.Title}}</a>
+ {{svg "octicon-project"}} <a href="{{.Link}}">{{.Title}}</a>
<div class="meta">
{{$closedDate:= TimeSinceUnix .ClosedDateUnix $.locale}}
{{if .IsClosed}}
diff --git a/templates/shared/issuelist.tmpl b/templates/shared/issuelist.tmpl
index 6f3fd0f916..16bb3c1ec7 100644
--- a/templates/shared/issuelist.tmpl
+++ b/templates/shared/issuelist.tmpl
@@ -87,8 +87,8 @@
</a>
{{end}}
{{if .Project}}
- <a class="project" {{if $.RepoLink}}href="{{$.RepoLink}}/projects/{{.Project.ID}}"{{else}}href="{{.Repo.Link}}/projects/{{.Project.ID}}"{{end}}>
- {{svg "octicon-project" 14 "gt-mr-2"}}{{.Project.Title}}
+ <a class="project" href="{{.Project.Link}}">
+ {{if .Project.IsOrganizationProject}}{{svg "octicon-project-symlink" 14 "gt-mr-2"}}{{else}}{{svg "octicon-project" 14 "gt-mr-2"}}{{end}}{{.Project.Title}}
</a>
{{end}}
{{if .Ref}}
diff --git a/templates/user/overview/header.tmpl b/templates/user/overview/header.tmpl
index 2449f5fc32..ce9ecb46ad 100644
--- a/templates/user/overview/header.tmpl
+++ b/templates/user/overview/header.tmpl
@@ -23,7 +23,7 @@
{{svg "octicon-repo"}} {{.locale.Tr "user.repositories"}}
</a>
<a href="{{.ContextUser.HomeLink}}/-/projects" class="{{if .PageIsViewProjects}}active {{end}}item">
- {{svg "octicon-project"}} {{.locale.Tr "user.projects"}}
+ {{svg "octicon-project-symlink"}} {{.locale.Tr "user.projects"}}
</a>
{{if (not .UnitPackagesGlobalDisabled)}}
<a href="{{.ContextUser.HomeLink}}/-/packages" class="{{if .IsPackagesPage}}active {{end}}item">
diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl
index fcaec60eae..5b445bdb00 100644
--- a/templates/user/profile.tmpl
+++ b/templates/user/profile.tmpl
@@ -107,7 +107,7 @@
{{svg "octicon-repo"}} {{.locale.Tr "user.repositories"}}
</a>
<a href="{{.Owner.HomeLink}}/-/projects" class="{{if eq .TabName "projects"}}active {{end}}item">
- {{svg "octicon-project"}} {{.locale.Tr "user.projects"}}
+ {{svg "octicon-project-symlink"}} {{.locale.Tr "user.projects"}}
</a>
{{if .IsPackageEnabled}}
<a class='{{if eq .TabName "packages"}}active {{end}}item' href="{{.Owner.HomeLink}}/-/packages">