Going back to the inline links for installing a local module or theme.

--HG--
branch : dev
This commit is contained in:
Nathan Heskew
2011-02-26 07:07:16 -08:00
parent a395b47e66
commit 944bc02076
9 changed files with 31 additions and 5 deletions

View File

@@ -93,6 +93,7 @@ namespace Orchard.Modules.Controllers {
return View(new ModulesIndexViewModel {
Modules = modules,
InstallModules = _featureManager.GetEnabledFeatures().FirstOrDefault(f => f.Id == "PackagingServices") != null,
Options = options,
Pager = Shape.Pager(pager).TotalItemCount(totalItemCount)
});

View File

@@ -3,6 +3,7 @@ using Orchard.Modules.Models;
namespace Orchard.Modules.ViewModels {
public class ModulesIndexViewModel {
public bool InstallModules { get; set; }
public IEnumerable<ModuleEntry> Modules { get; set; }
public ModulesIndexOptions Options { get; set; }

View File

@@ -47,4 +47,8 @@
}
@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>
}

View File

@@ -4,6 +4,14 @@
#main .features h3 {
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 {
clear: both;
}

View File

@@ -15,11 +15,9 @@ namespace Orchard.Packaging {
public void GetNavigation(NavigationBuilder builder) {
builder
.Add(T("Modules"), menu => menu
.Add(T("Gallery"), "3", item => Describe(item, "Modules", "Gallery", true))
.Add(T("Upload"), "9", item => Describe(item, "AddModule", "PackagingServices", true)))
.Add(T("Gallery"), "3", item => Describe(item, "Modules", "Gallery", true)))
.Add(T("Themes"), menu => menu
.Add(T("Gallery"), "3", item => Describe(item, "Themes", "Gallery", true))
.Add(T("Upload"), "9", item => Describe(item, "AddTheme", "PackagingServices", true)))
.Add(T("Gallery"), "3", item => Describe(item, "Themes", "Gallery", true)))
.Add(T("Settings"), menu => menu
.Add(T("Gallery"), "1", item => Describe(item, "Sources", "Gallery", false)));
}

View File

@@ -103,6 +103,7 @@ namespace Orchard.Themes.Controllers {
return View(new ThemesIndexViewModel {
CurrentTheme = currentTheme,
InstallThemes = installThemes,
Themes = themes
});
} catch (Exception exception) {

View File

@@ -10,6 +10,14 @@
height: 50px;
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 {
float: left;
padding-top: 10px;

View File

@@ -3,6 +3,7 @@ using Orchard.Themes.Models;
namespace Orchard.Themes.ViewModels {
public class ThemesIndexViewModel {
public bool InstallThemes { get; set; }
public ThemeEntry CurrentTheme { get; set; }
public IEnumerable<ThemeEntry> Themes { get; set; }
}

View File

@@ -30,4 +30,8 @@
<li>@Display.ThemeEntry(ContentPart: themeEntry)</li>
}
</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>
}