Skip to content

Instantly share code, notes, and snippets.

@DonKoko
Last active June 17, 2016 13:31
Show Gist options
  • Save DonKoko/ff8d59d42d9357ef5cb0fc6545d30876 to your computer and use it in GitHub Desktop.
Save DonKoko/ff8d59d42d9357ef5cb0fc6545d30876 to your computer and use it in GitHub Desktop.
---
title: Evenement
slug: evenement
listed: false
published: true
content_type: "events"
is_layout: false
---
{% extends 'layouts/fwgrey' %}
{% block 'main' %}
<section class="p-b-50 sm-p-t-50 p-t-60 m-t-60">
<div class="row">
<div class="text-center">
<h2 class="col-sm-12 p-b-10">{{ event.name }}</h2>
<a href="#openSubscriptionForm" class="btn btn-lg btn-primary btn-cons btn-rounded" type="button">Direct Aanmelden</a>
</div>
</div>
</section>
<section class="p-b-60 p-t-40">
<div class="container">
<div class="row">
<div class="col-md-10 col-md-offset-1 sm-m-t-30">
<div class="card-custom card b-a b-grey">
<div class="text-center b-rad-sm no-overflow">
<div class="row">
<div class="bg-master p-t-15 p-b-15">
<h3 style="color: white;">{{ event.start_date | date: "%d %b %Y" }} | {{ event.location | truncate: 35 }}</h3>
</div>
</div>
<div class="row">
<div class="col-sm-8 m-t-40 m-b-40 p-l-40 b-r b-grey">
<div class="text-left fs-14 m-l-30 p-r-30 m-b-50">{{ event.description }}</div>
<div id="openSubscriptionForm">
<h2>Aanmelden</h2>
{% model_form 'open_subscriptions', success: '/', error: '/contact', class: 'text-left p-t-40 p-b-80', method: 'POST' %}
{% if open_subscription.errors %}
<p>The following errors occured:</p>
<ul>
{% for error in open_subscription.errors %}
<li>{{error[0] | capitalize}} - {{error[1]}}</li>
{% endfor %}
</ul>
{% endif %}
<input type='hidden' name="content[event]" value="{{ event._slug }}" />
<div class="form-group form-group-default ">
<label>Bedrijfsnaam:</label>
<input type="text" class="form-control" name="content[company_name]" value="{{ open_subscription.company_name }}" required>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group form-group-default">
<label>Email:</label>
<input type="email" class="form-control" name="content[email]" value="{{ open_subscription.email }}" placeholder="bijv. Jan@gmail.com" required>
</div>
</div>
<div class="col-sm-6">
<div class="form-group form-group-default">
<label>Telefoon:</label>
<input type="text" class="form-control" name="content[phone]" value="{{ open_subscription.phone }}" required>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group form-group-default">
<label>Voornaam contactpersoon:</label>
<input type="email" class="form-control" name="content[contact_person_first_name]" value="{{ open_subscription.contact_person_first_name }}">
</div>
</div>
<div class="col-sm-6">
<div class="form-group form-group-default">
<label>Achternaam contactpersoon:</label>
<input type="text" class="form-control" name="content[contact_person_last_name]" value="{{ open_subscription.contact_person_last_name }}" required>
</div>
</div>
</div>
<input type="submit" class="form-control"/>
{% endmodel_form %}
</div>
</div>
<div class="col-sm-4 m-t-40 text-left p-l-20">
<div class="">
<h4 class="font-montserrat block-title no-margin">Categorie</h4>
<p class=" no-margin fs-14">{{ event.type }}</p>
</div>
<div class="m-t-20">
<h4 class="font-montserrat block-title no-margin">Bijlagen</h4>
{% for attachment in event.attachments %}
<p class=" no-margin fs-14">
<a href="{{ attachment.file_name.url }}">{{ attachment.title }}</a>
</p>
{% endfor %}
</div>
<div class="m-t-20">
<h4 class="font-montserrat block-title no-margin">Bezoekers</h4>
{% for subscription in event.subscriptions %}
{% with_scope accepted: true %}
{% link_to subscription.member %}
<div class="card-member-attendance b-a b-grey-light b-ra-sm m-b-10">
<div class="card-header clearfix">
<div class="user-pic">
<img alt="Profile Image" width="33" height="33"
data-src-retina="{{ subscription.member.logo.url }}"
data-src="{{ subscription.member.logo.url }}"
src="{{ subscription.member.logo.url }}">
</div>
<h5>{{ subscription.member.company_name }}</h5>
{% with_scope main: true %}
<h6>{{ subscription.member.contact_persons.first.first_name }} {{ subscription.member.contact_persons.first.last_name }}</h6>
{% endwith_scope %}
</div>
</div>
{% endlink_to %}
{% endwith_scope %}
{% endfor %}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
{% endblock %}
name: Evenementen
slug: events
# description: A description of the content type for the editors
label_field_name: name
order_by: _position
order_direction: asc
public_submission_enabled: true
public_submission_account_emails: []
fields:
- name:
label: Evenement naam
type: string
required: true
localized: false
- type:
label: Type
type: select
required: true
localized: false
select_options:
- OKA bijeenkomsten
- Externe bijeenkomsten
- Overleg/vergadering van het bestuur
- open_for_public:
label: Open
type: boolean
required: false
hint: Geef hier aan of leden zich hiervoor kunnen aanmelden.
localized: false
- start_date:
label: Start datum
type: date_time
required: true
localized: false
- end_date:
label: Eind datum
type: date_time
required: true
localized: false
- location:
label: Locatie
type: string
required: true
localized: false
- description:
label: Omschrijving
type: text
required: true
hint: Geef hier een beschrijving van het evenement.
localized: false
- thumbnail:
label: Thumbnail
type: file
required: true
hint: Chose an image as a thumbnail.
localized: false
- subscriptions:
label: Aanmeldingen
type: has_many
class_name: subscriptions
inverse_of: event
ui_enabled: true
- open_subscriptions:
label: Open subscriptions
type: has_many
class_name: open_subscriptions
inverse_of: event
ui_enabled: true
required: false
- attachments:
label: Bijlagen
type: has_many
class_name: event_attachments
inverse_of: event
ui_enabled: true
# Human readable name of this type
name: Open subscriptions
# Lowercase, underscored handle used to access this type
slug: open_subscriptions
# Explanatory text displayed in the back-office
# description: A description of the content type for the editors
# Slug of field used to identify entries by default, such as the title
label_field_name: company_name
# Valid values: manually, created_at, updated_at, or the slug of any field
order_by: manually
public_submission_enabled: true
# Valid values: asc (ascending) and desc (descending). Set to asc by default.
# order_direction: asc
# Specify a field slug to group entries by that field in the back-office.
# group_by: <your field>
# Activate public 'create' API (e.g for a contact form)
# public_submission_enabled: false
# Array of emails to be notified of new entries made with the public API
# public_submission_accounts: ['john@example.com']
# Control the display of the content type in the back-office.
display_settings:
# seo: false # display the SEO tab for the content entries
# advanced: false # display the Advanced tab for the content entries
# position: 1 # position in the sidebar menu
hidden: true # hidden for authors?
# By default, the back-office displays the _label property (see label_field_name) of the content entry. This can be modified by writing your own Liquid template below:
# entry_template: '<a href="{{ link }}">{{ entry._label }}</a>' # The default template
# A list describing each field
fields:
- company_name: # The lowercase, underscored name of the field
label: Bedrijfsnaam # Human readable name of the field
type: string
required: true
# hint: Explanatory text displayed in the back office
localized: false
- phone: # The lowercase, underscored name of the field
label: Telefoon # Human readable name of the field
type: string
required: true
# hint: Explanatory text displayed in the back office
localized: false
- email: # The lowercase, underscored name of the field
label: E-mail # Human readable name of the field
type: string
required: true
# hint: Explanatory text displayed in the back office
localized: false
- contact_person_first_name: # The lowercase, underscored name of the field
label: Voornaam contactpersoon # Human readable name of the field
type: string
required: false
# hint: Explanatory text displayed in the back office
localized: false
- contact_person_last_name: # The lowercase, underscored name of the field
label: Achternaam contactpersoon # Human readable name of the field
type: string
required: true
# hint: Explanatory text displayed in the back office
localized: false
- event:
label: Evenement
type: belongs_to
class_name: events
required: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment