Ensure preview button is not shown when the content is being created

This commit is contained in:
Shannon
2014-10-21 10:34:52 +10:00
parent 15413a75fe
commit 8388ec12cd
2 changed files with 2 additions and 1 deletions

View File

@@ -13,6 +13,7 @@ function ContentEditController($scope, $rootScope, $routeParams, $q, $timeout, $
$scope.subButtons = [];
$scope.currentSection = appState.getSectionState("currentSection");
$scope.currentNode = null; //the editors affiliated node
$scope.isNew = $routeParams.create;
//This sets up the action buttons based on what permissions the user has.
//The allowedActions parameter contains a list of chars, each represents a button by permission so

View File

@@ -46,7 +46,7 @@
</a>
</div>
<div class="btn-group" ng-show="content.template">
<div class="btn-group" ng-show="content.template && !isNew">
<a class="btn" ng-click="preview(content)">
<localize key="buttons_showPage">Preview page</localize>
</a>