Skip to content

Commit 460ea8a

Browse files
committed
Make tag lists clickable and fix some HTML entity encoding
1 parent b5590d1 commit 460ea8a

File tree

10 files changed

+17
-17
lines changed

10 files changed

+17
-17
lines changed

templates/about.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
about RDM enabled products.
1515
</p>
1616

17-
<h3>Adding & Changing Information</h3>
17+
<h3>Adding &amp; Changing Information</h3>
1818

1919
We're more than happy to list new products. Please see the sections below for
2020
how to add information.

templates/admin.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444
<div class="btn-group-vertical" role="group">
4545
<div>/admin?action=clear_p - Clear PIDs</div>
46-
<div>/admin?action=clear_mp&manufacturer=1234 - Clear Manufacturer PIDs</div>
46+
<div>/admin?action=clear_mp&amp;manufacturer=1234 - Clear Manufacturer PIDs</div>
4747
<!-- These deliberately aren't links, so people don't click them accidentally -->
4848
<a class="btn btn-default" href="/admin?action=load_p">Load ESTA PIDs</a>
4949
<a class="btn btn-default" href="/admin?action=load_mp">Load Manufacturer PIDs</a>

templates/base_model_search.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<tbody>
2424
{% for model in models %}
2525
<tr class="results_row"
26-
onclick="window.location='/model/display?manufacturer={{ model.manufacturer.esta_id }}&model={{ model.device_model_id }}'">
26+
onclick="window.location='/model/display?manufacturer={{ model.manufacturer.esta_id }}&amp;model={{ model.device_model_id }}'">
2727
<td>{{ model.manufacturer.name }}</td>
2828
<td>{{ model.device_model_id }} (0x{{ model.device_model_id|stringformat:"04x" }})</td>
2929
<td>

templates/base_pid_search.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<tbody>
3333
{% for pid in pids %}
3434
<tr class="results_row"
35-
onclick="window.location='/pid/display?manufacturer={{ pid.manufacturer.esta_id }}&pid={{ pid.pid_id }}'">
35+
onclick="window.location='/pid/display?manufacturer={{ pid.manufacturer.esta_id }}&amp;pid={{ pid.pid_id }}'">
3636
<td>{{ pid.manufacturer.name }}</td>
3737
<td>0x{{ pid.manufacturer.esta_id|stringformat:"04hx"}}</td>
3838
<td>0x{{ pid.pid_id|stringformat:"04hx" }}</td>
@@ -62,4 +62,4 @@
6262
<script type="text/javascript">
6363
app.makePIDTable("pid_table");
6464
</script>
65-
{% endblock %}
65+
{% endblock %}

templates/browse_models.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
{% for row in model_rows %}
3434
{% for model in row %}
3535
<div class="panel panel-default model_panel"
36-
onclick="location.href='/model/display?manufacturer={{ model.manufacturer_id }}&model={{ model.model_id }}'">
37-
<div class="panel-heading" onclick="location.href='/model/display?manufacturer={{ model.manufacturer_id }}&model={{ model.model_id }}'">
36+
onclick="location.href='/model/display?manufacturer={{ model.manufacturer_id }}&amp;model={{ model.model_id }}'">
37+
<div class="panel-heading" onclick="location.href='/model/display?manufacturer={{ model.manufacturer_id }}&amp;model={{ model.model_id }}'">
3838
{% if model.name %}
3939
{{ model.name }}
4040
{% else %}
@@ -46,7 +46,7 @@
4646
- Model ID {{ model.model_id }}
4747
{% endif %}
4848
</div>
49-
<div class="panel-body" onclick="location.href='/model/display?manufacturer={{ model.manufacturer_id }}&model={{ model.model_id }}'">
49+
<div class="panel-body" onclick="location.href='/model/display?manufacturer={{ model.manufacturer_id }}&amp;model={{ model.model_id }}'">
5050
{% if model.image_key %}
5151
<img src="{{ model.image_key }}=s100">
5252
{% else %}

templates/browse_products.tmpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<ul class="pager">
2525
{% if previous %}
2626
<li class="previous">
27-
<a href="/{{ product_type }}/browse?page={{ previous }}{% if tag %}&tag={{ tag }}{% endif %}{% if manufacturer %}&manufacturer={{ manufacturer }}{% endif %}">
27+
<a href="/{{ product_type }}/browse?page={{ previous }}{% if tag %}&amp;tag={{ tag|urlencode }}{% endif %}{% if manufacturer %}&manufacturer={{ manufacturer }}{% endif %}">
2828
<span aria-hidden="true">&larr;</span> Previous Page
2929
</a>
3030
</li>
@@ -36,7 +36,7 @@
3636
<li>Displaying {{ start }} to {{ end }} of {{ total }}</li>
3737
{% if next %}
3838
<li class="next">
39-
<a href="/{{ product_type }}/browse?page={{ next }}{% if tag %}&tag={{ tag }}{% endif %}{% if manufacturer %}&manufacturer={{ manufacturer }}{% endif %}">
39+
<a href="/{{ product_type }}/browse?page={{ next }}{% if tag %}&amp;tag={{ tag|urlencode }}{% endif %}{% if manufacturer %}&manufacturer={{ manufacturer }}{% endif %}">
4040
Next Page <span aria-hidden="true">&rarr;</span>
4141
</a>
4242
</li>
@@ -74,7 +74,7 @@
7474
<ul class="pager">
7575
{% if previous %}
7676
<li class="previous">
77-
<a href="/{{ product_type }}/browse?page={{ previous }}{% if tag %}&tag={{ tag }}{% endif %}{% if manufacturer %}&manufacturer={{ manufacturer }}{% endif %}">
77+
<a href="/{{ product_type }}/browse?page={{ previous }}{% if tag %}&amp;tag={{ tag|urlencode }}{% endif %}{% if manufacturer %}&manufacturer={{ manufacturer }}{% endif %}">
7878
<span aria-hidden="true">&larr;</span> Previous Page
7979
</a>
8080
</li>
@@ -86,7 +86,7 @@
8686
<li>Displaying {{ start }} to {{ end }} of {{ total }}</li>
8787
{% if next %}
8888
<li class="next">
89-
<a href="/{{ product_type }}/browse?page={{ next }}{% if tag %}&tag={{ tag }}{% endif %}{% if manufacturer %}&manufacturer={{ manufacturer }}{% endif %}">
89+
<a href="/{{ product_type }}/browse?page={{ next }}{% if tag %}&amp;tag={{ tag|urlencode }}{% endif %}{% if manufacturer %}&manufacturer={{ manufacturer }}{% endif %}">
9090
Next Page <span aria-hidden="true">&rarr;</span>
9191
</a>
9292
</li>

templates/display_manufacturer.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<ul class="list-group">
2323
{% for device in devices %}
2424
<li class="list-group-item">
25-
<a href="/model/display?manufacturer={{ id }}&model={{ device.device_model_id }}">
25+
<a href="/model/display?manufacturer={{ id }}&amp;model={{ device.device_model_id }}">
2626
{% if device.model_description %}
2727
{{ device.model_description }}
2828
{% else %}
@@ -98,7 +98,7 @@
9898
<ul class="list-group">
9999
{% for pid in pids %}
100100
<li class="list-group-item">
101-
<a href="/pid/display?manufacturer={{ id }}&pid={{ pid.pid_id }}">{{ pid.name }}</a>
101+
<a href="/pid/display?manufacturer={{ id }}&amp;pid={{ pid.pid_id }}">{{ pid.name }}</a>
102102
</li>
103103
{% endfor %}
104104
</ul>

templates/display_model.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
<td>Tags</td>
4545
<td>
4646
{% for tag in tags %}
47-
<div class="model_tag">{{ tag }}</div>
47+
<div class="model_tag"><a href="tag?tag={{ tag|urlencode }}">{{ tag }}</a></div>
4848
{% endfor %}
4949
</td>
5050
</tr>

templates/display_pid.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@
146146
<ul class="list-group">
147147
{% for responder in supported_by %}
148148
<li class="list-group-item">
149-
<a href="/model/display?manufacturer={{ responder.manufacturer }}&model={{ responder.model }}">{{ responder.name }}</a>
149+
<a href="/model/display?manufacturer={{ responder.manufacturer }}&amp;model={{ responder.model }}">{{ responder.name }}</a>
150150
</li>
151151
{% endfor %}
152152
</ul>

templates/display_product.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<td>Tags</td>
3333
<td>
3434
{% for tag in tags %}
35-
<div class="model_tag">{{ tag }}</div>
35+
<div class="model_tag"><a href="browse?tag={{ tag|urlencode }}">{{ tag }}</a></div>
3636
{% endfor %}
3737
</td>
3838
</tr>

0 commit comments

Comments
 (0)