Merge branch 'temp8' into temp-U4-11218
# Conflicts: # src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js # src/Umbraco.Web.UI.Client/src/common/directives/components/umbgroupsbuilder.directive.js # src/Umbraco.Web.UI.Client/src/views/common/overlays/contenttypeeditor/propertysettings/propertysettings.controller.js # src/Umbraco.Web.UI.Client/src/views/common/overlays/contenttypeeditor/propertysettings/propertysettings.html # src/Umbraco.Web.UI.Client/src/views/content/edit.html
This commit is contained in:
@@ -84,27 +84,21 @@
|
||||
};
|
||||
}
|
||||
|
||||
if (!String.prototype.trimStart) {
|
||||
|
||||
/** trims the start of the string*/
|
||||
String.prototype.trimStart = function (str) {
|
||||
if (this.startsWith(str)) {
|
||||
return this.substring(str.length);
|
||||
}
|
||||
return this;
|
||||
};
|
||||
}
|
||||
|
||||
if (!String.prototype.trimEnd) {
|
||||
/** trims the start of the string*/
|
||||
String.prototype.trimStart = function (str) {
|
||||
if (this.startsWith(str)) {
|
||||
return this.substring(str.length);
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
/** trims the end of the string*/
|
||||
String.prototype.trimEnd = function (str) {
|
||||
if (this.endsWith(str)) {
|
||||
return this.substring(0, this.length - str.length);
|
||||
}
|
||||
return this;
|
||||
};
|
||||
}
|
||||
/** trims the end of the string*/
|
||||
String.prototype.trimEnd = function (str) {
|
||||
if (this.endsWith(str)) {
|
||||
return this.substring(0, this.length - str.length);
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
if (!String.prototype.utf8Encode) {
|
||||
|
||||
@@ -330,19 +324,19 @@
|
||||
return false;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
if (!Object.toBoolean) {
|
||||
|
||||
/** Converts a string/integer/bool to true/false */
|
||||
Object.toBoolean = function (obj) {
|
||||
if ((typeof obj) === "boolean") {
|
||||
Object.toBoolean = function (obj) {
|
||||
if ((typeof obj) === "boolean") {
|
||||
return obj;
|
||||
}
|
||||
if (obj === "1" || obj === 1 || obj === "true") {
|
||||
}
|
||||
if (obj === "1" || obj === 1 || obj === "true") {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
}
|
||||
|
||||
})();
|
||||
})();
|
||||
|
||||
@@ -38,7 +38,7 @@ function sectionsDirective($timeout, $window, navigationService, treeService, se
|
||||
calculateWidth();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function calculateWidth(){
|
||||
$timeout(function(){
|
||||
//total width minus room for avatar, search, and help icon
|
||||
@@ -119,9 +119,10 @@ function sectionsDirective($timeout, $window, navigationService, treeService, se
|
||||
}
|
||||
else {
|
||||
var lastAccessed = historyService.getLastAccessedItemForSection(section.alias);
|
||||
var path = lastAccessed != null ? lastAccessed.link : section.alias;
|
||||
$location.path(path).search('');
|
||||
}
|
||||
var path = lastAccessed != null ? lastAccessed.link : section.alias;
|
||||
$location.path(path);
|
||||
}
|
||||
navigationService.clearSearch();
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
$scope.page.listViewPath = null;
|
||||
$scope.page.isNew = $scope.isNew ? true : false;
|
||||
$scope.page.buttonGroupState = "init";
|
||||
$scope.page.languageId = $scope.languageId;
|
||||
$scope.page.culture = $scope.culture;
|
||||
$scope.allowOpen = true;
|
||||
|
||||
// add all editors to an editors array to support split view
|
||||
@@ -121,14 +121,14 @@
|
||||
|
||||
/**
|
||||
* This does the content loading and initializes everything, called on load and changing variants
|
||||
* @param {any} languageId
|
||||
* @param {any} culture
|
||||
*/
|
||||
function getNode(languageId) {
|
||||
function getNode(culture) {
|
||||
|
||||
$scope.page.loading = true;
|
||||
|
||||
//we are editing so get the content item from the server
|
||||
$scope.getMethod()($scope.contentId, languageId)
|
||||
$scope.getMethod()($scope.contentId, culture)
|
||||
.then(function (data) {
|
||||
|
||||
$scope.content = data;
|
||||
@@ -257,7 +257,7 @@
|
||||
else {
|
||||
|
||||
//Browse content nodes based on the selected tree language variant
|
||||
$scope.page.languageId ? getNode($scope.page.languageId) : getNode();
|
||||
$scope.page.culture ? getNode($scope.page.culture) : getNode();
|
||||
|
||||
}
|
||||
|
||||
@@ -533,7 +533,7 @@
|
||||
saveMethod: "&",
|
||||
getMethod: "&",
|
||||
getScaffoldMethod: "&?",
|
||||
languageId: "=?",
|
||||
culture: "=?",
|
||||
model: "=?"
|
||||
}
|
||||
};
|
||||
|
||||
@@ -218,6 +218,7 @@ Use this directive to construct a header inside the main editor window.
|
||||
}
|
||||
|
||||
function setCurrentVariant(variants) {
|
||||
|
||||
angular.forEach(variants, function (variant) {
|
||||
if(variant.current) {
|
||||
scope.vm.currentVariant = variant;
|
||||
@@ -225,30 +226,35 @@ Use this directive to construct a header inside the main editor window.
|
||||
});
|
||||
}
|
||||
|
||||
//TODO: This doesn't really affect any UI currently, need some feedback from mads
|
||||
function setVariantStatusColor(variants) {
|
||||
angular.forEach(variants, function (variant) {
|
||||
angular.forEach(variant.states, function(state){
|
||||
switch (state.name) {
|
||||
case "Published":
|
||||
case "Published +":
|
||||
state.stateColor = "success";
|
||||
break;
|
||||
default:
|
||||
state.stateColor = "gray";
|
||||
}
|
||||
});
|
||||
|
||||
//TODO: What about variant.exists? If we are applying colors/styles, this should be one of them
|
||||
|
||||
switch (variant.state) {
|
||||
case "Published":
|
||||
variant.stateColor = "success";
|
||||
break;
|
||||
case "Unpublished":
|
||||
//TODO: Not sure if these statuses will ever bubble up to the UI?
|
||||
case "Publishing":
|
||||
case "Unpublishing":
|
||||
default:
|
||||
variant.stateColor = "gray";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
scope.goBack = function() {
|
||||
if(scope.onBack) {
|
||||
scope.goBack = function () {
|
||||
if (scope.onBack) {
|
||||
scope.onBack();
|
||||
}
|
||||
};
|
||||
|
||||
scope.selectVariant = function (event, variant) {
|
||||
scope.vm.dropdownOpen = false;
|
||||
$location.search({ languageId: variant.language.id });
|
||||
$location.search("cculture", variant.language.culture);
|
||||
};
|
||||
|
||||
scope.openIconPicker = function() {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
'use strict';
|
||||
|
||||
function GroupsBuilderDirective(contentTypeHelper, contentTypeResource, mediaTypeResource, dataTypeHelper, dataTypeResource, $filter, iconHelper, $q, $timeout, notificationsService, localizationService, editorService) {
|
||||
|
||||
|
||||
function link(scope, el, attr, ctrl) {
|
||||
|
||||
var validationTranslated = "";
|
||||
@@ -498,6 +498,7 @@
|
||||
property: property,
|
||||
contentType: scope.contentType,
|
||||
contentTypeName: scope.model.name,
|
||||
contentTypeAllowCultureVariant: scope.model.allowCultureVariant,
|
||||
view: "views/common/infiniteeditors/propertysettings/propertysettings.html",
|
||||
size: "small",
|
||||
submit: function(model) {
|
||||
|
||||
@@ -160,7 +160,6 @@ angular.module('umbraco.mocks').
|
||||
{ name: "Data types", childNodesUrl: dataTypeChildrenUrl, id: -1, icon: "icon-folder-close", children: [], expanded: false, hasChildren: true, level: 1, menuUrl: dataTypeMenuUrl, metaData: { treeAlias: "dataTypes" } },
|
||||
{ name: "Macros", childNodesUrl: url, id: -1, icon: "icon-folder-close", children: [], expanded: false, hasChildren: true, level: 1, menuUrl: menuUrl, metaData: { treeAlias: "macros" } },
|
||||
{ name: "Packages", childNodesUrl: url, id: -1, icon: "icon-folder-close", children: [], expanded: false, hasChildren: true, level: 1, menuUrl: menuUrl, metaData: { treeAlias: "packager" } },
|
||||
{ name: "XSLT Files", childNodesUrl: url, id: -1, icon: "icon-folder-close", children: [], expanded: false, hasChildren: true, level: 1, menuUrl: menuUrl, metaData: { treeAlias: "xslt" } },
|
||||
{ name: "Partial View Macros", childNodesUrl: url, id: -1, icon: "icon-folder-close", children: [], expanded: false, hasChildren: true, level: 1, menuUrl: menuUrl, metaData: { treeAlias: "partialViewMacros" } }
|
||||
],
|
||||
expanded: true,
|
||||
@@ -240,4 +239,4 @@ angular.module('umbraco.mocks').
|
||||
|
||||
}
|
||||
};
|
||||
}]);
|
||||
}]);
|
||||
|
||||
@@ -260,8 +260,6 @@ angular.module('umbraco.mocks').
|
||||
"errors_stylesNoStylesOnPage": "No active styles available",
|
||||
"errors_tableColMergeLeft": "Please place cursor at the left of the two cells you wish to merge",
|
||||
"errors_tableSplitNotSplittable": "You cannot split a cell that hasn't been merged.",
|
||||
"errors_xsltErrorHeader": "Error in XSLT source",
|
||||
"errors_xsltErrorText": "The XSLT has not been saved, because it contained error(s)",
|
||||
"general_about": "About",
|
||||
"general_action": "Action",
|
||||
"general_add": "Add",
|
||||
@@ -598,11 +596,6 @@ angular.module('umbraco.mocks').
|
||||
"speechBubbles_templateErrorText": "Please make sure that you do not have 2 templates with the same alias",
|
||||
"speechBubbles_templateSavedHeader": "Template saved",
|
||||
"speechBubbles_templateSavedText": "Template saved without any errors!",
|
||||
"speechBubbles_xsltErrorHeader": "XSLT not saved",
|
||||
"speechBubbles_xsltErrorText": "XSLT contained an error",
|
||||
"speechBubbles_xsltPermissionErrorText": "XSLT could not be saved, check file permissions",
|
||||
"speechBubbles_xsltSavedHeader": "XSLT saved",
|
||||
"speechBubbles_xsltSavedText": "No errors in XSLT",
|
||||
"speechBubbles_contentUnpublished": "Content unpublished",
|
||||
"speechBubbles_partialViewSavedHeader": "Partial view saved",
|
||||
"speechBubbles_partialViewSavedText": "Partial view saved without any errors!",
|
||||
@@ -703,7 +696,6 @@ angular.module('umbraco.mocks').
|
||||
"treeHeaders_scripts": "Scripts",
|
||||
"treeHeaders_stylesheets": "Stylesheets",
|
||||
"treeHeaders_templates": "Templates",
|
||||
"treeHeaders_xslt": "XSLT Files",
|
||||
"update_updateAvailable": "New update ready",
|
||||
"update_updateDownloadText": "%0% is ready, click here for download",
|
||||
"update_updateNoServer": "No connection to server",
|
||||
@@ -760,4 +752,4 @@ angular.module('umbraco.mocks').
|
||||
.respond(getLanguageResource);
|
||||
}
|
||||
};
|
||||
}]);
|
||||
}]);
|
||||
|
||||
@@ -314,17 +314,17 @@ function contentResource($q, $http, umbDataFormatter, umbRequestHelper) {
|
||||
* </pre>
|
||||
*
|
||||
* @param {Int} id id of content item to return
|
||||
* @param {Int} languageId optional ID of the language to retrieve the item in
|
||||
* @param {Int} culture optional culture to retrieve the item in
|
||||
* @returns {Promise} resourcePromise object containing the content item.
|
||||
*
|
||||
*/
|
||||
getById: function (id, languageId) {
|
||||
getById: function (id, culture) {
|
||||
return umbRequestHelper.resourcePromise(
|
||||
$http.get(
|
||||
umbRequestHelper.getApiUrl(
|
||||
"contentApiBaseUrl",
|
||||
"GetById",
|
||||
{ id: id, languageId: languageId })),
|
||||
{ id: id, culture: culture })),
|
||||
'Failed to retrieve data for content id ' + id);
|
||||
},
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* @description A helper service for most editors, some methods are specific to content/media/member model types but most are used by
|
||||
* all editors to share logic and reduce the amount of replicated code among editors.
|
||||
**/
|
||||
function contentEditingHelper(fileManager, $q, $location, $routeParams, notificationsService, localizationService, serverValidationManager, dialogService, formHelper, appState) {
|
||||
function contentEditingHelper(fileManager, $q, $location, $routeParams, notificationsService, navigationService, localizationService, serverValidationManager, dialogService, formHelper, appState) {
|
||||
|
||||
function isValidIdentifier(id){
|
||||
//empty id <= 0
|
||||
@@ -596,7 +596,7 @@ function contentEditingHelper(fileManager, $q, $location, $routeParams, notifica
|
||||
// /belle/#/content/edit/9876 (where 9876 is the new id)
|
||||
|
||||
//clear the query strings
|
||||
$location.search("");
|
||||
navigationService.clearSearch();
|
||||
|
||||
//change to new path
|
||||
$location.path("/" + $routeParams.section + "/" + $routeParams.tree + "/" + $routeParams.method + "/" + id);
|
||||
@@ -617,9 +617,9 @@ function contentEditingHelper(fileManager, $q, $location, $routeParams, notifica
|
||||
* For some editors like scripts or entites that have names as ids, these names can change and we need to redirect
|
||||
* to their new paths, this is helper method to do that.
|
||||
*/
|
||||
redirectToRenamedContent: function (id) {
|
||||
redirectToRenamedContent: function (id) {
|
||||
//clear the query strings
|
||||
$location.search("");
|
||||
navigationService.clearSearch();
|
||||
//change to new path
|
||||
$location.path("/" + $routeParams.section + "/" + $routeParams.tree + "/" + $routeParams.method + "/" + id);
|
||||
//don't add a browser history for this
|
||||
|
||||
@@ -102,6 +102,25 @@ function navigationService($rootScope, $routeParams, $log, $location, $q, $timeo
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* @ngdoc method
|
||||
* @name umbraco.services.navigationService#clearSearch
|
||||
* @methodOf umbraco.services.navigationService
|
||||
*
|
||||
* @description
|
||||
* utility to clear the querystring/search params while maintaining a known list of parameters that should be maintained throughout the app
|
||||
*/
|
||||
clearSearch: function () {
|
||||
var retainKeys = ["mculture"];
|
||||
var currentSearch = $location.search();
|
||||
$location.search('');
|
||||
_.each(retainKeys, function (k) {
|
||||
if (currentSearch[k]) {
|
||||
$location.search(k, currentSearch[k]);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* @ngdoc method
|
||||
* @name umbraco.services.navigationService#load
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
var saveModel = _.pick(displayModel,
|
||||
'compositeContentTypes', 'isContainer', 'allowAsRoot', 'allowedTemplates', 'allowedContentTypes',
|
||||
'alias', 'description', 'thumbnail', 'name', 'id', 'icon', 'trashed',
|
||||
'key', 'parentId', 'alias', 'path');
|
||||
'key', 'parentId', 'alias', 'path', 'allowCultureVariant');
|
||||
|
||||
//TODO: Map these
|
||||
saveModel.allowedTemplates = _.map(displayModel.allowedTemplates, function (t) { return t.alias; });
|
||||
@@ -56,7 +56,7 @@
|
||||
});
|
||||
|
||||
var saveProperties = _.map(realProperties, function (p) {
|
||||
var saveProperty = _.pick(p, 'id', 'alias', 'description', 'validation', 'label', 'sortOrder', 'dataTypeId', 'groupId', 'memberCanEdit', 'showOnMemberProfile', 'isSensitiveData');
|
||||
var saveProperty = _.pick(p, 'id', 'alias', 'description', 'validation', 'label', 'sortOrder', 'dataTypeId', 'groupId', 'memberCanEdit', 'showOnMemberProfile', 'isSensitiveData', 'allowCultureVariant');
|
||||
return saveProperty;
|
||||
});
|
||||
|
||||
@@ -326,19 +326,23 @@
|
||||
|
||||
//get the selected variant and build the additional published variants
|
||||
saveModel.publishVariations = [];
|
||||
_.each(displayModel.variants,
|
||||
function (d) {
|
||||
//set the selected variant if this is current
|
||||
if (d.current === true) {
|
||||
saveModel.languageId = d.language.id;
|
||||
}
|
||||
if (d.publish === true) {
|
||||
saveModel.publishVariations.push({
|
||||
languageId: d.language.id,
|
||||
segment: d.segment
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
//if there's any variants than we need to set the language and include the variants to publish
|
||||
if (displayModel.variants.length > 0) {
|
||||
_.each(displayModel.variants,
|
||||
function (d) {
|
||||
//set the selected variant if this is current
|
||||
if (d.current === true) {
|
||||
saveModel.culture = d.language.culture;
|
||||
}
|
||||
if (d.publish === true) {
|
||||
saveModel.publishVariations.push({
|
||||
culture: d.language.culture,
|
||||
segment: d.segment
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var propExpireDate = displayModel.removeDate;
|
||||
var propReleaseDate = displayModel.releaseDate;
|
||||
|
||||
@@ -96,10 +96,12 @@ function NavigationController($scope, $rootScope, $location, $log, $q, $routePar
|
||||
appState.setMenuState("currentNode", args.node);
|
||||
|
||||
//not legacy, lets just set the route value and clear the query string if there is one.
|
||||
$location.path(n.routePath).search("");
|
||||
$location.path(n.routePath);
|
||||
navigationService.clearSearch();
|
||||
}
|
||||
else if (n.section) {
|
||||
$location.path(n.section).search("");
|
||||
$location.path(n.section);
|
||||
navigationService.clearSearch();
|
||||
}
|
||||
|
||||
navigationService.hideNavigation();
|
||||
@@ -236,24 +238,37 @@ function NavigationController($scope, $rootScope, $location, $log, $q, $routePar
|
||||
languageResource.getAll().then(function(languages) {
|
||||
$scope.languages = languages;
|
||||
|
||||
// make the default language selected
|
||||
$scope.languages.forEach(function (language) {
|
||||
if (language.isDefault) {
|
||||
$scope.selectedLanguage = language;
|
||||
if ($scope.languages.length > 1) {
|
||||
var defaultLang = _.find($scope.languages, function (l) {
|
||||
return l.isDefault;
|
||||
});
|
||||
if (defaultLang) {
|
||||
//set the route param
|
||||
$location.search("mculture", defaultLang.culture);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
init();
|
||||
});
|
||||
}));
|
||||
|
||||
/**
|
||||
* Updates the tree's query parameters
|
||||
*/
|
||||
function initTree() {
|
||||
function init() {
|
||||
//select the current language if set in the query string
|
||||
var mainCulture = $location.search().mculture;
|
||||
if (mainCulture && $scope.languages && $scope.languages.length > 1) {
|
||||
var found = _.find($scope.languages, function (l) {
|
||||
return l.culture === mainCulture;
|
||||
});
|
||||
if (found) {
|
||||
//set the route param
|
||||
$scope.selectedLanguage = found;
|
||||
}
|
||||
}
|
||||
|
||||
//create the custom query string param for this tree
|
||||
var queryParams = {};
|
||||
if ($scope.selectedLanguage && $scope.selectedLanguage.id) {
|
||||
queryParams["languageId"] = $scope.selectedLanguage.id;
|
||||
if ($scope.selectedLanguage && $scope.selectedLanguage.culture) {
|
||||
queryParams["culture"] = $scope.selectedLanguage.culture;
|
||||
}
|
||||
var queryString = $.param(queryParams); //create the query string from the params object
|
||||
|
||||
@@ -266,6 +281,7 @@ function NavigationController($scope, $rootScope, $location, $log, $q, $routePar
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function nodeExpandedHandler(args) {
|
||||
//store the reference to the expanded node path
|
||||
if (args.node) {
|
||||
@@ -274,11 +290,15 @@ function NavigationController($scope, $rootScope, $location, $log, $q, $routePar
|
||||
}
|
||||
|
||||
$scope.selectLanguage = function(language) {
|
||||
$scope.selectedLanguage = language;
|
||||
|
||||
$location.search("mculture", language.culture);
|
||||
|
||||
//$scope.selectedLanguage = language;
|
||||
|
||||
// close the language selector
|
||||
$scope.page.languageSelectorIsOpen = false;
|
||||
|
||||
initTree(); //this will reset the tree params and the tree directive will pick up the changes in a $watch
|
||||
init(); //re-bind language to the query string and update the tree params
|
||||
|
||||
//execute after next digest because the internal watch on the customtreeparams needs to be bound now that we've changed it
|
||||
$timeout(function () {
|
||||
|
||||
@@ -104,7 +104,6 @@ app.config(function ($routeProvider) {
|
||||
resolve: doLogout()
|
||||
})
|
||||
.when('/:section', {
|
||||
|
||||
//This allows us to dynamically change the template for this route since you cannot inject services into the templateUrl method.
|
||||
template: "<div ng-include='templateUrl'></div>",
|
||||
//This controller will execute for this route, then we can execute some code in order to set the template Url
|
||||
|
||||
@@ -58,6 +58,11 @@
|
||||
});
|
||||
|
||||
function activate() {
|
||||
//make the default the same as the content type
|
||||
if (!$scope.model.property.id) {
|
||||
$scope.model.property.allowCultureVariant = $scope.model.contentTypeAllowCultureVariant;
|
||||
}
|
||||
|
||||
matchValidationType();
|
||||
}
|
||||
|
||||
|
||||
@@ -21,16 +21,16 @@
|
||||
<div class="umb-control-group" ng-if="!model.property.locked">
|
||||
<div class="control-group">
|
||||
<textarea class="editor-label"
|
||||
data-element="property-name"
|
||||
name="propertyLabel"
|
||||
ng-model="model.property.label"
|
||||
localize="placeholder"
|
||||
placeholder="@placeholders_entername"
|
||||
umb-auto-focus
|
||||
focus-on-filled="true"
|
||||
umb-auto-resize
|
||||
required
|
||||
ng-keypress="vm.submitOnEnter($event)">
|
||||
data-element="property-name"
|
||||
name="propertyLabel"
|
||||
ng-model="model.property.label"
|
||||
localize="placeholder"
|
||||
placeholder="@placeholders_entername"
|
||||
umb-auto-focus
|
||||
focus-on-filled="true"
|
||||
umb-auto-resize
|
||||
required
|
||||
overlay-submit-on-enter>
|
||||
</textarea>
|
||||
<div class="umb-validation-label" val-msg-for="propertyLabel" val-toggle-msg="required">Required label</div>
|
||||
</div>
|
||||
@@ -38,99 +38,105 @@
|
||||
<umb-generate-alias enable-lock="true" alias-from="model.property.label" alias="model.property.alias"></umb-generate-alias>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="umb-control-group control-group">
|
||||
<textarea
|
||||
data-element="property-description"
|
||||
class="editor-description"
|
||||
ng-model="model.property.description"
|
||||
localize="placeholder"
|
||||
placeholder="@placeholders_enterDescription"
|
||||
ng-keypress="vm.submitOnEnter($event)"
|
||||
umb-auto-resize>
|
||||
</textarea>
|
||||
<textarea data-element="property-description"
|
||||
class="editor-description"
|
||||
ng-model="model.property.description"
|
||||
localize="placeholder"
|
||||
placeholder="@placeholders_enterDescription"
|
||||
overlay-submit-on-enter
|
||||
umb-auto-resize>
|
||||
</textarea>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="editor-wrapper umb-control-group control-group" ng-model="model.property.editor" val-require-component ng-if="!model.property.locked">
|
||||
|
||||
|
||||
<a data-element="editor-add" href="" ng-if="!model.property.editor" class="editor-placeholder" hotkey="alt+shift+e" ng-click="vm.openDataTypePicker(model.property)">
|
||||
<localize key="shortcuts_addEditor"></localize>
|
||||
</a>
|
||||
|
||||
|
||||
<div class="editor clearfix" ng-if="model.property.editor">
|
||||
|
||||
|
||||
<a href="" class="editor-icon-wrapper" ng-click="vm.openDataTypePicker(model.property)">
|
||||
<i class="icon {{ model.property.dataTypeIcon }}" ng-class="{'icon-autofill': model.property.dataTypeIcon == null}"></i>
|
||||
</a>
|
||||
|
||||
|
||||
<div class="editor-details">
|
||||
<a href="" class="editor-name" ng-click="vm.openDataTypePicker(model.property)">{{ model.property.dataTypeName }}</a>
|
||||
<a href="" class="editor-editor" ng-click="vm.openDataTypePicker(model.property)">{{ model.property.editor }}</a>
|
||||
</div>
|
||||
|
||||
|
||||
<a href class="editor-settings-icon pull-right"
|
||||
ng-click="vm.openDataTypeSettings(model.property)"
|
||||
hotkey="alt+shift+d"
|
||||
ng-if="model.property.editor">
|
||||
ng-click="vm.openDataTypeSettings(model.property)"
|
||||
hotkey="alt+shift+d"
|
||||
ng-if="model.property.editor">
|
||||
<i class="icon icon-settings"></i>
|
||||
</a>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="umb-control-group clearfix" ng-if="!model.property.locked">
|
||||
|
||||
|
||||
<div class="umb-control-group clearfix" ng-if="!model.property.locked">
|
||||
|
||||
<h5><localize key="validation_validation"></localize></h5>
|
||||
|
||||
|
||||
<label class="checkbox no-indent">
|
||||
<input type="checkbox" ng-model="model.property.validation.mandatory" focus-when="{{vm.focusOnMandatoryField}}">
|
||||
<input type="checkbox" ng-model="model.property.validation.mandatory" focus-when="{{vm.focusOnMandatoryField}}" />
|
||||
<localize key="validation_fieldIsMandatory"></localize>
|
||||
</label>
|
||||
|
||||
|
||||
<select class="umb-dropdown" ng-options="validationType.name for validationType in vm.validationTypes" ng-model="vm.selectedValidationType" ng-change="vm.changeValidationType(vm.selectedValidationType)">
|
||||
<option value=""><localize key="validation_validation">Validation</localize></option>
|
||||
</select>
|
||||
|
||||
<textarea
|
||||
class="editor-validation-pattern"
|
||||
localize="placeholder"
|
||||
placeholder="@validation_validationRegExp"
|
||||
ng-model="model.property.validation.pattern"
|
||||
ng-change="vm.changeValidationPattern()"
|
||||
ng-if="vm.showValidationPattern"
|
||||
umb-auto-resize
|
||||
focus-when="{{vm.focusOnPatternField}}"
|
||||
ng-keypress="vm.submitOnEnter($event)">
|
||||
</textarea>
|
||||
|
||||
|
||||
<textarea class="editor-validation-pattern"
|
||||
localize="placeholder"
|
||||
placeholder="@validation_validationRegExp"
|
||||
ng-model="model.property.validation.pattern"
|
||||
ng-change="vm.changeValidationPattern()"
|
||||
ng-if="vm.showValidationPattern"
|
||||
umb-auto-resize
|
||||
focus-when="{{vm.focusOnPatternField}}"
|
||||
overlay-submit-on-enter>
|
||||
</textarea>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="umb-control-group clearfix" ng-if="model.contentType === 'documentType' && model.contentTypeAllowCultureVariant">
|
||||
|
||||
<h5>Property Type Variation</h5>
|
||||
|
||||
<label class="checkbox no-indent">
|
||||
<input type="checkbox" ng-model="model.property.allowCultureVariant" />
|
||||
Allow varying by Culture
|
||||
</label>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="umb-control-group clearfix" ng-if="model.contentType === 'memberType'">
|
||||
|
||||
|
||||
<h5><localize key="general_options"></localize></h5>
|
||||
|
||||
|
||||
<label class="checkbox no-indent">
|
||||
<input type="checkbox" ng-model="model.property.showOnMemberProfile">
|
||||
<localize key="contentTypeEditor_showOnMemberProfile"></localize>
|
||||
<small><localize key="contentTypeEditor_showOnMemberProfileDescription"></localize></small>
|
||||
</label>
|
||||
|
||||
|
||||
<label class="checkbox no-indent">
|
||||
<input type="checkbox" ng-model="model.property.memberCanEdit">
|
||||
<localize key="contentTypeEditor_memberCanEdit"></localize>
|
||||
<small><localize key="contentTypeEditor_memberCanEditDescription"></localize></small>
|
||||
</label>
|
||||
|
||||
|
||||
<label ng-if="vm.showSensitiveData" class="checkbox no-indent">
|
||||
<input type="checkbox" ng-model="model.property.isSensitiveData">
|
||||
<localize key="contentTypeEditor_isSensitiveData"></localize>
|
||||
<small><localize key="contentTypeEditor_isSensitiveDataDescription"></localize></small>
|
||||
</label>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</umb-box-content>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//used for the media picker dialog
|
||||
angular.module("umbraco").controller("Umbraco.Notifications.ConfirmRouteChangeController",
|
||||
function ($scope, $location, $log, notificationsService) {
|
||||
function ($scope, $location, $log, notificationsService, navigationService) {
|
||||
|
||||
$scope.discard = function(not){
|
||||
|
||||
@@ -13,7 +13,7 @@ angular.module("umbraco").controller("Umbraco.Notifications.ConfirmRouteChangeCo
|
||||
// when no callback is added run the normal functionality of the discard button
|
||||
not.args.listener();
|
||||
|
||||
$location.search("");
|
||||
navigationService.clearSearch();
|
||||
|
||||
//we need to break the path up into path and query
|
||||
var parts = not.args.path.split("?");
|
||||
@@ -33,4 +33,4 @@ angular.module("umbraco").controller("Umbraco.Notifications.ConfirmRouteChangeCo
|
||||
notificationsService.remove(not);
|
||||
};
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,23 +1,27 @@
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
function PublishController($scope, $timeout) {
|
||||
function PublishController($scope) {
|
||||
|
||||
var vm = this;
|
||||
vm.variants = $scope.model.variants;
|
||||
var variants = $scope.model.variants;
|
||||
vm.changeSelection = changeSelection;
|
||||
vm.loading = true;
|
||||
|
||||
vm.dirtyVariants = [];
|
||||
vm.pristineVariants = [];
|
||||
|
||||
//watch this model, if it's reset, then re init
|
||||
$scope.$watch(function() {
|
||||
return $scope.model.variants;
|
||||
},
|
||||
function(newVal, oldVal) {
|
||||
$scope.$watch(function () {
|
||||
return $scope.model.variants;
|
||||
},
|
||||
function (newVal, oldVal) {
|
||||
vm.variants = newVal;
|
||||
if (oldVal && oldVal.length) {
|
||||
//re-bind the selections
|
||||
for (var i = 0; i < oldVal.length; i++) {
|
||||
var found = _.find(vm.variants, function(v) {
|
||||
return v.language.id == oldVal[i].language.id;
|
||||
var found = _.find(variants, function (v) {
|
||||
return v.language.id === oldVal[i].language.id;
|
||||
});
|
||||
if (found) {
|
||||
found.publish = oldVal[i].publish;
|
||||
@@ -28,24 +32,42 @@
|
||||
});
|
||||
|
||||
function changeSelection(variant) {
|
||||
var firstSelected = _.find(vm.variants, function(v) {
|
||||
var firstSelected = _.find(variants, function (v) {
|
||||
return v.publish;
|
||||
});
|
||||
$scope.model.disableSubmitButton = !firstSelected; //disable submit button if there is none selected
|
||||
}
|
||||
|
||||
function onInit() {
|
||||
_.each(vm.variants,
|
||||
function (v) {
|
||||
v.compositeId = v.language.id + "_" + (v.segment ? v.segment : "");
|
||||
v.htmlId = "publish_variant_" + v.compositeId;
|
||||
_.each(variants,
|
||||
function (variant) {
|
||||
variant.compositeId = variant.language.id + "_" + (variant.segment ? variant.segment : "");
|
||||
variant.htmlId = "publish_variant_" + variant.compositeId;
|
||||
|
||||
//separate "pristine" and "dirty" variants
|
||||
if (variant.isEdited === true) {
|
||||
vm.dirtyVariants.push(variant);
|
||||
} else if (variant.isEdited === true ||
|
||||
variant.isEdited === false && variant.state === "Unpublished") {
|
||||
vm.dirtyVariants.push(variant);
|
||||
} else {
|
||||
vm.pristineVariants.push(variant);
|
||||
}
|
||||
});
|
||||
//now sort it so that the current one is at the top
|
||||
vm.variants = _.sortBy(vm.variants, function(v) {
|
||||
return v.current ? 0 : 1;
|
||||
});
|
||||
//ensure that the current one is selected
|
||||
vm.variants[0].publish = true;
|
||||
|
||||
if (vm.dirtyVariants.length !== 0) {
|
||||
//now sort it so that the current one is at the top
|
||||
vm.dirtyVariants = _.sortBy(vm.dirtyVariants, function (v) {
|
||||
return v.current ? 0 : 1;
|
||||
});
|
||||
//ensure that the current one is selected
|
||||
vm.dirtyVariants[0].publish = true;
|
||||
} else {
|
||||
//disable Publish button if we have nothing to publish
|
||||
$scope.model.disableSubmitButton = true;
|
||||
}
|
||||
|
||||
vm.loading = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,34 +1,52 @@
|
||||
<div ng-controller="Umbraco.Overlays.PublishController as vm" >
|
||||
|
||||
<div ng-controller="Umbraco.Overlays.PublishController as vm">
|
||||
|
||||
<div style="margin-bottom: 15px;">
|
||||
<p>What languages would you like to publish?</p>
|
||||
<p ng-if="vm.dirtyVariants.length > 0"><localize key="content_languagesToPublish"></localize></p>
|
||||
<p ng-if="vm.dirtyVariants.length === 0"><localize key="content_noLanguagesToPublish"></localize></p>
|
||||
</div>
|
||||
|
||||
<div ng-if="vm.loading" style="min-height: 50px; position: relative;">
|
||||
<umb-load-indicator></umb-load-indicator>
|
||||
</div>
|
||||
|
||||
<div class="umb-list umb-list--condensed" ng-if="!vm.loading">
|
||||
<div class="umb-list-item" ng-repeat="variant in vm.variants">
|
||||
<div class="umb-list umb-list--condensed" ng-if="!vm.loading && vm.dirtyVariants">
|
||||
|
||||
<div class="umb-list-item" ng-repeat="variant in vm.dirtyVariants">
|
||||
<ng-form name="publishVariantSelectorForm">
|
||||
<label class="flex" for="{{variant.htmlId}}">
|
||||
<input
|
||||
id="{{variant.htmlId}}"
|
||||
name="publishVariantSelector"
|
||||
type="checkbox"
|
||||
ng-model="variant.publish"
|
||||
ng-change="vm.changeSelection(variant)"
|
||||
ng-disabled="variant.validationError"
|
||||
style="margin-right: 8px;"
|
||||
val-server-field="{{variant.htmlId}}"/>
|
||||
<input id="{{variant.htmlId}}"
|
||||
name="publishVariantSelector"
|
||||
type="checkbox"
|
||||
ng-model="variant.publish"
|
||||
ng-change="vm.changeSelection(variant)"
|
||||
ng-disabled="variant.validationError"
|
||||
style="margin-right: 8px;"
|
||||
val-server-field="{{variant.htmlId}}" />
|
||||
<div>
|
||||
<div ng-class="{'bold': variant.published}" style="margin-bottom: 2px;">{{ variant.language.name }}</div>
|
||||
<div class="umb-permission__description" ng-if="!variant.validationError">{{ variant.state }}</div>
|
||||
<div class="umb-permission__description" ng-if="!variant.validationError && variant.isEdited && variant.state === 'Published'"><localize key="content_publishedPendingChanges"></localize></div>
|
||||
<div class="umb-permission__description" ng-if="!variant.validationError && variant.isEdited && variant.state === 'Unpublished'"><localize key="content_unpublishedPendingChanges"></localize></div>
|
||||
<div class="umb-permission__description" ng-if="!variant.validationError && variant.isEdited === false">{{ variant.state }}</div>
|
||||
|
||||
<div class="umb-permission__description" style="color: #F02E28;" val-msg-for="publishVariantSelector" val-toggle-msg="valServerField"></div>
|
||||
</div>
|
||||
</label>
|
||||
</ng-form>
|
||||
</div>
|
||||
<br/>
|
||||
</div>
|
||||
|
||||
<div class="umb-list umb-list--condensed" ng-if="!vm.loading && vm.pristineVariants">
|
||||
<div style="margin-bottom: 15px; font-weight: bold;">
|
||||
<p><localize key="content_publishedLanguages"></localize></p>
|
||||
</div>
|
||||
|
||||
<div class="umb-list-item" ng-repeat="variant in vm.pristineVariants">
|
||||
<div>
|
||||
<div ng-class="{'bold': variant.published}" style="margin-bottom: 2px;">{{ variant.language.name }}</div>
|
||||
<div class="umb-permission__description" ng-if="!variant.validationError">{{ variant.state }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -36,7 +36,7 @@ angular.module("umbraco")
|
||||
|
||||
//perform the path change, if it is successful then the promise will resolve otherwise it will fail
|
||||
$scope.model.close();
|
||||
$location.path("/logout");
|
||||
$location.path("/logout").search('');
|
||||
};
|
||||
|
||||
$scope.gotoHistory = function (link) {
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
server-validation-field="Alias">
|
||||
</umb-generate-alias>
|
||||
|
||||
<a ng-if="variants.length > 1" class="umb-variant-switcher__toggle" href="" ng-click="vm.dropdownOpen = !vm.dropdownOpen">
|
||||
<a ng-if="variants.length > 0" class="umb-variant-switcher__toggle" href="" ng-click="vm.dropdownOpen = !vm.dropdownOpen">
|
||||
<span>{{vm.currentVariant.language.name}}</span>
|
||||
<ins class="umb-variant-switcher__expand" ng-class="{'icon-navigation-down': !vm.dropdownOpen, 'icon-navigation-up': vm.dropdownOpen}"> </ins>
|
||||
</a>
|
||||
@@ -59,9 +59,14 @@
|
||||
<umb-dropdown-item class="umb-variant-switcher__item" ng-class="{'umb-variant-switcher_item--current': variant.current}" ng-repeat="variant in variants">
|
||||
<a href="" class="umb-variant-switcher__name-wrapper" ng-click="selectVariant($event, variant)" prevent-default>
|
||||
<span class="umb-variant-switcher__name">{{variant.language.name}}</span>
|
||||
<span class="umb-variant-switcher__state">{{variant.state}}</span>
|
||||
<span class="umb-variant-switcher__state" ng-if="!variant.validationError && variant.isEdited && variant.state === 'Published'"><localize key="content_publishedPendingChanges"></localize></span>
|
||||
<span class="umb-variant-switcher__state" ng-if="!variant.validationError && variant.isEdited && variant.state === 'Unpublished'"><localize key="content_unpublishedPendingChanges"></localize></span>
|
||||
<span class="umb-variant-switcher__state" ng-if="variant.isEdited === false">{{variant.state}}</span>
|
||||
</a>
|
||||
<!-- Commented out as opposed to removed until we fully support split view (U4-11290) -->
|
||||
<!--
|
||||
<div ng-if="splitViewOpen !== true" class="umb-variant-switcher__split-view" ng-click="openInSplitView($event, variant)">Open in split view</div>
|
||||
-->
|
||||
</umb-dropdown-item>
|
||||
</umb-dropdown>
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ function ContentEditController($scope, $routeParams, contentResource) {
|
||||
$scope.getScaffoldMethod = $routeParams.blueprintId ? scaffoldBlueprint : scaffoldEmpty;
|
||||
$scope.page = $routeParams.page;
|
||||
$scope.isNew = $routeParams.create;
|
||||
$scope.languageId = $routeParams.languageId;
|
||||
$scope.culture = $routeParams.cculture;
|
||||
}
|
||||
|
||||
angular.module("umbraco").controller("Umbraco.Editors.Content.EditController", ContentEditController);
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
get-scaffold-method="getScaffoldMethod"
|
||||
tree-alias="content"
|
||||
is-new="isNew"
|
||||
language-id="languageId"
|
||||
culture="culture"
|
||||
model="model">
|
||||
</content-editor>
|
||||
</div>
|
||||
|
||||
@@ -1,19 +1,18 @@
|
||||
<div class="sub-view-columns">
|
||||
|
||||
<div class="sub-view-column-left">
|
||||
<h5><localize key="contentTypeEditor_enableListViewHeading" /></h5>
|
||||
<small><localize key="contentTypeEditor_enableListViewDescription" /></small>
|
||||
</div>
|
||||
|
||||
<div class="sub-view-column-right">
|
||||
|
||||
<umb-list-view-settings
|
||||
enable-list-view="model.isContainer"
|
||||
model-alias="model.alias"
|
||||
list-view-name="model.listViewEditorName"
|
||||
content-type="documentType">
|
||||
</umb-list-view-settings>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<umb-box>
|
||||
<umb-box-content>
|
||||
<div class="sub-view-columns">
|
||||
<div class="sub-view-column-left">
|
||||
<h5><localize key="contentTypeEditor_enableListViewHeading" /></h5>
|
||||
<small><localize key="contentTypeEditor_enableListViewDescription" /></small>
|
||||
</div>
|
||||
<div class="sub-view-column-right">
|
||||
<umb-list-view-settings
|
||||
enable-list-view="model.isContainer"
|
||||
model-alias="model.alias"
|
||||
list-view-name="model.listViewEditorName"
|
||||
content-type="documentType">
|
||||
</umb-list-view-settings>
|
||||
</div>
|
||||
</div>
|
||||
</umb-box-content>
|
||||
</umb-box>
|
||||
@@ -1,47 +1,65 @@
|
||||
<div ng-controller="Umbraco.Editors.DocumentType.PermissionsController as vm">
|
||||
|
||||
<div class="sub-view-columns">
|
||||
<umb-box>
|
||||
<umb-box-content>
|
||||
|
||||
<div class="sub-view-column-left">
|
||||
<h5><localize key="contentTypeEditor_allowAsRootHeading" /></h5>
|
||||
<small><localize key="contentTypeEditor_allowAsRootDescription" /></small>
|
||||
</div>
|
||||
<div class="sub-view-column-right">
|
||||
<label class="checkbox no-indent" >
|
||||
<input type="checkbox" ng-model="model.allowAsRoot" hotkey="alt+shift+r" />
|
||||
<localize key="contentTypeEditor_allowAsRootCheckbox" />
|
||||
</label>
|
||||
</div>
|
||||
<div class="sub-view-columns">
|
||||
|
||||
</div>
|
||||
<div class="sub-view-column-left">
|
||||
<h5><localize key="contentTypeEditor_allowAsRootHeading" /></h5>
|
||||
<small><localize key="contentTypeEditor_allowAsRootDescription" /></small>
|
||||
</div>
|
||||
<div class="sub-view-column-right">
|
||||
<label class="checkbox no-indent">
|
||||
<input type="checkbox" ng-model="model.allowAsRoot" hotkey="alt+shift+r" />
|
||||
<localize key="contentTypeEditor_allowAsRootCheckbox" />
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="sub-view-columns">
|
||||
</div>
|
||||
|
||||
<div class="sub-view-column-left">
|
||||
<h5><localize key="contentTypeEditor_childNodesHeading" /></h5>
|
||||
<small><localize key="contentTypeEditor_childNodesDescription" /></small>
|
||||
</div>
|
||||
<div class="sub-view-columns">
|
||||
|
||||
<div class="sub-view-column-right">
|
||||
<umb-child-selector
|
||||
selected-children="vm.selectedChildren"
|
||||
available-children="vm.contentTypes"
|
||||
parent-name="model.name"
|
||||
parent-icon="model.icon"
|
||||
parent-id="model.id"
|
||||
on-add="vm.addChild"
|
||||
on-remove="vm.removeChild">
|
||||
</umb-child-selector>
|
||||
<div class="sub-view-column-left">
|
||||
<h5><localize key="contentTypeEditor_childNodesHeading" /></h5>
|
||||
<small><localize key="contentTypeEditor_childNodesDescription" /></small>
|
||||
</div>
|
||||
|
||||
<umb-overlay
|
||||
ng-if="vm.childNodeSelectorOverlay.show"
|
||||
model="vm.childNodeSelectorOverlay"
|
||||
position="target"
|
||||
view="vm.childNodeSelectorOverlay.view">
|
||||
</umb-overlay>
|
||||
<div class="sub-view-column-right">
|
||||
<umb-child-selector selected-children="vm.selectedChildren"
|
||||
available-children="vm.contentTypes"
|
||||
parent-name="model.name"
|
||||
parent-icon="model.icon"
|
||||
parent-id="model.id"
|
||||
on-add="vm.addChild"
|
||||
on-remove="vm.removeChild">
|
||||
</umb-child-selector>
|
||||
|
||||
</div>
|
||||
<umb-overlay ng-if="vm.childNodeSelectorOverlay.show"
|
||||
model="vm.childNodeSelectorOverlay"
|
||||
position="target"
|
||||
view="vm.childNodeSelectorOverlay.view">
|
||||
</umb-overlay>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="sub-view-columns">
|
||||
|
||||
<div class="sub-view-column-left">
|
||||
<h5>Content Type Variation</h5>
|
||||
<small>Define the rules for how this content type's properties can be varied</small>
|
||||
</div>
|
||||
<div class="sub-view-column-right">
|
||||
<label class="checkbox no-indent">
|
||||
<input type="checkbox" ng-model="model.allowCultureVariant" />
|
||||
Allow varying by Culture
|
||||
</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</umb-box-content>
|
||||
</umb-box>
|
||||
</div>
|
||||
|
||||
@@ -1,23 +1,27 @@
|
||||
<div class="sub-view-columns" ng-controller="Umbraco.Editors.DocumentType.TemplatesController as vm">
|
||||
<div ng-controller="Umbraco.Editors.DocumentType.TemplatesController as vm">
|
||||
<umb-box>
|
||||
<umb-box-content>
|
||||
<div class="sub-view-columns">
|
||||
|
||||
<div class="sub-view-column-left">
|
||||
<h5><localize key="contentTypeEditor_allowedTemplatesHeading" /></h5>
|
||||
<small><localize key="contentTypeEditor_allowedTemplatesDescription" /></small>
|
||||
</div>
|
||||
|
||||
<div class="sub-view-column-right">
|
||||
|
||||
<umb-grid-selector
|
||||
ng-if="vm.availableTemplates"
|
||||
selected-items="model.allowedTemplates"
|
||||
available-items="vm.availableTemplates"
|
||||
default-item="model.defaultTemplate"
|
||||
item-name="template"
|
||||
name="model.name"
|
||||
alias="model.alias"
|
||||
update-placeholder="vm.updateTemplatePlaceholder">
|
||||
</umb-grid-selector>
|
||||
|
||||
</div>
|
||||
<div class="sub-view-column-left">
|
||||
<h5><localize key="contentTypeEditor_allowedTemplatesHeading" /></h5>
|
||||
<small><localize key="contentTypeEditor_allowedTemplatesDescription" /></small>
|
||||
</div>
|
||||
|
||||
<div class="sub-view-column-right">
|
||||
<umb-grid-selector
|
||||
ng-if="vm.availableTemplates"
|
||||
selected-items="model.allowedTemplates"
|
||||
available-items="vm.availableTemplates"
|
||||
default-item="model.defaultTemplate"
|
||||
item-name="template"
|
||||
name="model.name"
|
||||
alias="model.alias"
|
||||
update-placeholder="vm.updateTemplatePlaceholder">
|
||||
</umb-grid-selector>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</umb-box-content>
|
||||
</umb-box>
|
||||
</div>
|
||||
|
||||
@@ -1,19 +1,18 @@
|
||||
<div class="sub-view-columns">
|
||||
|
||||
<div class="sub-view-column-left">
|
||||
<h5><localize key="contentTypeEditor_enableListViewHeading" /></h5>
|
||||
<small><localize key="contentTypeEditor_enableListViewDescription" /></small>
|
||||
</div>
|
||||
|
||||
<div class="sub-view-column-right">
|
||||
|
||||
<umb-list-view-settings
|
||||
enable-list-view="model.isContainer"
|
||||
model-alias="model.alias"
|
||||
list-view-name="model.listViewEditorName"
|
||||
content-type="mediaType">
|
||||
</umb-list-view-settings>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<umb-box>
|
||||
<umb-box-content>
|
||||
<div class="sub-view-columns">
|
||||
<div class="sub-view-column-left">
|
||||
<h5><localize key="contentTypeEditor_enableListViewHeading" /></h5>
|
||||
<small><localize key="contentTypeEditor_enableListViewDescription" /></small>
|
||||
</div>
|
||||
<div class="sub-view-column-right">
|
||||
<umb-list-view-settings
|
||||
enable-list-view="model.isContainer"
|
||||
model-alias="model.alias"
|
||||
list-view-name="model.listViewEditorName"
|
||||
content-type="mediaType">
|
||||
</umb-list-view-settings>
|
||||
</div>
|
||||
</div>
|
||||
</umb-box-content>
|
||||
</umb-box>
|
||||
@@ -1,49 +1,51 @@
|
||||
<div ng-controller="Umbraco.Editors.MediaType.PermissionsController as vm">
|
||||
<umb-box>
|
||||
<umb-box-content>
|
||||
<div class="sub-view-columns">
|
||||
|
||||
<div class="sub-view-columns">
|
||||
|
||||
<div class="sub-view-column-left">
|
||||
<h5><localize key="contentTypeEditor_allowAsRootHeading" /></h5>
|
||||
<small><localize key="contentTypeEditor_allowAsRootDescription" /></small>
|
||||
</div>
|
||||
<div class="sub-view-column-right">
|
||||
<label class="checkbox no-indent" >
|
||||
<input type="checkbox" ng-model="model.allowAsRoot" hotkey="alt+shift+r" />
|
||||
<localize key="contentTypeEditor_allowAsRootCheckbox" />
|
||||
</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="sub-view-columns">
|
||||
|
||||
<div class="sub-view-column-left">
|
||||
<h5><localize key="contentTypeEditor_childNodesHeading" /></h5>
|
||||
<small><localize key="contentTypeEditor_childNodesDescription" /></small>
|
||||
</div>
|
||||
|
||||
<div class="sub-view-column-right">
|
||||
|
||||
<umb-child-selector
|
||||
selected-children="vm.selectedChildren"
|
||||
available-children="vm.mediaTypes"
|
||||
parent-name="model.name"
|
||||
parent-icon="model.icon"
|
||||
parent-id="model.id"
|
||||
on-add="vm.addChild"
|
||||
on-remove="vm.removeChild">
|
||||
</umb-child-selector>
|
||||
|
||||
<umb-overlay
|
||||
ng-if="vm.childNodeSelectorOverlay.show"
|
||||
model="vm.childNodeSelectorOverlay"
|
||||
position="target"
|
||||
view="vm.childNodeSelectorOverlay.view">
|
||||
</umb-overlay>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="sub-view-column-left">
|
||||
<h5><localize key="contentTypeEditor_allowAsRootHeading" /></h5>
|
||||
<small><localize key="contentTypeEditor_allowAsRootDescription" /></small>
|
||||
</div>
|
||||
<div class="sub-view-column-right">
|
||||
<label class="checkbox no-indent" >
|
||||
<input type="checkbox" ng-model="model.allowAsRoot" hotkey="alt+shift+r" />
|
||||
<localize key="contentTypeEditor_allowAsRootCheckbox" />
|
||||
</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="sub-view-columns">
|
||||
|
||||
<div class="sub-view-column-left">
|
||||
<h5><localize key="contentTypeEditor_childNodesHeading" /></h5>
|
||||
<small><localize key="contentTypeEditor_childNodesDescription" /></small>
|
||||
</div>
|
||||
|
||||
<div class="sub-view-column-right">
|
||||
|
||||
<umb-child-selector
|
||||
selected-children="vm.selectedChildren"
|
||||
available-children="vm.mediaTypes"
|
||||
parent-name="model.name"
|
||||
parent-icon="model.icon"
|
||||
parent-id="model.id"
|
||||
on-add="vm.addChild"
|
||||
on-remove="vm.removeChild">
|
||||
</umb-child-selector>
|
||||
|
||||
<umb-overlay
|
||||
ng-if="vm.childNodeSelectorOverlay.show"
|
||||
model="vm.childNodeSelectorOverlay"
|
||||
position="target"
|
||||
view="vm.childNodeSelectorOverlay.view">
|
||||
</umb-overlay>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</umb-box-content>
|
||||
</umb-box>
|
||||
</div>
|
||||
|
||||
@@ -19,50 +19,53 @@
|
||||
</umb-editor-header>
|
||||
|
||||
<umb-editor-container>
|
||||
<umb-box>
|
||||
<umb-box-content>
|
||||
|
||||
<div class="flex" style="margin-bottom: 30px;">
|
||||
<div class="flex" style="margin-bottom: 30px;">
|
||||
|
||||
<div class="flex" style="margin-left: auto;">
|
||||
<div class="btn-group umb-era-button-group dropdown" style="margin-right: 10px;">
|
||||
|
||||
<button
|
||||
type="button"
|
||||
class="umb-era-button umb-button--s"
|
||||
ng-click="vm.openInsertOverlay()">
|
||||
<i class="icon icon-add"></i> <localize key="template_insert">Insert</localize>
|
||||
</button>
|
||||
<div class="flex" style="margin-left: auto;">
|
||||
<div class="btn-group umb-era-button-group dropdown" style="margin-right: 10px;">
|
||||
|
||||
<button
|
||||
type="button"
|
||||
class="umb-era-button umb-button--s"
|
||||
ng-click="vm.openInsertOverlay()">
|
||||
<i class="icon icon-add"></i> <localize key="template_insert">Insert</localize>
|
||||
</button>
|
||||
|
||||
<a class="umb-era-button umb-button--s dropdown-toggle umb-button-group__toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<a class="umb-era-button umb-button--s dropdown-toggle umb-button-group__toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
|
||||
<ul aria-labelledby="dLabel" class="dropdown-menu bottom-up umb-button-group__sub-buttons" role="menu">
|
||||
<li><a href="" ng-click="vm.openPageFieldOverlay()"><localize key="template_insertPageField">Value</localize></a></li>
|
||||
<li><a href="" ng-click="vm.openMacroOverlay()"><localize key="template_insertMacro">Macro</localize></a></li>
|
||||
<li><a href="" ng-click="vm.openDictionaryItemOverlay()"><localize key="template_insertDictionaryItem">Dictionary item</localize></a></li>
|
||||
</ul>
|
||||
<ul aria-labelledby="dLabel" class="dropdown-menu bottom-up umb-button-group__sub-buttons" role="menu">
|
||||
<li><a href="" ng-click="vm.openPageFieldOverlay()"><localize key="template_insertPageField">Value</localize></a></li>
|
||||
<li><a href="" ng-click="vm.openMacroOverlay()"><localize key="template_insertMacro">Macro</localize></a></li>
|
||||
<li><a href="" ng-click="vm.openDictionaryItemOverlay()"><localize key="template_insertDictionaryItem">Dictionary item</localize></a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
style="margin-right: 10px;"
|
||||
class="umb-era-button umb-button--s"
|
||||
ng-click="vm.openQueryBuilderOverlay()">
|
||||
<i class="icon icon-wand"></i> <localize key="template_queryBuilder">Query builder</localize>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
style="margin-right: 10px;"
|
||||
class="umb-era-button umb-button--s"
|
||||
ng-click="vm.openQueryBuilderOverlay()">
|
||||
<i class="icon icon-wand"></i> <localize key="template_queryBuilder">Query builder</localize>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div
|
||||
auto-scale="85"
|
||||
umb-ace-editor="vm.aceOption"
|
||||
model="vm.partialViewMacro.content">
|
||||
</div>
|
||||
|
||||
<div
|
||||
auto-scale="85"
|
||||
umb-ace-editor="vm.aceOption"
|
||||
model="vm.partialViewMacro.content">
|
||||
</div>
|
||||
|
||||
</umb-box-content>
|
||||
</umb-box>
|
||||
</umb-editor-container>
|
||||
|
||||
<umb-editor-footer>
|
||||
|
||||
@@ -20,49 +20,54 @@
|
||||
|
||||
<umb-editor-container>
|
||||
|
||||
<div class="flex" style="margin-bottom: 30px;">
|
||||
<umb-box>
|
||||
<umb-box-content>
|
||||
|
||||
<div class="flex" style="margin-bottom: 30px;">
|
||||
|
||||
<div class="flex" style="margin-left: auto;">
|
||||
<div class="btn-group umb-era-button-group dropdown" style="margin-right: 10px;">
|
||||
|
||||
<button
|
||||
type="button"
|
||||
class="umb-era-button umb-button--s"
|
||||
ng-click="vm.openInsertOverlay()">
|
||||
<i class="icon icon-add"></i> <localize key="template_insert">Insert</localize>
|
||||
</button>
|
||||
|
||||
<a class="umb-era-button umb-button--s dropdown-toggle umb-button-group__toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
|
||||
<ul aria-labelledby="dLabel" class="dropdown-menu bottom-up umb-button-group__sub-buttons" role="menu">
|
||||
<li><a href="" ng-click="vm.openPageFieldOverlay()"><localize key="template_insertPageField">Value</localize></a></li>
|
||||
<li><a href="" ng-click="vm.openMacroOverlay()"><localize key="template_insertMacro">Macro</localize></a></li>
|
||||
<li><a href="" ng-click="vm.openDictionaryItemOverlay()"><localize key="template_insertDictionaryItem">Dictionary item</localize></a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="flex" style="margin-left: auto;">
|
||||
<div class="btn-group umb-era-button-group dropdown" style="margin-right: 10px;">
|
||||
|
||||
<button
|
||||
type="button"
|
||||
style="margin-right: 10px;"
|
||||
class="umb-era-button umb-button--s"
|
||||
ng-click="vm.openInsertOverlay()">
|
||||
<i class="icon icon-add"></i> <localize key="template_insert">Insert</localize>
|
||||
ng-click="vm.openQueryBuilderOverlay()">
|
||||
<i class="icon icon-wand"></i> <localize key="template_queryBuilder">Query builder</localize>
|
||||
</button>
|
||||
|
||||
<a class="umb-era-button umb-button--s dropdown-toggle umb-button-group__toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
|
||||
<ul aria-labelledby="dLabel" class="dropdown-menu bottom-up umb-button-group__sub-buttons" role="menu">
|
||||
<li><a href="" ng-click="vm.openPageFieldOverlay()"><localize key="template_insertPageField">Value</localize></a></li>
|
||||
<li><a href="" ng-click="vm.openMacroOverlay()"><localize key="template_insertMacro">Macro</localize></a></li>
|
||||
<li><a href="" ng-click="vm.openDictionaryItemOverlay()"><localize key="template_insertDictionaryItem">Dictionary item</localize></a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
style="margin-right: 10px;"
|
||||
class="umb-era-button umb-button--s"
|
||||
ng-click="vm.openQueryBuilderOverlay()">
|
||||
<i class="icon icon-wand"></i> <localize key="template_queryBuilder">Query builder</localize>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div
|
||||
auto-scale="85"
|
||||
umb-ace-editor="vm.aceOption"
|
||||
model="vm.partialView.content">
|
||||
</div>
|
||||
|
||||
<div
|
||||
auto-scale="85"
|
||||
umb-ace-editor="vm.aceOption"
|
||||
model="vm.partialView.content">
|
||||
</div>
|
||||
|
||||
</umb-box-content>
|
||||
</umb-box>
|
||||
|
||||
</umb-editor-container>
|
||||
|
||||
<umb-editor-footer>
|
||||
|
||||
@@ -19,14 +19,16 @@
|
||||
</umb-editor-header>
|
||||
|
||||
<umb-editor-container>
|
||||
|
||||
<div
|
||||
data-element="code-editor"
|
||||
auto-scale="85"
|
||||
umb-ace-editor="vm.aceOption"
|
||||
model="vm.script.content">
|
||||
</div>
|
||||
|
||||
<umb-box>
|
||||
<umb-box-content>
|
||||
<div
|
||||
data-element="code-editor"
|
||||
auto-scale="85"
|
||||
umb-ace-editor="vm.aceOption"
|
||||
model="vm.script.content">
|
||||
</div>
|
||||
</umb-box-content>
|
||||
</umb-box>
|
||||
</umb-editor-container>
|
||||
|
||||
<umb-editor-footer>
|
||||
|
||||
@@ -7,14 +7,12 @@
|
||||
novalidate
|
||||
val-form-manager>
|
||||
|
||||
|
||||
<umb-editor-view ng-if="!vm.page.loading">
|
||||
|
||||
<umb-editor-header
|
||||
name="vm.template.name"
|
||||
alias="vm.template.alias"
|
||||
key="vm.template.key"
|
||||
hideDescription="true"
|
||||
description="vm.template.virtualPath"
|
||||
description-locked="true"
|
||||
menu="vm.page.menu"
|
||||
@@ -23,84 +21,90 @@
|
||||
|
||||
<umb-editor-container>
|
||||
|
||||
<div class="flex" style="margin-bottom: 30px;">
|
||||
<umb-box>
|
||||
<umb-box-content>
|
||||
|
||||
<div class="flex">
|
||||
<div class="flex" style="margin-bottom: 30px;">
|
||||
|
||||
<div ng-class="{'btn-group umb-era-button-group': vm.template.masterTemplateAlias}" style="margin-right: 10px;">
|
||||
|
||||
<button
|
||||
data-element="button-masterTemplate"
|
||||
type="button"
|
||||
class="umb-era-button umb-button--s"
|
||||
ng-click="vm.openMasterTemplateOverlay()">
|
||||
<i class="icon icon-layout"></i>
|
||||
<span class="bold"><localize key="template_mastertemplate">Master template</localize>:</span>
|
||||
<span style="margin-left: 5px;">
|
||||
<span ng-if="vm.template.masterTemplateAlias">{{ vm.getMasterTemplateName(vm.template.masterTemplateAlias, vm.templates) }}</span>
|
||||
<span ng-if="!vm.template.masterTemplateAlias"><localize key="template_noMaster">No master</localize></span>
|
||||
</span>
|
||||
</button>
|
||||
<div class="flex">
|
||||
|
||||
<a ng-if="vm.template.masterTemplateAlias" ng-click="vm.removeMasterTemplate()" class="umb-era-button umb-button--s dropdown-toggle umb-button-group__toggle">
|
||||
<span class="icon icon-wrong"></span>
|
||||
</a>
|
||||
<div ng-class="{'btn-group umb-era-button-group': vm.template.masterTemplateAlias}" style="margin-right: 10px;">
|
||||
|
||||
<button
|
||||
data-element="button-masterTemplate"
|
||||
type="button"
|
||||
class="umb-era-button umb-button--s"
|
||||
ng-click="vm.openMasterTemplateOverlay()">
|
||||
<i class="icon icon-layout"></i>
|
||||
<span class="bold"><localize key="template_mastertemplate">Master template</localize>:</span>
|
||||
<span style="margin-left: 5px;">
|
||||
<span ng-if="vm.template.masterTemplateAlias">{{ vm.getMasterTemplateName(vm.template.masterTemplateAlias, vm.templates) }}</span>
|
||||
<span ng-if="!vm.template.masterTemplateAlias"><localize key="template_noMaster">No master</localize></span>
|
||||
</span>
|
||||
</button>
|
||||
|
||||
<a ng-if="vm.template.masterTemplateAlias" ng-click="vm.removeMasterTemplate()" class="umb-era-button umb-button--s dropdown-toggle umb-button-group__toggle">
|
||||
<span class="icon icon-wrong"></span>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="flex" style="margin-left: auto;">
|
||||
<div class="btn-group umb-era-button-group dropdown" style="margin-right: 10px;">
|
||||
|
||||
<button
|
||||
data-element="button-insert"
|
||||
type="button"
|
||||
class="umb-era-button umb-button--s"
|
||||
ng-click="vm.openInsertOverlay()">
|
||||
<i class="icon icon-add"></i> <localize key="general_insert">Insert</localize>
|
||||
</button>
|
||||
|
||||
<a class="umb-era-button umb-button--s dropdown-toggle umb-button-group__toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
|
||||
<ul aria-labelledby="dLabel" class="dropdown-menu bottom-up umb-button-group__sub-buttons" role="menu">
|
||||
<li><a href="" ng-click="vm.openPageFieldOverlay()"><localize key="template_insertPageField">Value</localize></a></li>
|
||||
<li><a href="" ng-click="vm.openPartialOverlay()"><localize key="template_insertPartialView">Partial view</localize></a></li>
|
||||
<li><a href="" ng-click="vm.openDictionaryItemOverlay()"><localize key="template_insertDictionaryItem">Dictionary</localize></a></li>
|
||||
<li><a href="" ng-click="vm.openMacroOverlay()"><localize key="template_insertMacro">Macro</localize></a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<button
|
||||
data-element="button-queryBuilder"
|
||||
type="button"
|
||||
style="margin-right: 10px;"
|
||||
class="umb-era-button umb-button--s"
|
||||
ng-click="vm.openQueryBuilderOverlay()">
|
||||
<i class="icon icon-wand"></i> <localize key="template_queryBuilder">Query builder</localize>
|
||||
</button>
|
||||
|
||||
<button
|
||||
data-element="button-sections"
|
||||
type="button"
|
||||
class="umb-era-button umb-button--s"
|
||||
ng-click="vm.openSectionsOverlay()">
|
||||
<i class="icon icon-indent"></i> <localize key="template_insertSections">Sections</localize>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="flex" style="margin-left: auto;">
|
||||
<div class="btn-group umb-era-button-group dropdown" style="margin-right: 10px;">
|
||||
|
||||
<button
|
||||
data-element="button-insert"
|
||||
type="button"
|
||||
class="umb-era-button umb-button--s"
|
||||
ng-click="vm.openInsertOverlay()">
|
||||
<i class="icon icon-add"></i> <localize key="general_insert">Insert</localize>
|
||||
</button>
|
||||
|
||||
<a class="umb-era-button umb-button--s dropdown-toggle umb-button-group__toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
|
||||
<ul aria-labelledby="dLabel" class="dropdown-menu bottom-up umb-button-group__sub-buttons" role="menu">
|
||||
<li><a href="" ng-click="vm.openPageFieldOverlay()"><localize key="template_insertPageField">Value</localize></a></li>
|
||||
<li><a href="" ng-click="vm.openPartialOverlay()"><localize key="template_insertPartialView">Partial view</localize></a></li>
|
||||
<li><a href="" ng-click="vm.openDictionaryItemOverlay()"><localize key="template_insertDictionaryItem">Dictionary</localize></a></li>
|
||||
<li><a href="" ng-click="vm.openMacroOverlay()"><localize key="template_insertMacro">Macro</localize></a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<div
|
||||
data-element="code-editor"
|
||||
auto-scale="85"
|
||||
umb-ace-editor="vm.aceOption"
|
||||
model="vm.template.content">
|
||||
</div>
|
||||
|
||||
<button
|
||||
data-element="button-queryBuilder"
|
||||
type="button"
|
||||
style="margin-right: 10px;"
|
||||
class="umb-era-button umb-button--s"
|
||||
ng-click="vm.openQueryBuilderOverlay()">
|
||||
<i class="icon icon-wand"></i> <localize key="template_queryBuilder">Query builder</localize>
|
||||
</button>
|
||||
|
||||
<button
|
||||
data-element="button-sections"
|
||||
type="button"
|
||||
class="umb-era-button umb-button--s"
|
||||
ng-click="vm.openSectionsOverlay()">
|
||||
<i class="icon icon-indent"></i> <localize key="template_insertSections">Sections</localize>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div
|
||||
data-element="code-editor"
|
||||
auto-scale="85"
|
||||
umb-ace-editor="vm.aceOption"
|
||||
model="vm.template.content">
|
||||
</div>
|
||||
</umb-box-content>
|
||||
</umb-box>
|
||||
|
||||
</umb-editor-container>
|
||||
|
||||
|
||||
@@ -165,196 +165,200 @@
|
||||
|
||||
<div class="umb-package-details__sidebar">
|
||||
|
||||
<div class="umb-package-details__section">
|
||||
<umb-box>
|
||||
|
||||
<!-- Avatar -->
|
||||
<div style="margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #d8d7d9;">
|
||||
<ng-form name="avatarForm" class="flex flex-column justify-center items-center">
|
||||
<umb-box-content>
|
||||
|
||||
<umb-avatar style="margin-bottom: 15px;"
|
||||
color="secondary"
|
||||
size="xxl"
|
||||
name="{{model.user.name}}"
|
||||
img-src="{{model.user.avatars[3]}}"
|
||||
img-srcset="{{model.user.avatars[4]}} 2x, {{model.user.avatars[4]}} 3x">
|
||||
</umb-avatar>
|
||||
<!-- Avatar -->
|
||||
<div style="margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #d8d7d9;">
|
||||
<ng-form name="avatarForm" class="flex flex-column justify-center items-center">
|
||||
|
||||
<umb-progress-bar style="max-width: 120px;"
|
||||
ng-if="model.avatarFile.uploadStatus === 'uploading'"
|
||||
progress="{{ model.avatarFile.uploadProgress }}"
|
||||
size="s">
|
||||
</umb-progress-bar>
|
||||
<umb-avatar style="margin-bottom: 15px;"
|
||||
color="secondary"
|
||||
size="xxl"
|
||||
name="{{model.user.name}}"
|
||||
img-src="{{model.user.avatars[3]}}"
|
||||
img-srcset="{{model.user.avatars[4]}} 2x, {{model.user.avatars[4]}} 3x">
|
||||
</umb-avatar>
|
||||
|
||||
<div class="flex items-center" ng-if="model.avatarFile.uploadStatus !== 'uploading'">
|
||||
<umb-progress-bar style="max-width: 120px;"
|
||||
ng-if="model.avatarFile.uploadStatus === 'uploading'"
|
||||
progress="{{ model.avatarFile.uploadProgress }}"
|
||||
size="s">
|
||||
</umb-progress-bar>
|
||||
|
||||
<a href=""
|
||||
class="umb-user-group-preview__action"
|
||||
ngf-select ng-model="filesHolder"
|
||||
ngf-change="model.changeAvatar($files, $event)"
|
||||
ngf-multiple="false"
|
||||
ngf-pattern="{{model.acceptedFileTypes}}"
|
||||
ngf-max-size="{{ model.maxFileSize }}">
|
||||
<localize key="user_changePhoto">Change photo</localize>
|
||||
</a>
|
||||
<div class="flex items-center" ng-if="model.avatarFile.uploadStatus !== 'uploading'">
|
||||
|
||||
<a href=""
|
||||
ng-if="model.user.avatars"
|
||||
class="umb-user-group-preview__action umb-user-group-preview__action--red"
|
||||
ng-click="model.clearAvatar()"
|
||||
prevent-default>
|
||||
<localize key="user_removePhoto">Remove photo</localize>
|
||||
</a>
|
||||
<a href=""
|
||||
class="umb-user-group-preview__action"
|
||||
ngf-select ng-model="filesHolder"
|
||||
ngf-change="model.changeAvatar($files, $event)"
|
||||
ngf-multiple="false"
|
||||
ngf-pattern="{{model.acceptedFileTypes}}"
|
||||
ngf-max-size="{{ model.maxFileSize }}">
|
||||
<localize key="user_changePhoto">Change photo</localize>
|
||||
</a>
|
||||
|
||||
<a href=""
|
||||
ng-if="model.user.avatars"
|
||||
class="umb-user-group-preview__action umb-user-group-preview__action--red"
|
||||
ng-click="model.clearAvatar()"
|
||||
prevent-default>
|
||||
<localize key="user_removePhoto">Remove photo</localize>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
</ng-form>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Actions -->
|
||||
<div style="margin-bottom: 20px;">
|
||||
|
||||
<div style="margin-bottom: 10px;">
|
||||
<umb-button ng-if="model.user.userDisplayState.key === 'Disabled' && !model.user.isCurrentUser"
|
||||
type="button"
|
||||
button-style="[success,block]"
|
||||
state="model.enableUserButtonState"
|
||||
action="model.enableUser()"
|
||||
label="Enable"
|
||||
label-key="actions_enable"
|
||||
size="s">
|
||||
</umb-button>
|
||||
</div>
|
||||
|
||||
</ng-form>
|
||||
<div style="margin-bottom: 10px;">
|
||||
<umb-button ng-if="model.user.userDisplayState.key === 'LockedOut' && !model.user.isCurrentUser"
|
||||
type="button"
|
||||
button-style="[success,block]"
|
||||
state="model.unlockUserButtonState"
|
||||
action="model.unlockUser()"
|
||||
label="Unlock"
|
||||
label-key="actions_unlock"
|
||||
size="s">
|
||||
</umb-button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Actions -->
|
||||
<div style="margin-bottom: 20px;">
|
||||
|
||||
<div style="margin-bottom: 10px;">
|
||||
<umb-button ng-if="model.user.userDisplayState.key === 'Disabled' && !model.user.isCurrentUser"
|
||||
type="button"
|
||||
button-style="[success,block]"
|
||||
state="model.enableUserButtonState"
|
||||
action="model.enableUser()"
|
||||
label="Enable"
|
||||
label-key="actions_enable"
|
||||
size="s">
|
||||
</umb-button>
|
||||
</div>
|
||||
|
||||
<div style="margin-bottom: 10px;">
|
||||
<umb-button ng-if="model.user.userDisplayState.key === 'LockedOut' && !model.user.isCurrentUser"
|
||||
type="button"
|
||||
button-style="[success,block]"
|
||||
state="model.unlockUserButtonState"
|
||||
action="model.unlockUser()"
|
||||
label="Unlock"
|
||||
label-key="actions_unlock"
|
||||
size="s">
|
||||
</umb-button>
|
||||
</div>
|
||||
|
||||
<div style="margin-bottom: 10px;">
|
||||
<umb-button ng-if="model.user.userDisplayState.key !== 'Disabled' && !model.user.isCurrentUser"
|
||||
type="button"
|
||||
button-style="[info,block]"
|
||||
action="model.disableUser()"
|
||||
state="model.disableUserButtonState"
|
||||
label="Disable"
|
||||
label-key="actions_disable"
|
||||
size="s">
|
||||
</umb-button>
|
||||
</div>
|
||||
|
||||
<umb-button type="button"
|
||||
button-style="[info,block]"
|
||||
action="model.toggleChangePassword()"
|
||||
label="Change password"
|
||||
label-key="general_changePassword"
|
||||
state="changePasswordButtonState"
|
||||
ng-if="model.changePasswordModel.isChanging === false"
|
||||
size="s">
|
||||
</umb-button>
|
||||
|
||||
<ng-form ng-if="model.changePasswordModel.isChanging" name="passwordForm" class="block-form" val-form-manager>
|
||||
|
||||
<change-password password-values="model.user.changePassword"
|
||||
config="model.changePasswordModel.config">
|
||||
</change-password>
|
||||
<div style="margin-bottom: 10px;">
|
||||
<umb-button ng-if="model.user.userDisplayState.key !== 'Disabled' && !model.user.isCurrentUser"
|
||||
type="button"
|
||||
button-style="[info,block]"
|
||||
action="model.disableUser()"
|
||||
state="model.disableUserButtonState"
|
||||
label="Disable"
|
||||
label-key="actions_disable"
|
||||
size="s">
|
||||
</umb-button>
|
||||
</div>
|
||||
|
||||
<umb-button type="button"
|
||||
button-style="[info,block]"
|
||||
action="model.toggleChangePassword()"
|
||||
label="Cancel"
|
||||
label-key="general_cancel"
|
||||
button-style="cancel">
|
||||
label="Change password"
|
||||
label-key="general_changePassword"
|
||||
state="changePasswordButtonState"
|
||||
ng-if="model.changePasswordModel.isChanging === false"
|
||||
size="s">
|
||||
</umb-button>
|
||||
|
||||
</ng-form>
|
||||
<ng-form ng-if="model.changePasswordModel.isChanging" name="passwordForm" class="block-form" val-form-manager>
|
||||
|
||||
<change-password password-values="model.user.changePassword"
|
||||
config="model.changePasswordModel.config">
|
||||
</change-password>
|
||||
|
||||
<umb-button type="button"
|
||||
action="model.toggleChangePassword()"
|
||||
label="Cancel"
|
||||
label-key="general_cancel"
|
||||
button-style="cancel">
|
||||
</umb-button>
|
||||
|
||||
</ng-form>
|
||||
|
||||
<div ng-if="model.user.resetPasswordValue">
|
||||
<p><br />Password reset to value: <strong>{{model.user.resetPasswordValue}}</strong></p>
|
||||
</div>
|
||||
|
||||
<div ng-if="model.user.resetPasswordValue">
|
||||
<p><br />Password reset to value: <strong>{{model.user.resetPasswordValue}}</strong></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- User stats -->
|
||||
<div class="umb-package-details__information-item">
|
||||
<div class="umb-package-details__information-item-label">
|
||||
<localize key="general_status">Status</localize>:
|
||||
</div>
|
||||
<div class="umb-package-details__information-item-content">
|
||||
<umb-badge style="margin-top: 4px;" size="s" color="{{model.user.userDisplayState.color}}">
|
||||
{{model.user.userDisplayState.name}}
|
||||
</umb-badge>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- User stats -->
|
||||
<div class="umb-package-details__information-item">
|
||||
<div class="umb-package-details__information-item-label">
|
||||
<localize key="general_status">Status</localize>:
|
||||
<div class="umb-package-details__information-item">
|
||||
<div class="umb-package-details__information-item-label">
|
||||
<localize key="user_lastLogin">Last login</localize>:
|
||||
</div>
|
||||
<div class="umb-package-details__information-item-content">
|
||||
<span ng-if="model.user.lastLoginDate">{{ model.user.formattedLastLogin }}</span>
|
||||
<span ng-if="!model.user.lastLoginDate">{{ model.user.name | umbWordLimit:1 }} <localize key="user_noLogin">has not logged in yet</localize></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="umb-package-details__information-item-content">
|
||||
<umb-badge style="margin-top: 4px;" size="s" color="{{model.user.userDisplayState.color}}">
|
||||
{{model.user.userDisplayState.name}}
|
||||
</umb-badge>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="umb-package-details__information-item">
|
||||
<div class="umb-package-details__information-item-label">
|
||||
<localize key="user_lastLogin">Last login</localize>:
|
||||
<div class="umb-package-details__information-item">
|
||||
<div class="umb-package-details__information-item-label">
|
||||
<localize key="user_failedPasswordAttempts">Failed login attempts</localize>:
|
||||
</div>
|
||||
<div class="umb-package-details__information-item-content">
|
||||
{{ model.user.failedPasswordAttempts }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="umb-package-details__information-item-content">
|
||||
<span ng-if="model.user.lastLoginDate">{{ model.user.formattedLastLogin }}</span>
|
||||
<span ng-if="!model.user.lastLoginDate">{{ model.user.name | umbWordLimit:1 }} <localize key="user_noLogin">has not logged in yet</localize></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="umb-package-details__information-item">
|
||||
<div class="umb-package-details__information-item-label">
|
||||
<localize key="user_failedPasswordAttempts">Failed login attempts</localize>:
|
||||
<div class="umb-package-details__information-item">
|
||||
<div class="umb-package-details__information-item-label">
|
||||
<localize key="user_lastLockoutDate">Last lockout date</localize>:
|
||||
</div>
|
||||
<div class="umb-package-details__information-item-content">
|
||||
<span ng-if="model.user.lastLockoutDate === '0001-01-01T00:00:00'">
|
||||
{{ model.user.name | umbWordLimit:1 }} <localize key="user_noLockouts">hasn't been locked out</localize>
|
||||
</span>
|
||||
<span ng-if="model.user.lastLockoutDate !== '0001-01-01T00:00:00'">{{ model.user.formattedLastLockoutDate }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="umb-package-details__information-item-content">
|
||||
{{ model.user.failedPasswordAttempts }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="umb-package-details__information-item">
|
||||
<div class="umb-package-details__information-item-label">
|
||||
<localize key="user_lastLockoutDate">Last lockout date</localize>:
|
||||
<div class="umb-package-details__information-item">
|
||||
<div class="umb-package-details__information-item-label">
|
||||
<localize key="user_lastPasswordChangeDate">Password is last changed</localize>:
|
||||
</div>
|
||||
<div class="umb-package-details__information-item-content">
|
||||
<span ng-if="model.user.lastPasswordChangeDate === '0001-01-01T00:00:00'">
|
||||
<localize key="user_noPasswordChange">The password hasn't been changed</localize>
|
||||
</span>
|
||||
<span ng-if="model.user.lastPasswordChangeDate !== '0001-01-01T00:00:00'">{{ model.user.formattedLastPasswordChangeDate }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="umb-package-details__information-item-content">
|
||||
<span ng-if="model.user.lastLockoutDate === '0001-01-01T00:00:00'">
|
||||
{{ model.user.name | umbWordLimit:1 }} <localize key="user_noLockouts">hasn't been locked out</localize>
|
||||
</span>
|
||||
<span ng-if="model.user.lastLockoutDate !== '0001-01-01T00:00:00'">{{ model.user.formattedLastLockoutDate }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="umb-package-details__information-item">
|
||||
<div class="umb-package-details__information-item-label">
|
||||
<localize key="user_lastPasswordChangeDate">Password is last changed</localize>:
|
||||
<div class="umb-package-details__information-item">
|
||||
<div class="umb-package-details__information-item-label">
|
||||
<localize key="user_createDate">User is created</localize>:
|
||||
</div>
|
||||
<div class="umb-package-details__information-item-content">
|
||||
{{ model.user.formattedCreateDate }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="umb-package-details__information-item-content">
|
||||
<span ng-if="model.user.lastPasswordChangeDate === '0001-01-01T00:00:00'">
|
||||
<localize key="user_noPasswordChange">The password hasn't been changed</localize>
|
||||
</span>
|
||||
<span ng-if="model.user.lastPasswordChangeDate !== '0001-01-01T00:00:00'">{{ model.user.formattedLastPasswordChangeDate }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="umb-package-details__information-item">
|
||||
<div class="umb-package-details__information-item-label">
|
||||
<localize key="user_createDate">User is created</localize>:
|
||||
<div class="umb-package-details__information-item">
|
||||
<div class="umb-package-details__information-item-label">
|
||||
<localize key="user_updateDate">User is last updated</localize>:
|
||||
</div>
|
||||
<div class="umb-package-details__information-item-content">
|
||||
{{ model.user.formattedUpdateDate }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="umb-package-details__information-item-content">
|
||||
{{ model.user.formattedCreateDate }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="umb-package-details__information-item">
|
||||
<div class="umb-package-details__information-item-label">
|
||||
<localize key="user_updateDate">User is last updated</localize>:
|
||||
</div>
|
||||
<div class="umb-package-details__information-item-content">
|
||||
{{ model.user.formattedUpdateDate }}
|
||||
</div>
|
||||
</div>
|
||||
</umb-box-content>
|
||||
|
||||
</div>
|
||||
</umb-box>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user