Feature: [Calendar doc] complete CRUD for associating documents within Calendar

This commit is contained in:
2022-11-28 14:33:06 +01:00
parent fc15b85d11
commit 39f410dc8f
16 changed files with 688 additions and 31 deletions

View File

@@ -17,27 +17,37 @@
</thead>
<tbody>
{% for d in calendar.documents %}
<tr>
<td class="eval">
<ul class="eval_title">
<li>
{{ mm.mimeIcon(d.storedObject.type) }}
{{ d.storedObject.title }}
<ul class="record_actions small inline">
{% if chill_document_is_editable(d.storedObject) %}
<li>
{{ d.storedObject|chill_document_edit_button }}
</li>
{% endif %}
{% if is_granted('CHILL_CALENDAR_DOC_SEE', d) %}
<tr>
<td class="eval">
<ul class="eval_title">
<li>
{{ m.download_button(d.storedObject, d.storedObject.title) }}
{{ mm.mimeIcon(d.storedObject.type) }}
{{ d.storedObject.title }}
<ul class="record_actions small inline">
{% if chill_document_is_editable(d.storedObject) and is_granted('CHILL_CALENDAR_DOC_EDIT', d) %}
<li>
<a href="{{ chill_path_add_return_path('chill_calendar_calendardoc_delete', {'id': d.id})}}" class="btn btn-delete"></a>
</li>
<li>
{{ d.storedObject|chill_document_edit_button }}
</li>
{% endif %}
{% if is_granted('CHILL_CALENDAR_DOC_EDIT', d) %}
<li>
<a href="{{ chill_path_add_return_path('chill_calendar_calendardoc_edit', {'id': d.id})}}" class="btn btn-edit"></a>
</li>
{% endif %}
<li>
{{ m.download_button(d.storedObject, d.storedObject.title) }}
</li>
</ul>
</li>
</ul>
</li>
</ul>
</td>
</tr>
</td>
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>