Skip to content

Commit

Permalink
Merge pull request #182 from Metalab/issue_181_caleventlocation
Browse files Browse the repository at this point in the history
Implement location display in calendar view
  • Loading branch information
luto authored Jul 8, 2023
2 parents 0d73bcb + c7ebbda commit c2474ed
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cal/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ def formatday(self, day, weekday):
if self.admin:
body.append(u'<a href="%s" class="edit" title="edit">✏️</a>' % event.get_absolute_url())
body.append('<a href="/wiki/%s">' % event.wikiPage)
body.append('<span class="event-time">' + event.startDate.strftime('%H:%M') + '</span> ' + esc(event.name))
body.append('<span class="event-time">' + event.startDate.strftime('%H:%M') + '</span>')
body.append('<span class="event-name">' + esc(event.name) + '</span>')
body.append('<span class="event-location">' + esc(event.location) + '</span>')
body.append('</a>')
body.append('</li>')
body.append('</ul>')
Expand Down
17 changes: 17 additions & 0 deletions static/stylesheets/cal.css
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,23 @@ table.month .event-time {
font-weight: bold;
}

.event .event-name::before {
display: inline;
content: " ";
}

.event .event-location {
display: none;
}

.event .event-location::before {
content: " | ";
}

.event:hover .event-location {
display: inline;
}

#calendar-year-list {
text-align: right;
}
Expand Down

0 comments on commit c2474ed

Please sign in to comment.