Skip to content

Add unlisted review page link to devhub and change review page links.#4932

Merged
eviljeff merged 2 commits intomozilla:masterfrom
eviljeff:4536-unlisted-review-link-in-devhub
Mar 16, 2017
Merged

Add unlisted review page link to devhub and change review page links.#4932
eviljeff merged 2 commits intomozilla:masterfrom
eviljeff:4536-unlisted-review-link-in-devhub

Conversation

@eviljeff
Copy link
Copy Markdown
Member

fixes mozilla/addons#3965 and simplifies the logic on the review page so it works in more edge cases (e.g. accessing the listed review page when there aren't any listed versions)

{% if unlisted and addon.has_listed_versions() %}
<li><a href="{{ url('editors.review', addon.slug) }}">{{ _('Listed Review Page') }}</a></li>
{# On the listed review page, show link to unlisted version review if necessary and allowed #}
{% elif action_allowed('Addons', 'ReviewUnlisted') and addon.has_unlisted_versions() %}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because it's a elif if you're on the unlisted page, and there are no listed versions, we can enter this block (provided the other conditions are met). In that case we'd show the unlisted review page link even though you're already on it. Worth changing to {% endif %}{% if not unlisted and ... or something similar ?

Copy link
Copy Markdown
Member Author

@eviljeff eviljeff Mar 15, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

either that or {% elif not unlisted and action_allowed('Addons', 'ReviewUnlisted') and addon.has_unlisted_versions() %}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep. r+wc

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eviljeff eviljeff merged commit 5930027 into mozilla:master Mar 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add "Add-on Unlisted Review" link to devhub for add-ons with unlisted versions

2 participants