Commit 1a0a02b6 authored by Agneska Slusarczyk's avatar Agneska Slusarczyk
Browse files

Series View: move the studylist tab, add yearsRange to left bar, improve...

Series View: move the studylist tab, add yearsRange to left bar, improve title, add english version to serie d'etudes. yearsRange undefined problem
parent 155aec89
......@@ -44,6 +44,11 @@
$: variables =
codeBook === undefined ? [] : [...iterCodeBookVariables(codeBook)]
$: yearsRange =
series.termsLabelByRelation?.yearsRange === undefined
? []
: series.termsLabelByRelation?.yearsRange
$: methodology = {
"Methode de collecte (collMode)": extractCodeBookText(
codeBook?.stdyDscr.method?.dataColl.collMode,
......@@ -82,16 +87,20 @@
class="mb-1 py-6 px-4 overflow-hidden h-40 w-1/4 bg-gray-100 rounded shadow"
>
<h1 class="text-2xl font-bold text-gray-500">
{_("Series")}{_("colon")}
{_("Project")}{_("colon")}
</h1>
<p class="text-sm text-gray-500 mt-2">
({_(".....")})
</p>
</div>
<!-- grid: top right element with series title-->
<div class="py-6 px-4 overflow-hidden h-40 w-3/4 text-gray-600 bg-gray-50">
<h1 class="text-2xl mb-2">{series.title}</h1>
<div
class="py-6 pl-12 pr-4 overflow-hidden h-40 w-3/4 text-gray-600 bg-gray-50"
>
<h1 class="text-2xl mb-2">{series.title.replace('"', "")}</h1>
{#if codeBook != null}
<p class="text-sm text-red-400 mt-2 pl-2">
<p class="text-sm text-red-400 mt-2 pl-0">
Codebook {_("Version")}{_("colon")}
{codeBook["@version"]}
</p>
......@@ -104,7 +113,7 @@
>
<hr class="sep h-8" />
<ul class=" text-xs text-gray-500">
{#if topic != null}
{#if subTitle != null}
<li>
{_("Subtitle")}{_("colon")}
{subTitle}
......@@ -118,6 +127,13 @@
</li>
{/if}
<hr class="sep h-8" />
{#if yearsRange != null}
<li>
{_("Couverture temporelle")}{_("colon")}
{yearsRange[0] + "-" + yearsRange[1]}
</li>
{/if}
<hr class="sep h-8" />
{#if method != null}
<li>
{_("Method")}{_("colon")}
......@@ -169,12 +185,6 @@
<div
class="flex flex-row w-full h-10 text-gray-700 items-center content-center border-red-700"
>
<span
class="portal px-3 text-gray-500 {tab === 'studies'
? '~neutral active'
: ''}"
on:click={() => (tab = "studies")}>{_("Studies")}</span
>
<span
class="portal px-3 text-gray-500 {tab === 'description'
? '~neutral active'
......@@ -188,6 +198,12 @@
: ''}"
on:click={() => (tab = "method")}>{_("Method")}</span
>
<span
class="portal px-3 text-gray-500 {tab === 'studies'
? '~neutral active'
: ''}"
on:click={() => (tab = "studies")}>{_("Studies")}</span
>
<span
class="portal px-3 text-gray-500 {tab === 'variables'
? '~neutral active'
......@@ -200,20 +216,8 @@
<!-- {#if codeBook != null} -->
<hr class="sep h-8" />
<!-- ONGLET STUDIES -->
{#if tab === "studies"}
<div class="flex flex-col w-4/5 overflow-hidden ml-6 mr-6 my-4">
{#if series.studies != null}
<StudiesList
count={series.studies.length}
studies={series.studies}
/>
{/if}
</div>
<hr class="sep h-20" />
<!-- ONGLET DESCRIPTION -->
{:else if tab === "description"}
<!-- ONGLET DESCRIPTION -->
{#if tab === "description"}
<div class="flex flex-col overflow-hidden ml-0 mr-12 my-4 px-2">
<h4 class="font-bold text-base">{_("Abstract")}{_("colon")}</h4>
<p class="text-sm whitespace-pre-line">
......@@ -259,19 +263,6 @@
<!-- ONGLET METHODOLOGIE -->
{:else if tab === "method"}
<div class="flex flex-col overflow-hidden ml-2 mr-8 my-4 px-2">
<!-- LES 2 premiers -->
<!--
<p class="font-bold text-base">
{_("Methode de collecte")}{_("colon")}
</p>
<p class="text-sm whitespace-pre-line">
collMode: {extractCodeBookText(
codeBook.stdyDscr.method?.dataColl.collMode,
)}
resInstru: {extractCodeBookText(
codeBook.stdyDscr.method?.dataColl.resInstru,
)}
</p> -->
{#each Object.entries(methodology) as [key, value]}
<p class="font-bold text-base mt-4">
{_(key)}{_("colon")}
......@@ -306,9 +297,21 @@
<hr class="sep h-20" />
</div>
<!-- ONGLET STUDIES -->
{:else if tab === "studies"}
<div class="flex flex-col overflow-hidden ml-6 mr-6 my-4">
{#if series.studies != null}
<StudiesList
count={series.studies.length}
studies={series.studies}
/>
{/if}
<hr class="sep h-20" />
</div>
<!-- ONGLET VARIABLES -->
{:else if tab === "variables"}
<div class="flex flex-col w-4/5 overflow-hidden ml-6 mr-6 my-4">
<div class="flex flex-col overflow-hidden ml-12 mr-4 my-4">
{#if variables.length > 0}
{#each variables as variable}
<Drawer>
......
......@@ -50,6 +50,7 @@ Privacy_policy = Privacy policy
Producer = Producer
producer = producer
Producers = Producers
Project = Project
Resources = Resources
Search = Search
Serie = Serie
......
......@@ -50,6 +50,7 @@ Privacy_policy = Politique de confidentialité
Producer = Producteur
producer = producteur
Producers = Producteurs
Project = Série d'études
Resources = Ressources
Search = Rechercher
Serie = Série
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment