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

This commit is contained in:
Jenkins 2015-01-19 23:43:33 +00:00 committed by Gerrit Code Review
commit f4674f3a02
15 changed files with 18 additions and 18 deletions

View File

@ -25,7 +25,7 @@
<td{{ cell.attr_string|safe }}> <td{{ cell.attr_string|safe }}>
<div class="table_cell_wrapper"> <div class="table_cell_wrapper">
<div class="table_cell_data_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>
<div class="table_cell_action"> <div class="table_cell_action">
<button class="ajax-inline-edit"><span class="fa fa-pencil"></span></button> <button class="ajax-inline-edit"><span class="fa fa-pencil"></span></button>
@ -34,6 +34,6 @@
</div> </div>
</td> </td>
{% else %} {% 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 %}
{% endif %} {% endif %}

View File

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

View File

@ -5,7 +5,7 @@
{% if cell.field %} {% if cell.field %}
{{ cell.field }} {{ cell.field }}
{% else %} {% 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 %} {% endif %}
{% if forloop.first %} {% if forloop.first %}
{% for field in row.form.hidden_fields %} {% for field in row.form.hidden_fields %}

View File

@ -33,7 +33,7 @@
<div class="d3_quota_bar"> <div class="d3_quota_bar">
<div class="d3_pie_chart_usage" data-used="{% widthratio usage.limits.totalSecurityGroupsUsed usage.limits.maxSecurityGroups 100 %}"></div> <div class="d3_pie_chart_usage" data-used="{% widthratio usage.limits.totalSecurityGroupsUsed usage.limits.maxSecurityGroups 100 %}"></div>
<strong>{% trans "Security Groups" %} <br /> <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> </strong>
</div> </div>
{% if usage.limits.totalVolumesUsed >= 0 %} {% if usage.limits.totalVolumesUsed >= 0 %}

View File

@ -3,7 +3,7 @@
{% load url from future %} {% load url from future %}
{% block form_id %}update_security_group_form{% endblock %} {% 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-header %}{% trans "Edit Security Group" %}{% endblock %}
{% block modal_id %}update_security_group_modal{% endblock %} {% block modal_id %}update_security_group_modal{% endblock %}

View File

@ -30,7 +30,7 @@
<dt>{% trans "Job Configuration" %}</dt> <dt>{% trans "Job Configuration" %}</dt>
<dd>{% for group, vals in job_execution.job_configs.iteritems %} <dd>{% for group, vals in job_execution.job_configs.iteritems %}
<ul><li><span style="font-weight:bold">{% blocktrans %}{{ group }}:{% endblocktrans %}</span> <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> <ul>{% for val in vals %} <li>{{ val }}</li> {% endfor %}</ul>
{% else %} {% else %}
<ul>{% for key, val in vals.iteritems %} <li>{{ key }} = {{ val }}</li> {% endfor %}</ul> <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 Move networks from 'Available Networks' to 'Selected Networks' by
clicking the button, or dragging and dropping. You can change the clicking the button, or dragging and dropping. You can change the
NIC order by dragging and dropping as well. NIC order by dragging and dropping as well.
{% endblocktrans%} {% endblocktrans %}
</p> </p>

View File

@ -18,7 +18,7 @@
<dt>{% trans "Policy ID" %}</dt> <dt>{% trans "Policy ID" %}</dt>
<dd> <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> <a href="{{ policy_url }}">{{ firewall.policy.name|default:firewall.policy.id }}</a>
</dd> </dd>

View File

@ -4,7 +4,7 @@
{% block form_id %}password_instance_form{% endblock %} {% 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_id %}password_instance_modal{% endblock %}
{% block modal-header %}{% trans "Retrieve Instance Password" %}{% endblock %} {% block modal-header %}{% trans "Retrieve Instance Password" %}{% endblock %}

View File

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

View File

@ -6,7 +6,7 @@
</head> </head>
<body> <body>
{% include "horizon/_messages.html" %} {% 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" %} {% include "project/network_topology/_post_massage.html" %}
</body> </body>
</html> </html>

View File

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

View File

@ -3,7 +3,7 @@
{% load url from future %} {% load url from future %}
{% block form_id %}select_template{% endblock %} {% 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 form_attrs %}enctype="multipart/form-data"{% endblock %}
{% block modal-header %}{% trans "Select Template" %}{% endblock %} {% block modal-header %}{% trans "Select Template" %}{% endblock %}

View File

@ -57,7 +57,7 @@
<dl class="dl-horizontal"> <dl class="dl-horizontal">
<dt>{% trans "Image" %}</dt> <dt>{% trans "Image" %}</dt>
<dd> <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> <a href="{{ image_url }}">{{ volume.volume_image_metadata.image_name }}</a>
</dd> </dd>
</dl> </dl>

View File

@ -3,7 +3,7 @@
{% load url from future %} {% load url from future %}
{% block form_id %}{% endblock %} {% 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_id %}extend_volume_modal{% endblock %}
{% block modal-header %}{% trans "Extend Volume" %}{% endblock %} {% block modal-header %}{% trans "Extend Volume" %}{% endblock %}