Unify the syntax used for the {% ... %} delimter in Jinja2 templates

According to the Jinja2 documentation the preferred usage for
the syntax of the {% ... %} delimter is {% ... %}. This patch
changes all occurcens of {%... and ...%} to {% ... %}.

Change-Id: I49243a16b71237bea47bc29f11508e16e77e3621
This commit is contained in:
Christian Berendt 2015-01-19 20:58:15 +01:00
parent 27ccf91997
commit 31f7f50ff1
15 changed files with 18 additions and 18 deletions

View File

@ -25,7 +25,7 @@
<td{{ cell.attr_string|safe }}>
<div class="table_cell_wrapper">
<div class="table_cell_data_wrapper">
{%if cell.wrap_list %}<ul>{% endif %}{{ cell.value }}{%if cell.wrap_list %}</ul>{% endif %}
{% if cell.wrap_list %}<ul>{% endif %}{{ cell.value }}{% if cell.wrap_list %}</ul>{% endif %}
</div>
<div class="table_cell_action">
<button class="ajax-inline-edit"><span class="fa fa-pencil"></span></button>
@ -34,6 +34,6 @@
</div>
</td>
{% else %}
<td{{ cell.attr_string|safe }}>{%if cell.wrap_list %}<ul>{% endif %}{{ cell.value }}{%if cell.wrap_list %}</ul>{% endif %}</td>
<td{{ cell.attr_string|safe }}>{% if cell.wrap_list %}<ul>{% endif %}{{ cell.value }}{% if cell.wrap_list %}</ul>{% endif %}</td>
{% endif %}
{% endif %}

View File

@ -21,7 +21,7 @@
{% endfor %}
</div>
{% endif %}
{% if row_actions|length == 1%}
{% include "horizon/common/_data_table_row_action_dropdown.html" with action=row_actions.0%}
{% if row_actions|length == 1 %}
{% include "horizon/common/_data_table_row_action_dropdown.html" with action=row_actions.0 %}
{% endif %}
{% endspaceless %}

View File

@ -5,7 +5,7 @@
{% if cell.field %}
{{ cell.field }}
{% else %}
{%if cell.wrap_list %}<ul>{% endif %}{{ cell.value }}{%if cell.wrap_list %}</ul>{% endif %}
{% if cell.wrap_list %}<ul>{% endif %}{{ cell.value }}{% if cell.wrap_list %}</ul>{% endif %}
{% endif %}
{% if forloop.first %}
{% for field in row.form.hidden_fields %}

View File

@ -33,7 +33,7 @@
<div class="d3_quota_bar">
<div class="d3_pie_chart_usage" data-used="{% widthratio usage.limits.totalSecurityGroupsUsed usage.limits.maxSecurityGroups 100 %}"></div>
<strong>{% trans "Security Groups" %} <br />
{% blocktrans with used=usage.limits.totalSecurityGroupsUsed|intcomma available=usage.limits.maxSecurityGroups|quotainf|intcomma%}Used <span> {{ used }} </span> of <span> {{ available }} </span>{% endblocktrans %}
{% blocktrans with used=usage.limits.totalSecurityGroupsUsed|intcomma available=usage.limits.maxSecurityGroups|quotainf|intcomma %}Used <span> {{ used }} </span> of <span> {{ available }} </span>{% endblocktrans %}
</strong>
</div>
{% if usage.limits.totalVolumesUsed >= 0 %}

View File

@ -3,7 +3,7 @@
{% load url from future %}
{% block form_id %}update_security_group_form{% endblock %}
{% block form_action %}{% url 'horizon:project:access_and_security:security_groups:update' security_group.id%}{% endblock %}
{% block form_action %}{% url 'horizon:project:access_and_security:security_groups:update' security_group.id %}{% endblock %}
{% block modal-header %}{% trans "Edit Security Group" %}{% endblock %}
{% block modal_id %}update_security_group_modal{% endblock %}

View File

@ -30,7 +30,7 @@
<dt>{% trans "Job Configuration" %}</dt>
<dd>{% for group, vals in job_execution.job_configs.iteritems %}
<ul><li><span style="font-weight:bold">{% blocktrans %}{{ group }}:{% endblocktrans %}</span>
{%if group == "args" %}
{% if group == "args" %}
<ul>{% for val in vals %} <li>{{ val }}</li> {% endfor %}</ul>
{% else %}
<ul>{% for key, val in vals.iteritems %} <li>{{ key }} = {{ val }}</li> {% endfor %}</ul>

View File

@ -5,5 +5,5 @@
Move networks from 'Available Networks' to 'Selected Networks' by
clicking the button, or dragging and dropping. You can change the
NIC order by dragging and dropping as well.
{% endblocktrans%}
{% endblocktrans %}
</p>

View File

@ -18,7 +18,7 @@
<dt>{% trans "Policy ID" %}</dt>
<dd>
{% url 'horizon:project:firewalls:policydetails' firewall.firewall_policy_id as policy_url%}
{% url 'horizon:project:firewalls:policydetails' firewall.firewall_policy_id as policy_url %}
<a href="{{ policy_url }}">{{ firewall.policy.name|default:firewall.policy.id }}</a>
</dd>

View File

@ -4,7 +4,7 @@
{% block form_id %}password_instance_form{% endblock %}
{% block form_action %}{% url "horizon:project:instances:decryptpassword" instance_id keypair_name%}{% endblock %}
{% block form_action %}{% url "horizon:project:instances:decryptpassword" instance_id keypair_name %}{% endblock %}
{% block modal_id %}password_instance_modal{% endblock %}
{% block modal-header %}{% trans "Retrieve Instance Password" %}{% endblock %}

View File

@ -121,7 +121,7 @@
{% for key, value in instance.metadata.items %}
<dt>{{ key|force_escape }}</dt>
<dd>{{ value|force_escape|default:default_item_value }}</dd>
{% endfor%}
{% endfor %}
{% endwith %}
</dl>
</div>

View File

@ -6,7 +6,7 @@
</head>
<body>
{% include "horizon/_messages.html" %}
{% firstof table.render interfaces_table.render tab_group.render%}
{% firstof table.render interfaces_table.render tab_group.render %}
{% include "project/network_topology/_post_massage.html" %}
</body>
</html>

View File

@ -19,8 +19,8 @@
<div class="topologyNavi">
<div class="toggleView btn-group" data-toggle="buttons-radio">
<button type="button" class="btn small" data-value="small"><i class="fa fa-th"></i>{%trans "Small" %}</button>
<button type="button" class="btn normal" data-value="normal"><i class="fa fa-th-large"></i>{%trans "Normal" %}</button>
<button type="button" class="btn small" data-value="small"><i class="fa fa-th"></i>{% trans "Small" %}</button>
<button type="button" class="btn normal" data-value="normal"><i class="fa fa-th-large"></i>{% trans "Normal" %}</button>
</div>
<div class="launchButtons">

View File

@ -3,7 +3,7 @@
{% load url from future %}
{% block form_id %}select_template{% endblock %}
{% block form_action %}{% url 'horizon:project:stacks:change_template' stack.id%}{% endblock %}
{% block form_action %}{% url 'horizon:project:stacks:change_template' stack.id %}{% endblock %}
{% block form_attrs %}enctype="multipart/form-data"{% endblock %}
{% block modal-header %}{% trans "Select Template" %}{% endblock %}

View File

@ -57,7 +57,7 @@
<dl class="dl-horizontal">
<dt>{% trans "Image" %}</dt>
<dd>
{% url 'horizon:project:images:images:detail' volume.volume_image_metadata.image_id as image_url%}
{% url 'horizon:project:images:images:detail' volume.volume_image_metadata.image_id as image_url %}
<a href="{{ image_url }}">{{ volume.volume_image_metadata.image_name }}</a>
</dd>
</dl>

View File

@ -3,7 +3,7 @@
{% load url from future %}
{% block form_id %}{% endblock %}
{% block form_action %}{% url 'horizon:project:volumes:volumes:extend' volume.id%}{% endblock %}
{% block form_action %}{% url 'horizon:project:volumes:volumes:extend' volume.id %}{% endblock %}
{% block modal_id %}extend_volume_modal{% endblock %}
{% block modal-header %}{% trans "Extend Volume" %}{% endblock %}