1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-23 02:38:35 +00:00

Web editor: support upload files

This commit is contained in:
Unknwon
2016-08-30 05:07:50 -07:00
parent 7c31f235da
commit 643142acab
24 changed files with 503 additions and 600 deletions

View File

@@ -316,7 +316,7 @@ func (f *EditPreviewDiffForm) Validate(ctx *macaron.Context, errs binding.Errors
//
type UploadRepoFileForm struct {
TreeName string `binding:MaxSize(500)"`
TreePath string `binding:MaxSize(500)"`
CommitSummary string `binding:"MaxSize(100)`
CommitMessage string
CommitChoice string `binding:"Required;MaxSize(50)"`

View File

@@ -86,6 +86,7 @@ func NewFuncMap() []template.FuncMap {
}
return str[start:end]
},
"EllipsisString": base.EllipsisString,
"DiffTypeToStr": DiffTypeToStr,
"DiffLineTypeToStr": DiffLineTypeToStr,
"Sha1": Sha1,