summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorJosh Frye <joshfng@gmail.com>2016-03-04 14:50:34 -0500
committerJosh Frye <joshfng@gmail.com>2016-03-04 18:32:30 -0500
commit275464e7fb14c3cb33540f05426b1e5cdca9dd2d (patch)
tree36629035709da8c3134773f73477ab04ffc8131c /models
parentf6759a731a063d5d2be8a932f8d1e1a784cc0528 (diff)
downloadgitea-275464e7fb14c3cb33540f05426b1e5cdca9dd2d.tar.gz
gitea-275464e7fb14c3cb33540f05426b1e5cdca9dd2d.zip
Use relative url when showing forked from
Diffstat (limited to 'models')
-rw-r--r--models/repo.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/models/repo.go b/models/repo.go
index 17c0082cbd..a23abc0c2e 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -321,6 +321,11 @@ func (repo *Repository) RepoLink() string {
return setting.AppSubUrl + "/" + repo.MustOwner().Name + "/" + repo.Name
}
+func (repo *Repository) RepoRelLink() string {
+ return "/" + repo.MustOwner().Name + "/" + repo.Name
+}
+
+
func (repo *Repository) ComposeCompareURL(oldCommitID, newCommitID string) string {
return fmt.Sprintf("%s/%s/compare/%s...%s", repo.MustOwner().Name, repo.Name, oldCommitID, newCommitID)
}