Skip to content
Snippets Groups Projects
Commit ef6884a5 authored by Lukas Ruge's avatar Lukas Ruge
Browse files

Merge branch 'lending' into 'master'

Lending

See merge request !17
parents 155054ee 31e30708
No related branches found
No related tags found
1 merge request!17Lending
Pipeline #8974 failed
Showing
with 221 additions and 0 deletions
---
layout: none
type: text/calendar
---
{%- for device in site.inventory -%}
{%- if device.uid == page.device -%}
BEGIN:VCALENDAR
VERSION:2.0
X-WR-CALNAME:Chaotikum
X-WR-CALDESC:Termine des Chaotikum e.V.
CALSCALE:GREGORIAN
PRODID:https://chaotikum.org/
METHOD:PUBLISH
{% for loan in site.loan %}
{%- if loan.devices contains device.uid -%}
BEGIN:VEVENT
UID:{{ loan.uid }}
ORGANIZER;CN=Chaotikum e.V.:MAILTO:verleih@chaotikum.org
LOCATION:Unknown
{% capture sum %}{{ device.name }}:{{ loan.title }}{% endcapture %}
SUMMARY:{{ sum | xml_escape | truncate: 60}}
DESCRIPTION:Verleih
CLASS:PUBLIC
DTSTART;TZID=Europe/Berlin:{{ loan.eventdate | date: "%Y%m%d" }}T{{ loan.eventdate | date: "%H%M%S" }}
DTEND;TZID=Europe/Berlin:{{ loan.eventend | date: "%Y%m%d" }}T{{ loan.eventend | date: "%H%M%S" }}
DTSTAMP:{{ event.eventdate | date: "%Y%m%d" }}T{{ loan.eventdate | date: "%H%M%S" }}Z
URL:{{site.url}}{{loan.url}}
END:VEVENT
{% endif %}
{%- endfor -%}
{%- for set in device.sets -%}
{%- for loan in site.loan -%}
{%- if loan.sets contains set -%}
BEGIN:VEVENT
UID:{{ loan.uid }}
ORGANIZER;CN=Chaotikum e.V.:MAILTO:verleih@chaotikum.org
LOCATION:Unknown
{% capture sum %}{{ device.name }}:{{ loan.title }}{% endcapture %}
SUMMARY:{{ sum | xml_escape | truncate: 60}}
DESCRIPTION:Verleih
CLASS:PUBLIC
DTSTART;TZID=Europe/Berlin:{{ loan.eventdate | date: "%Y%m%d" }}T{{ loan.eventdate | date: "%H%M%S" }}
DTEND;TZID=Europe/Berlin:{{ loan.eventend | date: "%Y%m%d" }}T{{ loan.eventend | date: "%H%M%S" }}
DTSTAMP:{{ event.eventdate | date: "%Y%m%d" }}T{{ loan.eventdate | date: "%H%M%S" }}Z
URL:{{site.url}}{{loan.url}}
END:VEVENT
{% endif %}
{%- endfor -%}
{%- endfor -%}
{%- for event in site.events -%}
{%- if event.devices contains device.uid-%}
BEGIN:VEVENT
UID:{{ event.uid }}
ORGANIZER;CN={% if event.organizer and event.organizer != "" and event.organizer != nil %}{{event.organizer}}{% else %}Chaotikum e.V.{% endif %}:MAILTO:{{event.contact}}
LOCATION:{% if event.locations contains 'Augenprüfraum' and event.locations contains 'Wartezimmer' and event.locations contains 'Lager' %}Nobreakspace{% else %}{{ event.locations | array_to_sentence_string }}{% endif %}{% capture textSize %}{{ event.short | size }}{% endcapture %}{% assign linelength = 50 %}{% assign rounds = textSize | divided_by: linelength %}{% assign extra = textSize | modulo: linelength %}{% assign start = 0 %}
{% capture sum %}{{ device.name }}:{{ event.title }}{% endcapture %}
SUMMARY:{{ sum | xml_escape | truncate: 60}}
DESCRIPTION:{% for i in (1..rounds) %}{% if i > 1 %} {% endif %}{{ event.short | slice: start, linelength }}{% assign start = start | plus: linelength %}
{% endfor%}{{ event.short | slice: start, extra }}
CLASS:PUBLIC
DTSTART;TZID=Europe/Berlin:{{ event.eventdate | date: "%Y%m%d" }}T{{ event.eventdate | date: "%H%M%S" }}
DTEND;TZID=Europe/Berlin:{{ event.eventend | date: "%Y%m%d" }}T{{ event.eventend | date: "%H%M%S" }}
DTSTAMP:{{ event.eventdate | date: "%Y%m%d" }}T{{ event.eventdate | date: "%H%M%S" }}Z
{%- if event.uid %}
{%- assign post = site.posts | where: "uid", event.uid | first %}
{%- if post %}
URL:{{site.url}}{{post.url}}
{%- endif %}{%- endif -%}
END:VEVENT
{% endif %}
{%- endfor -%}
{%- for set in device.sets -%}
{%- for event in site.events -%}
{%- if event.sets contains set -%}
BEGIN:VEVENT
UID:{{ event.uid }}
ORGANIZER;CN={% if event.organizer and event.organizer != "" and event.organizer != nil %}{{event.organizer}}{% else %}Chaotikum e.V.{% endif %}:MAILTO:{{event.contact}}
LOCATION:{% if event.locations contains 'Augenprüfraum' and event.locations contains 'Wartezimmer' and event.locations contains 'Lager' %}Nobreakspace{% else %}{{ event.locations | array_to_sentence_string }}{% endif %}{% capture textSize %}{{ event.short | size }}{% endcapture %}{% assign linelength = 50 %}{% assign rounds = textSize | divided_by: linelength %}{% assign extra = textSize | modulo: linelength %}{% assign start = 0 %}
{% capture sum %}{{ device.name }}:{{ event.title }}{% endcapture %}
SUMMARY:{{ sum | xml_escape | truncate: 60}}
DESCRIPTION:{% for i in (1..rounds) %}{% if i > 1 %} {% endif %}{{ event.short | slice: start, linelength }}{% assign start = start | plus: linelength %}
{% endfor%}{{ event.short | slice: start, extra }}
CLASS:PUBLIC
DTSTART;TZID=Europe/Berlin:{{ event.eventdate | date: "%Y%m%d" }}T{{ event.eventdate | date: "%H%M%S" }}
DTEND;TZID=Europe/Berlin:{{ event.eventend | date: "%Y%m%d" }}T{{ event.eventend | date: "%H%M%S" }}
DTSTAMP:{{ event.eventdate | date: "%Y%m%d" }}T{{ event.eventdate | date: "%H%M%S" }}Z
{%- if event.uid %}
{%- assign post = site.posts | where: "uid", event.uid | first %}
{%- if post %}
URL:{{site.url}}{{post.url}}
{%- endif %}{%- endif %}
END:VEVENT
{% endif %}
{%- endfor -%}
{%- endfor -%}
END:VCALENDAR
{%- endif -%}
{%- endfor -%}
\ No newline at end of file
---
layout: default
---
{% include site-header.html %}
<main class="main container">
<div class="calendar-container">
<div id="calendar"></div>
{{ content }}
</div>
</main>
{% include site-footer.html %}
<script src='/assets/fullcalendar/moment.min.js'></script>
<script src='/assets/fullcalendar/jquery.min.js'></script>
<script src='/assets/fullcalendar/ical.min.js'></script>
<script src='/assets/fullcalendar/fullcalendar.min.js'></script>
<script src='/assets/fullcalendar/de.js'></script>
<script src='/assets/fullcalendar/loancalendar.js'></script>
---
layout: loan
title: "Verleih"
eventdate: 2023-04-24 00:00:00 +0200
eventend: 2023-04-25 23:59:59 +0200
#https://www.uuidgenerator.net/
uid: 18189132-24ed-42c9-8921-a8c9e73d3429
contact: verleih@chaotikum.org
sets:
- kofferweiss
- kofferblau
short: "Das Chaotikum verleiht Dinge."
---
---
layout: loan
title: "Verleih"
eventdate: 2023-05-23 00:00:00 +0200
eventend: 2023-05-26 23:59:59 +0200
#https://www.uuidgenerator.net/
uid: 2d07feb0-fa24-4c73-8f84-9eca35486f90
contact: verleih@chaotikum.org
devices:
- 646997ba-ca63-4854-a1df-73c6443e65e3
- 1cc57ea7-6bcc-4113-bb26-e682e338256c
short: "Das Chaotikum verleiht Dinge."
---
---
layout: loan
title: "Verleih"
eventdate: 2023-05-30 00:00:00 +0200
eventend: 2023-06-04 23:59:59 +0200
#https://www.uuidgenerator.net/
uid: b5b9afc2-213d-49de-9ff0-6480cc8292fe
contact: verleih@chaotikum.org
devices:
- b5b9afc2-213d-49de-9ff0-6480cc8292fe
short: "Das Chaotikum verleiht Dinge."
---
---
layout: [loancal]
device: e8b93fff-0f17-4a5a-ae97-611de68a86c5
---
\ No newline at end of file
---
layout: [loancal]
device: 34eaa382-de42-4f1e-8f4d-987af077a613
---
\ No newline at end of file
---
layout: [loancal]
device: 65b3752c-440e-4dc4-876c-5dd7b148ec92
---
\ No newline at end of file
---
layout: [loancal]
device: 14961ed3-235f-4869-918b-573aa4f2befa
---
\ No newline at end of file
---
layout: [loancal]
device: b5b9afc2-213d-49de-9ff0-6480cc8292fe
---
\ No newline at end of file
---
layout: [loancal]
device: 67fe9c8b-a59b-4d90-9cd2-27e00a6fc013
---
\ No newline at end of file
---
layout: [loancal]
device: 0fcdfefe-6741-4833-83d4-fa0c6ed01b14
---
\ No newline at end of file
---
layout: [loancal]
device: 78517d23-2e83-4f27-b289-df6853f1ae34
---
\ No newline at end of file
---
layout: [loancal]
device: ed7a8302-34af-429f-9736-86740a03962a
---
\ No newline at end of file
---
layout: [loancal]
device: 6c004241-448a-4b4a-b44a-e3516eb7b8ba
---
\ No newline at end of file
---
layout: [loancal]
device: 646997ba-ca63-4854-a1df-73c6443e65e3
---
\ No newline at end of file
---
layout: [loancal]
device: 1cc57ea7-6bcc-4113-bb26-e682e338256c
---
\ No newline at end of file
---
layout: [loancal]
device: 3ff192c6-cc5e-4656-b202-25fd6ffaa8bc
---
\ No newline at end of file
---
layout: [loancal]
device: 595c58b5-2b48-4aac-b986-62ac22e0307f
---
\ No newline at end of file
---
layout: [loancal]
device: 75cfafdb-9b33-4bd0-af88-d051ed5f0857
---
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment