Use relative url when showing forked from

This commit is contained in:
Josh Frye committed 2016-03-04 18:32:30 -05:00
1 parent f6759a731a
commit 275464e7fb
2 files changed
+7 -2

No files matched your search

+5
View File
@@ -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)
}