mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-14 02:44:52 +08:00
Adding link to Gallery in "Modules" and "Themes" pages
--HG-- branch : 1.x
This commit is contained in:
@@ -52,7 +52,8 @@ namespace Orchard.Modules.Controllers {
|
||||
|
||||
return View(new ModulesIndexViewModel {
|
||||
Modules = modules,
|
||||
InstallModules = _featureManager.GetEnabledFeatures().FirstOrDefault(f => f.Id == "PackagingServices") != null
|
||||
InstallModules = _featureManager.GetEnabledFeatures().FirstOrDefault(f => f.Id == "PackagingServices") != null,
|
||||
BrowseToGallery = _featureManager.GetEnabledFeatures().FirstOrDefault(f => f.Id == "Gallery") != null
|
||||
});
|
||||
}
|
||||
|
||||
|
@@ -1,9 +1,11 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Orchard.Environment.Extensions.Models;
|
||||
|
||||
namespace Orchard.Modules.ViewModels {
|
||||
public class ModulesIndexViewModel {
|
||||
public bool InstallModules { get; set; }
|
||||
public bool BrowseToGallery { get; set; }
|
||||
public IEnumerable<ExtensionDescriptor> Modules { get; set; }
|
||||
}
|
||||
}
|
@@ -9,6 +9,10 @@
|
||||
|
||||
<h1>@Html.TitleForPage(T("Installed Modules").ToString())</h1>
|
||||
|
||||
@if (Model.BrowseToGallery) {
|
||||
<div class="manage">@Html.ActionLink(T("Install a module from the Gallery").ToString(), "Modules", "Gallery", new { area = "Orchard.Packaging", returnUrl = HttpContext.Current.Request.RawUrl }, new { @class = "button primaryAction" })</div>
|
||||
}
|
||||
|
||||
@if (Model.InstallModules) {
|
||||
<div class="manage">@Html.ActionLink(T("Install a module").ToString(), "AddModule", "PackagingServices", new { area = "Orchard.Packaging", returnUrl = HttpContext.Current.Request.RawUrl }, new { @class = "button primaryAction" })</div>
|
||||
}
|
||||
|
@@ -71,7 +71,8 @@ namespace Orchard.Themes.Controllers {
|
||||
|
||||
return View(new ThemesIndexViewModel {
|
||||
CurrentTheme = currentTheme, Themes = themes,
|
||||
InstallThemes = _featureManager.GetEnabledFeatures().FirstOrDefault(f => f.Id == "PackagingServices") != null
|
||||
InstallThemes = _featureManager.GetEnabledFeatures().FirstOrDefault(f => f.Id == "PackagingServices") != null,
|
||||
BrowseToGallery = _featureManager.GetEnabledFeatures().FirstOrDefault(f => f.Id == "Gallery") != null
|
||||
});
|
||||
}
|
||||
catch (Exception exception) {
|
||||
|
@@ -1,9 +1,11 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Orchard.Environment.Extensions.Models;
|
||||
|
||||
namespace Orchard.Themes.ViewModels {
|
||||
public class ThemesIndexViewModel {
|
||||
public bool InstallThemes { get; set; }
|
||||
public bool BrowseToGallery { get; set; }
|
||||
public ExtensionDescriptor CurrentTheme { get; set; }
|
||||
public IEnumerable<ThemeEntry> Themes { get; set; }
|
||||
}
|
||||
|
@@ -19,7 +19,11 @@
|
||||
</p>
|
||||
|
||||
if (Model.InstallThemes) {
|
||||
@Html.ActionLink(T("Install a new Theme").ToString(), "AddTheme", "PackagingServices", new { area = "Orchard.Packaging", returnUrl = HttpContext.Current.Request.RawUrl }, new { @class = "button primaryAction" })
|
||||
<p>@Html.ActionLink(T("Install a theme").ToString(), "AddTheme", "PackagingServices", new { area = "Orchard.Packaging", returnUrl = HttpContext.Current.Request.RawUrl }, new { @class = "button primaryAction" })</p>
|
||||
}
|
||||
|
||||
if (Model.BrowseToGallery) {
|
||||
<p>@Html.ActionLink(T("Install a theme from the Gallery").ToString(), "Themes", "Gallery", new { area = "Orchard.Packaging", returnUrl = HttpContext.Current.Request.RawUrl }, new { @class = "button primaryAction" })</p>
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user