#macro setBtnAction action_nb> <#switch action_nb> <#case 1> <#case 6> <#case 8> <#case 11> <#assign btnAction='danger' /> <#break> <#case 14> <#case 15> <#assign btnAction='info' /> <#break> <#case 4> <#case 12> <#case 13> <#assign btnAction='success' /> <#break> <#case 5> <#assign btnAction='warning' /> <#break> <#default> <#assign btnAction='primary' /> #switch>${btnAction} #macro> <@row> <@columns lg=3> <@box> <@boxHeader title='#i18n{document.manage_documents.labelSpaces}'> <#if space_actions_list?size != 0 > <#list space_actions_list as space_action> <#if space_action.permission="DELETE"> <#assign btnClass = 'danger' /> <#else> <#assign btnClass = 'primary' /> #if> <@aButton href='${space_action.url}?id_space=${space.id}' title='${space_action.description}' class='btn-space-action' color='${btnClass}' buttonIcon='${space_action.iconUrl}' size='sm' hideTitle=['all'] /> #list> #if> @boxHeader> <@boxBody> <@icon style='folder-open' /> #i18n{document.manage_documents.labelSpaces} ${spaces_tree} @boxBody> @box> <#if mass_action?has_content && mass_action> <@box> <@boxHeader title='#i18n{document.manage_documents.labelMoreActions}' /> <@boxBody> <@listGroup> <@listGroupItem> <@tform type='inline' method='post' id='archiveForm' name='archiveForm' action='jsp/admin/plugins/document/MassArchivalDocument.jsp'> <@button class='btn btn-link' type='submit' buttonIcon='file-archive' title='#i18n{document.manage_document.mass_archival_labelBtn}' /> @tform> @listGroupItem> @listGroup> @boxBody> @box> #if> @columns> <@columns lg=9> <#if space?has_content> <@box> <@boxHeader title='#i18n{document.manage_documents.buttonSearch}' /> <@boxBody> <@tform method='post' id='SearchDocumentById' name='SearchDocumentById' action='jsp/admin/plugins/document/DoSearchDocumentById.jsp'> <@formGroup labelFor='id_document' labelKey='#i18n{document.manage_documents.buttonSearch}' helpKey='#i18n{document.manage_documents.labelSearchById}'> <@inputGroup> <@input type='text' id='id_document' name='id_document' maxlength=10 /> <@inputGroupItem> <@button type='submit' title='#i18n{document.manage_documents.buttonSearch}' buttonIcon='search' hideTitle=['all'] /> @inputGroupItem> @inputGroup> @formGroup> @tform> <@tform method='post' id='FullTextSearchDocument' name='FullTextSearchDocument' action='jsp/admin/plugins/document/DocumentSearch.jsp'> <@input type='hidden' id='id_document' name='id_document' /> <@formGroup labelFor='query' labelKey='#i18n{document.manage_documents.buttonSearch}' helpKey='#i18n{document.manage_documents.labelFullTextSearch}'> <@inputGroup> <@input type='text' id='query' name='query' maxlength=50 /> <@inputGroupItem> <@button type='submit' title='#i18n{document.manage_documents.buttonSearch}' buttonIcon='search' hideTitle=['all'] /> @inputGroupItem> @inputGroup> @formGroup> @tform> <#if document_types_filter_list?size > 1 > <@tform method='post' name='FilterDocumentsForm' action='jsp/admin/plugins/document/ManageDocuments.jsp'> <@formGroup labelFor='document_type_code_filter' labelKey='#i18n{document.manage_documents.labelType}'> <@select name='document_type_code_filter' default_value='${default_document_type}' items=document_types_filter_list /> @formGroup> <@formGroup labelFor='id_state_filter' labelKey='#i18n{document.manage_documents.labelState}'> <@inputGroup> <@select name='id_state_filter' default_value='${default_state}' items=states_filter_list /> <@inputGroupItem> <@button type='submit' title='#i18n{document.manage_documents.buttonFilter}' buttonIcon='filter' hideTitle=['all'] /> @inputGroupItem> @inputGroup> @formGroup> <@formGroup labelFor='view_type' labelKey='#i18n{document.manage_documents.labelViewType}'> <@inputGroup> <@select name='view_type' default_value='${view_type}' items=view_types_list /> <@inputGroupItem> <@button type='submit' buttonIcon='check' /> @inputGroupItem> @inputGroup> @formGroup> @tform> #if> <#if space.documentCreationAllowed > <#if document_types_list?has_content> <@tform method='post' name='CreateDocument' action='jsp/admin/plugins/document/CreateDocument.jsp'> <@formGroup labelFor='document_type_code' labelKey='#i18n{document.manage_documents.labelCreate}'> <@inputGroup> <@select name='document_type_code' default_value='' items=document_types_list /> <@inputGroupItem> <@button type='submit' title='#i18n{document.manage_documents.buttonCreate}' buttonIcon='plus-circle' hideTitle=['all'] /> @inputGroupItem> @inputGroup> @formGroup> <#if is_files2docs_plugin_active?has_content && is_files2docs_plugin_active> <@button type='button' title='#i18n{document.manage_documents.buttonImport}' id='importLinkButton' buttonIcon='plus-circle' /> #if> @tform> #if> #if>
<#if document.title?length > 60>${document.title?substring(0,60)}...<#else>${document.title}#if>
<@icon style='calendar' title='#i18n{document.manage_documents.labelDateModification}' /> ${document.dateModification} <#if document.stateId = 3> <@tag color='success' title='#i18n{document.manage_documents.labelState}' tagIcon='check-circle'>${document.state} @tag> <#else> <@tag color='info' title='#i18n{document.manage_documents.labelState}' tagIcon='times'>${document.state} @tag> #if>
<#if document.comment != ''> <@alert color='info'> <@icon style='info-circle' /> ${document.comment} @alert> #if> @td> <@td> <#if document.publishedStatus = 0> <@tag color='success' tagIcon='check-circle'>#i18n{document.manage_documents.PublishedStatus}@tag> <#else> <@tag color='danger' tagIcon='times'>#i18n{document.manage_documents.UnPublishedStatus}@tag> #if> @td> <@td> <#list document.actions?sort_by("idAction") as action> <#if action.url?has_content> <#assign aBtnColor> <@setBtnAction action_nb=action.idAction /> #assign> <@aButton href='${action.url}id_document=${document.id}&id_action=${action.idAction}' title='${action.description}' buttonIcon='${action.iconUrl}' color=aBtnColor?trim hideTitle=['all'] size='sm' /> #if> #list> @td> @tr> #list> @table> @tform> #if> <#if view_type = "thumbnail"> <@columns> <@row> <#list documents_list as document > <@columns sm=6 class='document-row' params='data-document="${document.id} ${document.title}"'><@tag>${document.id}@tag> <#if document.title?length > 18>${document.title?substring(0,18)}...<#else>${document.title}#if>
<@btnGroup size='sm'> <#list document.actions?sort_by("idAction") as action> <#if action.url?has_content> <#assign aBtnColor> <@setBtnAction action_nb=action.idAction /> #assign> <@aButton href='${action.url}id_document=${document.id}&id_action=${action.idAction}' title='${action.description}' buttonIcon='${action.iconUrl}' color=aBtnColor?trim hideTitle=['all'] /> #if> #list> @btnGroup>