<#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' /> ${btnAction} <@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' /> <@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'] /> <@boxBody> <@icon style='folder-open' /> #i18n{document.manage_documents.labelSpaces} ${spaces_tree} <#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}' /> <@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'] /> <@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'] /> <#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 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'] /> <@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' /> <#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'] /> <#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 documents_list?size = 0>
<@alert color='warning'> <@icon style='exclamation-triangle' /> #i18n{document.manage_documents.noDocument} <#else> <#if view_type = 'detail' > <@tform id='documents_form' name='documents_form' method='post' action='jsp/admin/plugins/document/DoActionSelectionDocument.jsp'> <@table> <@tr> <@th> <@checkBox id='select_all' name='select_all' /> <@th> #i18n{document.manage_documents.labelDocumentId} <@sort jsp_url='jsp/admin/plugins/document/ManageDocuments.jsp' attribute='id' /> <@th> #i18n{document.manage_documents.labelDocument}<@sort jsp_url='jsp/admin/plugins/document/ManageDocuments.jsp' attribute='title' /> <@formGroup labelFor='selection' rows=2> <@inputGroup> <@select id='selection' name='selection' size='sm' disabled=true> <@inputGroupItem> <@button type='submit' title='#i18n{document.manage_documents.applyToSelection}' buttonIcon='check' hideTitle=['all'] size='sm' /> <@th>#i18n{document.manage_documents.labelPublishedStatus}<@sort jsp_url='jsp/admin/plugins/document/ManageDocuments.jsp' attribute='publishedStatus' /> <@th>#i18n{document.manage_documents.labelActions} <#list documents_list as document > <@tr class='document-row' params='data-document="${document.id} ${document.title}"'> <@td><@checkBox id='document_selection' name='document_selection' value='${document.id}' /> <@td>${document.id} <@td>

<#if document.title?length > 60>${document.title?substring(0,60)}...<#else>${document.title}

<@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}    <#else> <@tag color='info' title='#i18n{document.manage_documents.labelState}' tagIcon='times'>${document.state}

<#if document.comment != ''> <@alert color='info'> <@icon style='info-circle' /> ${document.comment} <@td> <#if document.publishedStatus = 0> <@tag color='success' tagIcon='check-circle'>#i18n{document.manage_documents.PublishedStatus} <#else> <@tag color='danger' tagIcon='times'>#i18n{document.manage_documents.UnPublishedStatus} <@td> <#list document.actions?sort_by("idAction") as action> <#if action.url?has_content> <#assign aBtnColor> <@setBtnAction action_nb=action.idAction /> <@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 view_type = "thumbnail"> <@columns> <@row> <#list documents_list as document > <@columns sm=6 class='document-row' params='data-document="${document.id} ${document.title}"'>
${document.title}

<@tag>${document.id} <#if document.title?length > 18>${document.title?substring(0,18)}...<#else>${document.title}

<@btnGroup size='sm'> <#list document.actions?sort_by("idAction") as action> <#if action.url?has_content> <#assign aBtnColor> <@setBtnAction action_nb=action.idAction /> <@aButton href='${action.url}id_document=${document.id}&id_action=${action.idAction}' title='${action.description}' buttonIcon='${action.iconUrl}' color=aBtnColor?trim hideTitle=['all'] />
<@paginationAdmin paginator=paginator combo=1 /> <#else> <#if child_spaces_list?size != 0 > <@box> <@boxHeader title='#i18n{document.manage_documents.childSpacesList}' /> <@boxBody> <#if is_files2docs_plugin_active?has_content && is_files2docs_plugin_active>