#--
-- Build the HTML code to display the actions
-- @param resource_actions the actions to display
-- @return the HTML code of the actions
-->
<#macro display_actions resource_actions >
<#if resource_actions.workflow_action_list?exists>
<@h level=2>#i18n{forms.multiviewForms.view_record_history.actions}@h>
<#if resource_actions.workflow_action_list?has_content>
<@div class="d-grid gap-2 position-relative mt-3">
<#list resource_actions.workflow_action_list as action>
<@tform action='jsp/admin/plugins/forms/ManageDirectoryFormResponseDetails.jsp' method='post' class='d-grid'>
<@input type='hidden' name='action' value='doProcessAction' />
<@input type='hidden' name='id_action' value='${action.id}' />
<@input type='hidden' name='id_form_response' value='${form_response.id}' />
<@input type='hidden' name='_csrftoken' value='${(link_tokens.doProcessAction)!}' />
<@button type='submit' class='btn-block is-fullwidth my-1'>
<@img class='img-circle img-action' url='image?resource_type=workflow_icon_img&id=${action.icon.id}' title=action.name alt=action.name /> ${action.name}
@button>
@tform>
#list>
@div>
<#else>
<@alert color='warning'>
<@icon style='exclamation-triangle' /> #i18n{forms.multiviewForms.view_record_history.history_empty}
@alert>
#if>
#if>
#macro>
<@pageContainer params='data-feature="#i18n{forms.adminFeature.manageForms.name}"' class='forms-response' >
<@pageColumn>
<@pageHeader title='#i18n{forms.multiviewForms.responseDetails.title} ${form_response.id!} ${form.title!}' />
<@formBreadCrumb>
<@breadcrumbItem><@link href='jsp/admin/plugins/forms/MultiviewForms.jsp?current_selected_panel=forms&id_form=${form.id}' label='#i18n{forms.multiviewForms.boxTitle} ${form.title}' />@breadcrumbItem>
<@breadcrumbItem>#i18n{forms.multiviewForms.responseDetails.title} ${form_response.id!}@breadcrumbItem>
@formBreadCrumb>
<@div id='form-response-details'>
<@messages errors=errors />
<@div id='toc'>
<@box id='toc-box'>
<@boxHeader id='toc-box-header' title=form.title boxTools=true>
<@icon style='arrow-right' id='toc-side-toggle' title='#i18n{forms.multiviewForms.responseDetails.hide.steps}' params=' role="button"' />
<@icon style='layout-sidebar-right-expand' id='toc-compress-toggle' title='#i18n{forms.multiviewForms.responseDetails.hide.steps}' params=' role="button"' />
@boxHeader>
<@boxBody>
<@div id='step-toc'>
<@nav type='pills' class='step-toc-list'>@nav>
@div>
@boxBody>
@box>
@div>
<@box id='form-detail-header'>
<@boxBody>
<@icon style='layout-sidebar-left-expand' id='toc-expand-toggle' title='#i18n{forms.multiviewForms.responseDetails.show.steps}' params=' role="button"' />
<@row>
<@columns sm=8 id='steps-content' params='data-bs-spy="scroll" data-bs-target="#step-toc-list" data-bs-smooth-scroll="true"'>
<#if list_multiview_step_display?has_content>
<#list list_multiview_step_display as multiview_step_display>
${multiview_step_display}
#list>
#if>
<#if comment??>
<@box color='primary' class='step-group' id='step-comment' params=' tabindex=0 data-title="#i18n{module.forms.extend.response.comment.title}"'>
<@boxHeader title='#i18n{module.forms.extend.response.comment.title}' boxTools=true>
<@button color='link' buttonIcon='minus-square' params='data-toggle="collapse" data-target="#box-step-content-comment" aria-expanded="false" aria-controls="box-step-content-comment"' />
@boxHeader>
<@boxBody id='box-step-content-comment' class='collapse show'>
<@fieldSet class='fieldset-group' legend='#i18n{module.forms.extend.response.comment.subtitle}' legendClass='sr-only' fieldsetId='group-comment' fieldsetParams=' tabindex=0'>
${comment!}
@fieldSet>
@boxBody>
@box>
#if>
<#if rating??>
<@box color='primary' class='step-group' id='step-rating' params=' tabindex=0 data-title="#i18n{module.forms.extend.response.rating.title}"'>
<@boxHeader title='#i18n{module.forms.extend.response.rating.title}' boxTools=true>
<@button color='link' buttonIcon='minus-square' params='data-toggle="collapse" data-target="#box-step-content-rating" aria-expanded="false" aria-controls="box-step-content-rating"' />
@boxHeader>
<@boxBody id='box-step-content-rating' class='collapse show'>
<@fieldSet class='fieldset-group' legend='#i18n{module.forms.extend.response.rating.subtitle}' legendClass='sr-only' fieldsetId='group-rating' fieldsetParams=' tabindex=0'>
${rating!}
@fieldSet>
@boxBody>
@box>
#if>
<#if follow??>
<@box color='primary' class='step-group' id='step-follow' params=' tabindex=0 data-title="#i18n{module.forms.extend.response.follow.title}"'>
<@boxHeader title='#i18n{module.forms.extend.response.follow.title}' boxTools=true>
<@button color='link' buttonIcon='minus-square' params='data-toggle="collapse" data-target="#box-step-content-follow" aria-expanded="false" aria-controls="box-step-content-follow"' />
@boxHeader>
<@boxBody id='box-step-content-follow' class='collapse show'>
<@fieldSet class='fieldset-group' legend='#i18n{module.forms.extend.response.follow.subtitle}' legendClass='sr-only' fieldsetId='group-follow' fieldsetParams=' tabindex=0'>
${follow!}
@fieldSet>
@boxBody>
@box>
#if>
<#if feedback??>
<@box color='primary' class='step-group' id='step-feedback' params=' tabindex=0 data-title="#i18n{module.forms.extend.response.feedback.title}"'>
<@boxHeader title='#i18n{module.forms.extend.response.feedback.title}' boxTools=true>
<@button color='link' buttonIcon='minus-square' params='data-toggle="collapse" data-target="#box-step-content-feedback" aria-expanded="false" aria-controls="box-step-content-feedback"' />
@boxHeader>
<@boxBody id='box-step-content-feedback' class='collapse show'>
<@fieldSet class='fieldset-group' legend='#i18n{module.forms.extend.response.feedback.subtitle}' legendClass='sr-only' fieldsetId='group-feedback' fieldsetParams=' tabindex=0'>
${feedback!}
@fieldSet>
@boxBody>
@box>
#if>
@columns>
<@columns sm=4>
<@box id='response-sidebar'>
<@boxHeader id='info-box-header' title='' class='boxTool' boxTools=true>
<@tform method='get' id='form-response-detail-header' type='inline' action='jsp/admin/plugins/forms/MultiviewForms.jsp'>
<@input type='hidden' name='page' value='form' />
<@input type='hidden' name='session' value='session' />
<#assign editModeValue = "ReadOnly">
<#assign viewNumberAttValue = "1">
<#if list_filter_values?has_content>
<#list list_filter_values as filter_values>
<@input type='hidden' name='${filter_values.code}' value='${filter_values.name}' />
#list>
#if>
<@button type='submit' buttonIcon='list' title='#i18n{portal.util.labelBack}' size='' />
@tform>
@boxHeader>
<@boxBody>
<@h level=2>#i18n{forms.multiviewForms.view_record_history.information}@h>
<@p><@icon style='calendar' /> #i18n{forms.multiviewForms.responseDetails.response.dateCreation} : ${form_response.creation}@p>
<@p><@icon style='calendar' /> #i18n{forms.multiviewForms.responseDetails.response.dateModification} : ${form_response.update}@p>
<#if admin_depositary??>
<@p>#i18n{forms.multiviewForms.admin.depositary.label} : ${admin_depositary.firstName!} ${admin_depositary.lastName} - ${admin_depositary.email}@p>
#if>
<#if resource_actions?exists && resource_actions.workflow_state?exists><@p><@icon style='info-circle' /> #i18n{forms.multiviewForms.responseDetails.response.state} : ${resource_actions.workflow_state.name} @p>#if>
<@p><@icon style='info-circle' /><#if form_response.published> #i18n{forms.multiviewForms.responseDetails.response.status} : ${form_response.update!} <#else>#i18n{forms.multiviewForms.responseDetails.response.status} : #i18n{portal.site.admin_page.labelNodeStatus1}#if>@p>
<#if form_response.published>
<@p><@icon style='external-link' title='#i18n{portal.portal_footer.newWindow}' /> <@link href='jsp/site/Portal.jsp?page=formsResponse&view=formResponseView&id_response=${form_response.id}' target='_blank'>#i18n{forms.permission.label.viewResult}@link>@p>
#if>
<@display_actions resource_actions! />
${resource_history!}
@boxBody>
@box>
@columns>
@row>
@boxBody>
@box>
@div>
@pageColumn>
@pageContainer>
<@scrollTopBtn />