Add a button to export list questions
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
8f5e2f380f
commit
c7059671cb
@ -29,6 +29,7 @@
|
|||||||
})
|
})
|
||||||
let edit = false;
|
let edit = false;
|
||||||
let exportview = false;
|
let exportview = false;
|
||||||
|
let exportview_list = false;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#await surveyP then survey}
|
{#await surveyP then survey}
|
||||||
@ -43,9 +44,18 @@
|
|||||||
class="btn ms-1 float-end"
|
class="btn ms-1 float-end"
|
||||||
class:btn-dark={exportview}
|
class:btn-dark={exportview}
|
||||||
class:btn-outline-dark={!exportview}
|
class:btn-outline-dark={!exportview}
|
||||||
title="Éditer"
|
title="Afficher les graphiques"
|
||||||
on:click={() => { exportview = !exportview; } }
|
on:click={() => { exportview = !exportview; } }
|
||||||
><i class="bi bi-activity"></i></button>
|
><i class="bi bi-activity"></i></button>
|
||||||
|
{#if exportview}
|
||||||
|
<button
|
||||||
|
class="btn ms-1 float-end"
|
||||||
|
class:btn-dark={exportview_list}
|
||||||
|
class:btn-outline-dark={!exportview_list}
|
||||||
|
title="Traiter les listes comme des textes : ne pas chercher à les regrouper sous un diagramme"
|
||||||
|
on:click={() => { exportview_list = !exportview_list; } }
|
||||||
|
><i class="bi bi-view-list"></i></button>
|
||||||
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
<div class="d-flex align-items-center">
|
<div class="d-flex align-items-center">
|
||||||
<h2>
|
<h2>
|
||||||
@ -114,7 +124,7 @@
|
|||||||
{:else}
|
{:else}
|
||||||
{#each questions as question (question.id)}
|
{#each questions as question (question.id)}
|
||||||
<h3>{question.title}</h3>
|
<h3>{question.title}</h3>
|
||||||
{#if question.kind == "text"}
|
{#if question.kind == "text" || (exportview_list && question.kind.indexOf("list") == 0)}
|
||||||
{#await question.getResponses() then responses}
|
{#await question.getResponses() then responses}
|
||||||
{#each responses as response (response.id)}
|
{#each responses as response (response.id)}
|
||||||
<div class="card mb-2">
|
<div class="card mb-2">
|
||||||
|
Reference in New Issue
Block a user