Skip to content

Commit

Permalink
Include HTTP and webcal links for calendar
Browse files Browse the repository at this point in the history
  • Loading branch information
RealOrangeOne committed Apr 30, 2024
1 parent c71dfaf commit 343589a
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions calmerge/templates/listing.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,20 @@ <h1>Calmerge</h1>
<tr>
{% with calendar_url = url('calendar', slug=calendar.slug) %}
<td><a href="{{ calendar_url }}">{{ calendar_url }}</a></td>
<td>{{ calendar.name|default("-", true) }}</td>
<td>{{ calendar.description|default("-", true) }}</td>
<td>{{ calendar.offset_days|sort|join(", ") }}</td>
<td>{{ calendar.ttl_hours }} hours</td>
{% if config.listing.include_credentials and calendar.auth %}
<td><code>{{ calendar.auth.username }}:{{ calendar.auth.password }}</code></td>
{% else %}
<td>{{ "Yes" if calendar.auth else "No" }}</td>
{% endif %}
<td>
<a href="{{ calendar_url }}">{{ calendar_url.scheme|default("http", true) }}</a>
<a href="{{ calendar|webcal_url }}">webcal</a>
</td>
{% endwith %}
<td>{{ calendar.name|default("-", true) }}</td>
<td>{{ calendar.description|default("-", true) }}</td>
<td>{{ calendar.offset_days|sort|join(", ") }}</td>
<td>{{ calendar.ttl_hours }} hours</td>
{% if config.listing.include_credentials and calendar.auth %}
<td><code>{{ calendar.auth.username }}:{{ calendar.auth.password }}</code></td>
{% else %}
<td>{{ "Yes" if calendar.auth else "No" }}</td>
{% endif %}
<td><a href="{{ calendar|webcal_url }}">Add to calendar</a></td>
</tr>
{% endfor %}
</table>
Expand Down

0 comments on commit 343589a

Please sign in to comment.