added a republish button to templates

This commit is contained in:
Henry Oswald 2014-03-03 22:55:12 +00:00
parent 07fe9c36a9
commit 413ef7440f
2 changed files with 4 additions and 0 deletions

View file

@ -298,6 +298,8 @@
#publishedAsTemplateArea(style="display:none;")
a#templateLink(href='{{canonicalUrl}}') View Template
.btn.btn-warning#unPublishProjectAsTemplate unpublish project as template
.btn.btn-success#republishProjectAsTemplate re publish project as template
#problemWithPublishingArea(style="display:none;")
p There is a problem with our publishing service, please try again in a few minutes.
#publishWorkingArea(style="display:none;")

View file

@ -171,6 +171,7 @@ define [
events:
"click #publishProjectAsTemplate": "publishProjectAsTemplate"
"click #republishProjectAsTemplate": "publishProjectAsTemplate"
"click #unPublishProjectAsTemplate": "unPublishProjectAsTemplate"
"blur #projectDescription" : "updateDescription"
@ -218,6 +219,7 @@ define [
publishProjectAsTemplate: ->
@showWorking()
@unpublishedArea.hide()
@publishedArea.hide()
@ide.socket.emit "publishProjectAsTemplate", @ide.user.get("id"), (err)=>
@hideWorking()
if err?