Commits

Yohan Boniface  committed 1fb1263

Set background-color only if the categories has one (cf #70)

  • Participants
  • Parent commits 30cbed1

Comments (0)

Files changed (1)

File leaflet_storage/templates/leaflet_storage/map_infos.html

 <h4>{{ map.name }}</h4>
 <p>{% firstof map.description "No caption yet." %}</p>
 {% for category in map.category_set.all %}
-    <p><span class="category_color" style="background-color: {{ category.options.color }};"></span><strong>{{ category }}</strong> {{ category.description }}</p>
+    <p><span class="category_color" {% if category.options.color %}style="background-color: {{ category.options.color }};"{% endif %}></span><strong>{{ category }}</strong> {{ category.description }}</p>
 {% endfor %}
 <hr />
 <h5>{% trans "User content credits" %}</h5>