Files
Orchard/src/Orchard.Web/Modules/Orchard.Packaging/Views/Gallery/Themes.cshtml
2011-01-07 22:34:41 -08:00

62 lines
2.9 KiB
Plaintext

@model Orchard.Packaging.ViewModels.PackagingExtensionsViewModel
@using System.Linq;
@{ Style.Require("PackagingAdmin"); }
<h1>@Html.TitleForPage(T("Browse Gallery - Themes").Text)</h1>
@using ( Html.BeginFormAntiForgeryPost(Url.Action("Themes", "Gallery")) ) {
<fieldset class="bulk-actions">
<label for="filterResults" class="bulk-filter">@T("Feed:")</label>
<select id="sourceId" name="sourceId">
@Html.SelectOption("", Model.SelectedSource == null, T("Any (show all feeds)").ToString())
@foreach (var source in Model.Sources) {
@Html.SelectOption(source.Id, Model.SelectedSource != null && Model.SelectedSource.Id == source.Id, source.FeedTitle)
}
</select>
<button type="submit">@T("Apply")</button>
</fieldset>
}
@if (Model.Extensions.Count() > 0) {
<ul class="contentItems">
@foreach (var item in Model.Extensions) {
<li>
@{
string iconUrl = @item.IconUrl;
if (!string.IsNullOrWhiteSpace(@item.FirstScreenshot)) {
iconUrl = Href(@item.FirstScreenshot);
}
else if (string.IsNullOrWhiteSpace(iconUrl)) {
iconUrl = Href("../../Content/Images/imagePlaceholder.png");
}
}
<img src="@iconUrl" class="thumbnail" />
<div class="extensionDetails">
<div class="extensionName">
<h2>@item.Title<span> - @T("Version: {0}", item.Version)</span></h2>
</div>
<div class="related">
@Html.ActionLink(T("Install").ToString(), "Install", new RouteValueDictionary {{"packageId", item.PackageId}, {"version", item.Version}, {"sourceId", item.Source.Id}, {"redirectTo", "Themes"}})@T(" | ")
<a href="@item.PackageStreamUri">@T("Download")</a>
</div>
<div class="properties">
<p>@(item.Description == null ? T("(No description").Text : item.Description)</p>
<ul class="pageStatus">
<li>@T("Last Updated: {0}", DateTime.Now.ToLocalTime())</li>
<li>&nbsp;&#124;&nbsp;@T("Author: {0}", !string.IsNullOrEmpty(item.Authors) ? item.Authors : T("Unknown").ToString())</li>
<li>&nbsp;&#124;&nbsp;@T("Rating: {0}", item.Rating)</li>
<li>&nbsp;&#124;&nbsp;@T("Ratings Count: {0}", item.RatingsCount)</li>
<li>&nbsp;&#124;&nbsp;@T("Website: ")
@if(!string.IsNullOrEmpty(item.ProjectUrl)) { <a href="@item.ProjectUrl">@item.ProjectUrl</a> }
else { @T("Unknown").ToString() }
</li>
</ul>
</div>
</div>
</li>}
</ul>
}