|
@@ -109,6 +109,20 @@ body { overflow:auto; }
|
109
|
109
|
}
|
110
|
110
|
"""
|
111
|
111
|
|
|
112
|
+_LABELS = {
|
|
113
|
+ 'archiving': 'Item archived',
|
|
114
|
+ 'content-comment': 'Item commented',
|
|
115
|
+ 'creation': 'Item created',
|
|
116
|
+ 'deletion': 'Item deleted',
|
|
117
|
+ 'edition': 'item modified',
|
|
118
|
+ 'revision': 'New revision',
|
|
119
|
+ 'status-update': 'New status',
|
|
120
|
+ 'unarchiving': 'Item unarchived',
|
|
121
|
+ 'undeletion': 'Item undeleted',
|
|
122
|
+ 'move': 'Item moved',
|
|
123
|
+ 'comment': 'Comment'
|
|
124
|
+}
|
|
125
|
+
|
112
|
126
|
|
113
|
127
|
def create_readable_date(created, delta_from_datetime: datetime = None):
|
114
|
128
|
if not delta_from_datetime:
|
|
@@ -139,19 +153,6 @@ def designPage(content: data.Content, content_revision: data.ContentRevisionRO)
|
139
|
153
|
for event in hist:
|
140
|
154
|
if isinstance(event, VirtualEvent):
|
141
|
155
|
date = event.create_readable_date()
|
142
|
|
- _LABELS = {
|
143
|
|
- 'archiving': 'Item archived',
|
144
|
|
- 'content-comment': 'Item commented',
|
145
|
|
- 'creation': 'Item created',
|
146
|
|
- 'deletion': 'Item deleted',
|
147
|
|
- 'edition': 'item modified',
|
148
|
|
- 'revision': 'New revision',
|
149
|
|
- 'status-update': 'New status',
|
150
|
|
- 'unarchiving': 'Item unarchived',
|
151
|
|
- 'undeletion': 'Item undeleted',
|
152
|
|
- 'move': 'Item moved'
|
153
|
|
- }
|
154
|
|
-
|
155
|
156
|
label = _LABELS[event.type.id]
|
156
|
157
|
|
157
|
158
|
histHTML += '''
|
|
@@ -265,20 +266,6 @@ def designThread(content: data.Content, content_revision: data.ContentRevisionRO
|
265
|
266
|
participants[t.owner.display_name][0] += 1
|
266
|
267
|
else:
|
267
|
268
|
if isinstance(t, VirtualEvent) and t.type.id != 'comment':
|
268
|
|
- _LABELS = {
|
269
|
|
- 'archiving': 'Item archived',
|
270
|
|
- 'content-comment': 'Item commented',
|
271
|
|
- 'creation': 'Item created',
|
272
|
|
- 'deletion': 'Item deleted',
|
273
|
|
- 'edition': 'item modified',
|
274
|
|
- 'revision': 'New revision',
|
275
|
|
- 'status-update': 'New status',
|
276
|
|
- 'unarchiving': 'Item unarchived',
|
277
|
|
- 'undeletion': 'Item undeleted',
|
278
|
|
- 'move': 'Item moved',
|
279
|
|
- 'comment' : 'hmmm'
|
280
|
|
- }
|
281
|
|
-
|
282
|
269
|
label = _LABELS[t.type.id]
|
283
|
270
|
|
284
|
271
|
disc += '''
|