Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: a81dcc0e06
Fetching contributors…

Cannot retrieve contributors at this time

215 lines (211 sloc) 8.031 kb
@model DisplayPackageViewModel
@{
ViewBag.Tab = "Packages";
Layout = "~/Views/Shared/TwoColumnLayout.cshtml";
}
@section SideColumn {
<img class="logo" src="@(Model.IconUrl ?? @Links.Content.Images.packageDefaultIcon_png)" alt="Icon for package @Model.Id" onerror="this.src='@Links.Content.Images.packageDefaultIcon_png';" />
<div id="stats">
<div class="stat">
<p class="stat-number">@Model.TotalDownloadCount.ToString("n0")</p>
<p class="stat-label">
Downloads</p>
</div>
<div class="stat">
<p class="stat-number">@Model.DownloadCount.ToString("n0")</p>
<p class="stat-label">
Downloads of v @Model.Version</p>
</div>
<div class="stat">
<p class="stat-number">@Model.LastUpdated.ToShortDateString()</p>
<p class="stat-label">
Last update</p>
</div>
</div>
<nav>
<ul class="links">
@if (!String.IsNullOrEmpty(Model.ProjectUrl)) {
<li><a href="@Model.ProjectUrl" title="Visit the project site to learn more about this package">
Project Site</a></li>
}
@if (!String.IsNullOrEmpty(Model.LicenseUrl)) {
<li><a href="@Model.LicenseUrl" title="Make sure you agree with the license">License</a></li>
}
<li><a href="@Url.Action(MVC.Packages.ReportAbuse(Model.Id, Model.Version))" title="Report Abuse">
Report Abuse</a></li>
<li><a href="@Url.Action(MVC.Packages.ContactOwners(Model.Id))">Contact Owners</a></li>
@if (User.Identity.IsAuthenticated)
{
<li><a href="@Url.PackageDownload(2,Model.Id, Model.Version)" title="Download the raw nupkg file.">Download</a></li>
} else {
<li><a href="@Url.Action(@MVC.Packages.Download())" title="How do I download?">How to Download</a></li>
}
@if (Model.IsOwner(User)) {
<li><a href="@Url.EditPackage(Model)">Edit Package</a></li>
<li><a href="@Url.ManagePackageOwners(Model)">Manage Owners</a></li>
<li><a href="@Url.DeletePackage(Model)" class="delete">Delete Package</a></li>
}
</ul>
</nav>
}
<div class="package-page">
@if (Model.Prerelease)
{
<p class="prerelease-message">
This is a prerelease version of @Model.Title.
</p>
}
else if (!Model.IsLatestVersionAvailable)
{
<p class="not-latest-message">
This is not the <a href="@Url.Package(Model.Id)" title="View the latest version">latest
version</a> of @Model.Title available.
</p>
}
<hgroup class="page-heading">
<h1>@Model.Title</h1>
<h2>@Model.Version</h2>
</hgroup>
@foreach (var line in Model.Description.Split('\n'))
{
<p>@line</p>
}
@if (!Model.Listed && Model.IsOwner(User))
{
<p class="message warning">
This package is unlisted and hidden from package listings.
You can see the package because you are one of its owners. To list the package again,
<a href="@Url.DeletePackage(Model)">change its listing setting</a>.
</p>
}
<p>
To install @Model.Title, run the following command in the <a href="http://docs.nuget.org/docs/start-here/using-the-package-manager-console">
Package Manager Console</a>
</p>
<div class="nuget-badge">
<p>
<code>PM&gt; Install-Package @Model.Id
@if (!Model.LatestVersion || !Model.Listed)
{ <text> -Version @Model.Version</text> }
@if (Model.Prerelease)
{<text> -Pre </text>}</code></p>
</div>
@if (!String.IsNullOrWhiteSpace(Model.ReleaseNotes))
{
<h3>Release Notes</h3>
foreach (var note in Model.ReleaseNotes.Split('\n'))
{
<p>@note</p>
}
}
<h3>Owners</h3>
@ViewHelpers.OwnersGravatar(Model.Owners, 32, Url)
<h3>Authors</h3>
<ul class="authors">
@foreach (var author in Model.Authors)
{
<li><a href="@Url.Search(author.Name)" title="Search for @author.Name">@author.Name</a></li>
}
</ul>
@if (!String.IsNullOrEmpty(Model.Copyright))
{
<h3>Copyright</h3>
<p>@Model.Copyright</p>
}
@if (@Model.Tags.AnySafe())
{
<h3>Tags</h3>
<ul class="tags">
@foreach (var tag in Model.Tags)
{
<li><a href="@Url.Search(tag)" title="Search for @tag">@tag</a></li>
}
</ul>
}
<h3>Dependencies</h3>
@if (Model.Dependencies.Any())
{
<table class="sexy-table">
<thead>
<tr>
<th class="first">
Id
</th>
<th class="last">
Version Range
</th>
</tr>
</thead>
<tbody>
@foreach (var dependency in Model.Dependencies)
{
<tr>
<td>
<a href="@Url.Package(dependency.Id)">@dependency.Id</a>
</td>
<td>@dependency.VersionSpec
</td>
</tr>
}
</tbody>
</table>
}
else
{
<p>@Model.Id @Model.Version does not have any dependencies
</p>
}
<h3>Version History</h3>
<table class="sexy-table">
<thead>
<tr>
<th class="first">
Version
</th>
<th>
Downloads
</th>
<th class="@(Model.IsOwner(User) ? "" : "last")">
Last updated
</th>
@if (Model.IsOwner(User))
{
<th class="last">
Listed
</th>
}
</tr>
</thead>
<tbody>
@foreach (var packageVersion in Model.PackageVersions)
{
if (packageVersion.Listed || Model.IsOwner(User))
{
<tr class="versionTableRow @if (packageVersion.LatestVersion)
{<text>recommended </text>}">
<td class="version" @if (packageVersion.LatestVersion)
{<text>title="Latest Version"</text>}>
@if (!packageVersion.IsCurrent(Model))
{
<a href="@Url.Package(packageVersion)">@packageVersion.Title @packageVersion.Version</a>
}
else
{
<span>@packageVersion.Title @packageVersion.Version</span>
}
</td>
<td>@packageVersion.DownloadCount
</td>
<td>@packageVersion.LastUpdated.ToString("D")
</td>
@if (Model.IsOwner(User))
{
<td><a href="@Url.DeletePackage(packageVersion)" class="delete">@(packageVersion.Listed ? "yes" : "no")</a>
</td>
}
</tr>
}
}
</tbody>
</table>
</div>
Jump to Line
Something went wrong with that request. Please try again.