Challenges now connected to items and added items hidden field
This commit is contained in:
@@ -8,12 +8,6 @@
|
||||
<div class="col m8">
|
||||
<h3 class="">{{ challenge.name }}</h3>
|
||||
|
||||
<div>
|
||||
{% for tag in challenge.tags.all %}
|
||||
<div class="chip">{{ tag.name }}</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<p style="">{{ challenge.description | markdownify }}</p>
|
||||
|
||||
<div class="section">
|
||||
@@ -25,7 +19,8 @@
|
||||
<br>
|
||||
{% endif %}
|
||||
{% if challenge.creator.profile.phone_number %}
|
||||
<div class="valign-wrapper"><i class="material-icons">phone</i> {{ challenge.creator.profile.phone_number }}</div>
|
||||
<div class="valign-wrapper"><i
|
||||
class="material-icons">phone</i> {{ challenge.creator.profile.phone_number }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
@@ -41,33 +36,31 @@
|
||||
|
||||
</ul>
|
||||
|
||||
{% if challenge.tags|length > 0 %}
|
||||
<ul class="collection with-header">
|
||||
<li class="collection-header">
|
||||
<span class="title"><b>Tags</b></span>
|
||||
<ul class="collection with-header">
|
||||
<li class="collection-header">
|
||||
<span class="title"><b>Tags</b></span>
|
||||
</li>
|
||||
|
||||
{% for tag in challenge.tags.all %}
|
||||
<li class="collection-item">
|
||||
<span class="">{{ tag.name }}</span>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
{% for tag in challenge.tags.all %}
|
||||
<ul class="collection with-header">
|
||||
<li class="collection-header">
|
||||
<span class="title"><b>Inventory Items</b></span>
|
||||
</li>
|
||||
|
||||
{% for item in challenge.required_items.all %}
|
||||
{% if not item.hidden %}
|
||||
<li class="collection-item">
|
||||
<span class="">{{ tag.name }}</span>
|
||||
<span class="">{{ item.item_name }}</span>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{% if challenge.tags|length > 0 %}
|
||||
<ul class="collection with-header">
|
||||
<li class="collection-header">
|
||||
<span class="title"><b>Tags</b></span>
|
||||
</li>
|
||||
|
||||
{% for tag in challenge.tags.all %}
|
||||
<li class="collection-item">
|
||||
<span class="">{{ tag.name }}</span>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -9,28 +9,30 @@
|
||||
<div class="row container challenges">
|
||||
<div class="row">
|
||||
{% for item in inventory %}
|
||||
<div class="col s12 m3">
|
||||
<div class="card" style="height:350px;">
|
||||
<div class="card-content">
|
||||
<div class="row" style="height:210px;">
|
||||
<div class="col s12 m12">
|
||||
<div class="card-title"><b>{{ item.item_name }}</b></div>
|
||||
<p>Serial: {{ item.serial_nr }}</p>
|
||||
<p style="text-align: justify; max-height: 120px; overflow: auto;">{{ item.description }}</p>
|
||||
{% if not item.hidden %}
|
||||
<div class="col s12 m3">
|
||||
<div class="card" style="height:350px;">
|
||||
<div class="card-content">
|
||||
<div class="row" style="height:210px;">
|
||||
<div class="col s12 m12">
|
||||
<div class="card-title"><b>{{ item.item_name }}</b></div>
|
||||
<p>Serial: {{ item.serial_nr }}</p>
|
||||
<p style="text-align: justify; max-height: 120px; overflow: auto;">{{ item.description }}</p>
|
||||
|
||||
<div class="card-image">
|
||||
{% if item.photo %}
|
||||
<img src='/media/{{ item.photo }}'>
|
||||
{% else %}
|
||||
<img src='/media/missing_photo.png'>
|
||||
{% endif %}
|
||||
<div class="card-image">
|
||||
{% if item.photo %}
|
||||
<img src='/media/{{ item.photo }}'>
|
||||
{% else %}
|
||||
<img src='/media/missing_photo.png'>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</br>
|
||||
</div>
|
||||
</br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user