Skip to content

Commit

Permalink
update template code
Browse files Browse the repository at this point in the history
  • Loading branch information
grahamu committed Jun 19, 2024
1 parent 7ca7daa commit 8f8aa0d
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions flyingcracker/cam/templates/cam/cam_select.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<select id="id-image" class="selectLink">
<option value="">--Select webcam--</option>
{% for cam in camlist %}
<option value="{{ cam.id }}"{% ifequal cam.id image.id %} selected="selected"{% endifequal %}>
<option value="{{ cam.id }}"{% if cam.id == image.id %} selected="selected"{% endif %}>
{{ cam.title }}
</option>
{% endfor %}
Expand All @@ -19,7 +19,7 @@
<select id="id-category" class="selectLink">
<option value="">--Select category--</option>
{% for cat in catlist %}
<option value="{{ cat.id }}"{% ifequal cat category %} selected="selected"{% endifequal %}>
<option value="{{ cat.id }}"{% if cat == category %} selected="selected"{% endif %}>
{{ cat.title }}
</option>
{% endfor %}
Expand Down
4 changes: 2 additions & 2 deletions flyingcracker/cam/templates/cam/iphone/cam-iui.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<form action="." method="post">{% csrf_token %}
<select id="id-category">
{% for cat in catlist %}
<option value="{{ cat.id }}"{% ifequal cat category %} selected="selected"{% endifequal %}>
<option value="{{ cat.id }}"{% if cat == category %} selected="selected"{% endif %}>
{{ cat.title }}</option>
{% endfor %}
</select>
Expand All @@ -27,7 +27,7 @@
<form action="." method="post">{% csrf_token %}
<select id="id-image">
{% for cam in camlist %}
<option value="{{ cam.id }}"{% ifequal cam.id image.id %} selected="selected"{% endifequal %}>
<option value="{{ cam.id }}"{% if cam.id == image.id %} selected="selected"{% endif %}>
{{ cam.title }}</option>
{% endfor %}
</select>
Expand Down
4 changes: 2 additions & 2 deletions flyingcracker/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@ <h1 id="site-name">{% block branding %}{{ system_name }} <span class="subtitle">
<h2>Queries</h2>
<p>
{{ sql_queries|length }} Quer{{ sql_queries|pluralize:"y,ies" }}
{% ifnotequal sql_queries|length 0 %}
{% if sql_queries|length != 0 %}
(<span style="cursor: pointer;" onclick="var s=document.getElementById('debugQueryTable').style;s.display=s.display=='none'?'':'none';this.innerHTML=this.innerHTML=='Show'?'Hide':'Show';">Show</span>)
{% endifnotequal %}
{% endif %}
</p>
<table id="debugQueryTable" style="display: none;">
<col width="1"></col>
Expand Down
4 changes: 2 additions & 2 deletions flyingcracker/weather/templates/weather/current.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@
<div><span class="curr_units speed_units" id="wind_units" style="display: {{ show_units }}">{{ speed_unit }}</span></div>
</div>
<div id="curr_windchill" class="yui-u">
{% ifnotequal current.temp current.windchill %}
{% if current.temp != current.windchill %}
<span class="temp_value">{{ windchill_val }}&#186;</span>
<span class="curr_units temp_units" style="display: {{ show_units }}">{{ temp_unit }}</span>
<div>
<span class="curr_title" style="visibility: {{ show_titles }}; font-size: 50%">windchill</span>
</div>
{% endifnotequal %}
{% endif %}
</div>
<div id="curr_humidity" class="yui-u">
<span id="humidity_value" class="humidity_value">{{ humidity }}%</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@
<div><span class="curr_units speed_units" id="wind_units" style="display: {{ show_units }}">{{ speed_unit }}</span></div>
</div>
<div id="curr_windchill" class="yui-u">
{% ifnotequal temp_val windchill_val %}
{% if temp_val != windchill_val %}
<span class="temp_value">{{ windchill_val }}&#186;</span>
<span class="curr_units temp_units" style="display: {{ show_units }}">{{ temp_unit }}</span>
<div>
<span class="curr_title" style="visibility: {{ show_titles }}; font-size: 50%">windchill</span>
</div>
{% endifnotequal %}
{% endif %}
</div>
<div id="curr_humidity" class="yui-u">
<span id="humidity_value" class="humidity_value">{{ humidity }}%</span>
Expand Down

0 comments on commit 8f8aa0d

Please sign in to comment.