Skip to content

Commit

Permalink
Merge pull request #1654 from NuGet/tilovell/1647-prereleaseAvailable…
Browse files Browse the repository at this point in the history
…MessageFix

Fixes # 1647 - erroneous message that a newer prerelease package is avai...
  • Loading branch information
Tim Lovell-Smith committed Oct 16, 2013
2 parents a1eb9ac + aa1828d commit aacb3ac
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/NuGetGallery/ViewModels/DisplayPackageViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,13 @@ public void SetPendingMetadata(PackageEdit pendingMetadata)
public string Copyright { get; set; }

public bool HasPendingMetadata { get; private set; }

public bool HasNewerPrerelease
{
get
{
return PackageVersions.Any(pv => pv.LatestVersion && !pv.LatestStableVersion);
}
}
}
}
2 changes: 1 addition & 1 deletion src/NuGetGallery/Views/Packages/DisplayPackage.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
This is a prerelease version of @Model.Title.
</p>
}
else if (!Model.LatestVersion)
@if (Model.LatestStableVersion && Model.HasNewerPrerelease)
{
<p class="not-latest-message">
There is a newer prerelease version of this package available. See the version list below for details.
Expand Down

0 comments on commit aacb3ac

Please sign in to comment.