-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathevent_search_results.html
More file actions
118 lines (101 loc) · 4.29 KB
/
event_search_results.html
File metadata and controls
118 lines (101 loc) · 4.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
{% load actionkit_tags %}
{% filter collapse_spaces %}
{% comment %}
This file is so long because you can choose whether your campaign uses
event titles, venues, etc., and different choices produce different HTML.
The field that's linked in each search result is the first of these
that's defined:
1. Title
2. Venue
3. Distance
4. Campaign name
{% endcomment %}
{% if events|is_defined %}
<input type="hidden" id="id_have_events" name="have_events" value="1">
{% if not events|length %}
<h3>No events found near {{ place|default:"your location" }}.</h3>
{% else %}
{% if not hide_map %}
<p>There are <strong>{{ open_events|length }}</strong> events open for signup {% if is_in_past or is_full %}({% if is_full %}plus <strong>{{ is_full|length }}</strong> full{% endif %}{% if is_in_past and is_full %}, {% endif %}{% if is_in_past and not is_full %}plus {% endif %}{% if is_in_past %}<strong>{{ is_in_past|length }}</strong> ended{% endif %}){% endif %}</p>
{% endif %}
{% if not args.all and not hide_map and campaign.show_address1 %}
<img src="http://maps.google.com/maps/api/staticmap?sensor=false&size=500x300&markers={% for event in events %}{% if event.is_in_past or event.is_full %}{% else %}{{ event.address1|urlencode }}, {{ event.city_etc|urlencode }}{% if not forloop.last %}|{% endif %}{% endif %}{% endfor %}" id="ak-map-img">
{% endif %}
{% for event in events %}
{% if event.is_in_past or event.is_full %}
{% else %}
{% if not all %}
<div class="ak-field-box {% if event.is_in_past or event.is_full %}ak-event-disabled{% endif %}">
<div class="ak-info-column">
{% if campaign.use_title and campaign.show_title and event.title %}
<p class="ak-event-title"><a href="/event/{{ campaign.local_name }}/{{event.id}}/signup/?akid={{args.akid}}&zip={{args.zip}}">{{ event.title }}</a></p>
{% else %}
<p class="ak-event-title">
<a href="/event/{{ campaign.local_name }}/{{event.id}}/signup/?akid={{args.akid}}&zip={{args.zip}}" class="ak-campaign-title">{{ campaign.local_title }}</a>
</p>
{% endif %}
{% if campaign.show_venue and event.venue %}
<span class="ak-event-venue">{{ event.venue }}</span>
{% endif %}
{% if campaign.show_address1 %}
<div class="ak-event-address1">{{ event.address1 }}</div>
{% endif %}
{% if campaign.show_city or campaign.show_state or campaign.show_zip %}
{% if campaign.show_zip %}
<div class="ak-event-city-etc">{{ event.city_etc }}</div>
{% else %}
<div class="ak-event-city-etc">{{ event.city_etc_no_postal }}</div>
{% endif %}
{% endif %}
{% if event.distance|is_nonblank %}
<p><span class="ak-event-distance">{{ event.distance_str }} away</a></span></p>
{% endif %}
<table cellspacing="0" class="ak-event-table">
{% if event.starts_at %}
<tr class="ak-event-time">
<th>When:</th>
<td>{{ event.starts_at }}</td>
</tr>
{% endif %}
{% if campaign.show_directions and event.directions %}
<tr class="ak-event-directions">
<th>Directions:</th>
<td>{{ event.directions }}</span></td>
</tr>
{% endif %}
{% if campaign.show_attendee_count %}
<tr class="ak-event-attendee-count">
<th>Attendee count:</th>
<td>{{ event.attendee_count }} attendee{{ event.attendee_count|pluralize }}</td>
</tr>
{% endif %}
</table>
</div>
<div class="ak-description-column">
{% if campaign.show_public_description %}
{% if event.public_description %}
<p class="ak-event-description">
{{ event.public_description }}
</p>
{% endif %}
{% endif %}
</div>
</div>
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
{% if campaign.public_create_page %}
<div>
<a class="ak-button ak-event-create" href="/event/{{ campaign.name }}/create/">Create your own event</a>
</div>
{% endif %}
{% endif %}
{% if errors|length %}
<ul id="ak-errors">
{% for key,val in errors.items %}
<li>{{ val|nth:0 }}</li>
{% endfor %}
</ul>
{% endif %}
{% endfilter %}