mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Formatted Setup/Index.cshtml file.
This commit is contained in:
@@ -12,22 +12,19 @@
|
|||||||
}
|
}
|
||||||
@helper RenderRecipeOptions(IEnumerable<Recipe> recipes) {
|
@helper RenderRecipeOptions(IEnumerable<Recipe> recipes) {
|
||||||
foreach (var recipe in recipes) {
|
foreach (var recipe in recipes) {
|
||||||
var optionAttributes = new RouteValueDictionary {
|
var optionAttributes = new RouteValueDictionary {{ "data-recipe-description", recipe.Description }};
|
||||||
{ "data-recipe-description", recipe.Description }
|
|
||||||
};
|
|
||||||
if (Model.Recipe == null && recipe.Name == "Default") {
|
if (Model.Recipe == null && recipe.Name == "Default") {
|
||||||
optionAttributes["selected"] = "selected";
|
optionAttributes["selected"] = "selected";
|
||||||
}
|
}
|
||||||
@Html.SelectOption(Model.Recipe, recipe.Name, recipe.Name, optionAttributes)
|
@Html.SelectOption(Model.Recipe, recipe.Name, recipe.Name, optionAttributes)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
<h1>@Html.TitleForPage(T("Get Started").ToString())</h1>
|
<h1>@Html.TitleForPage(T("Get Started").ToString())</h1>
|
||||||
|
|
||||||
@using (Html.BeginFormAntiForgeryPost()) {
|
@using (Html.BeginFormAntiForgeryPost()) {
|
||||||
@Html.ValidationSummary()
|
@Html.ValidationSummary()
|
||||||
<h2>@T("Please answer a few questions to configure your site.")</h2>
|
<h2>@T("Please answer a few questions to configure your site.")</h2>
|
||||||
<fieldset class="site">
|
<fieldset class="site">
|
||||||
<div>
|
<div>
|
||||||
<label for="SiteName">@T("What is the name of your site?")</label>
|
<label for="SiteName">@T("What is the name of your site?")</label>
|
||||||
@Html.TextBoxFor(svm => svm.SiteName, new { autofocus = "autofocus" })
|
@Html.TextBoxFor(svm => svm.SiteName, new { autofocus = "autofocus" })
|
||||||
@@ -44,9 +41,9 @@
|
|||||||
<label for="ConfirmAdminPassword">@T("Confirm the password:")</label>
|
<label for="ConfirmAdminPassword">@T("Confirm the password:")</label>
|
||||||
@Html.PasswordFor(svm => svm.ConfirmPassword, new { @class = "text single-line" })
|
@Html.PasswordFor(svm => svm.ConfirmPassword, new { @class = "text single-line" })
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
if (!Model.DatabaseIsPreconfigured) {
|
if (!Model.DatabaseIsPreconfigured) {
|
||||||
<fieldset class="data">
|
<fieldset class="data">
|
||||||
<legend>@T("How would you like to store your data?")</legend>
|
<legend>@T("How would you like to store your data?")</legend>
|
||||||
@Html.ValidationMessage("DatabaseOptions", "Unable to setup data storage.")
|
@Html.ValidationMessage("DatabaseOptions", "Unable to setup data storage.")
|
||||||
<div>
|
<div>
|
||||||
@@ -68,32 +65,27 @@ if (!Model.DatabaseIsPreconfigured) {
|
|||||||
<div data-controllerid="builtin" data-defaultstate="hidden">
|
<div data-controllerid="builtin" data-defaultstate="hidden">
|
||||||
<label for="DatabaseConnectionString">@T("Connection string")</label>
|
<label for="DatabaseConnectionString">@T("Connection string")</label>
|
||||||
@Html.EditorFor(svm => svm.DatabaseConnectionString)
|
@Html.EditorFor(svm => svm.DatabaseConnectionString)
|
||||||
|
|
||||||
<span data-controllerid="sqlserver" class="hint databaseTypeHint">
|
<span data-controllerid="sqlserver" class="hint databaseTypeHint">
|
||||||
@T("Data Source=sqlServerName;Initial Catalog=dbName;User ID=userName;Password=password")
|
@T("Data Source=sqlServerName;Initial Catalog=dbName;User ID=userName;Password=password")
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span data-controllerid="mysql" class="hint databaseTypeHint">
|
<span data-controllerid="mysql" class="hint databaseTypeHint">
|
||||||
@T("Data Source=serverName;Database=dbName;User Id=userName;Password=password")
|
@T("Data Source=serverName;Database=dbName;User Id=userName;Password=password")
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span data-controllerid="postgresql" class="hint databaseTypeHint">
|
<span data-controllerid="postgresql" class="hint databaseTypeHint">
|
||||||
@T("Server=serverName;Port=5432;Database=dbName;User Id=userName;Password=password")
|
@T("Server=serverName;Port=5432;Database=dbName;User Id=userName;Password=password")
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<br /><br />
|
<br /><br />
|
||||||
<label for="DatabaseTablePrefix">@T("Database Table Prefix")</label>
|
<label for="DatabaseTablePrefix">@T("Database Table Prefix")</label>
|
||||||
@Html.EditorFor(svm => svm.DatabaseTablePrefix)
|
@Html.EditorFor(svm => svm.DatabaseTablePrefix)
|
||||||
</div>
|
</div>
|
||||||
|
</fieldset>
|
||||||
</fieldset>
|
}
|
||||||
}
|
<fieldset>
|
||||||
<fieldset>
|
|
||||||
<legend>@T("Choose an Orchard Recipe")</legend>
|
<legend>@T("Choose an Orchard Recipe")</legend>
|
||||||
<div>@T("Orchard Recipes allow you to setup your site with additional pre-configured options, features and settings out of the box.")</div>
|
<div>@T("Orchard Recipes allow you to setup your site with additional pre-configured options, features and settings out of the box.")</div>
|
||||||
<div>
|
<div>
|
||||||
<select id="@Html.FieldIdFor(m => m.Recipe)" name="@Html.FieldNameFor(m => m.Recipe)" class="recipe">
|
<select id="@Html.FieldIdFor(m => m.Recipe)" name="@Html.FieldNameFor(m => m.Recipe)" class="recipe">
|
||||||
@foreach(var recipeGroup in groupedRecipes.OrderBy(x => x.Key)) {
|
@foreach (var recipeGroup in groupedRecipes.OrderBy(x => x.Key)) {
|
||||||
if (groupCount > 1) {
|
if (groupCount > 1) {
|
||||||
<optgroup label="@recipeGroup.Key"></optgroup>
|
<optgroup label="@recipeGroup.Key"></optgroup>
|
||||||
}
|
}
|
||||||
@@ -108,8 +100,8 @@ if (!Model.DatabaseIsPreconfigured) {
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div id="recipedescription">@Model.RecipeDescription</div>
|
<div id="recipedescription">@Model.RecipeDescription</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<div id="throbber">
|
<div id="throbber">
|
||||||
<div class="curtain"></div>
|
<div class="curtain"></div>
|
||||||
<div class="curtain-content">
|
<div class="curtain-content">
|
||||||
<div>
|
<div>
|
||||||
@@ -119,9 +111,8 @@ if (!Model.DatabaseIsPreconfigured) {
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<fieldset>
|
||||||
<fieldset>
|
|
||||||
<button class="primaryAction setupButton" type="submit">@T("Finish Setup")</button>
|
<button class="primaryAction setupButton" type="submit">@T("Finish Setup")</button>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user