|
@@ -388,12 +388,13 @@ def serialize_node_for_page(content: Content, context: Context):
|
388
|
388
|
is_new=content.has_new_information_for(context.get_user()),
|
389
|
389
|
content=data_container.description,
|
390
|
390
|
created=data_container.created,
|
|
391
|
+ updated=data_container.updated,
|
391
|
392
|
label=data_container.label,
|
392
|
393
|
icon=ContentType.get_icon(content.type),
|
393
|
|
- owner=context.toDict(data_container.owner),
|
|
394
|
+ owner=context.toDict(content.first_revision.owner),
|
394
|
395
|
status=context.toDict(data_container.get_status()),
|
395
|
396
|
links=[],
|
396
|
|
- revisions=context.toDict(sorted(content.revisions, key=lambda v: v.created, reverse=True)),
|
|
397
|
+ revision_nb = len(content.revisions),
|
397
|
398
|
selected_revision='latest' if content.revision_to_serialize<=0 else content.revision_to_serialize,
|
398
|
399
|
history=Context(CTX.CONTENT_HISTORY).toDict(content.get_history()),
|
399
|
400
|
is_editable=content.is_editable,
|
|
@@ -450,11 +451,13 @@ def serialize_content_for_history(event: VirtualEvent, context: Context):
|
450
|
451
|
)
|
451
|
452
|
|
452
|
453
|
@pod_serializer(Content, CTX.THREAD)
|
453
|
|
-def serialize_node_for_page(item: Content, context: Context):
|
|
454
|
+def serialize_node_for_thread(item: Content, context: Context):
|
454
|
455
|
if item.type==ContentType.Thread:
|
455
|
456
|
return DictLikeClass(
|
456
|
457
|
content = item.description,
|
457
|
458
|
created = item.created,
|
|
459
|
+ updated = item.updated,
|
|
460
|
+ revision_nb = len(item.revisions),
|
458
|
461
|
icon = ContentType.get_icon(item.type),
|
459
|
462
|
id = item.content_id,
|
460
|
463
|
label = item.label,
|