mirror of https://gitlab.com/bashrc2/epicyon
Sender tag for calendar events
parent
c345290354
commit
c038d86e22
|
@ -233,6 +233,8 @@ def getTodaysEvents(baseDir: str, nickname: str, domain: str,
|
|||
# link to the id so that the event can be
|
||||
# easily deleted
|
||||
tag['postId'] = postId.split('#statuses#')[1]
|
||||
tag['sender'] = postId.split('#statuses#')[0]
|
||||
tag['sender'] = tag['sender'].replace('#', '/')
|
||||
postEvent.append(tag)
|
||||
else:
|
||||
# tag is a place
|
||||
|
|
|
@ -135,6 +135,7 @@ def _htmlCalendarDay(personCache: {}, cssCache: {}, translate: {},
|
|||
eventDescription = None
|
||||
eventPlace = None
|
||||
postId = None
|
||||
senderName = ''
|
||||
# get the time place and description
|
||||
for ev in eventPost:
|
||||
if ev['type'] == 'Event':
|
||||
|
@ -145,21 +146,22 @@ def _htmlCalendarDay(personCache: {}, cssCache: {}, translate: {},
|
|||
datetime.strptime(ev['startTime'],
|
||||
"%Y-%m-%dT%H:%M:%S%z")
|
||||
eventTime = eventDate.strftime("%H:%M").strip()
|
||||
if ev.get('name'):
|
||||
if ev.get('sender'):
|
||||
# get display name from sending actor
|
||||
senderName = ''
|
||||
# if ev.get('actor'):
|
||||
# actor = ev['actor']
|
||||
# senderName = \
|
||||
# '<a href="' + actor + '">' + \
|
||||
# getDisplayName(baseDir, actor,
|
||||
# personCache) + \
|
||||
# '</a>: '
|
||||
if ev.get('sender'):
|
||||
senderActor = ev['sender']
|
||||
senderName = \
|
||||
'<a href="' + actor + '">' + \
|
||||
getDisplayName(baseDir, senderActor,
|
||||
personCache) + '</a>: '
|
||||
if ev.get('name'):
|
||||
eventDescription = senderName + ev['name'].strip()
|
||||
elif ev['type'] == 'Place':
|
||||
if ev.get('name'):
|
||||
eventPlace = ev['name']
|
||||
|
||||
if senderName and eventDescription:
|
||||
eventDescription = senderName + eventDescription
|
||||
deleteButtonStr = ''
|
||||
if postId:
|
||||
deleteButtonStr = \
|
||||
|
|
Loading…
Reference in New Issue