From 079c45e2c3598518c468e5f84c31f160f77267ed Mon Sep 17 00:00:00 2001 From: Peter Marheine Date: Fri, 25 Mar 2016 22:40:42 -0600 Subject: [PATCH 1/2] Add a backlink to newest for yanked crate versions --- app/templates/crate/version.hbs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/templates/crate/version.hbs b/app/templates/crate/version.hbs index 3077343d651..6bda2e6a3a6 100644 --- a/app/templates/crate/version.hbs +++ b/app/templates/crate/version.hbs @@ -37,8 +37,13 @@ {{#if currentVersion.yanked}}
- This crate has been yanked, but it is still available for download for - other crates that may be depending on it. +
+

This crate has been yanked, but it is still available for download for + other crates that may be depending on it.

+

You may wish to + {{#link-to 'crate' crate}}view the newest version{{/link-to}} instead. +

+
{{else}}
From b4d4bc5912c34657b9251d19b2c7568035dccabe Mon Sep 17 00:00:00 2001 From: Peter Marheine Date: Mon, 28 Mar 2016 14:44:40 -0600 Subject: [PATCH 2/2] Backlink to version list from yanked versions Also fix a bug in the versions template causing the yanked indicator to never appear. --- app/templates/crate/version.hbs | 3 ++- app/templates/crate/versions.hbs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/templates/crate/version.hbs b/app/templates/crate/version.hbs index 6bda2e6a3a6..b0e93ba2b8d 100644 --- a/app/templates/crate/version.hbs +++ b/app/templates/crate/version.hbs @@ -41,7 +41,8 @@

This crate has been yanked, but it is still available for download for other crates that may be depending on it.

You may wish to - {{#link-to 'crate' crate}}view the newest version{{/link-to}} instead. + {{#link-to 'crate.versions' crate}}view all versions{{/link-to}} to find one that + has not been yanked.

diff --git a/app/templates/crate/versions.hbs b/app/templates/crate/versions.hbs index 35bdd3662e6..53015faa82f 100644 --- a/app/templates/crate/versions.hbs +++ b/app/templates/crate/versions.hbs @@ -17,7 +17,7 @@ {{#link-to 'crate.version' version.num}}{{ version.num }}{{/link-to}} {{moment-format version.created_at 'LL'}} - {{#if yanked}} + {{#if version.yanked}} yanked {{/if}}