{% load i18n %}

<div class="formunculous_container">
  <div class="fr">
	<a href="javascript:window.print()" class="formunculous_printlink">{% trans "Print" %}</a>
  </div>
  <ul class="formunculous_form_info">
	{% for field in fields %}
	   <li>
	      <span class="formunculous_field_label">{{ field.label }}:</span>
		  <span class="formunculous_field_data">
			{% if field.data.url %}
			<a target="_blank" href="{{ field.data.url }}">
			{% endif %}
			{{ field.data }}
			{% if field.data.url %}
			</a>
			{% endif %}
		  </span>
	   </li>
    {% endfor %}
  </ul>
  {% if sub_apps %}
  {% for sub_app_group in sub_apps %}
    <h3 class="formunculous_sub_ad_title">{{ sub_app_group.sub_ad.name }}</h3>
	{% for sub_app in sub_app_group.sub_apps %}
	  <ul class="formunculous_form_info formunculous_sub_form_info">
		{% for field in sub_app.fields %}
		  <li>
			<span class="formunculous_field_label">{{ field.label }}:</span>
			<span class="formunculous_field_data">
			  {% if field.data.url %}
			  <a target="_blank" href="{{ field.data.url }}">
				{% endif %}
				{{ field.data }}
				{% if field.data.url %}
			  </a>
			  {% endif %}
			</span>
		  </li>
		{% endfor %}
	  </ul>
	{% endfor %}
  {% endfor %}
  {% endif %}
</div>
