Fix title underline error in faq.rst
[ganeti_webmgr.git] / muddle / templates / view / model_fields.html
blob97cbd24d68af02a7ede89cc098bf0a7b8955f050
1 {% load maintain_extras %}
3 {% if wrapper.children %}
4 {% for field, wrapper in wrapper.children.items %}
5 {% if instance|get:field %}
6 {% with instance|get:field as instance %}
8 {% for field, wrapper in wrapper.many_to_one.items %}
9 {% with instance|get:field as instance %}
10 <div><label>{{wrapper.name}}:</label>
11 {% if wrapper|link %}
12 <a href="{{ROOT}}/o/{{wrapper.name}}/{{instance.id}}" class="model">
13 {% for field in wrapper.fields %}
14 <b>{{field}}:</b> {{ instance|get:field }}
15 {% endfor %}
16 </a>
17 {% else %}
18 {% for field in wrapper.fields %}
19 <b>{{field}}:</b> {{ instance|get:field }}
20 {% endfor %}
21 {% endif %}
22 </div>
23 {% endwith %}
24 {% endfor %}
26 {% for field in wrapper.fields %}
27 <div><label>{{field|capfirst}}:</label>{{instance|get:field}}</div>
28 {% endfor %}
29 {% endwith %}
30 {% endif %}
31 {% endfor %}
32 {% else %}
33 {% for field in wrapper.fields %}
34 <div><label>{{field|capfirst}}:</label>{{instance|get:field}}</div>
35 {% endfor %}
36 {% endif %}