Feature: The state of a project on its card 

Description 

Every project now tells a template whether it is active or completed, by the same rule the Active state filter of the project lists uses: no end date or an end date still ahead is active, an end date that has passed is completed.

EXT:my_sitepackage/Resources/Private/Extensions/academic_projects/Partials/Project/Item.html
<f:if condition="{project.activeState} == 'completed'">
    <p class="text-muted">This project has ended.</p>
</f:if>
Copied!

The Projects and the Projects (selected) content elements have a new option, Show active state badge ( settings.showActiveStateBadge ). Switched on, every project card shows its state as a badge with the labels "Active" and "Completed" the extension already ships, translated into the language of the page.

Impact 

Nothing changes until an editor switches the option on: it is off for new content elements and for every content element saved before it existed.

A template of a site package that already reads {project.activeState} rendered nothing so far, and renders active or completed now.