prototype distinguishes:
- content shares (link, download, view) versus status attachments (download)
- files (with title, description) versus images (fullwidth)
- has preview versus no preview versus preview in progress
Please study prototype/./_includes/post.html when making changes here.
NB the prototype assumes that multiple attachments are either all images
or else are all files. Implementation will need to split that into
a multi-file + multi-image renderer.
Structure
---------
Explanation see https://github.com/quaive/ploneintranet/issues/1
The below is broken into 2x2 blocks wrapped in conditionals:
1. streamonly = post with attachment, without reference to content object
a. stream_document = file attachment
b. stream_image = image attachment
2. content = post with content object reference
a. content_default = reference to file or document, anything but an image
b. content_image = reference to an image
The prototype does not have a distinction between 1. and 2. that way,
but we need it for the implementation since the API is very different,
and the markup is subtly different on top of that.
TODO:
- "converting" state not yet supported in markup
relates to https://github.com/quaive/ploneintranet/issues/44
- multi-attachments and multi-page previews
- zip downloads
----------------------------------------------------------------
1.a. STREAM DOCUMENT
----------------------------------------------------------------
Projection MaterialDownload
----------------------------------------------------------------
1.b. STREAM IMAGE
----------------------------------------------------------------
${attachment/title}