mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-31 20:02:09 +00:00
template: repo: compare: display a warning if the user is not logged in
Signed-off-by: Litchi Pi <litchi.pi@proton.me>
This commit is contained in:
parent
6836ded397
commit
dd4a1107ed
4 changed files with 46 additions and 0 deletions
|
@ -51,6 +51,7 @@ const (
|
|||
func setCompareContext(ctx *context.Context, before, head *git.Commit, headOwner, headName string) {
|
||||
ctx.Data["BeforeCommit"] = before
|
||||
ctx.Data["HeadCommit"] = head
|
||||
ctx.Data["SignInLink"] = setting.AppSubURL + "/user/login?redirect_to=" + url.QueryEscape(ctx.Data["Link"].(string))
|
||||
|
||||
ctx.Data["GetBlobByPathForCommit"] = func(commit *git.Commit, path string) *git.Blob {
|
||||
if commit == nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue