mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-25 11:22:16 +00:00
Add edit option for README.md (#28071)
Fix #28059

This commit is contained in:
parent
eae555ff23
commit
08552f0076
2 changed files with 7 additions and 0 deletions
|
@ -331,6 +331,10 @@ func renderReadmeFile(ctx *context.Context, subfolder string, readmeFile *git.Tr
|
|||
|
||||
ctx.Data["FileContent"] = buf.String()
|
||||
}
|
||||
|
||||
if !fInfo.isLFSFile && ctx.Repo.CanEnableEditor(ctx, ctx.Doer) {
|
||||
ctx.Data["CanEditReadmeFile"] = true
|
||||
}
|
||||
}
|
||||
|
||||
func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink string) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue