Skip to content

Instantly share code, notes, and snippets.

@bobdenotter
Created August 12, 2015 07:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bobdenotter/2154ae5f0406acdbd799 to your computer and use it in GitHub Desktop.
Save bobdenotter/2154ae5f0406acdbd799 to your computer and use it in GitHub Desktop.
speeltijden:
name: Speeltijden
singular_name: Speeltijd
fields:
title:
type: text
class: large
group: content
slug:
type: slug
uses: title
image:
type: image
label: Afbeelding
starttijd:
type: datetime
variant: inline
label: Speeldag en starttijd
postfix: AM is voor de middag, PM is na de middag
lengte:
type: integer
variant: inline
label: Speelduur
postfix: "Lengte van het optreden / performance. In minuten, dus '2 uur' is '120'."
programmaonderdelen:
type: select
label: Programma-onderdeel
values: programmaonderdelen/name
keys: id
sort: name
autocomplete: true
limit: 2000
programmas:
type: select
label: Programma
postfix: "Bij welke editie van GWO of HCTS hoort dit?"
values: programma/title
keys: id
speellokatie:
type: select
label: Locatie
values:
'': '-'
bolder-zaal: "De Bolder zaal"
bolder-cafe: "De Bolder café"
ruige-plak: 'Ruige Plak'
'-': '-'
armhuis: 'Armhuis'
bolder-restaurant: 'De Bolder restaurant'
bolder-terras: 'De Bolder terras'
bos: 'Bospodium'
bospodium: 'Bospodium'
de-bolder: 'De Bolder'
fortweg: 'Fortweg'
kerk-sportveld: 'Kerk Sportveld'
kerk: 'Kerk'
kolder: 'De Kolder'
kunst: 'Kunst'
naar-buiten: 'Naar Buiten'
platte-kar: 'De Platte Kar'
podium-vlieland: 'Podium Vlieland'
pukkel: 'De Pukkel, Sportveld'
sportveld: 'Sportveld'
stoep: 'De Ouwe Stoep'
strand: 'Strand'
tokkelbaan: 'Tokkelbaan'
vuurboetsduin: 'Vuurboetsduin'
class:
type: select
values:
'': '(standaard)'
'dj': 'DJ'
'kunst': 'Kunst'
label: Weergave in blokkenschema
postfix: "<small>Dit bepaalt de kleur / weergave van het blokje, in het blokkenschema in de webapp.</small>"
viewless: true
default_status: published
sort: starttijd
recordsperpage: 100
listing_records: 100
searchable: false # Toon niet in "search"
# show_in_menu: false # Toon niet in de sidebar in Bolt
# show_on_dashboard: false # Toon niet op dashboard
icon_many: "fa:music"
icon_one: "fa:music"
{# put this in a new file at /app/view/twig/custom/listing/speeltijden.twig #}
{% extends '_base/_listing.twig' %}
{# The number of columns used in listing table #}
{% block listing_columns %}5{% endblock %}
{# The header line #}
{% block listing_header %}
<th style="min-width:80px;">
<a href="{{ link }}id {% if request('order') == "id ASC" %}DESC{% else %}ASC{% endif %}">{{ __('Id') }}</a>
</th>
<th style="width:50%">
<a href="{{ link }}title {% if request('order') == "title ASC" %}DESC{% else %}ASC{% endif %}">{{ __('Title') }}</a>
</th>
<th>
<a href="{{ link }}slug {% if request('order') == "slug ASC" %}DESC{% else %}ASC{% endif %}">{{ __('Slug') }}</a>
</th>
<th>
<a href="{{ link }}image {% if request('order') == "image ASC" %}DESC{% else %}ASC{% endif %}">{{ __('Image') }}</a>
</th>
<th class="username hidden-xs"><a href="{{ link }}datecreated {% if request('order') == "datecreated ASC" %}DESC{% else %}ASC{% endif %}">{{ __('Meta') }}</a></th>
<th><a href="?">{{ __('Actions') }}</a></th>
{% endblock %}
{# The id column on the left #}
{% block listing_id %}
<td>
№ {{ content.id }}
</td>
{% endblock %}
{# The column displaying actions #}
{#{% block listing_actions %}{{ parent() }}{% endblock %}#}
{# The column displaying meta data left to the actions column #}
{#{% block listing_meta %}{{ parent() }}{% endblock %}#}
{# The column(s) between id und meta/action columns #}
{% block listing_content %}
<td class="excerpt {% if not compact %}large{% endif %}">
<div>
{% if editable %}
<a href="{{ path('editcontent', {'contenttypeslug': content.contenttype.slug, 'id': content.id}) }}" title="Slug: {{ content.slug }}">
{{ content.getTitle }}
</a>
{% else %}
<strong>
{{ content.getTitle }}
</strong>
{% endif %}
{% if content.starttijd is not empty %}
<br>Tijd: <strong>{{ content.starttijd|localdate("%a %e %b '%y") }}</strong> ({{ content.starttijd|localdate("%H:%M") }}, {{ content.lengte }} min)
{% endif %}
{% if content.speellokatie is not empty %}
<br>Locatie: <strong>{{ content.speellokatie }}</strong>
{% endif %}
</div>
</td>
<td>
{{ content.slug }}
</td>
<td>
{% if content.getImage is not empty %}
{{ content.getImage|popup(thumbsize, thumbsize * 0.75, 'c') }}
{% endif %}
</td>
{% endblock %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment