Changed the way active shows are elected on the company page.
This commit is contained in:
parent
bebad90eaf
commit
a2635996e1
3 changed files with 8 additions and 3 deletions
|
|
@ -85,14 +85,18 @@
|
|||
{% macro iterate_shows(collections, category, config) %}
|
||||
{% set shows = collections[category] %}
|
||||
{% for show in shows %}
|
||||
{% if config != null and config.before %}
|
||||
{% if config.before %}
|
||||
{% if moment(show.lastDate).isBefore(config.before) %}
|
||||
{{ config.render(show, config) }}
|
||||
{% endif %}
|
||||
{% elif config != null and config.after %}
|
||||
{% elif config.after %}
|
||||
{% if moment(show.lastDate).isAfter(config.after) %}
|
||||
{{ config.render(show, config) }}
|
||||
{% endif %}
|
||||
{% elif config.ongoing != undefined %}
|
||||
{% if show.ongoing %}
|
||||
{{ config.render(show, config) }}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{{ config.render(show, config) }}
|
||||
{% endif %}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
</div>
|
||||
<div>
|
||||
{{ macros.iterate_shows(collections, "troupe_shows", {
|
||||
'no_display_date': true, 'after': date, 'render': macros.expose_show })
|
||||
'no_display_date': true, 'ongoing': true, 'render': macros.expose_show })
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -179,6 +179,7 @@ function plugin () {
|
|||
author: get('author'),
|
||||
creation: data.creation,
|
||||
company: data.company,
|
||||
ongoing: data.ongoing || false,
|
||||
layout: data.layout || 'show.njk',
|
||||
poster: get('poster') || path.basename(filename, 'md') + 'jpg',
|
||||
lastDate: lastDate,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue