Changeset 1382:0c233d0a90dc for zine
- Timestamp:
- 09/04/10 18:52:31 (21 months ago)
- Branch:
- default
- Tags:
- tip
- Location:
- zine
- Files:
-
- 2 edited
-
application.py (modified) (1 diff)
-
templates/admin/theme.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
zine/application.py
r1339 r1382 470 470 """Return the URL of the author of the theme.""" 471 471 return self.author_info[2] 472 473 @property 474 def contributors(self): 475 """The Contributors of the plugin.""" 476 from zine.utils.mail import split_email 477 data = self.metadata.get('contributors', '') 478 if not data: 479 return [] 480 return [split_email(c.strip()) for c in 481 self.metadata.get('contributors', '').split(',')] 482 483 @property 484 def html_contributors_info(self): 485 from zine.utils.mail import check, is_valid_email 486 result = [] 487 for contributor in self.contributors: 488 name, contact = contributor 489 if not contact: 490 result.append(escape(name)) 491 else: 492 result.append('<a href="%s">%s</a>' % ( 493 escape(check(is_valid_email, contact) and 494 'mailto:' + contact or contact), 495 escape(name) 496 )) 497 return u', '.join(result) 472 498 473 499 @cached_property -
zine/templates/admin/theme.html
r1022 r1382 18 18 <blockquote><p>{{ theme.description|e }}</p></blockquote> 19 19 {%- if theme.has_author %} 20 <p class="author">{% trans author=theme.html_author_info %}by {{ author }}{% endtrans %}</p> 20 <p class="author"> 21 {% trans author=theme.html_author_info %}by {{ author }}{% endtrans %} 22 {% if theme.contributors %} 23 {% trans contributors=theme.html_contributors_info %} 24 and {{ contributors }} 25 {% endtrans %} 26 {% endif %} 27 </p> 21 28 {%- endif %} 22 29 </div>
Note: See TracChangeset
for help on using the changeset viewer.