diff --git a/src/Hackspace/Bundle/CalciferBundle/Resources/assets/css/events.scss b/src/Hackspace/Bundle/CalciferBundle/Resources/assets/css/events.scss index 7e0730a..3c230c4 100755 --- a/src/Hackspace/Bundle/CalciferBundle/Resources/assets/css/events.scss +++ b/src/Hackspace/Bundle/CalciferBundle/Resources/assets/css/events.scss @@ -1,3 +1,18 @@ +.card { + h2 { + margin-bottom: 0.3em !important; + a { + color: inherit; + } + } + .meta { + .label,.button { + margin-bottom: 0.3em; + margin-top: 0.3em; + } + } +} + .event.box { h2 { padding: 0.5rem; diff --git a/src/Hackspace/Bundle/CalciferBundle/Resources/assets/css/main.scss b/src/Hackspace/Bundle/CalciferBundle/Resources/assets/css/main.scss index b4dd9dd..add0555 100644 --- a/src/Hackspace/Bundle/CalciferBundle/Resources/assets/css/main.scss +++ b/src/Hackspace/Bundle/CalciferBundle/Resources/assets/css/main.scss @@ -1,6 +1,5 @@ body { - margin: 0; - font-family: 'Roboto', sans-serif; + margin: 40px 0 0; } header { diff --git a/src/Hackspace/Bundle/CalciferBundle/Resources/assets/js/events.js b/src/Hackspace/Bundle/CalciferBundle/Resources/assets/js/events.js index c4dddbd..64698a7 100755 --- a/src/Hackspace/Bundle/CalciferBundle/Resources/assets/js/events.js +++ b/src/Hackspace/Bundle/CalciferBundle/Resources/assets/js/events.js @@ -49,7 +49,6 @@ jQuery(document).ready(function () { if (!(jQuery('input[name=location_lat]').val() == undefined)) { jQuery('input[name=location_lat]').val(coords.lat); jQuery('input[name=location_lon]').val(coords.lng); - jQuery('input[name=location]').css('margin-bottom', '3.2rem'); jQuery('span.coords').text('Folgende Koordinaten sind angegeben: lat:' + coords.lat + ', lon:' + coords.lng); } else { jQuery('input[name=geocords]').val(coords.lat + ',' + coords.lng); @@ -83,9 +82,35 @@ jQuery(document).ready(function () { } }); -$(document).ready(function() { +function calcBoxSize(columns) { + var card_selector = jQuery('.ui.cards .card'); + var screen_width = $(window).width() - 14 - 14; /* padding of basic segment */ + // first check if we can display 4 cards on the screen with a minimum width of 399px + var box_width = Math.floor((screen_width / columns)) - 10; + if ((box_width >= 395) || (columns == 1)) { + card_selector.css('width',box_width); + } else { + calcBoxSize(columns - 1); + } +} - if (jQuery('#view-map').length == 1) { +$(window).resize(function(){ + var card_selector = jQuery('.ui.cards .card'); + + if (card_selector.length > 0) { + calcBoxSize(4); + } +}); + +$(document).ready(function() { + var view_map_selector = jQuery('#view-map'); + var card_selector = jQuery('.ui.cards .card'); + + if (card_selector.length > 0) { + calcBoxSize(4); + } + + if (view_map_selector.length == 1) { jQuery('.show_map').click(addGeoCoordinates); map = L.map('view-map'); @@ -108,8 +133,8 @@ $(document).ready(function() { }, onVisible: function () { map.invalidateSize(true); - var lat = $('#view-map').data('lat'); - var lon = $('#view-map').data('lon'); + var lat = view_map_selector.data('lat'); + var lon = view_map_selector.data('lon'); if ((lat > 0) && (lon > 0)) { map.setView([lat, lon], 16); var latlng = new L.LatLng(lat, lon); diff --git a/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/edit.html.twig b/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/edit.html.twig index a004f41..f712722 100755 --- a/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/edit.html.twig +++ b/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/edit.html.twig @@ -19,14 +19,12 @@ {% endblock %} {% block body -%} -
-
-

Termin bearbeiten

-
+
+

Termin bearbeiten

-
-
+
+
{{ include('CalciferBundle:Event:event_form.html.twig',{'entity':entity}) }}
diff --git a/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/event_box.html.twig b/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/event_box.html.twig index 4a9b99a..948a40f 100755 --- a/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/event_box.html.twig +++ b/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/event_box.html.twig @@ -1,57 +1,61 @@ -
-
-

+
+

{{ entity.summary }}

+
+
+ {{ entity.getFormatedDate() }} +
+ + {% if entity.location is not null %} + + {{ entity.location.name }} + + {% endif %} + + {% if (detail|default(false)) %} + {% if entity.tags|length > 0 %} + {% for tag in entity.tags %} + + {{ tag.name }} + + {% endfor %} + {% endif %} + {% endif %} + + {% if entity.url|length > 0 %} + + {{ entity.url|truncate(30) }} + + {% endif %} +
+ +
+ {% if truncate_summary|default(false) %} +

{{ entity.description|truncate(255)|markdown }}

+ {% else %} +

{{ entity.description|markdown }}

+ {% endif %} +
{% if (detail|default(false)) %} -

- Bearbeiten -

- -

- Löschen -

- -

- Kopieren -

- {% endif %} - -

- {{ entity.getFormatedDate() }} -

- - {% if entity.location is not null %} -

- {{ entity.location.name }} -

- {% endif %} - {% if entity.tags|length > 0 %} - - {% endif %} - - {% if entity.url|length > 0 %} -

- {{ entity.url }} -

- {% endif %} - -
- - {% if truncate_summary|default(false) %} -

{{ entity.description|truncate(255)|markdown }}

- {% else %} -

{{ entity.description|markdown }}

+ + + Bearbeiten + + + + Löschen + + + + Kopieren + {% endif %}

\ No newline at end of file diff --git a/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/event_form.html.twig b/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/event_form.html.twig index 39ac995..38a4e70 100755 --- a/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/event_form.html.twig +++ b/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/event_form.html.twig @@ -1,142 +1,148 @@ -
-
-
- + +
+ -
- - {% if(errors|default('0') != 0) %} {% if('startdate' in errors|keys) %} +
+ + {% if(errors|default('0') != 0) %} {% if('startdate' in errors|keys) %}
{{ errors.startdate }}
- {% endif %}{% endif %} + {% endif %}{% endif %} - - -
- -
-
+
-
- - -
- - - {% if(errors|default('0') != 0) %} {% if('enddate' in errors|keys) %} -
{{ errors.enddate }}
- {% endif %}{% endif %} - - -
+
+ Bitte gebe das Startdatum im Format ISO 8601 an.
-
- +
+
+ -
- +
+ - {% if(errors|default('0') != 0) %} {% if('summary' in errors|keys) %} -
{{ errors.summary }}
- {% endif %}{% endif %} + {% if(errors|default('0') != 0) %} {% if('enddate' in errors|keys) %} +
{{ errors.enddate }}
+ {% endif %}{% endif %} -
- -
-
+
- -
- - -
- -
Du kannst hier Markdown benutzen.
-
+
+ Bitte gebe das Enddatum im Format ISO 8601 an.
+
+
+ -
- +
+ -
- - -
+ {% if(errors|default('0') != 0) %} {% if('summary' in errors|keys) %} +
{{ errors.summary }}
+ {% endif %}{% endif %}
- -
- - -
- - - - -
- Du kannst zu diesem Ort auch Geokoordinaten hinterlegen.
- {% if entity.location.lat|default(0) > 0 %}Folgende Koordinaten sind angegeben: lat:{{ entity.location.lat }}, lon:{{ entity.location.lon }}{% endif %} -
- -
-
- -
- - -
- - -
Du kannst hier kommasepariert Tags angeben.
-
-
- -
+
+ + +
+ +
+
Du kannst hier Markdown + benutzen. +
+
+ +
+ + +
+ + +
+ +
+ Vergesse nicht das https:// zur URL anzugeben. +
+
+ +
+ + +
+ + + + +
+ +
+ Du kannst zu diesem Ort auch Geokoordinaten hinterlegen (JavaScript erforderlich).
+ {% if entity.location.lat|default(0) > 0 %}Folgende Koordinaten sind angegeben: lat:{{ entity.location.lat }}, lon:{{ entity.location.lon }}{% endif %} +
+ +
+ +
+ + +
+ + +
+
Du kannst hier kommasepariert Tags angeben. +
+
+ + \ No newline at end of file diff --git a/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/index.html.twig b/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/index.html.twig index 457520b..588ffed 100755 --- a/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/index.html.twig +++ b/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/index.html.twig @@ -2,92 +2,98 @@ {% block css %} {% stylesheets filter="compass" - "@CalciferBundle/Resources/assets/css/events.scss" - "@CalciferBundle/Resources/assets/css/leaflet.scss" - %} - + "@CalciferBundle/Resources/assets/css/events.scss" + "@CalciferBundle/Resources/assets/css/leaflet.scss" %} + {% endstylesheets %} {% endblock %} {% block javascripts %} {% javascripts "@CalciferBundle/Resources/assets/js/events.js" - "@CalciferBundle/Resources/assets/js/leaflet.js" - %} + "@CalciferBundle/Resources/assets/js/leaflet.js" %} {% endjavascripts %} {% endblock %} {% block body -%} -
-
-

- Termine - {% if tags|default(false) %} - {% if tags|length == 1 %} - für Tag {{ tags[0].name }} - {% elseif(tags|length == 2) %} - für die Tags {{ tags[0].name }} {% if operator == 'or' %}oder{% else %}und{% endif %} {{ tags[1].name }} - {% else %} - für die Tags - {% for tag in tags %} - {% if not loop.last %} - {{ tag.name }}{% if loop.index < (tags|length - 1) %},{% endif %} - {% else %} - {% if operator == 'or' %}oder{% else %}und{% endif %} {{ tag.name }} - {% endif %} - {% endfor %} - {% endif %} +
+

+ Termine + {% if tags|default(false) %} + {% if tags|length == 1 %} + für Tag {{ tags[0].name }} + {% elseif(tags|length == 2) %} + für die Tags {{ tags[0].name }} {% if operator == 'or' %}oder{% else %}und{% endif %} {{ tags[1].name }} + {% else %} + für die Tags + {% for tag in tags %} + {% if not loop.last %} + {{ tag.name }}{% if loop.index < (tags|length - 1) %},{% endif %} + {% else %} + {% if operator == 'or' %}oder{% else %}und{% endif %} {{ tag.name }} + {% endif %} + {% endfor %} {% endif %} - {% if location|default(false) %} für Ort „{{ location.name }}“ {% endif %} -

- {% if tag|default(false) %} - Link zur Kalenderdatei {% endif %} - {% if location|default(false) %} - {% if (location.description|length > 0) or location.hasAddress() %} -
- {% if (location.description|length > 0) %} -

{{ location.description|markdown }}

- {% endif %} - {% if (location.hasAddress()) %} -
-

- Anschrift:
- {{ location.streetaddress }}{% if(location.streetnumber|length > 0) %} {{ location.streetnumber }}{% endif %}
+ {% if location|default(false) %} für Ort „{{ location.name }}“ {% endif %} +

+ {% if tag|default(false) %} + Link zur + Kalenderdatei + {% endif %} + {% if location|default(false) %} + {% if (location.description|length > 0) or location.hasAddress() %} +
+ {% if (location.description|length > 0) %} +

{{ location.description|markdown }}

+ {% endif %} + {% if (location.hasAddress()) %} +
+

+ Anschrift:
+ {{ location.streetaddress }}{% if(location.streetnumber|length > 0) %} {{ location.streetnumber }}{% endif %} +
+ {% if(location.zipcode|length > 0) %}{{ location.zipcode }} {% endif %}{{ location.city }} +

+ {% endif %} + {% if ((location.lon > 0) and (location.lat > 0)) %} +

Auf einer OpenStreetMap-Karte anzeigen

+ {% endif %} -
+ {% endif %}
{% if entities|length > 0 %} -
- {% for entity in entities %} - {{ include('CalciferBundle:Event:event_box.html.twig',{'truncate_summary':true}) }} - {% endfor %} +
+
+ {% for entity in entities %} + {{ include('CalciferBundle:Event:event_box.html.twig',{'truncate_summary':true}) }} + {% endfor %} +
{% else %}
diff --git a/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/show.html.twig b/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/show.html.twig index 7d19293..592eecf 100755 --- a/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/show.html.twig +++ b/src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/show.html.twig @@ -17,7 +17,7 @@ {% endblock %} {% block body -%} -
+
{{ include('CalciferBundle:Event:event_box.html.twig',{'entity' : entity,'detail' : true}) }}
{% endblock %} diff --git a/src/Hackspace/Bundle/CalciferBundle/Resources/views/Location/edit.html.twig b/src/Hackspace/Bundle/CalciferBundle/Resources/views/Location/edit.html.twig index 5142616..130cb69 100644 --- a/src/Hackspace/Bundle/CalciferBundle/Resources/views/Location/edit.html.twig +++ b/src/Hackspace/Bundle/CalciferBundle/Resources/views/Location/edit.html.twig @@ -19,157 +19,151 @@ {% endblock %} {% block body -%} -
-
-

Ort bearbeiten

-
+
+

Ort bearbeiten

-
-
-
+
+ {% set errors = app.session.flashbag.get('error') %} {% if errors|length > 0 %} -
-
Bitte korrigiere folgende Fehler:
-
    - {% for flashMessage in errors %} -
  • {{ flashMessage }}
  • - {% endfor %} -
-
+
+
Bitte korrigiere folgende Fehler:
+
    + {% for flashMessage in errors %} +
  • {{ flashMessage }}
  • + {% endfor %} +
+
{% endif %} -
-
- +
+ -
- - -
- -
-
+
+
- -
- - -
- - -
Du kannst hier Markdown benutzen. -
-
-
- -
- - -
- - -
-
- -
- - -
- - -
-
- -
- - -
- - -
-
- -
- - -
- - -
-
- -
- - -
- - -
- Gebe entweder Breitengrad und Längengrad (Mit Punkten!) kommasepariert ein oder wähle einen Punkt auf der Karte aus. -
- -
-
- - - -
+
+ + +
+ +
+ +
Du kannst hier Markdown benutzen. +
+
+ +
+ + +
+ + +
+
+ +
+ + +
+ + +
+
+ +
+ + +
+ + +
+
+ +
+ + +
+ + +
+
+ +
+ + +
+ + +
+ +
+ Gebe entweder Breitengrad und Längengrad (Mit Punkten!) kommasepariert ein oder wähle + einen Punkt auf der Karte aus. +
+ +
+ + + +
diff --git a/src/Hackspace/Bundle/CalciferBundle/Resources/views/RepeatingEvent/edit.html.twig b/src/Hackspace/Bundle/CalciferBundle/Resources/views/RepeatingEvent/edit.html.twig index 25f2f34..84ac09d 100755 --- a/src/Hackspace/Bundle/CalciferBundle/Resources/views/RepeatingEvent/edit.html.twig +++ b/src/Hackspace/Bundle/CalciferBundle/Resources/views/RepeatingEvent/edit.html.twig @@ -4,8 +4,7 @@ {% stylesheets filter="compass" "@CalciferBundle/Resources/assets/css/jquery.datetimepicker.scss" "@CalciferBundle/Resources/assets/css/events.scss" - "@CalciferBundle/Resources/assets/css/leaflet.scss" - %} + "@CalciferBundle/Resources/assets/css/leaflet.scss" %} {% endstylesheets %} {% endblock %} @@ -15,21 +14,18 @@ "@CalciferBundle/Resources/assets/js/jquery.datetimepicker.js" "@CalciferBundle/Resources/assets/js/repeating_events.js" "@CalciferBundle/Resources/assets/js/events.js" - "@CalciferBundle/Resources/assets/js/leaflet.js" - %} + "@CalciferBundle/Resources/assets/js/leaflet.js" %} {% endjavascripts %} {% endblock %} {% block body -%} -
-
-

Wiederholenden Termin bearbeiten

-
+
+

Wiederholenden Termin bearbeiten

-
-
+
+
{{ include('CalciferBundle:RepeatingEvent:repeating_event_form.html.twig',{'entity':entity}) }}
diff --git a/src/Hackspace/Bundle/CalciferBundle/Resources/views/RepeatingEvent/index.html.twig b/src/Hackspace/Bundle/CalciferBundle/Resources/views/RepeatingEvent/index.html.twig index 12664f7..c705fdc 100755 --- a/src/Hackspace/Bundle/CalciferBundle/Resources/views/RepeatingEvent/index.html.twig +++ b/src/Hackspace/Bundle/CalciferBundle/Resources/views/RepeatingEvent/index.html.twig @@ -15,51 +15,47 @@ {% endblock %} {% block body -%} -
-
-

- Wiederholende Termine -

-
+
+

+ Wiederholende Termine +

-
-
- - +
+
+ + + + + + + + + + {% for entity in entities %} - - - - + + + + - - - {% for entity in entities %} - - - - - - - {% endfor %} - - - - - - -
ZusammenfassungNächstes DatumWiederholungsmusterAktionen
ZusammenfassungNächstes DatumWiederholungsmusterAktionen + {{ entity.summary }} + + {{ entity.nextdate.format('Y-m-d H:i') }} + + {{ entity.repeating_pattern }} + + Bearbeiten | + Löschen +
- {{ entity.summary }} - - {{ entity.nextdate.format('Y-m-d H:i') }} - - {{ entity.repeating_pattern }} - - Bearbeiten | - Löschen -
Neuen wiederholenden Termin anlegen
-
+ {% endfor %} + + + + Neuen wiederholenden Termin anlegen + + +
diff --git a/src/Hackspace/Bundle/CalciferBundle/Resources/views/RepeatingEvent/new.html.twig b/src/Hackspace/Bundle/CalciferBundle/Resources/views/RepeatingEvent/new.html.twig index 22b9509..cb28b39 100755 --- a/src/Hackspace/Bundle/CalciferBundle/Resources/views/RepeatingEvent/new.html.twig +++ b/src/Hackspace/Bundle/CalciferBundle/Resources/views/RepeatingEvent/new.html.twig @@ -20,14 +20,12 @@ {% endblock %} {% block body -%} -
-
-

Wiederholenden Termin erstellen

-
+
+

Wiederholenden Termin erstellen

-
-
+
+
{{ include('CalciferBundle:RepeatingEvent:repeating_event_form.html.twig') }}
diff --git a/src/Hackspace/Bundle/CalciferBundle/Resources/views/RepeatingEvent/repeating_event_form.html.twig b/src/Hackspace/Bundle/CalciferBundle/Resources/views/RepeatingEvent/repeating_event_form.html.twig index c532246..0bd20f3 100755 --- a/src/Hackspace/Bundle/CalciferBundle/Resources/views/RepeatingEvent/repeating_event_form.html.twig +++ b/src/Hackspace/Bundle/CalciferBundle/Resources/views/RepeatingEvent/repeating_event_form.html.twig @@ -1,10 +1,9 @@ -
-
-
- +
+ -
+
-
- -
+
+ +
+ Bitte gebe das Datum des nächsten Termin im Format ISO 8601 an.
- + -
+
-
- Hier gibst du bitte die Dauer der Veranstaltung in Minuten an. -
+
+
+ Hier gibst du bitte die Dauer der Veranstaltung in Minuten an.
-
- +
+ -
+
+
-
- -
- -
- Gebe hier ein Wiederholungsmuster an. -
+
+ Gebe hier ein Wiederholungsmuster an.
-
- +
+ -
+
- -
- -
- + -
+
- -
Du kannst hier Markdown - benutzen. -
+
+
Du kannst hier Markdown + benutzen.
- + -
+
-
+
-
+
+
-
- Du kannst zu diesem Ort auch Geokoordinaten hinterlegen.
- {% if entity.location.lat|default(0) > 0 %}Folgende Koordinaten sind angegeben: lat:{{ entity.location.lat }}, lon:{{ entity.location.lon }}{% endif %} +
+ Du kannst zu diesem Ort auch Geokoordinaten hinterlegen (JavaScript erforderlich).
+ {% if entity.location.lat|default(0) > 0 %}Folgende Koordinaten sind angegeben: lat:{{ entity.location.lat }}, lon:{{ entity.location.lon }}{% endif %} +
+