Merge branch 'master' of https://phablab.krautspace.de/diffusion/C/calcifer
Conflicts: src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/event_box.html.twig
This commit is contained in:
commit
e54460d0ed
5 changed files with 64 additions and 59 deletions
1
TODO.md
1
TODO.md
|
@ -2,4 +2,5 @@
|
||||||
|
|
||||||
* Sich wiederholende Termine
|
* Sich wiederholende Termine
|
||||||
* Mehr Dokumentation im Interface. Also beschreiben was das eigentlich ist und so.
|
* Mehr Dokumentation im Interface. Also beschreiben was das eigentlich ist und so.
|
||||||
|
* Schöne URLs für Termine/Orte/Tags
|
||||||
* Irgendwoher ein k3wles Logo auftreiben
|
* Irgendwoher ein k3wles Logo auftreiben
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.startdate,.location,.url,.edit {
|
.startdate,.location,.url,.edit {
|
||||||
/*float: left;*/
|
|
||||||
display: inline;
|
display: inline;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
margin-right: 0.5rem;
|
margin-right: 0.5rem;
|
||||||
|
@ -16,14 +15,12 @@
|
||||||
|
|
||||||
ul.tags {
|
ul.tags {
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
/*float: left;*/
|
|
||||||
margin: 0;
|
margin: 0;
|
||||||
margin-right: 0.5rem;
|
margin-right: 0.5rem;
|
||||||
margin-bottom: 0.5rem;
|
margin-bottom: 0.5rem;
|
||||||
display: inline;
|
display: inline;
|
||||||
li {
|
li {
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
/*float: left;*/
|
|
||||||
display: inline;
|
display: inline;
|
||||||
margin-right: 0.5rem;
|
margin-right: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,11 +8,17 @@ function addGeoCoordinates(ev) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
var map = null;
|
var map = null;
|
||||||
$(document).ready(function () {
|
jQuery(document).ready(function () {
|
||||||
$('.icon.link').popup();
|
if (jQuery('.icon.link').length > 0) {
|
||||||
jQuery('input[type=datetime]').datetimepicker({lang: 'de', format: 'Y-m-d H:i'});
|
jQuery('.icon.link').popup();
|
||||||
|
}
|
||||||
|
|
||||||
$('.add_geo').click(addGeoCoordinates);
|
if (jQuery('input[type=datetime]').length > 0) {
|
||||||
|
jQuery('input[type=datetime]').datetimepicker({lang: 'de', format: 'Y-m-d H:i'});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (jQuery('#map').length == 1) {
|
||||||
|
jQuery('.add_geo').click(addGeoCoordinates);
|
||||||
map = L.map('map');
|
map = L.map('map');
|
||||||
|
|
||||||
// add an OpenStreetMap tile layer
|
// add an OpenStreetMap tile layer
|
||||||
|
@ -36,22 +42,22 @@ $(document).ready(function () {
|
||||||
|
|
||||||
map.on('click', onMapClick);
|
map.on('click', onMapClick);
|
||||||
|
|
||||||
$('.geo.chooser').modal('setting', {
|
jQuery('.geo.chooser').modal('setting', {
|
||||||
closable: false,
|
closable: false,
|
||||||
onApprove: function () {
|
onApprove: function () {
|
||||||
var coords = marker.getLatLng();
|
var coords = marker.getLatLng();
|
||||||
$('input[name=location_lat]').val(coords.lat);
|
jQuery('input[name=location_lat]').val(coords.lat);
|
||||||
$('input[name=location_lon]').val(coords.lng);
|
jQuery('input[name=location_lon]').val(coords.lng);
|
||||||
$('input[name=location]').css('margin-bottom', '3.2rem');
|
jQuery('input[name=location]').css('margin-bottom', '3.2rem');
|
||||||
$('span.coords').text('Folgende Koordinaten sind angegeben: lat:' + coords.lat + ', lon:' + coords.lng);
|
jQuery('span.coords').text('Folgende Koordinaten sind angegeben: lat:' + coords.lat + ', lon:' + coords.lng);
|
||||||
},
|
},
|
||||||
onDeny: function () {
|
onDeny: function () {
|
||||||
|
|
||||||
},
|
},
|
||||||
onVisible: function () {
|
onVisible: function () {
|
||||||
map.invalidateSize(true);
|
map.invalidateSize(true);
|
||||||
var lat = parseFloat($('input[name=location_lat]').val());
|
var lat = parseFloat(jQuery('input[name=location_lat]').val());
|
||||||
var lon = parseFloat($('input[name=location_lon]').val());
|
var lon = parseFloat(jQuery('input[name=location_lon]').val());
|
||||||
if ((lat > 0) && (lon > 0)) {
|
if ((lat > 0) && (lon > 0)) {
|
||||||
map.setView([lat, lon], 16);
|
map.setView([lat, lon], 16);
|
||||||
var latlng = new L.LatLng(lat, lon);
|
var latlng = new L.LatLng(lat, lon);
|
||||||
|
@ -62,4 +68,5 @@ $(document).ready(function () {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).modal('attach events', '.add_geo', 'show');
|
}).modal('attach events', '.add_geo', 'show');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -4,29 +4,29 @@
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<p class="edit">
|
<p class="edit">
|
||||||
<a href="{{ path('_edit', {'slug' : entity.slug }) }}"><i class="ui icon edit circular green inverted"></i>Bearbeiten</a>
|
<a href="{{ path('_edit', {'slug' : entity.slug }) }}"><i class="circular icon edit green inverted link"></i>Bearbeiten</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class="startdate ">
|
<p class="startdate ">
|
||||||
<i class="ui icon calendar circular green inverted link" title="Wann?" data-content="Wann?"></i>{{ entity.startdate.format('Y-m-d H:i') }}
|
<i class="circular icon calendar green inverted link" title="Wann?" data-content="Wann?"></i>{{ entity.startdate.format('Y-m-d H:i') }}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
{% if entity.location is not null %}
|
{% if entity.location is not null %}
|
||||||
<p class="location">
|
<p class="location">
|
||||||
<a href="{{ path('location_show', {'slug' : entity.location.slug }) }}"><i class="ui icon map marker circular green inverted link" title="Wo?" data-content="Wo?"></i>{{ entity.location.name }}</a>
|
<a href="{{ path('location_show', {'slug' : entity.location.slug }) }}"><i class="circular icon map marker green inverted link" title="Wo?" data-content="Wo?"></i>{{ entity.location.name }}</a>
|
||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if entity.tags|length > 0 %}
|
{% if entity.tags|length > 0 %}
|
||||||
<ul class="tags">
|
<ul class="tags">
|
||||||
{% for tag in entity.tags %}
|
{% for tag in entity.tags %}
|
||||||
<li class="tag"><a href="{{ path('tag_show',{'slug' : tag.slug }) }}"><i class="circular icon tag green inverted"></i>{{ tag.name }}</a></li>
|
<li class="tag"><a href="{{ path('tag_show',{'slug' : tag.slug }) }}"><i class="circular icon tag green inverted link"></i>{{ tag.name }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if entity.url|length > 0 %}
|
{% if entity.url|length > 0 %}
|
||||||
<p class="url">
|
<p class="url">
|
||||||
<a href="{{ entity.url }}"><i class="ui icon globe green circular inverted"></i>{{ entity.url }}</a>
|
<a href="{{ entity.url }}"><i class="circular icon globe green inverted link"></i>{{ entity.url }}</a>
|
||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
|
@ -22,12 +22,12 @@
|
||||||
<h1>
|
<h1>
|
||||||
Termine
|
Termine
|
||||||
{% if tag|default(false) %} für Tag „{{ tag.name }}“{% endif %}
|
{% if tag|default(false) %} für Tag „{{ tag.name }}“{% endif %}
|
||||||
{% if location|default(false) %} für Ort „{{ location.name }}{% endif %}
|
{% if location|default(false) %} für Ort „{{ location.name }}“{% endif %}
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ui three column page grid">
|
<div class="ui three column page grid stackable">
|
||||||
{% for entity in entities %}
|
{% for entity in entities %}
|
||||||
{{ include('CalciferBundle:Event:event_box.html.twig',{'truncate_summary':true}) }}
|
{{ include('CalciferBundle:Event:event_box.html.twig',{'truncate_summary':true}) }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
Reference in a new issue