Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Tiny change to make sponsor entries addressable #21

Merged
merged 2 commits into from

3 participants

@holdenweb

Just adds an id attribute to both tags to allow use of fragment identifiers.

@trbs

wouldn't it be nicer to have a separator between the name and id ?
and use .pk instead of .id

Like:

+        <img id="sponsor_{{ sponsor.pk }}" src="{% thumbnail sponsor.logo '150x150' %}" alt="{{ sponsor.name }}" />

Yeah, much. Looks much more sensible, thanks. Presumably pk because that always maps to something?

Yeah, sponsor.pk will always map to the primary key of the Sponsor model, at this moment we can be sure that the primary is 'id' but if for some reason that would change in the future this should automatically change with it.

@holdenweb holdenweb Update symposion/templates/sponsorship/_sponsor_link.html
Improved reference format and used pk rather than id 
- thanks to trbs for the suggestion
8afa17b
@lukeman lukeman merged commit 91366dc into pinax:master
@dkua dkua referenced this pull request from a commit in dkua/2013-web
@taavi taavi Adds logo credit. Fixes #21. 0644d89
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 21, 2013
  1. @holdenweb
  2. @holdenweb

    Update symposion/templates/sponsorship/_sponsor_link.html

    holdenweb authored
    Improved reference format and used pk rather than id 
    - thanks to trbs for the suggestion
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 symposion/templates/sponsorship/_sponsor_link.html
View
4 symposion/templates/sponsorship/_sponsor_link.html
@@ -2,9 +2,9 @@
{% spaceless %}
<a href="{{ sponsor.external_url }}">
{% if dimensions %}
- <img src="{% thumbnail sponsor.logo dimensions %}" alt="{{ sponsor.name }}" />
+ <img id="sponsor_{{ sponsor.pk }}" src="{% thumbnail sponsor.logo dimensions %}" alt="{{ sponsor.name }}" />
{% else %}
- <img src="{% thumbnail sponsor.logo '150x150' %}" alt="{{ sponsor.name }}" />
+ <img id="sponsor_{{ sponsor.pk }}" src="{% thumbnail sponsor.logo '150x150' %}" alt="{{ sponsor.name }}" />
{% endif %}
</a>
{% endspaceless %}
Something went wrong with that request. Please try again.