aboutsummaryrefslogtreecommitdiffstats
path: root/models/project/project.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/project/project.go')
-rw-r--r--models/project/project.go11
1 files changed, 11 insertions, 0 deletions
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))
}