mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-14 05:52:43 +00:00
Use relative url when showing forked from
This commit is contained in:
parent
f6759a731a
commit
275464e7fb
2 changed files with 7 additions and 2 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue