mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Going back to the inline links for installing a local module or theme.
--HG-- branch : dev
This commit is contained in:
@@ -93,6 +93,7 @@ namespace Orchard.Modules.Controllers {
|
|||||||
|
|
||||||
return View(new ModulesIndexViewModel {
|
return View(new ModulesIndexViewModel {
|
||||||
Modules = modules,
|
Modules = modules,
|
||||||
|
InstallModules = _featureManager.GetEnabledFeatures().FirstOrDefault(f => f.Id == "PackagingServices") != null,
|
||||||
Options = options,
|
Options = options,
|
||||||
Pager = Shape.Pager(pager).TotalItemCount(totalItemCount)
|
Pager = Shape.Pager(pager).TotalItemCount(totalItemCount)
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ using Orchard.Modules.Models;
|
|||||||
|
|
||||||
namespace Orchard.Modules.ViewModels {
|
namespace Orchard.Modules.ViewModels {
|
||||||
public class ModulesIndexViewModel {
|
public class ModulesIndexViewModel {
|
||||||
|
public bool InstallModules { get; set; }
|
||||||
public IEnumerable<ModuleEntry> Modules { get; set; }
|
public IEnumerable<ModuleEntry> Modules { get; set; }
|
||||||
|
|
||||||
public ModulesIndexOptions Options { get; set; }
|
public ModulesIndexOptions Options { get; set; }
|
||||||
|
|||||||
@@ -47,4 +47,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Display(Model.Pager)
|
@Display(Model.Pager)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@if (Model.InstallModules) {
|
||||||
|
<p id="otherActionsBar">@Html.ActionLink(T("Upload a module").ToString(), "AddModule", "PackagingServices", new { area = "Orchard.Packaging", returnUrl = HttpContext.Current.Request.RawUrl }, null)</p>
|
||||||
|
}
|
||||||
|
|||||||
@@ -4,6 +4,14 @@
|
|||||||
#main .features h3 {
|
#main .features h3 {
|
||||||
padding:0 3em 0 0;
|
padding:0 3em 0 0;
|
||||||
}
|
}
|
||||||
|
#otherActionsBar {
|
||||||
|
clear: both;
|
||||||
|
border-top-width: thin;
|
||||||
|
border-top-style: solid;
|
||||||
|
border-top-color: #E4E5E6;
|
||||||
|
margin: 10px 0 0;
|
||||||
|
padding: 10px 0 0;
|
||||||
|
}
|
||||||
.pageStatus {
|
.pageStatus {
|
||||||
clear: both;
|
clear: both;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,11 +15,9 @@ namespace Orchard.Packaging {
|
|||||||
public void GetNavigation(NavigationBuilder builder) {
|
public void GetNavigation(NavigationBuilder builder) {
|
||||||
builder
|
builder
|
||||||
.Add(T("Modules"), menu => menu
|
.Add(T("Modules"), menu => menu
|
||||||
.Add(T("Gallery"), "3", item => Describe(item, "Modules", "Gallery", true))
|
.Add(T("Gallery"), "3", item => Describe(item, "Modules", "Gallery", true)))
|
||||||
.Add(T("Upload"), "9", item => Describe(item, "AddModule", "PackagingServices", true)))
|
|
||||||
.Add(T("Themes"), menu => menu
|
.Add(T("Themes"), menu => menu
|
||||||
.Add(T("Gallery"), "3", item => Describe(item, "Themes", "Gallery", true))
|
.Add(T("Gallery"), "3", item => Describe(item, "Themes", "Gallery", true)))
|
||||||
.Add(T("Upload"), "9", item => Describe(item, "AddTheme", "PackagingServices", true)))
|
|
||||||
.Add(T("Settings"), menu => menu
|
.Add(T("Settings"), menu => menu
|
||||||
.Add(T("Gallery"), "1", item => Describe(item, "Sources", "Gallery", false)));
|
.Add(T("Gallery"), "1", item => Describe(item, "Sources", "Gallery", false)));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -103,6 +103,7 @@ namespace Orchard.Themes.Controllers {
|
|||||||
|
|
||||||
return View(new ThemesIndexViewModel {
|
return View(new ThemesIndexViewModel {
|
||||||
CurrentTheme = currentTheme,
|
CurrentTheme = currentTheme,
|
||||||
|
InstallThemes = installThemes,
|
||||||
Themes = themes
|
Themes = themes
|
||||||
});
|
});
|
||||||
} catch (Exception exception) {
|
} catch (Exception exception) {
|
||||||
|
|||||||
@@ -10,6 +10,14 @@
|
|||||||
height: 50px;
|
height: 50px;
|
||||||
margin: 10px 0 10px 0;
|
margin: 10px 0 10px 0;
|
||||||
}
|
}
|
||||||
|
#otherActionsBar {
|
||||||
|
clear: both;
|
||||||
|
border-top-width: thin;
|
||||||
|
border-top-style: solid;
|
||||||
|
border-top-color: #E4E5E6;
|
||||||
|
margin: 10px 0 0;
|
||||||
|
padding: 10px 0 0;
|
||||||
|
}
|
||||||
#installedBar h3 {
|
#installedBar h3 {
|
||||||
float: left;
|
float: left;
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ using Orchard.Themes.Models;
|
|||||||
|
|
||||||
namespace Orchard.Themes.ViewModels {
|
namespace Orchard.Themes.ViewModels {
|
||||||
public class ThemesIndexViewModel {
|
public class ThemesIndexViewModel {
|
||||||
|
public bool InstallThemes { get; set; }
|
||||||
public ThemeEntry CurrentTheme { get; set; }
|
public ThemeEntry CurrentTheme { get; set; }
|
||||||
public IEnumerable<ThemeEntry> Themes { get; set; }
|
public IEnumerable<ThemeEntry> Themes { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,4 +30,8 @@
|
|||||||
<li>@Display.ThemeEntry(ContentPart: themeEntry)</li>
|
<li>@Display.ThemeEntry(ContentPart: themeEntry)</li>
|
||||||
}
|
}
|
||||||
</ul>
|
</ul>
|
||||||
|
}
|
||||||
|
|
||||||
|
@if (Model.InstallThemes) {
|
||||||
|
<p id="otherActionsBar">@Html.ActionLink(T("Upload a theme").ToString(), "AddTheme", "PackagingServices", new { area = "Orchard.Packaging", returnUrl = HttpContext.Current.Request.RawUrl }, null)</p>
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user