Skip to content

Commit

Permalink
Fixing templates (#2048)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienros committed Jun 26, 2018
1 parent 8a81943 commit 968e45f
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 27 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -189,4 +189,5 @@ node_modules/
wwwroot
!src/OrchardCore.Modules/**/wwwroot
!src/OrchardCore.Themes/**/wwwroot
!src/Templates/**/content/**
.template.config/
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ $(function () {
toggleConnectionStringAndPrefix();
});

// Refresh the description hide the connection string when a provider is selected
// Refresh the recipe description
$("#recipes div a").on('click', function () {
refreshDescription($(this));
});
Expand Down
21 changes: 5 additions & 16 deletions src/OrchardCore.Modules/OrchardCore.Setup/Views/Setup/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -143,23 +143,12 @@
<div class="row">
<div class="form-group col-md-6">
<label asp-for="DatabaseProvider">@T["What type of database to use?"]</label>
@if (Model.DatabaseConfigurationPreset)
{
var provider = Model.DatabaseProviders.FirstOrDefault(p => p.Value == Model.DatabaseProvider);

<select asp-for="DatabaseProvider" class="form-control" required readonly>
<select asp-for="DatabaseProvider" class="form-control" required>
@foreach (var provider in Model.DatabaseProviders)
{
<option value="@provider.Value" data-connection-string="@provider.HasConnectionString" data-table-prefix="@provider.HasTablePrefix">@provider.Name</option>
</select>
}
else
{
<select asp-for="DatabaseProvider" class="form-control" required>
@foreach (var provider in Model.DatabaseProviders)
{
<option value="@provider.Value" data-connection-string="@provider.HasConnectionString" data-table-prefix="@provider.HasTablePrefix">@provider.Name</option>
}
</select>
}
}
</select>
<span asp-validation-for="DatabaseProvider" class="text-danger"></span>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@
<option value="" data-connection-string="false">@T["None"]</option>
@foreach (var provider in DatabaseProviders)
{
<option value="@provider.Value" data-connection-string="@provider.HasConnectionString.ToString().ToLower()">@provider.Name</option>
<option value="@provider.Value" data-connection-string="@provider.HasConnectionString.ToString().ToLower()" data-table-prefix="@provider.HasTablePrefix.ToString().ToLower()">@provider.Name</option>
}
</select>
</div>
<div class="form-group col-md-6" asp-validation-class-for="TablePrefix">
<div class="form-group col-md-6 tablePrefix" asp-validation-class-for="TablePrefix">
<label asp-for="TablePrefix">@T["Table Prefix"]</label>
<span asp-validation-for="TablePrefix" class="text-danger"></span>
<input asp-for="TablePrefix" class="form-control" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:2918",
"applicationUrl": "http://localhost:8080",
"sslPort": 44300
}
},
Expand All @@ -15,13 +15,13 @@
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"web": {
"OrchardCore.Templates.Cms.Web": {
"commandName": "Project",
"launchBrowser": true,
"applicationUrl": "http://localhost:5000",
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
��
4 changes: 2 additions & 2 deletions src/Templates/README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ More information about `dotnet new` can be found at <https://docs.microsoft.com/
Once the .NET Core SDK has been installed, type the following command to install the templates for creating Orchard Core Cms web applications.

```CMD
dotnet new -i OrchardCore.Cms.Templates::1.0.0-beta2
dotnet new -i OrchardCore.Cms.Templates::1.0.0-beta2-*
```

This will use the most stable release of Orchard Core. In order to use the latest __dev__ branch of Orchard Core, the following command can be used:

```CMD
dotnet new -i OrchardCore.Cms.Templates::1.0.0-beta2 --nuget-source https://www.myget.org/F/orchardcore-preview/api/v3/index.json
dotnet new -i OrchardCore.Cms.Templates::1.0.0-beta2-* --nuget-source https://www.myget.org/F/orchardcore-preview/api/v3/index.json
```

## Create a new website
Expand Down

0 comments on commit 968e45f

Please sign in to comment.