Skip to content

Commit

Permalink
Footer links do not open tree
Browse files Browse the repository at this point in the history
Fixes #799
hyanwong committed Apr 16, 2024

Verified

This commit was signed with the committer’s verified signature.
1 parent 2927d1b commit b0ca647
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion views/default/footer_sponsor_items.load
Original file line number Diff line number Diff line change
@@ -27,5 +27,5 @@
{{pic_index.add(rng % len(data))}}
{{pass}}
{{for p in pic_index:}}
<a href="/life/@={{=data[p][0]}}?pop=osn_&init=jump" target="_blank"><img class="species" alt="{{=data[p][1]}}" src="{{=img.thumb_url(data[p][2], data[p][3])}}" /></a>
<a href="{{=URL('default', 'sponsor_node.html', vars={'ott': data[p][0]})}}"><img class="species" alt="{{=data[p][1]}}" src="{{=img.thumb_url(data[p][2], data[p][3])}}" /></a>
{{pass}}
8 changes: 5 additions & 3 deletions views/default/sponsor_node.html
Original file line number Diff line number Diff line change
@@ -13,8 +13,10 @@ <h1>Sponsorship suggestions</h1>
{{end block}}
<h2>{{=T('Choose a leaf to sponsor on the OneZoom Tree of Life')}}</h2>
<em>{{=T('Sponsor a leaf for yourself or as a unique gift for someone you know.')}}</em>
<p>{{info_text = T('All the species on this page are descended from the part of the tree that you clicked on. We have selected some popular ones to show you, or you can look through %(sp_list)s. If you choose to sponsor one, we will acknowledge your donation to the %(oz_link)s and %(partner_link)s by displaying your chosen sponsor’s name on that leaf of the tree. Donations to OneZoom will help us in our aim to provide easy access to scientific knowledge about biodiversity and evolution, and raise awareness about the variety of life on earth together with the need to conserve it. %(partner_fund_use)s.') if partner else T('All the species on this page are descended from the part of the tree that you clicked on. We have selected some popular ones to show you, or you can look through %(sp_list)s. If you choose to sponsor one, we will acknowledge your donation to the %(oz_link)s by displaying your chosen sponsor’s name on that leaf of the tree. Donations to OneZoom will help us in our aim to provide easy access to scientific knowledge about biodiversity and evolution, and raise awareness about the variety of life on earth together with the need to conserve it.')}}
{{=XML(info_text % dict(sp_list=A(T("an alphabetical list"), _href=URL('list_sponsorable_children', vars=vars)), oz_link=A(T("OneZoom charity"), _href='//www.onezoom.org/static/images/RegistrationCertificate.jpg', _target="_blank"),partner_fund_use=T(partner.get('details')) if partner else "",partner_link=A(partner.get('name'), _href=partner.get('url'), _target="_blank") if partner else ""))}}</p>

<p>{{if 'popup' in request.vars:}}{{=T('All the species on this page are descended from the part of the tree that you clicked on')}}{{elif 'ott' in request.vars:}}{{=XML(T('All the species on this page can be placed on a <a href="%s">branch of the tree of life</a>') % URL('life/@=' + str(request.vars['ott']), url_encode=False))}}{{else:}}{{=T('All the species on this page can be placed on a branch of the tree of life')}}{{pass}}.
{{info_text = T('We have selected some popular ones to show you, or you can look through %(sp_list)s. If you choose to sponsor one, we will acknowledge your donation to the %(oz_link)s and %(partner_link)s by displaying your chosen sponsor’s name on that leaf of the tree. Donations to OneZoom will help us in our aim to provide easy access to scientific knowledge about biodiversity and evolution, and raise awareness about the variety of life on earth together with the need to conserve it. %(partner_fund_use)s.') if partner else T('We have selected some popular ones to show you, or you can look through %(sp_list)s. If you choose to sponsor one, we will acknowledge your donation to the %(oz_link)s by displaying your chosen sponsor’s name on that leaf of the tree. Donations to OneZoom will help us in our aim to provide easy access to scientific knowledge about biodiversity and evolution, and raise awareness about the variety of life on earth together with the need to conserve it.')}}
{{=XML(info_text % dict(sp_list=A(T("an alphabetical list"), _href=URL('list_sponsorable_children', vars=vars)), oz_link=A(T("OneZoom charity"), _href='//www.onezoom.org/static/images/RegistrationCertificate.jpg', _target="_blank"),partner_fund_use=T(partner.get('details')) if partner else "",partner_link=A(partner.get('name'), _href=partner.get('url'), _target="_blank") if partner else ""))}}</p>
<div>
{{if error is not None:}}
<h4>{{=error}}</h4>
@@ -23,7 +25,7 @@ <h4>{{=error}}</h4>
{{=LOAD('default','sponsor_node_price.load', vars=dict({'n':6, 'price':price}, **vars), ajax=True)}}
{{pass}}
{{if len(first25) > 0:}}
<h3>{{=T('Or browse all sponsorable species, in alphabetical order')}}</h3>
<h3>{{=T('Or browse all sponsorable species on this branch, in alphabetical order')}}</h3>
<ul class="alphabetical_list">
{{for i, spp in enumerate(first25):}}
{{if i<24:}}

0 comments on commit b0ca647

Please sign in to comment.