templates: replace use of = with ==

I can't quite tell which Django version broke this, but in any case
based on what's in pagination.html it seems we ought to have been
using == already.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
Paul Eggleton 2018-04-12 16:36:20 +12:00
parent 2632820305
commit e3afa843f4
6 changed files with 18 additions and 18 deletions

View File

@ -27,12 +27,12 @@
<ul class="dropdown-menu">
{% for branch in all_branches %}
<li><a href="{% url this_url_name branch.name %}{{ extra_url_param }}">
{% if branch.name = url_branch %}<b>{% endif %}
{% if branch.name == url_branch %}<b>{% endif %}
{{ branch.name }}
{% if branch.short_description %}
({{ branch.short_description }})
{% endif %}
{% if branch.name = url_branch %}</b>{% endif %}
{% if branch.name == url_branch %}</b>{% endif %}
</a></li>
{% endfor %}
{% if oe_classic %}

View File

@ -33,14 +33,14 @@
{% if layerbranch.yp_compatible_version %}
<a href="{{layerbranch.yp_compatible_version.link_url}}"><img src="{{layerbranch.yp_compatible_version.image_url}}" alt="{{layerbranch.yp_compatible_version.description}}" class="yp-icon" title="{{layerbranch.yp_compatible_version.description}}"></a>
{% endif %}
{% if layeritem.status = "N" %}
{% if layeritem.status == "N" %}
<span class="label label-warning">Unpublished</span>
{% endif %}
{% if user.is_authenticated %}
<span class="pull-right">
{% if perms.layerindex.publish_layer or useredit %}
<a href="{% url 'edit_layer' url_branch layeritem.name %}" class="btn">Edit layer</a>
{% if layeritem.layernote_set.count = 0 %}
{% if layeritem.layernote_set.count == 0 %}
<a href="{% url 'add_layernote' layeritem.name %}" class="btn">Add note</a>
{% endif %}
{% endif %}
@ -118,7 +118,7 @@
{% endif %}
{% if layerbranch.active_maintainers.count > 0 %}
<h3>{% if layerbranch.active_maintainers|length = 1 %}Maintainer{% else %}Maintainers{% endif %}</h3>
<h3>{% if layerbranch.active_maintainers|length == 1 %}Maintainer{% else %}Maintainers{% endif %}</h3>
<ul>
{% for maintainer in layerbranch.active_maintainers %}

View File

@ -29,12 +29,12 @@
<ul class="dropdown-menu">
{% for branch in all_branches %}
<li><a href="{% url this_url_name branch.name %}">
{% if branch.name = url_branch %}<b>{% endif %}
{% if branch.name == url_branch %}<b>{% endif %}
{{ branch.name }}
{% if branch.short_description %}
({{ branch.short_description }})
{% endif %}
{% if branch.name = url_branch %}</b>{% endif %}
{% if branch.name == url_branch %}</b>{% endif %}
</a></li>
{% endfor %}
</ul>

View File

@ -51,14 +51,14 @@
{{ field.label_tag }}
</div>
<div class="controls">
{% if field.name = 'deps' %}
{% if field.name == 'deps' %}
<div class="scrolling">
<table><tbody>
{% for deplayer in deplistlayers %}
{% if deplayer.id in form.checked_deps %}
<tr>
<td class="checkboxtd"><input type="checkbox" name="deps" value="{{ deplayer.id }}" id="id_deps_{{forloop.counter}}" checked="checked" /></td>
{% if deplayer.status = 'N' %}
{% if deplayer.status == 'N' %}
<td><label class="muted" for="id_deps_{{forloop.counter}}">{{ deplayer.name }} (unpublished)</label></td>
{% else %}
<td><label for="id_deps_{{forloop.counter}}">{{ deplayer.name }}</label></td>
@ -70,7 +70,7 @@
{% if not deplayer.id in form.checked_deps %}
<tr>
<td class="checkboxtd"><input type="checkbox" name="deps" value="{{ deplayer.id }}" id="id_deps_{{forloop.counter}}" /></td>
{% if deplayer.status = 'N' %}
{% if deplayer.status == 'N' %}
<td><label class="muted" for="id_deps_{{forloop.counter}}">{{ deplayer.name }} (unpublished)</label></td>
{% else %}
<td><label for="id_deps_{{forloop.counter}}">{{ deplayer.name }}</label></td>
@ -89,7 +89,7 @@
</div>
</div>
{% endif %}
{% if field.name = 'vcs_web_url' %}
{% if field.name == 'vcs_web_url' %}
<div class="control-label">
Web interface type
</div>

View File

@ -41,11 +41,11 @@
{{ revision.comment|linebreaksbr }}
{% else %}
{% for version in revision.version_set.all %}
{% if version.type = 0 %}
{% if version.type == 0 %}
Added
{% elif version.type = 1 %}
{% elif version.type == 1 %}
Changed
{% elif version.type = 2 %}
{% elif version.type == 2 %}
Deleted
{% endif %}
{{ version.content_type.name.lower }}: {{ version.object_repr }}

View File

@ -30,7 +30,7 @@
{% if layerbranch.yp_compatible_version %}
<a href="{{layerbranch.yp_compatible_version.link_url }}"><img src="{{layerbranch.yp_compatible_version.image_url}}" alt="{{layerbranch.yp_compatible_version.description}}" class="yp-icon" title="{{layerbranch.yp_compatible_version.description}}"></a>
{% endif %}
{% if layeritem.status = "N" %}
{% if layeritem.status == "N" %}
<span class="label label-warning">Unpublished</span>
{% else %}
<span class="label label-info">Published</span>
@ -39,11 +39,11 @@
<span class="pull-right">
{% if perms.layerindex.publish_layer or useredit %}
<a href="{% url 'edit_layer' 'master' layeritem.name %}?returnto=layer_review" class="btn">Edit layer</a>
{% if layeritem.layernote_set.count = 0 %}
{% if layeritem.layernote_set.count == 0 %}
<a href="{% url 'add_layernote' layeritem.name %}" class="btn">Add note</a>
{% endif %}
{% endif %}
{% if layeritem.status = "N" and perms.layerindex.publish_layer %}
{% if layeritem.status == "N" and perms.layerindex.publish_layer %}
<a href="{% url 'delete_layer' layeritem.name %}" class="btn btn-warning">Delete layer</a>
<a href="{% url 'publish' layeritem.name %}" class="btn btn-primary">Publish layer</a>
{% endif %}