Permalink
Browse files

nicer contact information templates and maps

  • Loading branch information...
1 parent 0249d76 commit d163e7e6a93bcdf45eebdd086dea8d2cead72109 @evildmp committed Feb 13, 2013
View
2 arkestra_utilities/templates/arkestra.html
@@ -51,7 +51,7 @@
<body {% block body_attributes %}{% endblock body_attributes %}>
{% cms_toolbar %}
- {% with placeholder_width=960 generic_main_width=523 sidebar_image_size="294x196" entity_image_size="445x384" person_entity_map_size="445x100" sidebar_map_size="296x100" person_image_size="460x460" lightbox_max_dimension=600 plugin_thumbnail_size="75x75" place_image_size="627x418" %}
+ {% with placeholder_width=960 generic_main_width=523 sidebar_image_size="294x196" entity_image_size="445x384" entity_map_size="445x100" person_map_size="445x100" sidebar_map_size="296x100" person_image_size="460x460" lightbox_max_dimension=600 plugin_thumbnail_size="75x75" place_image_size="627x418" %}
{% block body_content %}
<div id="outer-wrapper">
{% block outer_wrapper_top %}{% endblock %}
View
13 contacts_and_people/templates/contacts_and_people/entity_contacts_and_people.html
@@ -9,6 +9,9 @@
{% load entity_tags %}
{% load thumbnail %}
{% load typogrify_tags %}
+
+{% thumbnail entity.image.file entity_image_size subject_location=entity.image.subject_location as image %}
+
{% block arkestra_content %}
<div class="row columns2">
{% render_placeholder intro_page_placeholder %}
@@ -17,13 +20,11 @@
<h{{ IN_BODY_HEADING_LEVEL }}>Contact information</h{{ IN_BODY_HEADING_LEVEL }}>
<dl>
{% include "includes/key_contacts.html" %}
- {% include "includes/address.html" %}
- {% include "includes/precise_location.html" %}
- {% include "includes/access_notes.html" %}
- {% include "includes/email.html" %}
- {% include "includes/phone_contacts.html" %}
+ {% with entity_map_size as map_size %}
+ {% include "includes/contact_information.html" %}
+ {% endwith %}
</dl>
- {% thumbnail entity.image.file entity_image_size subject_location=entity.image.subject_location as image %}{% if image %}<img src="{{ image.url }}" alt = "" class="right"/>{% endif %}
+ {% if image %}<img src="{{ image.url }}" alt = "" class="right"/>{% endif %}
</div>
</div>
{% if entity.get_people_with_roles or initials_list or people %}
View
8 contacts_and_people/templates/contacts_and_people/person.html
@@ -35,11 +35,9 @@
<div>
{% if building or address or location or access_note or email or phone.all %}<h{{ IN_BODY_HEADING_LEVEL }}>Contact information</h{{ IN_BODY_HEADING_LEVEL }}>
<dl>
- {% include "includes/address.html" %}
- {% if full_address %}{% include "includes/precise_location.html" %}{% endif %}
- {% include "includes/access_notes.html" %}
- {% include "includes/email.html" %}
- {% include "includes/phone_contacts.html" %}
+ {% with person_map_size as map_size %}
+ {% include "includes/contact_information.html" %}
+ {% endwith %}
</dl>
{% endif %}
{% render_placeholder person.description %}
View
4 contacts_and_people/templates/includes/access_notes.html
@@ -1,4 +0,0 @@
-{% if access_note %}
- <dt>Please note</dt>
- <dd>{{ access_note }}</dd>
-{% endif %}
View
11 contacts_and_people/templates/includes/address.html
@@ -1,11 +0,0 @@
-{% if full_address %}
-<dt>Address</dt>
-<dd>
- <strong>{{ entity }}</strong>
- <br />
- {{ full_address|join:"<br />" }}
- {% if building.map %}<p><a href="{{ building.get_absolute_url }}">map &amp; directions<br />
- <img alt="map" src="http://maps.googleapis.com/maps/api/staticmap?center={{ building.latitude }},{{ building.longitude }}&zoom={{ building.zoom }}&size={{ person_entity_map_size }}&markers=color:red|{{ building.latitude }},{{ building.longitude }}&sensor=false" />
- </a></p>{% endif %}
-</dd>
-{% endif %}
View
39 contacts_and_people/templates/includes/contact_information.html
@@ -0,0 +1,39 @@
+{% if email %}
+ <dt style = "clear: both;">Email address</dt>
+ <dd><a href="mailto:{{ email }}">{{ email }}</a></dd>
+{% endif %}
+
+{% if full_address and precise_location %}
+ <dt>Location</dt>
+ <dd>{{ precise_location }}</dd>
+{% endif %}
+
+{% if access_note %}
+ <dt>Please note</dt>
+ <dd>{{ access_note }}</dd>
+{% endif %}
+
+{% if phone %}
+ <dt>Telephone</dt>
+ {% for phone_number in phone %}
+ <dd>+{{ phone_number.country_code }} {{ phone_number.area_code }} {{ phone_number.number }}{% if phone_number.internal_extension %}, ext. {{ phone_number.internal_extension }} {% endif %} {% if phone_number.label %} ({{ phone_number.label }}) {% endif %}</dd>
+ {% endfor %}
+{% endif %}
+
+{% if full_address %}
+ <dt>Address</dt>
+ <dd>
+ <strong>{{ entity }}</strong>
+ <br />
+ {{ full_address|join:"<br />" }}
+ {% if building.map %}
+ <span class="image imageset">
+ <a href="{{ building.get_absolute_url }}">
+ <img alt="map" src="http://maps.googleapis.com/maps/api/staticmap?center={{ building.latitude }},{{ building.longitude }}&zoom={{ building.zoom|add:"-4" }}&size={{ map_size }}&markers=color:red|{{ building.latitude }},{{ building.longitude }}&sensor=false" />
+ <span class="imageset-item-data image-title text">map &amp; directions</span>
+ <span class="link-arrow"></span>
+ </a>
+ </span>
+ {% endif %}
+ </dd>
+{% endif %}
View
4 contacts_and_people/templates/includes/email.html
@@ -1,4 +0,0 @@
-{% if email %}
- <dt style = "clear: both;">Email address</dt>
- <dd><a href="mailto:{{ email }}">{{ email }}</a></dd>
-{% endif %}
View
6 contacts_and_people/templates/includes/phone_contacts.html
@@ -1,6 +0,0 @@
-{% if phone %}
- <dt>Telephone</dt>
- {% for phone_number in phone %}
- <dd>+{{ phone_number.country_code }} {{ phone_number.area_code }} {{ phone_number.number }}{% if phone_number.internal_extension %}, ext. {{ phone_number.internal_extension }} {% endif %} {% if phone_number.label %} ({{ phone_number.label }}) {% endif %}</dd>
- {% endfor %}
-{% endif %}
View
4 contacts_and_people/templates/includes/precise_location.html
@@ -1,4 +0,0 @@
-{% if precise_location %}
- <dt>Location</dt>
- <dd>{{ precise_location }}</dd>
-{% endif %}
View
3 docs/using_arkestra/templates.rst
@@ -20,7 +20,8 @@ They are set using `{% with %}`/`{% endwith %}` around the `{% block body_conten
generic_main_width=523 # width of the main part of a news item, event, etc
sidebar_image_size="294x196" # images in news, events, etc sidebars
sidebar_map_size="296x100" # map thumbnail image in events etc sidebars
- person_entity_map_size="445x100" # map thumbnail image for persons and entites
+ entity_map_size="445x100" # map thumbnail image for entites
+ person_map_size="445x100" # map thumbnail image for persons
entity_image_size="445x384" # main entity image
person_image_size="384x384" # person's main image
place_image_size="627x418" # a place's main image

1 comment on commit d163e7e

@evildmp
Owner

Fixes #66

Please sign in to comment.