<div ng-controller="Umbraco.Editors.Content.CreateController">

    <div class="umb-dialog-body with-footer" ng-cloak>

        <div class="umb-pane">
            <h5 ng-show="selectContentType"><localize key="create_createUnder">Create a page under</localize> {{currentNode.name}}</h5>
            <h5 ng-show="selectBlueprint"><localize key="blueprints_selectBlueprint">Select a blueprint</localize></h5>

            <div ng-if="allowedTypes && allowedTypes.length === 0">
                <p class="abstract" ng-if="!hasSettingsAccess"><localize key="create_noDocumentTypesWithNoSettingsAccess"/></p>
                <div ng-if="hasSettingsAccess">
                    <p class="abstract"><localize key="create_noDocumentTypes" /></p>
                    <button class="btn umb-outline" ng-click="editContentType()">
                        <localize key="create_noDocumentTypesEditPermissions"/>
                    </button>
                </div>
            </div>

            <ul class="umb-actions umb-actions-child" ng-if="selectContentType && allowedTypes.length > 0" >

                <li class="umb-action" data-element="action-create-{{docType.alias}}" ng-repeat="docType in allowedTypes | orderBy:'name':false">
                    <button class="umb-action-link umb-outline btn-reset" ng-click="createOrSelectBlueprintIfAny(docType)" umb-auto-focus ng-if="$index === 0">
                        <i class="large icon {{docType.icon}}"></i>
                        <span class="menu-label">
                            {{docType.name}}
                            <small>
                                {{docType.description}}
                            </small>
                        </span>
                    </button>
                    <button class="umb-action-link umb-outline btn-reset" ng-click="createOrSelectBlueprintIfAny(docType)" ng-if="$index !== 0">
                            <i class="large icon {{docType.icon}}"></i>
                            <span class="menu-label">
                                {{docType.name}}
                                <small>
                                    {{docType.description}}
                                </small>
                            </span>
                        </button>
                </li>

            </ul>
            <ul class="umb-actions umb-actions-child" ng-if="selectBlueprint">

                <li class="umb-action" ng-repeat="blueprint in selectableBlueprints | orderBy:'name':false">
                    <button class="umb-action-link umb-outline btn-reset" ng-click="createFromBlueprint(blueprint.id)">
                        <i class="large icon {{docType.icon}}"></i>
                        <span class="menu-label">
                            {{blueprint.name}}
                        </span>
                    </button>
                </li>

                <li class="umb-action sep" ng-show="allowBlank">
                    <button class="umb-action-link umb-outline btn-reset" ng-click="createBlank(docType)">
                        <i class="large icon {{docType.icon}}"></i>
                        <span class="menu-label">
                            <localize key="blueprints_blankBlueprint">Blank</localize>
                        </span>
                    </button>
                </li>

            </ul>

        </div>
    </div>

    <div class="umb-dialog-footer btn-toolbar umb-btn-toolbar">
        <button class="btn btn-info umb-outline" ng-click="closeDialog(true)">
            <localize key="buttons_somethingElse">All Actions</localize>
        </button>
    </div>

</div>
