Update delete wiki page route

tokarchuk/v1.17
Josh Frye 9 years ago
parent 1ca171dbe9
commit 2f228ddf31
  1. 2
      cmd/web.go
  2. 2
      templates/repo/wiki/view.tmpl

@ -495,7 +495,7 @@ func runWeb(ctx *cli.Context) {
Post(bindIgnErr(auth.NewWikiForm{}), repo.NewWikiPost)
m.Combo("/:page/_edit").Get(repo.EditWiki).
Post(bindIgnErr(auth.NewWikiForm{}), repo.EditWikiPost)
m.Post("/:page", bindIgnErr(auth.NewWikiForm{}), repo.DeleteWikiPagePost)
m.Post("/:page/delete", bindIgnErr(auth.NewWikiForm{}), repo.DeleteWikiPagePost)
}, reqSignIn, reqRepoPusher)
}, repo.MustEnableWiki, middleware.RepoRef())

@ -50,7 +50,7 @@
<div class="ui right">
<a class="ui small button" href="{{.RepoLink}}/wiki/{{.PageURL}}/_edit">{{.i18n.Tr "repo.wiki.edit_page_button"}}</a>
<a class="ui green small button" href="{{.RepoLink}}/wiki/_new">{{.i18n.Tr "repo.wiki.new_page_button"}}</a>
<a class="ui red small button delete-button" href="" data-url="{{.RepoLink}}/wiki/{{.PageURL}}/" data-id="{{.PageURL}}">{{.i18n.Tr "repo.wiki.delete_page_button"}}</a>
<a class="ui red small button delete-button" href="" data-url="{{.RepoLink}}/wiki/{{.PageURL}}/delete" data-id="{{.PageURL}}">{{.i18n.Tr "repo.wiki.delete_page_button"}}</a>
</div>
{{end}}
<div class="ui sub header">

Loading…
Cancel
Save