Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
Vary message on unclaimed package for anon
Browse files Browse the repository at this point in the history
Smooths out the experience a tad for proto-givers.
  • Loading branch information
chadwhitacre committed Jun 15, 2017
1 parent b81084e commit bf38cdb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion tests/py/test_www_npm_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def setUp(self):

def test_anon_gets_signin_page_from_unclaimed(self):
body = self.client.GET('/on/npm/foo/').body
assert 'foo</a> npm package:' in body
assert 'foo</a> npm package on Gratipay:' in body

def test_auth_gets_send_confirmation_page_from_unclaimed(self):
self.make_participant('bob', claimed_time='now')
Expand Down
17 changes: 11 additions & 6 deletions www/on/npm/%package/index.html.spt
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,22 @@ if user.participant:
<p class="sorry important-thing-at-the-top">{{ _("No description available.") }}</p>
{% endif %}

<p class="instructions">
{{ _( 'Apply to accept payments for the {package_link} npm package:'
, package_link=('<a href="' + package.remote_human_url + '">' + package_name + '</a>')|safe
) }}
</p>

{% if user.ANON %}
<p class="instructions">
{{ _( 'Claim the {package_link} npm package on Gratipay:'
, package_link=('<a href="' + package.remote_human_url + '">' + package_name + '</a>')|safe
) }}
</p>
<div class="important-button">
{{ sign_in_using(button_class='large') }}
</div>
{% else %}
<p class="instructions">
{{ _( 'Apply to accept payments for the {package_link} npm package:'
, package_link=('<a href="' + package.remote_human_url + '">' + package_name + '</a>')|safe
) }}
</p>

{% if len(emails) == 0 %}
<p class="sorry">{{ _("No email addresses on file.") }}</p>
{% else %}
Expand Down

0 comments on commit bf38cdb

Please sign in to comment.