diff --git a/services/web/app/views/project/editor/publish-template.jade b/services/web/app/views/project/editor/publish-template.jade index 0fbd07618c..37f622de85 100644 --- a/services/web/app/views/project/editor/publish-template.jade +++ b/services/web/app/views/project/editor/publish-template.jade @@ -27,18 +27,18 @@ script(type="text/ng-template", id="publishProjectAsTemplateModalTemplate") .modal-footer button.btn.btn-default( ng-click="cancel()", - ng-disabled="state.publishInflight" + ng-disabled="state.publishInflight || state.unpublishInflight" ) Cancel button.btn.btn-info( ng-click="unpublishTemplate()", - ng-disabled="state.unpublishInflight", + ng-disabled="state.publishInflight || state.unpublishInflight" ng-show="publishedDetails.exists" ) span(ng-show="!state.unpublishInflight") Unpublish span(ng-show="state.unpublishInflight") Unpublishing... button.btn.btn-primary( - ng-click="publish()", - ng-disabled="state.publishInflight" + ng-click="publishTemplate()", + ng-disabled="state.publishInflight || state.unpublishInflight" ) span(ng-show="!state.publishInflight && !publishedDetails.exists") Publish span(ng-show="!state.publishInflight && publishedDetails.exists") Republish diff --git a/services/web/public/coffee/ide/templates/controllers/TemplatesController.coffee b/services/web/public/coffee/ide/templates/controllers/TemplatesController.coffee index 238626d440..8442e1446c 100644 --- a/services/web/public/coffee/ide/templates/controllers/TemplatesController.coffee +++ b/services/web/public/coffee/ide/templates/controllers/TemplatesController.coffee @@ -39,7 +39,7 @@ define [ if description? ide.socket.emit 'updateProjectDescription', description, () => - $scope.publish = -> + $scope.publishTemplate = -> $scope.state.publishInflight = true ide.socket.emit 'publishProjectAsTemplate', user_id, (error, docLines, version) => refreshPublishedStatus()