Merge pull request #889 from r3r57/feature-events-count-column-in-calendar-overview

Add event count column in calendar overview
This commit is contained in:
H. Lehmann 2020-03-22 12:50:11 +01:00 committed by GitHub
commit fe25cf088a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View file

@ -68,6 +68,7 @@ class Calendars extends \Flake\Core\Controller {
"linkdelete" => $this->linkDelete($calendar), "linkdelete" => $this->linkDelete($calendar),
"icon" => $calendar->icon(), "icon" => $calendar->icon(),
"label" => $calendar->label(), "label" => $calendar->label(),
"events" => $calendar->getEventsBaseRequester()->count(),
"description" => $calendar->get("description"), "description" => $calendar->get("description"),
]; ];
} }

View file

@ -10,6 +10,7 @@
<thead> <thead>
<tr> <tr>
<th>Display name</th> <th>Display name</th>
<th>Events</th>
<th>Description</th> <th>Description</th>
<th class="no-border-left"></th> <th class="no-border-left"></th>
</tr> </tr>
@ -18,6 +19,7 @@
{% for calendar in calendars %} {% for calendar in calendars %}
<tr> <tr>
<td class="col-displayname"><i class="{{ calendar.icon }}"></i>{{ calendar.label|escape }}</td> <td class="col-displayname"><i class="{{ calendar.icon }}"></i>{{ calendar.label|escape }}</td>
<td class="col-events">{{ calendar.events|escape }}</td>
<td class="col-description">{{ calendar.description|escape }}</td> <td class="col-description">{{ calendar.description|escape }}</td>
<td class="col-actions no-border-left"> <td class="col-actions no-border-left">
<p class="pull-right"> <p class="pull-right">