Skip to content
Code-Schnipsel Gruppen Projekte
Commit f149a1bb erstellt von Jan Wennrich's avatar Jan Wennrich
Dateien durchsuchen

Merge branch 'dev'

Übergeordnete 855e7439 2da92eb6
No related branches found
No related tags found
Keine zugehörigen Merge Requests gefunden
......@@ -31,7 +31,7 @@ Contribute
Support
-------
If you have found errors, wishes or suggestions for improvement,
you can contact us by email at support@pcsg.de.
you can contact us by email at [support@pcsg.de](mailto:support@pcsg.de).
We will try to meet your needs or send them to the responsible developers
of the project.
......
......@@ -33,13 +33,6 @@
justify-content: center;
}
.event-wrapper:nth-child(even) .event-date {
background-color: #79b51c;
}
.event-wrapper:nth-child(odd) .event-date {
background-color: #2F8FC6;
}
.event-date .event-date-day,
.event-date .event-date-month {
......
......@@ -2,7 +2,7 @@
{foreach from=$events item=Event}
<li class="event-wrapper">
<div class="event">
<div class="event-date">
<div class="event-date" style="background-color: {$colors[$Event->calendar_id]}">
<div class="event-date-day">
{$Event->formattedDate}
</div>
......
......@@ -38,6 +38,17 @@ class EventList extends QUI\Control
$events = array();
}
// Holds all calendar colors, the index represents the calendar's id
$calendarColors = array();
foreach ($events as $key => $event) {
$calendarID = $event->calendar_id;
if (isset($calendarColors[$calendarID])) {
continue;
}
$calendarColors[$calendarID] = QUI\Calendar\Handler::getCalendar($calendarID)->getColor();
}
// Simple or modern display style?
if ($this->getAttribute('displayStyle') == "simple") {
$template = dirname(__FILE__) . '/EventListSimple.html';
......@@ -56,7 +67,10 @@ class EventList extends QUI\Control
}
$Engine = QUI::getTemplateManager()->getEngine();
$Engine->assign('events', $events);
$Engine->assign(array(
'events' => $events,
'colors' => $calendarColors
));
$this->addCSSFile($cssFile);
$html = $Engine->fetch($template);
......
......@@ -31,14 +31,6 @@
justify-content: center;
}
.event-wrapper:nth-child(even) .event-index {
background-color: #79b51c;
}
.event-wrapper:nth-child(odd) .event-index {
background-color: #2F8FC6;
}
.event-title {
float: left;
padding-left: 20px;
......
......@@ -2,7 +2,7 @@
{foreach from=$events key=k item=Event}
<li class="event-wrapper">
<div class="event">
<div class="event-index"></div>
<div class="event-index" style="background-color: {$colors[$Event->calendar_id]}"></div>
<div class="event-title">
{$Event->text}
</div>
......
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren