Skip to content

Commit

Permalink
Workflows (#1378)
Browse files Browse the repository at this point in the history
Adding Workflows module
  • Loading branch information
Sipke Schoorstra authored Apr 20, 2018
1 parent 5214f91 commit 44754f6
Show file tree
Hide file tree
Showing 494 changed files with 51,369 additions and 380 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Place your settings in this file to overwrite default and user settings.
{
"omnisharp.projectLoadTimeout": 600
}
21 changes: 21 additions & 0 deletions OrchardCore.sln
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27130.2024
Expand Down Expand Up @@ -328,6 +329,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.OpenId.Core", "
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.OpenId.Core.EntityFrameworkCore", "src\OrchardCore\OrchardCore.OpenId.Core.EntityFrameworkCore\OrchardCore.OpenId.Core.EntityFrameworkCore.csproj", "{910A3A3A-81DF-4DC5-B07A-CED2DAB4E906}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.Workflows", "src\OrchardCore.Modules\OrchardCore.Workflows\OrchardCore.Workflows.csproj", "{9973E641-B464-47F2-AA86-6A234B2A9604}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.Workflows.Abstractions", "src\OrchardCore\OrchardCore.Workflows.Abstractions\OrchardCore.Workflows.Abstractions.csproj", "{DE05E6A4-EDF4-4A88-80BF-328CA3AEAEAC}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{68F6113F-2F08-4412-B5E7-41B7164A0C7F}"
ProjectSection(SolutionItems) = preProject
gulpfile.js = gulpfile.js
Package.json = Package.json
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -906,6 +917,14 @@ Global
{910A3A3A-81DF-4DC5-B07A-CED2DAB4E906}.Debug|Any CPU.Build.0 = Debug|Any CPU
{910A3A3A-81DF-4DC5-B07A-CED2DAB4E906}.Release|Any CPU.ActiveCfg = Release|Any CPU
{910A3A3A-81DF-4DC5-B07A-CED2DAB4E906}.Release|Any CPU.Build.0 = Release|Any CPU
{9973E641-B464-47F2-AA86-6A234B2A9604}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9973E641-B464-47F2-AA86-6A234B2A9604}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9973E641-B464-47F2-AA86-6A234B2A9604}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9973E641-B464-47F2-AA86-6A234B2A9604}.Release|Any CPU.Build.0 = Release|Any CPU
{DE05E6A4-EDF4-4A88-80BF-328CA3AEAEAC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DE05E6A4-EDF4-4A88-80BF-328CA3AEAEAC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DE05E6A4-EDF4-4A88-80BF-328CA3AEAEAC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DE05E6A4-EDF4-4A88-80BF-328CA3AEAEAC}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -1067,6 +1086,8 @@ Global
{777AF226-7117-497E-A419-44997AE1BE4E} = {A066395F-6F73-45DC-B5A6-B4E306110DCE}
{A6E50FF8-BA44-4E59-95CD-3758300B9765} = {F23AC6C2-DE44-4699-999D-3C478EF3D691}
{910A3A3A-81DF-4DC5-B07A-CED2DAB4E906} = {F23AC6C2-DE44-4699-999D-3C478EF3D691}
{9973E641-B464-47F2-AA86-6A234B2A9604} = {A066395F-6F73-45DC-B5A6-B4E306110DCE}
{DE05E6A4-EDF4-4A88-80BF-328CA3AEAEAC} = {F23AC6C2-DE44-4699-999D-3C478EF3D691}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {46A1D25A-78D1-4476-9CBF-25B75E296341}
Expand Down
15 changes: 10 additions & 5 deletions Package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"fs": "0.0.2",
"glob": "7.1.2",
"gulp": "^3.9.1",
"gulp-cli": "1.3.0",
"gulp-cli": "1.4.0",
"gulp-concat": "2.6.1",
"gulp-cssnano": "2.1.2",
"gulp-debug": "3.1.0",
Expand All @@ -18,12 +18,17 @@
"gulp-print": "2.0.1",
"gulp-rename": "1.2.2",
"gulp-sass": "3.1.0",
"gulp-sourcemaps": "2.6.0",
"gulp-typescript": "2.14.1",
"gulp-sourcemaps": "2.6.1",
"gulp-typescript": "3.2.2",
"gulp-uglify": "3.0.0",
"merge-stream": "1.0.1",
"path-posix": "1.0.0",
"typescript": "2.4.2"
"typescript": "2.5.3"
},
"dependencies": {}
"dependencies": {
"typings": "^1.3.2"
},
"scripts": {
"postinstall": "typings install"
}
}
34 changes: 31 additions & 3 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ function createAssetGroupTask(assetGroup, doRebuild) {
case ".js":
return buildJsPipeline(assetGroup, doConcat, doRebuild);
}

if(assetGroup.copy === true){
return buildCopyPipeline(assetGroup, doRebuild);
}
}

/*
Expand All @@ -145,6 +149,7 @@ function buildCssPipeline(assetGroup, doConcat, doRebuild) {
// Source maps are useless if neither concatenating nor transforming.
if ((!doConcat || assetGroup.inputPaths.length < 2) && !containsLessOrScss)
generateSourceMaps = false;

var minifiedStream = gulp.src(assetGroup.inputPaths) // Minified output, source mapping completely disabled.
.pipe(gulpif(!doRebuild,
gulpif(doConcat,
Expand All @@ -156,7 +161,8 @@ function buildCssPipeline(assetGroup, doConcat, doRebuild) {
.pipe(plumber())
.pipe(gulpif("*.less", less()))
.pipe(gulpif("*.scss", scss({
precision: 10
precision: 10,

})))
.pipe(gulpif(doConcat, concat(assetGroup.outputFileName)))
.pipe(cssnano({
Expand Down Expand Up @@ -212,6 +218,8 @@ function buildJsPipeline(assetGroup, doConcat, doRebuild) {
// Source maps are useless if neither concatenating nor transforming.
if ((!doConcat || assetGroup.inputPaths.length < 2) && !assetGroup.inputPaths.some(function (inputPath) { return path.extname(inputPath).toLowerCase() === ".ts"; }))
generateSourceMaps = false;

console.log(assetGroup.inputPaths);
return gulp.src(assetGroup.inputPaths)
.pipe(gulpif(!doRebuild,
gulpif(doConcat,
Expand All @@ -226,8 +234,14 @@ function buildJsPipeline(assetGroup, doConcat, doRebuild) {
declaration: false,
noImplicitAny: true,
noEmitOnError: true,
sortOutput: true,
}).js))
lib: [
"dom",
"es5",
"scripthost",
"es2015.iterable"
],
target: "es5",
})))
.pipe(gulpif(doConcat, concat(assetGroup.outputFileName)))
.pipe(header(
"/*\n" +
Expand All @@ -247,3 +261,17 @@ function buildJsPipeline(assetGroup, doConcat, doRebuild) {
// Uncomment to copy assets to wwwroot
//.pipe(gulp.dest(assetGroup.webroot));
}

function buildCopyPipeline(assetGroup, doRebuild) {
var stream = gulp.src(assetGroup.inputPaths);

if(!doRebuild) {
stream = stream.pipe(newer(assetGroup.outputDir))
}

stream = stream.pipe(gulp.dest(assetGroup.outputDir));
// Uncomment to copy assets to wwwroot
//.pipe(gulp.dest(assetGroup.webroot));

return stream;
}
32 changes: 16 additions & 16 deletions src/OrchardCore.Cms.Web/NLog.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@
internalLogLevel="Warn"
internalLogFile="App_Data/logs/internal-nlog.txt">

<extensions>
<add assembly="NLog.Web.AspNetCore"/>
<add assembly="OrchardCore.Logging.NLog"/>
</extensions>

<!-- define various log targets -->
<targets>
<!-- write logs to file -->
<target xsi:type="File" name="allfile" fileName="${var:configDir}/App_Data/logs/orchard-log-${shortdate}.log"
layout="${longdate}|${orchard-tenant-name}|${aspnet-traceidentifier}|${event-properties:item=EventId.Id}|${logger}|${uppercase:${level}}|${message} ${exception:format=ToString,StackTrace}" />
<extensions>
<add assembly="NLog.Web.AspNetCore"/>
<add assembly="OrchardCore.Logging.NLog"/>
</extensions>

<!--<target xsi:type="Null" name="blackhole" /> -->
</targets>
<!-- define various log targets -->
<targets>
<!-- write logs to file -->
<target xsi:type="File" name="allfile" fileName="${var:configDir}/App_Data/logs/orchard-log-${shortdate}.log"
layout="${longdate}|${orchard-tenant-name}|${aspnet-traceidentifier}|${event-properties:item=EventId.Id}|${logger}|${uppercase:${level}}|${message} ${exception:format=ToString,StackTrace}" />

<rules>
<!--All logs-->
<logger name="*" minlevel="Error" writeTo="allfile" />
</rules>
<!--<target xsi:type="Null" name="blackhole" /> -->
</targets>

<rules>
<!--All logs-->
<logger name="*" minlevel="Error" writeTo="allfile" />
</rules>
</nlog>
3 changes: 2 additions & 1 deletion src/OrchardCore.Cms.Web/OrchardCore.Cms.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<PreserveCompilationContext>true</PreserveCompilationContext>
<MvcRazorCompileOnPublish>true</MvcRazorCompileOnPublish>
<MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish>
<TypeScriptToolsVersion>2.3</TypeScriptToolsVersion>
</PropertyGroup>

<ItemGroup>
Expand All @@ -30,4 +31,4 @@
<Import Project="..\OrchardCore\OrchardCore.Application.Cms.Targets\OrchardCore.Application.Cms.Targets.targets" />
<Import Project="..\OrchardCore\OrchardCore.Application.Targets\OrchardCore.Application.Targets.targets" />

</Project>
</Project>
9 changes: 7 additions & 2 deletions src/OrchardCore.Cms.Web/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,19 @@

"Modules": {
"OrchardCore.Setup": {
}
},
// Uncomment to configure media storage in Azure Blob Storage.
//"OrchardCore.Media.Azure":
//{
//"ConnectionString": "", // Set to your Azure Storage account connection string.
//"ContainerName": "somecontainer",
//"BasePath": "some/base/path", // Set to a path to store media in a subdirectory inside your container.
//"PublicHostName": "" // Set to a hostname to serve media from an alternative host such as a CDN.
//}
//},
// Uncomment to configure SMTP settings.
"OrchardCore.Email": {
"Host": "localhost",
"Port": "2525"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public AliasPartDisplayDriver(IContentDefinitionManager contentDefinitionManager

public override IDisplayResult Edit(AliasPart aliasPart)
{
return Shape<AliasPartViewModel>("AliasPart_Edit", m => BuildViewModel(m, aliasPart));
return Initialize<AliasPartViewModel>("AliasPart_Edit", m => BuildViewModel(m, aliasPart));
}

public override async Task<IDisplayResult> UpdateAsync(AliasPart model, IUpdateModel updater)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public override IDisplayResult Edit(ContentTypePartDefinition contentTypePartDef
return null;
}

return Shape<AliasPartSettingsViewModel>("AliasPartSettings_Edit", model =>
return Initialize<AliasPartSettingsViewModel>("AliasPartSettings_Edit", model =>
{
var settings = contentTypePartDefinition.GetSettings<AliasPartSettings>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ IStringLocalizer<AutoroutePartDisplay> localizer

public override IDisplayResult Edit(AutoroutePart autoroutePart)
{
return Shape<AutoroutePartViewModel>("AutoroutePart_Edit", async model =>
return Initialize<AutoroutePartViewModel>("AutoroutePart_Edit", async model =>
{

model.Path = autoroutePart.Path;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public override IDisplayResult Edit(ContentTypePartDefinition contentTypePartDef
return null;
}

return Shape<AutoroutePartSettingsViewModel>("AutoroutePartSettings_Edit", model =>
return Initialize<AutoroutePartSettingsViewModel>("AutoroutePartSettings_Edit", model =>
{
var settings = contentTypePartDefinition.Settings.ToObject<AutoroutePartSettings>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ public BodyPartDisplay(

public override IDisplayResult Display(BodyPart bodyPart)
{
return Shape<BodyPartViewModel>("BodyPart", m => BuildViewModelAsync(m, bodyPart))
return Initialize<BodyPartViewModel>("BodyPart", m => BuildViewModelAsync(m, bodyPart))
.Location("Detail", "Content:5")
.Location("Summary", "Content:10");
}

public override IDisplayResult Edit(BodyPart bodyPart)
{
return Shape<BodyPartViewModel>("BodyPart_Edit", m => BuildViewModelAsync(m, bodyPart));
return Initialize<BodyPartViewModel>("BodyPart_Edit", m => BuildViewModelAsync(m, bodyPart));
}

public override async Task<IDisplayResult> UpdateAsync(BodyPart model, IUpdateModel updater)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public override IDisplayResult Edit(ContentTypePartDefinition contentTypePartDef
return null;
}

return Shape<BodyPartSettingsViewModel>("BodyPartSettings_Edit", model =>
return Initialize<BodyPartSettingsViewModel>("BodyPartSettings_Edit", model =>
{
var settings = contentTypePartDefinition.GetSettings<BodyPartSettings>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class BooleanFieldDisplayDriver : ContentFieldDisplayDriver<BooleanField>
{
public override IDisplayResult Display(BooleanField field, BuildFieldDisplayContext context)
{
return Shape<DisplayBooleanFieldViewModel>("BooleanField", model =>
return Initialize<DisplayBooleanFieldViewModel>("BooleanField", model =>
{
model.Field = field;
model.Part = context.ContentPart;
Expand All @@ -24,7 +24,7 @@ public override IDisplayResult Display(BooleanField field, BuildFieldDisplayCont

public override IDisplayResult Edit(BooleanField field, BuildFieldEditorContext context)
{
return Shape<EditBooleanFieldViewModel>("BooleanField_Edit", model =>
return Initialize<EditBooleanFieldViewModel>("BooleanField_Edit", model =>
{
model.Value = field.Value;
model.Field = field;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public HtmlFieldDisplayDriver(ILiquidTemplateManager liquidTemplatemanager)

public override IDisplayResult Display(HtmlField field, BuildFieldDisplayContext context)
{
return Shape<DisplayHtmlFieldViewModel>("HtmlField", async model =>
return Initialize<DisplayHtmlFieldViewModel>("HtmlField", async model =>
{
var templateContext = new TemplateContext();
templateContext.SetValue("ContentItem", field.ContentItem);
Expand All @@ -43,7 +43,7 @@ public override IDisplayResult Display(HtmlField field, BuildFieldDisplayContext

public override IDisplayResult Edit(HtmlField field, BuildFieldEditorContext context)
{
return Shape<EditHtmlFieldViewModel>("HtmlField_Edit", model =>
return Initialize<EditHtmlFieldViewModel>("HtmlField_Edit", model =>
{
model.Html = field.Html;
model.Field = field;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public LinkFieldDisplayDriver(IStringLocalizer<LinkFieldDisplayDriver> localizer

public override IDisplayResult Display(LinkField field, BuildFieldDisplayContext context)
{
return Shape<DisplayLinkFieldViewModel>("LinkField", model =>
return Initialize<DisplayLinkFieldViewModel>("LinkField", model =>
{
model.Field = field;
model.Part = context.ContentPart;
Expand All @@ -34,7 +34,7 @@ public override IDisplayResult Display(LinkField field, BuildFieldDisplayContext

public override IDisplayResult Edit(LinkField field, BuildFieldEditorContext context)
{
return Shape<EditLinkFieldViewModel>("LinkField_Edit", model =>
return Initialize<EditLinkFieldViewModel>("LinkField_Edit", model =>
{
var settings = context.PartFieldDefinition.Settings.ToObject<LinkFieldSettings>();
model.Url = context.IsNew ? settings.DefaultUrl : field.Url;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public NumericFieldDisplayDriver(IStringLocalizer<NumericFieldDisplayDriver> loc

public override IDisplayResult Display(NumericField field, BuildFieldDisplayContext context)
{
return Shape<DisplayNumericFieldViewModel>("NumericField", model =>
return Initialize<DisplayNumericFieldViewModel>("NumericField", model =>
{
model.Field = field;
model.Part = context.ContentPart;
Expand All @@ -39,7 +39,7 @@ public override IDisplayResult Display(NumericField field, BuildFieldDisplayCont

public override IDisplayResult Edit(NumericField field, BuildFieldEditorContext context)
{
return Shape<EditNumericFieldViewModel>("NumericField_Edit", model =>
return Initialize<EditNumericFieldViewModel>("NumericField_Edit", model =>
{
var settings = context.PartFieldDefinition.Settings.ToObject<NumericFieldSettings>();
model.Value = context.IsNew ? settings.DefaultValue : Convert.ToString(field.Value, _cultureInfo);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class TextFieldDisplayDriver : ContentFieldDisplayDriver<TextField>
{
public override IDisplayResult Display(TextField field, BuildFieldDisplayContext context)
{
return Shape<DisplayTextFieldViewModel>("TextField", model =>
return Initialize<DisplayTextFieldViewModel>("TextField", model =>
{
model.Field = field;
model.Part = context.ContentPart;
Expand All @@ -23,7 +23,7 @@ public override IDisplayResult Display(TextField field, BuildFieldDisplayContext

public override IDisplayResult Edit(TextField field, BuildFieldEditorContext context)
{
return Shape<EditTextFieldViewModel>("TextField_Edit", model =>
return Initialize<EditTextFieldViewModel>("TextField_Edit", model =>
{
model.Text = field.Text;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class BooleanFieldSettingsDriver : ContentPartFieldDefinitionDisplayDrive
{
public override IDisplayResult Edit(ContentPartFieldDefinition partFieldDefinition)
{
return Shape<BooleanFieldSettings>("BooleanFieldSettings_Edit", model => partFieldDefinition.Settings.Populate(model))
return Initialize<BooleanFieldSettings>("BooleanFieldSettings_Edit", model => partFieldDefinition.Settings.Populate(model))
.Location("Content");
}

Expand Down
Loading

0 comments on commit 44754f6

Please sign in to comment.