Revision baec01a2 cloudcmsfaq/templates/cloudcmsfaq/detail.html

b/cloudcmsfaq/templates/cloudcmsfaq/detail.html
47 47
	 
48 48
	<div class="lt">
49 49
		{% for service in services %}
50
		<div class="faq-category {{ service.class_name }}">
51
			<h2>
52
				{% if service != question.service %}
53
					<a href="{{ service.get_first_question.get_absolute_url }}">
54
				{% endif %}
55
					{{ service.translation.title_faq|upper }}
56
				{% if service != question.service %}
57
					</a>
58
				{% endif %}
59
			</h2>
60
			 
61
			 {% for category, questions in service|get_service_faqs %}
62

  
63
			 	{% if service == question.service %}
64
              <h3>{{ category.translation.title }}</h3>
65
              <ul>
66
                {% for q in questions %}
67
                  <li>
68
                     {% if q != question %}<a href="{{ q.get_absolute_url }}">{% endif %}{{ q.title }}{% if q != question %}</a>{% endif %}
69
                  </li>
70
                  {% endfor %}
71
                  <br />
72
              </ul>
73
	           {% endif %}
74
	         {% endfor %}
75
		</div>
50
			{% if service.get_first_question %}
51
			<div class="faq-category {{ service.class_name }}">
52
				<h2>
53
					{% if service != question.service %}
54
						<a href="{{ service.get_first_question.get_absolute_url }}">
55
					{% endif %}
56
						{{ service.translation.title_faq|upper }}
57
					{% if service != question.service %}
58
						</a>
59
					{% endif %}
60
				</h2>
61
				 
62
				 {% for category, questions in service|get_service_faqs %}
63
	
64
				 	{% if service == question.service %}
65
	              <h3>{{ category.translation.title }}</h3>
66
	              <ul>
67
	                {% for q in questions %}
68
	                  <li>
69
	                     {% if q != question %}<a href="{{ q.get_absolute_url }}">{% endif %}{{ q.title }}{% if q != question %}</a>{% endif %}
70
	                  </li>
71
	                  {% endfor %}
72
	                  <br />
73
	              </ul>
74
		           {% endif %}
75
		         {% endfor %}
76
			</div>
77
			{% endif %}
76 78
		{% endfor %}
77 79
	</div>
78 80
</div>	

Also available in: Unified diff