mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-21 03:14:10 +08:00
Avoiding details page if there are no features to enable.
--HG-- branch : dev
This commit is contained in:
@@ -256,10 +256,14 @@ namespace Orchard.Packaging.Controllers {
|
||||
FeatureDescriptor = featureDescriptor
|
||||
}).ToList();
|
||||
|
||||
return View("InstallModule", new PackagingInstallViewModel {
|
||||
Features = features,
|
||||
ExtensionDescriptor = extensionDescriptor
|
||||
});
|
||||
if (features.Count > 0) {
|
||||
return View("InstallModule", new PackagingInstallViewModel {
|
||||
Features = features,
|
||||
ExtensionDescriptor = extensionDescriptor
|
||||
});
|
||||
}
|
||||
|
||||
return InstallPOST(packageId, version, sourceId, redirectTo);
|
||||
}
|
||||
|
||||
[HttpPost, ActionName("InstallModule")]
|
||||
|
@@ -12,7 +12,6 @@
|
||||
@using (Html.BeginFormAntiForgeryPost(Url.Action("InstallModule", "Gallery", new { packageId = Request.QueryString["packageId"], version = Request.QueryString["version"], sourceId = Request.QueryString["sourceId"], redirectTo = Request.QueryString["redirectTo"] }))) {
|
||||
<h3>@T("Pick the features you want enabled during install").ToString()</h3>
|
||||
|
||||
if (Model.Features.Count > 0) {
|
||||
<fieldset>
|
||||
@{ var index = 0; }
|
||||
@foreach (PackagingInstallFeatureViewModel feature in Model.Features) {
|
||||
@@ -27,7 +26,6 @@
|
||||
</div>
|
||||
}
|
||||
</fieldset>
|
||||
}
|
||||
|
||||
<button class="primaryAction" type="submit">@T("Install")</button>
|
||||
}
|
Reference in New Issue
Block a user