2011-02-21 12:03:06 -08:00
|
|
|
@using Orchard.Themes.Models
|
|
|
|
@using Orchard.Mvc.Html
|
|
|
|
@using Orchard.Environment.Extensions.Models
|
2015-01-18 19:11:37 +01:00
|
|
|
@using Orchard.Utility.Extensions;
|
2011-02-21 12:03:06 -08:00
|
|
|
|
2015-01-18 19:11:37 +01:00
|
|
|
@{
|
|
|
|
Orchard.Themes.Models.ThemeEntry theme = Model.Theme;
|
|
|
|
var themeClasses = theme.IsRecentlyInstalled ? "class=\"recentlyInstalledTheme\"" : String.Empty;
|
|
|
|
}
|
2011-02-21 12:03:06 -08:00
|
|
|
|
2011-02-24 10:43:49 -08:00
|
|
|
<div>
|
2015-01-18 19:11:37 +01:00
|
|
|
<h3 @Html.Raw(themeClasses)>@theme.Name</h3>
|
2011-02-21 12:03:06 -08:00
|
|
|
|
2015-01-18 19:11:37 +01:00
|
|
|
@Html.Image(Href(Html.ThemePath((ExtensionDescriptor) theme.Descriptor, "/Theme.png")), Html.Encode((string)theme.Name), null)
|
2011-02-21 12:03:06 -08:00
|
|
|
@using (Html.BeginFormAntiForgeryPost(Url.Action("Activate"), FormMethod.Post, new { @class = "inline" })) {
|
2015-01-18 19:11:37 +01:00
|
|
|
@Html.Hidden("themeId", (string)theme.Descriptor.Id)
|
2011-02-21 12:03:06 -08:00
|
|
|
<button type="submit" title="@T("Activate")">@T("Set Current")</button>
|
|
|
|
}
|
|
|
|
|
|
|
|
@using (Html.BeginFormAntiForgeryPost(Url.Action("Preview"), FormMethod.Post, new { @class = "inline" })) {
|
2015-01-18 19:11:37 +01:00
|
|
|
@Html.Hidden("themeId", (string)theme.Descriptor.Id)
|
2011-02-21 12:03:06 -08:00
|
|
|
<button type="submit" title="@T("Preview")">@T("Preview")</button>
|
|
|
|
}
|
|
|
|
|
2011-02-24 14:09:25 -08:00
|
|
|
<p class="themeInfo smallText">
|
2015-01-18 19:11:37 +01:00
|
|
|
@T("By") @theme.Descriptor.Author<br />
|
|
|
|
@T("Version:") @theme.Descriptor.Version<br />
|
|
|
|
@theme.Descriptor.Description<br />
|
|
|
|
@if (theme.Descriptor.WebSite != null) {
|
|
|
|
<a href="@theme.Descriptor.WebSite">@theme.Descriptor.WebSite</a><br />
|
2011-02-21 12:03:06 -08:00
|
|
|
}
|
|
|
|
</p>
|
|
|
|
|
2015-01-18 19:11:37 +01:00
|
|
|
@if (theme.Notifications != null && theme.Notifications.Count > 0) {
|
2011-02-21 12:03:06 -08:00
|
|
|
<ul class="notifications">
|
2015-01-18 19:11:37 +01:00
|
|
|
@foreach (string notification in theme.Notifications) {
|
2011-02-21 12:03:06 -08:00
|
|
|
<li>@notification</li>
|
|
|
|
}
|
|
|
|
</ul>
|
|
|
|
}
|
|
|
|
|
2015-01-18 19:11:37 +01:00
|
|
|
@if (theme.Enabled) {
|
2011-02-21 12:03:06 -08:00
|
|
|
using (Html.BeginFormAntiForgeryPost(Url.Action("Disable"), FormMethod.Post, new { @class = "inline link" })) {
|
2015-01-18 19:11:37 +01:00
|
|
|
@Html.Hidden("themeId", (string)theme.Descriptor.Id)
|
2011-04-04 17:46:00 -07:00
|
|
|
<button type="submit" class="disable" title="Disable">@T("Disable")</button>
|
2011-02-21 12:03:06 -08:00
|
|
|
}
|
|
|
|
}
|
2011-04-06 11:36:53 -07:00
|
|
|
else {
|
2011-02-28 13:08:07 -08:00
|
|
|
using (Html.BeginFormAntiForgeryPost(Url.Action("Enable"), FormMethod.Post, new { @class = "inline link" })) {
|
2015-01-18 19:11:37 +01:00
|
|
|
@Html.Hidden("themeId", (string)theme.Descriptor.Id)
|
2011-04-04 17:46:00 -07:00
|
|
|
<button type="submit" class="enable" title="Enable">@T("Enable")</button>
|
2011-02-28 13:08:07 -08:00
|
|
|
}
|
2011-04-06 11:36:53 -07:00
|
|
|
}
|
2011-02-21 12:03:06 -08:00
|
|
|
|
2015-01-18 19:11:37 +01:00
|
|
|
@if (theme.NeedsUpdate) {
|
2011-03-25 10:30:06 -07:00
|
|
|
<span> | </span>
|
2011-02-21 12:03:06 -08:00
|
|
|
using (Html.BeginFormAntiForgeryPost(Url.Action("Update"), FormMethod.Post, new { @class = "inline link" })) {
|
2015-01-18 19:11:37 +01:00
|
|
|
@Html.Hidden("themeId", (string)theme.Descriptor.Id)
|
2011-02-21 12:03:06 -08:00
|
|
|
<button type="submit" class="update">@T("Update")</button> <br/>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-01-18 19:11:37 +01:00
|
|
|
@if (theme.CanUninstall) {
|
2011-03-25 10:30:06 -07:00
|
|
|
<span> | </span>
|
2015-01-18 19:11:37 +01:00
|
|
|
@Html.ActionLink(
|
|
|
|
T("Uninstall").Text,
|
|
|
|
"UninstallTheme",
|
|
|
|
"PackagingServices",
|
|
|
|
new { ThemeId = theme.Descriptor.Id, ReturnUrl = Request.ToUrlString(), Area = "Orchard.Packaging" },
|
|
|
|
new { itemprop = "RemoveUrl UnsafeUrl" })
|
2011-02-21 12:03:06 -08:00
|
|
|
}
|
|
|
|
</div>
|