diff options
-rw-r--r-- | options/locale/locale_en-US.ini | 1 | ||||
-rw-r--r-- | routers/web/repo/wiki.go | 3 | ||||
-rw-r--r-- | templates/repo/wiki/new.tmpl | 3 |
3 files changed, 7 insertions, 0 deletions
diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 0a3c0c064c..94d351f0cb 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -1585,6 +1585,7 @@ wiki.page_already_exists = A wiki page with the same name already exists. wiki.reserved_page = The wiki page name '%s' is reserved. wiki.pages = Pages wiki.last_updated = Last updated %s +wiki.page_name_desc = Enter a name for this Wiki page. Some special names are: 'Home', '_Sidebar' and '_Footer'. activity = Activity activity.period.filter_label = Period: diff --git a/routers/web/repo/wiki.go b/routers/web/repo/wiki.go index 82f56a8c4a..44914a3e3d 100644 --- a/routers/web/repo/wiki.go +++ b/routers/web/repo/wiki.go @@ -627,6 +627,9 @@ func NewWiki(ctx *context.Context) { if !ctx.Repo.Repository.HasWiki() { ctx.Data["title"] = "Home" } + if ctx.FormString("title") != "" { + ctx.Data["title"] = ctx.FormString("title") + } ctx.HTML(http.StatusOK, tplWikiNew) } diff --git a/templates/repo/wiki/new.tmpl b/templates/repo/wiki/new.tmpl index 6cfa798374..5b8cdc8164 100644 --- a/templates/repo/wiki/new.tmpl +++ b/templates/repo/wiki/new.tmpl @@ -16,6 +16,9 @@ <div class="field {{if .Err_Title}}error{{end}}"> <input name="title" value="{{.title}}" autofocus required> </div> + <div class="help"> + {{.i18n.Tr "repo.wiki.page_name_desc"}} + </div> <div class="ui top attached tabular menu previewtabs" data-write="write" data-preview="preview"> <a class="active item" data-tab="write">{{.i18n.Tr "write"}}</a> <a class="item" data-tab="preview" data-url="{{$.Repository.APIURL}}/markdown" data-context="{{$.RepoLink}}">{{$.i18n.Tr "preview"}}</a> |