diff --git a/models/project/project.go b/models/project/project.go
index 679d695881..44609e60b2 100644
--- a/models/project/project.go
+++ b/models/project/project.go
@@ -144,10 +144,21 @@ func (p *Project) Link() string {
return ""
}
+func (p *Project) IconName() string {
+ if p.IsRepositoryProject() {
+ return "octicon-project"
+ }
+ return "octicon-project-symlink"
+}
+
func (p *Project) IsOrganizationProject() bool {
return p.Type == TypeOrganization
}
+func (p *Project) IsRepositoryProject() bool {
+ return p.Type == TypeRepository
+}
+
func init() {
db.RegisterModel(new(Project))
}
diff --git a/templates/projects/list.tmpl b/templates/projects/list.tmpl
index 89c52dee68..5062109161 100644
--- a/templates/projects/list.tmpl
+++ b/templates/projects/list.tmpl
@@ -38,7 +38,7 @@
{{range .ClosedProjects}}
- {{if .IsOrganizationProject}}{{svg "octicon-project-symlink" 18 "gt-mr-3"}}{{else}}{{svg "octicon-project" 18 "gt-mr-3"}}{{end}}
- {{.Title}}
+ {{svg .IconName 18 "gt-mr-3"}}{{.Title}}
{{end}}
{{end}}
@@ -273,8 +271,7 @@
{{range .OpenProjects}}
- {{if .IsOrganizationProject}}{{svg "octicon-project-symlink" 18 "gt-mr-3"}}{{else}}{{svg "octicon-project" 18 "gt-mr-3"}}{{end}}
- {{.Title}}
+ {{svg .IconName 18 "gt-mr-3"}}{{.Title}}
{{end}}
{{end}}
@@ -285,8 +282,7 @@
{{range .ClosedProjects}}
- {{if .IsOrganizationProject}}{{svg "octicon-project-symlink" 18 "gt-mr-3"}}{{else}}{{svg "octicon-project" 18 "gt-mr-3"}}{{end}}
- {{.Title}}
+ {{svg .IconName 18 "gt-mr-3"}}{{.Title}}
{{end}}
{{end}}
diff --git a/templates/repo/issue/new_form.tmpl b/templates/repo/issue/new_form.tmpl
index b45a00f781..4945203ca5 100644
--- a/templates/repo/issue/new_form.tmpl
+++ b/templates/repo/issue/new_form.tmpl
@@ -134,8 +134,7 @@
{{range .OpenProjects}}
{{end}}
{{end}}
@@ -146,8 +145,7 @@
{{range .ClosedProjects}}
{{end}}
{{end}}
@@ -159,8 +157,7 @@
{{if .Project}}
{{end}}
diff --git a/templates/repo/issue/view_content/sidebar.tmpl b/templates/repo/issue/view_content/sidebar.tmpl
index 40d87b4178..cef1e3a02e 100644
--- a/templates/repo/issue/view_content/sidebar.tmpl
+++ b/templates/repo/issue/view_content/sidebar.tmpl
@@ -196,8 +196,7 @@
{{range .OpenProjects}}
{{end}}
{{end}}
@@ -208,8 +207,7 @@
{{range .ClosedProjects}}
{{end}}
{{end}}
@@ -220,8 +218,7 @@
{{if .Issue.ProjectID}}
{{end}}
diff --git a/templates/repo/projects/list.tmpl b/templates/repo/projects/list.tmpl
index 6833b7d785..2350a3af54 100644
--- a/templates/repo/projects/list.tmpl
+++ b/templates/repo/projects/list.tmpl
@@ -40,7 +40,7 @@