Adding cancel action to wiki

stable
Alejandro Alonso 2014-08-08 10:47:33 +02:00
parent e9305acc27
commit 5ce2b92136
2 changed files with 4 additions and 1 deletions

View File

@ -95,6 +95,9 @@ class WikiDetailController extends mixOf(taiga.Controller, taiga.PageMixin, taig
edit: -> edit: ->
@location.path("/project/#{@scope.projectSlug}/wiki/#{@scope.wikiSlug}/edit") @location.path("/project/#{@scope.projectSlug}/wiki/#{@scope.wikiSlug}/edit")
cancel: ->
@location.path("/project/#{@scope.projectSlug}/wiki/#{@scope.wikiSlug}")
delete: -> delete: ->
onSuccess = => onSuccess = =>
@confirm.notify("success") @confirm.notify("success")

View File

@ -17,7 +17,7 @@ block content
span.wiki-title(tg-bo-bind='wikiSlug|unslugify') span.wiki-title(tg-bo-bind='wikiSlug|unslugify')
.action-buttons .action-buttons
a.button.button-green.save-wiki(href="", title="Save", ng-click="ctrl.save()") Save a.button.button-green.save-wiki(href="", title="Save", ng-click="ctrl.save()") Save
a.button.button-red.cancel-wiki(href="", title="CAncel", ng-click="") Cancel a.button.button-red.cancel-wiki(href="", title="CAncel", ng-click="ctrl.cancel()") Cancel
section.wysiwyg section.wysiwyg
textarea(placeholder="Write a your wiki page", ng-model="wiki.content", tg-markitup) textarea(placeholder="Write a your wiki page", ng-model="wiki.content", tg-markitup)