Skip to content

Commit

Permalink
CONCD-998 Add start dates to Completed Campaigns page
Browse files Browse the repository at this point in the history
  • Loading branch information
rasarkar committed Nov 18, 2024
1 parent 3bd9878 commit 6bfafa9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<div class="container py-3">
<h1>Completed Campaigns</h1>
<ul class="list-unstyled row">
{% with show_description=True %}
{% with show_description=True show_start=True %}
{% for campaign in campaigns %}
{% include "transcriptions/campaign_small_block.html" %}
{% endfor %}
Expand Down
12 changes: 10 additions & 2 deletions concordia/templates/transcriptions/campaign_small_block.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,16 @@
</div>
<span class="d-block h4 mt-2 small-campaign-title">{{ campaign.title }}</span>
</a>
{% if campaign.completed_date %}
<p><span class="fw-bold">Completed: </span>{{ campaign.completed_date|date:"Y-m-d" }}</p>
{% if campaign.completed_date or show_start and campaign.launch_date %}
<p>
{% if show_start and campaign.launch_date %}
<span class="fw-bold">Started: </span>{{ campaign.launch_date|date:"Y-m-d" }}
{% if campaign.completed_date %}</br>{% endif %}
{% endif %}
{% if campaign.completed_date %}
<span class="fw-bold">Completed: </span>{{ campaign.completed_date|date:"Y-m-d" }}
{% endif %}
</p>
{% endif %}
{% if show_description %}
<p class="small-campaign-description">{{ campaign.short_description|striptags|truncatechars_on_word_break:160 }}</p>
Expand Down

0 comments on commit 6bfafa9

Please sign in to comment.