Files
Orchard/src/Orchard.Web/Modules/Orchard.Packaging/Views/Gallery/Themes.cshtml
Sebastien Ros 1e2bbb922e Added version information display for Themes also
--HG--
branch : dev
2010-10-19 12:09:36 -07:00

49 lines
2.3 KiB
Plaintext

@model Orchard.Packaging.ViewModels.PackagingModulesViewModel
@{
Style.Require("PackagingAdmin");
Style.Require("ThemesAdmin");
}
<h1>@Html.TitleForPage(T("Browse Gallery - Themes").ToString())</h1>
<div class="manage">@Html.ActionLink(T("Refresh").ToString(), "Update", new { cameFrom = "Themes" }, new { @class = "button primaryAction" })</div>
@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.Modules.Count() > 0) {
<ul class="templates">
@foreach (var item in Model.Modules) {
<li>
@{
var author = item.SyndicationItem.Authors.Any() ? String.Join(", ", item.SyndicationItem.Authors.Select(a => a.Name)) : T("Unknown").Text;
var title = item.SyndicationItem.Title == null ? T("(No title)").Text : item.SyndicationItem.Title.Text;
var thumbnail = item.SyndicationItem.Links.Where(l=>l.RelationshipType=="thumbnail").Select(l=>l.Uri.ToString()).FirstOrDefault();
}
<div>
<h3>@title</h3>
@if(!String.IsNullOrEmpty(thumbnail)) {
@Html.Image(thumbnail, Html.Encode(title), null)
}
<br/>
@Html.ActionLink(T("Install").ToString(), "Install", new RouteValueDictionary {{"SyndicationId",item.SyndicationItem.Id},{"cameFrom", "Themes" }}, new Dictionary<string, object> { { "class", "button" } })
<a class="button" href="@item.PackageStreamUri">@T("Download")</a>
<h5>@T("By") @author</h5>
<p>
@T("Version: {0}", item.SyndicationItem.ElementExtensions.ReadElementExtensions<string>("Version", "http://orchardproject.net").FirstOrDefault() ?? T("N/A").Text)<br />
@(item.SyndicationItem.Summary == null ? T("(No description").Text : item.SyndicationItem.Summary.Text)<br />
</p>
</div>
</li>
}
</ul>
}