mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-21 19:34:40 +08:00
Restyling the recipe dropdown
Roughing in some recipe execution concepts... --HG-- branch : recipe
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Logging;
|
||||
using Orchard.Recipes.Models;
|
||||
@@ -21,21 +22,25 @@ namespace Orchard.Recipes.Services {
|
||||
if (recipe == null)
|
||||
return;
|
||||
|
||||
var executionId = Guid.NewGuid().ToString("n");
|
||||
var recipeContext = new RecipeContext { Recipe = recipe };
|
||||
|
||||
// TODO: Run each step inside a transaction boundary.
|
||||
// TODO: Output should go into a report.
|
||||
// TODO: Eventually return a guid.tostring("n") execution id
|
||||
// TODO: Enqueue steps for the step executor.
|
||||
foreach (var recipeStep in recipe.RecipeSteps) {
|
||||
recipeContext.RecipeStep = recipeStep;
|
||||
recipeContext.Executed = false;
|
||||
foreach (var handler in _recipeHandlers) {
|
||||
handler.ExecuteRecipeStep(recipeContext);
|
||||
foreach (var recipeHandler in _recipeHandlers) {
|
||||
recipeHandler.ExecuteRecipeStep(recipeContext);
|
||||
}
|
||||
if (!recipeContext.Executed) {
|
||||
Logger.Error("Could not execute recipe step '{0}' because the recipe handler was not found.", recipeContext.RecipeStep.Name);
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: figure out shell settings and shell descriptor for processing engine to run under
|
||||
// _processingEngine.AddTask(null, null, "IRecipeStepEvents_DoWork", null);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@@ -216,11 +216,6 @@ namespace Orchard.Setup.Services {
|
||||
}
|
||||
|
||||
private void CreateTenantData(SetupContext context, IWorkContextScope environment) {
|
||||
var recipeManager = environment.Resolve<IRecipeManager>();
|
||||
if (context.Recipe != null) {
|
||||
recipeManager.Execute(Recipes().Where(r => r.Name == context.Recipe).FirstOrDefault());
|
||||
}
|
||||
|
||||
// create superuser
|
||||
var membershipService = environment.Resolve<IMembershipService>();
|
||||
var user =
|
||||
@@ -349,6 +344,11 @@ Modules are created by other users of Orchard just like you so if you feel up to
|
||||
menuItem.As<MenuPart>().OnMainMenu = true;
|
||||
menuItem.As<MenuItemPart>().Url = "";
|
||||
|
||||
var recipeManager = environment.Resolve<IRecipeManager>();
|
||||
if (context.Recipe != null) {
|
||||
recipeManager.Execute(Recipes().Where(r => r.Name == context.Recipe).FirstOrDefault());
|
||||
}
|
||||
|
||||
//null check: temporary fix for running setup in command line
|
||||
if (HttpContext.Current != null) {
|
||||
authenticationService.SignIn(user, true);
|
||||
|
@@ -128,8 +128,10 @@ input[type="password"] {
|
||||
width:98%;
|
||||
}
|
||||
|
||||
select {
|
||||
width:100%;
|
||||
select {
|
||||
padding:3px;
|
||||
border:1px solid #bdbcbc;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
button.primaryAction, .button.primaryAction, .button.primaryAction:link, .button.primaryAction:visited {
|
||||
|
Reference in New Issue
Block a user