datatype controller methods for ct editor
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
<OldToolsVersion>4.0</OldToolsVersion>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile />
|
||||
<UseIISExpress>true</UseIISExpress>
|
||||
<UseIISExpress>false</UseIISExpress>
|
||||
<IISExpressSSLPort />
|
||||
<IISExpressAnonymousAuthentication />
|
||||
<IISExpressWindowsAuthentication />
|
||||
@@ -2575,7 +2575,7 @@ xcopy "$(ProjectDir)"..\packages\SqlServerCE.4.0.0.0\x86\*.* "$(TargetDir)x86\"
|
||||
<AutoAssignPort>True</AutoAssignPort>
|
||||
<DevelopmentServerPort>7300</DevelopmentServerPort>
|
||||
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
||||
<IISUrl>http://localhost:7300</IISUrl>
|
||||
<IISUrl>http://umbraco7.local</IISUrl>
|
||||
<NTLMAuthentication>False</NTLMAuthentication>
|
||||
<UseCustomServer>False</UseCustomServer>
|
||||
<CustomServerUrl>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<!--Settings-->
|
||||
<add application="settings" alias="stylesheets" title="Stylesheets" type="umbraco.loadStylesheets, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="0" />
|
||||
<add application="settings" alias="stylesheetProperty" title="Stylesheet Property" type="umbraco.loadStylesheetProperty, umbraco" iconClosed="" iconOpen="" initialize="false" sortOrder="0" />
|
||||
<add application="settings" alias="templates" title="Templates" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Umbraco.Web.Trees.TemplatesTreeController, umbraco" initialize="true" sortOrder="1"/>
|
||||
<add application="settings" alias="templates" title="Templates" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Umbraco.Web.Trees.TemplatesTreeController, umbraco" initialize="true" sortOrder="1" />
|
||||
<add application="settings" alias="partialViews" title="Partial Views" silent="false" initialize="true" iconClosed="icon-folder" iconOpen="icon-folder" type="Umbraco.Web.Trees.PartialViewsTree, umbraco" sortOrder="2" />
|
||||
<add application="settings" alias="scripts" title="Scripts" type="umbraco.loadScripts, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="3" />
|
||||
<add application="settings" alias="dictionary" title="Dictionary" type="umbraco.loadDictionary, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="4" />
|
||||
@@ -37,5 +37,6 @@
|
||||
<add silent="false" initialize="true" sortOrder="2" alias="yourTasks" application="translation" title="Tasks created by you" iconClosed="icon-folder" iconOpen="icon-folder" type="umbraco.loadYourTasks, umbraco" />
|
||||
<!-- Custom -->
|
||||
<!--<add application="myApplication" alias="myTree" title="Me Tree" type="MyNamespace.myTree, MyAssembly"
|
||||
iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="10" />-->
|
||||
iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="10" />-->
|
||||
<add initialize="true" sortOrder="0" alias="documenttype" application="settings" title="Document Types" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Umbraco.Web.Trees.DocumentTypeTreeController, umbraco" />
|
||||
</trees>
|
||||
@@ -75,6 +75,45 @@ namespace Umbraco.Web.Editors
|
||||
.Select(x => Mapper.Map<IDataTypeDefinition, DataTypeBasic>(x)).Where(x => x.IsSystemDataType == false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the content json for all data types added by the user
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
/// <remarks>
|
||||
/// Permission is granted to this method if the user has access to any of these trees: DataTypes, Content or Media
|
||||
/// </remarks>
|
||||
[UmbracoTreeAuthorize(Constants.Trees.DataTypes, Constants.Trees.Content, Constants.Trees.Media)]
|
||||
public IEnumerable<DataTypeBasic> GetAllUserConfigured()
|
||||
{
|
||||
//find all user configured for re-reference
|
||||
return Services.DataTypeService
|
||||
.GetAllDataTypeDefinitions()
|
||||
.Where(x => x.Id > 1045)
|
||||
.Select(x => Mapper.Map<IDataTypeDefinition, DataTypeBasic>(x)).Where(x => x.IsSystemDataType == false);
|
||||
|
||||
//find all custom editors added by non-core manifests
|
||||
|
||||
//find the rest
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the content json for all user added property editors
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
/// <remarks>
|
||||
/// Permission is granted to this method if the user has access to any of these trees: DataTypes, Content or Media
|
||||
/// </remarks>
|
||||
[UmbracoTreeAuthorize(Constants.Trees.DataTypes, Constants.Trees.Content, Constants.Trees.Media)]
|
||||
public IEnumerable<PropertyEditorBasic> GetAllUserPropertyEditors()
|
||||
{
|
||||
return PropertyEditorResolver.Current.PropertyEditors
|
||||
.OrderBy(x => x.Name)
|
||||
.Where(x => x.ValueEditor.View.IndexOf("app_plugins", StringComparison.InvariantCultureIgnoreCase) >= 0)
|
||||
.Select(Mapper.Map<PropertyEditorBasic>);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes a data type wth a given ID
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user