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

more stuff for maintenance

parent c8d07767
No related branches found
No related tags found
No related merge requests found
Pipeline #32031 passed
---
layout: device
name: "ATEM Mini Extreme ISO (Koffer Blau)"
#https://www.uuidgenerator.net/
# https://www.uuidgenerator.net/
uid: e8b93fff-0f17-4a5a-ae97-611de68a86c5
manual: "https://wiki.chaotikum.org/_media/intern:manuals:atem_mini.pdf"
wikilink: https://wiki.chaotikum.org/hackspace:equipment:atem_mini_extreme_iso_1
......
......@@ -23,12 +23,59 @@ 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
DTSTAMP:{{ loan.eventdate | date: "%Y%m%d" }}T{{ loan.eventdate | date: "%H%M%S" }}Z
URL:{{site.url}}{{loan.url}}
END:VEVENT
{% endif %}
{%- endfor -%}
{% for maintenance in site.maintenance -%}
{%- if maintenance.components contains device.uid -%}
BEGIN:VEVENT
UID:{{ maintenance.uid }}
ORGANIZER;CN=Chaotikum e.V.:MAILTO:verleih@chaotikum.org
LOCATION:Unknown
{% capture sum %}{{ device.name }}:{{ maintenance.title }}{% endcapture %}
SUMMARY:WARTUNG {{ sum | xml_escape | truncate: 60}}
DESCRIPTION:WARTUNG {{device.name}}: {{maintenance.title}}
CLASS:PUBLIC
DTSTART;TZID=Europe/Berlin:{{ maintenance.eventdate | date: "%Y%m%d" }}T{{ maintenance.eventdate | date: "%H%M%S" }}
DTEND;TZID=Europe/Berlin:{{ maintenance.eventend | date: "%Y%m%d" }}T{{ maintenance.eventend | date: "%H%M%S" }}
DTSTAMP:{{ maintenance.eventdate | date: "%Y%m%d" }}T{{ maintenance.eventdate | date: "%H%M%S" }}Z
URL:{{site.url}}{{maintenance.url}}
END:VEVENT
{% endif -%}
{%- endfor -%}
{% capture parent -%}{{device.parent}}{% endcapture -%}
{% capture old_parent -%}{% endcapture -%}
{% for counter in (0..9) -%}
{% if parent -%}
{%- for p_device in site.inventory -%}
{%- if p_device.uid == parent -%}
{% capture parent -%}{{p_device.parent}}{% endcapture -%}
{% for maintenance in site.maintenance -%}
{%- if maintenance.components contains p_device.uid -%}
BEGIN:VEVENT
UID:{{ maintenance.uid }}
ORGANIZER;CN=Chaotikum e.V.:MAILTO:verleih@chaotikum.org
LOCATION:Unknown
{% capture sum %}{{ p_device.name }}:{{ maintenance.title }}{% endcapture %}
SUMMARY:WARTUNG {{ sum | xml_escape | truncate: 60}}
DESCRIPTION:WARTUNG {{p_device.name}}: {{maintenance.title}}
CLASS:PUBLIC
DTSTART;TZID=Europe/Berlin:{{ maintenance.eventdate | date: "%Y%m%d" }}T{{ maintenance.eventdate | date: "%H%M%S" }}
DTEND;TZID=Europe/Berlin:{{ maintenance.eventend | date: "%Y%m%d" }}T{{ maintenance.eventend | date: "%H%M%S" }}
DTSTAMP:{{ maintenance.eventdate | date: "%Y%m%d" }}T{{ maintenance.eventdate | date: "%H%M%S" }}Z
URL:{{site.url}}{{maintenance.url}}
END:VEVENT
{% endif %}
{% endfor -%}
{% endif -%}
{% endfor -%}
{% endif -%}
{% endfor -%}
{%- for set in device.sets -%}
{%- for loan in site.loan -%}
{%- if loan.sets contains set -%}
......@@ -42,7 +89,7 @@ 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
DTSTAMP:{{ loan.eventdate | date: "%Y%m%d" }}T{{ loan.eventdate | date: "%H%M%S" }}Z
URL:{{site.url}}{{loan.url}}
END:VEVENT
{% endif %}
......
......@@ -182,7 +182,7 @@ layout: default
navLinks: true,
});
{% assign realslug = page.url | split:'/' | last %}
$.get('{{ site.url }}/loancal/{{realslug}}/loancal.ics', function (res) {
$.get('{{ site.url }}/availability/{{realslug}}/availability.ics', function (res) {
var events = []
var parsed = ICAL.parse(res);
parsed[2].forEach(function(event) {
......
---
layout: default
nofeature: true
---
\ No newline at end of file
......@@ -35,11 +35,11 @@ $(document).ready(function() {
locale: "de",
navLinks: true,
});
{% for loancal in site.loancal %}
{% for availability in site.availability %}
{%- for device in site.inventory -%}
{%- if loancal.device == device.uid -%}
{%- if availability.device == device.uid -%}
{%- assign realslug = device.url | split:'/' | last -%}
$.get('{{ site.url }}/loancal/{{realslug}}/loancal.ics', function (res) {
$.get('{{ site.url }}/availability/{{realslug}}/availability.ics', function (res) {
var events = []
var parsed = ICAL.parse(res);
parsed[2].forEach(function(event) {
......
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