Files
Orchard/src/Orchard.Web/Modules/Orchard.Themes/Views/Admin/Index.cshtml
Andre Rodrigues d94666aac0 Replace tabs for spaces in views, css and cs files.
--HG--
branch : dev
2010-11-24 16:10:08 -08:00

64 lines
3.3 KiB
Plaintext

@model Orchard.Themes.ViewModels.ThemesIndexViewModel
@{ Style.Require("ThemesAdmin"); }
<h1>@Html.TitleForPage(T("Manage Themes").ToString())</h1>
@if (Model.CurrentTheme == null) {
<p>
@T("There is no current theme in the application. The built-in theme will be used.")<br />
@Html.ActionLink(T("Install a new Theme").ToString(), "Install")
</p>
} else {
<h3>@T("Current Theme") - @Model.CurrentTheme.Name</h3>
@Html.Image(Href(Html.ThemePath(Model.CurrentTheme, "/Theme.png")), Html.Encode(Model.CurrentTheme.Name), new { @class = "themePreviewImage" })
<h5>@T("By") @Model.CurrentTheme.Author</h5>
<p>
@T("Version:") @Model.CurrentTheme.Version<br />
@Model.CurrentTheme.Description<br />
@Model.CurrentTheme.WebSite
</p>
@Html.ActionLink(T("Install a new Theme").ToString(), "Install", null, new { @class = "button primaryAction" })
}
<h2>@T("Available Themes")</h2>
<ul class="templates">
@foreach (var theme in Model.Themes) {
if (Model.CurrentTheme == null || theme.Id != Model.CurrentTheme.Id) {
<li>
<div>
<h3>@theme.Name</h3>
@Html.Image(Href(theme.ThemePath("/Theme.png")), Html.Encode(theme.Name), null)
@using (Html.BeginFormAntiForgeryPost(Url.Action(theme.Enabled ? "Disable" : "Enable"), FormMethod.Post, new { @class = "inline" })) {
@Html.Hidden("themeName", theme.Id)
<button type="submit" title="@T(theme.Enabled ? "Disable" : "Enable")">@T(theme.Enabled ? "Disable" : "Enable")</button>
}
@using (Html.BeginFormAntiForgeryPost(Url.Action("Activate"), FormMethod.Post, new { @class = "inline" })) {
@Html.Hidden("themeName", theme.Id)
<button type="submit" title="@T("Activate")">@T("Set Current")</button>
}
@using (Html.BeginFormAntiForgeryPost(Url.Action("Preview"), FormMethod.Post, new { @class = "inline" })) {
@Html.Hidden("themeName", theme.Id)
<button type="submit" title="@T("Preview")">@T("Preview")</button>
}
<h5>@T("By") @theme.Descriptor.Author</h5>
<p>
@T("Version:") @theme.Descriptor.Version<br />
@theme.Descriptor.Description<br />
@theme.Descriptor.WebSite
</p>
@if(theme.NeedsUpdate){
using (Html.BeginFormAntiForgeryPost(Url.Action("Update"), FormMethod.Post, new { @class = "inline link" })) {
@Html.Hidden("themeName", theme.Id)
<button type="submit" class="update">@T("Update")</button> <br/>
}
}
@using (Html.BeginFormAntiForgeryPost(Url.Action("Uninstall"), FormMethod.Post, new { @class = "inline link" })) {
@Html.Hidden("themeName", theme.Id)
<button type="submit" class="uninstall" title="@T("Uninstall")">@T("Uninstall")</button>
}
</div>
</li>
}
}
</ul>