<!-- $Id: record_unimarc_in_result_display.tpl.html,v 1.1.2.2 2026/02/26 13:23:00 dbellamy Exp $ -->

<article class="noticeNot_{{record.niveau_biblio}}{{record.typdoc}} parentNotCourte notExterne">

	{% block record_picture_source %}
		{% if record.source.icon %}
		<!-- champ icon de la notice dans le connecteur -->
			<aside class="vignetteimgNot">
				{% block record_picture_connecteur %}
					<div class="vignetteDocNot">
						<img src="{{ record.source.icon }}" alt="">
					</div>
				{% endblock %}
			</aside>
		{% else %}
			{% if record.thumbnail_url %}
			<!-- champ url de la vignette -->
				<aside class="vignetteimgNot">
					{% block record_picture_url %}
						<div class="vignetteDocNot">
							<img src="{{ record.thumbnail_url }}" alt="">
						</div>
					{% endblock %}
				</aside>
			{% else %}
				{% if record.get_picture_url %}
				<!-- URL calculee de l image -->
					<aside class="vignetteimgNot">
						{% block record_picture %}
							<div class="vignetteDocNot">
								<img src="{{ record.get_picture_url }}" alt="">
							</div>
						{% endblock %}
					</aside>
				{% endif %}
			{% endif %}
		{% endif %}
	{% endblock %}

	{% block record_content %}
		<section class="notice_corps">
			{% if record.source_label %}
				<p class="notice_tdoc">{{ record.source_label }}</p>
			{% endif %}

			{% block record_title %}
				<h3 class="pmb-title-3">
					{% if record.serie %}
					<!-- Serie -->
						<span>{{ record.serie.name | e }}{% if record.tnvol %}, {{ record.tnvol | e }}{% endif %} - </span>
					{% else %}
						{% if record.tnvol %}
							<span>{{ record.tnvol | e }}. </span>
						{% endif %}
					{% endif %}
					<span>
						{{ record.tit1 | e }}{% if record.tit4 %} : {{ record.tit4 | e }}{% endif %}
					</span>
				</h3>
			{% endblock %}

			{% block record_in %}
			{% endblock %}

			{% block record_infoCompl %}
				<ul class="infoCompl_notCourte">
					<!-- auteurs -->
					{% block record_responsabilites %}
						{% if record.responsabilites.auteurs %}
							<li>
								{% for auteur in record.responsabilites.auteurs %}
									{% if loop.length == 1 %}
										<p class="record_responsabilites">
											{{ auteur.auteur_titre }}{% if auteur.fonction_aff %}, {{ auteur.fonction_aff }}{% endif %}{% if auteur.qualification %} ({{ auteur.qualification }}){% endif %}
										</p>
									{% else %}
											{% if loop.first %}
												<ul class="record_responsabilites">
											{% endif %}
												<li>{{ auteur.auteur_titre }}{% if auteur.fonction_aff %}, {{ auteur.fonction_aff }}{% endif %}{% if auteur.qualification %}, ({{ auteur.qualification }}){% endif %}{% if !loop.last %} ; {% endif %}</li>
											{% if loop.last %}
												</ul>
											{% endif %}
									{% endif %}
								{% endfor %}
							</li>
						{% endif %}
					{% endblock %}

					{% block record_resume_court %}
						<!-- Resume -->
						{% if record.resume %}
							{% if record.resume.0|length; > 250 %}
								<li id="record_resume_court_{{record.id}}" class="record_resume">
									<p>
										<span class="labelNot">{{ msg.n_resume_start }}</span>
										<span class="labelContent">
											{{ record.resume.0 | nl2br | strip_tags | limitstring 250 }}
										</span>
									</p>

								</li>
							{% else %}
								<li id="record_resume_court_{{record.id}}" class="record_resume">
									<p>
										<span class="labelNot">{{ msg.n_resume_start }}</span>
										<span class="labelContent">
											{{ record.resume.0 | nl2br | strip_tags }}
											{% if record.resume.1|length; > 150 %}
												{{ record.resume.1 | nl2br | strip_tags | limitstring 150 }}
											{% endif %}
										</span>
									</p>
								</li>
							{% endif %}
						{% endif %}
					{% endblock %}

					{% block btn_show_detail %}
						<li class="button-lien-container">
							{% if record.resume or
							record.tit2 or
							record.tit3 or
							record.publishers.0 or
							record.collection.titre or
							record.subcollection.titre or
							record.npages or
							record.code or
							record.contenu or
							record.n_gen or
							record.indexint or
							record.categories or
							record.mots_cles or
							record.size or
							record.accomp or
							record.langues.langues or
							record.p_perso or
							record.docnums or
							record.expls_datas %}
							<button id ="btn_show_{{record.id}}"
							type="button" class="pmb-button button-not-externe"
							aria-controls="not_ext_{{record.id}}"
							aria-expanded="false"
							data-resume-id="record_resume_court_{{record.id}}"
							aria-label="{{ msg.ariaShowExt }}"
							>{{ msg.btnShowExt}}
							</button>
							{% endif %}

							{% block record_lien %}
							<!-- Liens -->
								{% if record.lien %}
									<div class="record-lien">
										<a href="{{record.lien}}"
										target="_blank"
										rel="noopener noreferrer"
										title="{{msg.open_link_url_notice}} - {{msg.newtab}}" >
										{{ msg.lien_start | replace ":""" }}</a>
									</div>
									{% endif %}
							{% endblock %}
						</li>
					{% endblock %}

					{% block notice_hidden %}
						{% if record.resume or
							record.tit2 or
							record.tit3 or
							record.publishers.0 or
							record.collection.titre or
							record.subcollection.titre or
							record.npages or
							record.code or
							record.contenu or
							record.n_gen or
							record.indexint or
							record.categories or
							record.mots_cles or
							record.size or
							record.accomp or
							record.langues.langues or
							record.p_perso or
							record.docnums or
							record.expls_datas %}
							<li id ="not_ext_{{record.id}}" class="notice-ext-detail is-hidden">
								<ul>
									{% block record_resume_long %}
										<!-- Resume -->
										{% if record.resume %}
											{% if record.resume.0|length; > 250 %}
												<li class="record_resume">
													<p>
														<span class="labelNot">{{ msg.n_resume_start }}</span>
														<span class="labelContent">
															{{ record.resume.0 | nl2br | strip_tags }}
														</span>
													</p>
												</li>
											{% else %}
												<li class="record_resume">
													<p>
														<span class="labelNot">{{ msg.n_resume_start }}</span>
														<span class="labelContent">
															{{ record.resume.0 | nl2br | strip_tags }}
															{% if record.resume.1|length; > 150 %}
																{{ record.resume.1 | nl2br | strip_tags }}
															{% endif %}
														</span>
													</p>
												</li>
											{% endif %}
										{% endif %}
									{% endblock %}

									{% block record_tit2 %}
										{% if record.tit2 %}
										<!-- Autre titre -->
											<li class="record_tit2">
												<p>
													<span class="labelNot">
														{{ msg.other_title_t2_start | replace ":" "" }} :
													</span>
													<span class="labelContent">
														{{ record.tit2 }}
													</span>
												</p>
											</li>
										{% endif %}
									{% endblock %}

									{% block record_tit3 %}
										{% if record.tit3 %}
										<!-- Titre original -->
											<li class="record_tit3">
												<p>
													<span class="labelNot">
														{{ msg.other_title_t3_start | replace ":" ""  }} :
													</span>
													<span class="labelContent">
														{{ record.tit3 }}
													</span>
												</p>
											</li>
										{% endif %}
									{% endblock %}

									{% block record_publishers_year %}
										{% if record.publishers.0 %}
											<!-- Editeurs -->
											<li class="record-publisher">
												<p>
													{% if !record.publishers.0.name %}
														<span class="labelNot">{{ msg.annee_edition }} :</span>
													{% else %}
														<span class="labelNot">{{ msg.editeur_start }}</span>
													{% endif %}
													<span class="label-content">
														{{ record.publishers.0.name }}
														{% if record.publishers.1.name %}
															;
															<!-- autre editeur -->
															{{ record.publishers.1.name }}
														{% endif %}

														{% block record_year %}
															<!-- Annee -->
															{% if record.year %}
																{% if record.publishers.0.name or record.publishers.1.name %} | {% endif %}														{{ record.year }}
															{% endif %}
														{% endblock %}
													</span>
												</p>
											</li>
										{% endif %}
									{% endblock %}

									{% block record_collection %}
										{% if record.collection.titre %}
										<!-- Collections -->
											<li class="record_collection">
												<p>
													<span class="labelNot">
														{{ msg.coll_start }}
													</span>
													<span class="labelContent">
														{{ record.collection.titre }}{% if record.nocoll %}, {{ record.nocoll }}{% endif %}
													</span>
												</p>
											</li>
										{% endif %}
									{% endblock %}

									{% block record_subcollection %}
										{% if record.subcollection.titre %}
										<!-- Sous-collection -->
											<li class="record_subcollection">
												<p>
													<span class="labelNot">
														{{ msg.subcoll_start }}
													</span>
													<span class="labelContent">
														{{ record.subcollection.titre }}
													</span>
												</p>
											</li>
										{% endif %}
									{% endblock %}

									{% block record_npages %}
										{% if record.npages %}
										<!-- Nombre de pages (importance materielle (nombre de pages, d elements...)) -->
											<li class="record_npages">
												<p>
													<span class="labelNot">
														{{ msg.npages_start }}
													</span>
													<span class="labelContent">
														{{ record.npages }}
													</span>
												</p>
											</li>
										{% endif %}
									{% endblock %}

									{% block record_code %}
										{% if record.code %}
										<!-- ISBN ou ISSN -->
											<li class="record_code">
												<p>
													<span class="labelNot">
														{{ msg.code_start }}
													</span>
													<span class="labelContent">
														{{ record.code }}
													</span>
												</p>
											</li>
										{% endif %}
									{% endblock %}

									{% block record_contenu %}
										{% if record.contenu %}
										<!-- Note de contenu -->
											{% for contenu in record.contenu %}
												{% if loop.first %}
													<li class="record_contenu">
														<p>
															<span class="labelNot">
																{{ msg.n_contenu_start }}
															</span>
															<span class="labelContent">
												{% endif %}
																<span>{{ contenu | nl2br }}</span>
												{% if loop.last %}
															</span>
														</p>
													</li>
												{% endif %}
											{% endfor %}
										{% endif %}
									{% endblock %}

									{% block record_n_gen %}
										{% if record.n_gen %}
										<!-- Note generale -->
											{% for n_gen in record.n_gen %}
												{% if loop.first %}
													<li class="record_n_gen">
														<p>
															<span class="labelNot">
																{{ msg.n_gen_start }}
															</span>
															<span class="labelContent">
													{% endif %}
																<span>{{ n_gen | nl2br }}</span>
													{% if loop.last %}
															</span>
														</p>
													</li>
												{% endif %}
											{% endfor %}
										{% endif %}
									{% endblock %}

									{% block record_indexint %}
										{% if record.indexint %}
										<!-- Indexation decimale -->
											{% for indexint in record.indexint %}
												{% if loop.first %}
													<li class="record_indexint">
														<p>
															<span class="labelNot">
																{{ msg.indexint_start }}
															</span>
															<span class="labelContent">
												{% endif %}
																<span>{{ indexint }}</span>
												{% if loop.last %}
															</span>
														</p>
													</li>
												{% endif %}
											{% endfor %}
										{% endif %}
									{% endblock %}

									{% block record_categories %}
										{% if record.categories %}
										<!-- Categories -->
											{% for categorie in record.categories %}
												{% if loop.first %}
													<li class="record_categories">
														<p>
															<span class="labelNot">
																{{ msg.categories_start }}
															</span>
															<span class="labelContent">
												{% endif %}
																<span>{{ categorie }}</span>
												{% if loop.last %}
															</span>
														</p>
													</li>
												{% endif %}
											{% endfor %}
										{% endif %}
									{% endblock %}

									{% block record_mots_cles %}
										{% if record.mots_cles %}
										<!-- Mots-cles -->
											<li class="record_mots_cles">
												<p>
													<span class="labelNot">
														{{ msg.keywords_start | replace ":" ""}} :
													</span>
													<span class="labelContent">
														{% for mot in record.mots_cles %}
															{% if loop.counter!=1 %}
																{{global.pmb_keyword_sep}}
															{% endif %}																											{{mot}}
														{% endfor %}
													</span>
												</p>
											</li>
										{% endif %}
									{% endblock %}

									{% block record_size %}
										{% if record.size %}
										<!-- Format (champs de collation) -->
											<li class="record_size">
												<p>
													<span class="labelNot">
														{{ msg.size_start }}
													</span>
													<span class="labelContent">
														{{ record.size }}
													</span>
												</p>
											</li>
										{% endif %}
									{% endblock %}

									{% block record_accomp %}
										{% if record.accomp %}
										<!-- Materiel accompagnement -->
											<li class="record_accomp">
												<p>
													<span class="labelNot">
														{{ msg.accomp_start }}
													</span>
													<span class="labelContent">
														{{ record.accomp }}
													</span>
												</p>
											</li>
										{% endif %}
									{% endblock %}

									{% block record_langues %}
										{% if record.langues.langues %}
										<!-- Langues -->
											<li class="record_langues">
												<p>
													<span class="labelNot">
														{{ msg.langues_start }}
													</span>
													<span class="labelContent">
														{% for langue in record.langues.langues %}
															{% if loop.first%}
																{{langue.langue}}
															{% else %}
																; {{langue.langue}}
															{% endif %}
														{% endfor %}
													</span>
												</p>
											</li>
										{% endif %}
									{% endblock %}

									{% block record_p_perso %}
										{% for cp in record.p_perso %}
											<li class="record_p_perso">
												<p>
													<span class="labelNot">
														{{ cp.libelle }} :
													</span>
													<span class="labelContent">
														{{ cp.value }}
													</span>
												</p>
											</li>
										{% endfor %}
									{% endblock %}

									{% block record_docnums %}
										{% if record.docnums %}
											<!-- Documents numeriques -->
											<li class="record_docnums">
												<h4 class='pmb-title-4'>
													{{ msg.entrepot_notice_docnum}}
												</h4>
												<ul class="docnums-ext">
													{% for docnum in record.docnums %}
														{% if docnum.a %}
															<li class="docnum-ext">
																<a href="{{docnum.a}}" target="_blank" rel="noopener noreferrer" title="{{msg.title_link_docNum}} {{ docnum.b }} - {{msg.newtab}}" >{% if docnum.b %}{{ docnum.b }}{% else%}{{docnum.a}}{% endif %}</a>
															</li>
														{% endif%}
													{% endfor %}
												</ul>
											</li>
										{% endif %}
									{% endblock %}

									{% block record_expl %}
										{% if record.expls_datas %}
										<li class="expl-externe">
											<h4 class="pmb-title-4">{{ msg.exemplaries }}</h4>
											<div class="expl-items-externe">
												{% for expl in record.expls_datas %}
													<ul class="expl-item-externe">
														{% if expl.content.f %}
															<li>
																<span class="labelNot">{{ msg.extexpl_codebar }} : </span>
																<span class="labelContent">{{ expl.content.f }}</span>
															</li>
														{% endif %}
														{% if expl.content.k %}
															<li>
															<span class="labelNot">{{ msg.extexpl_cote }} : </span>
															<span class="labelContent">{{ expl.content.k }}</span>
														</li>
														{% endif %}
														{% if expl.content.v %}
														<li>
															<span class="labelNot">{{ msg.extexpl_location }} : </span>
															<span class="labelContent">{{ expl.content.v }}</span>
														</li>
														{% endif %}
														{% if expl.content.x %}
														<li>
															<span class="labelNot">{{ msg.extexpl_section }} : </span>
															<span class="labelContent">{{ expl.content.x }}</span>
														</li>
														{% endif %}
														{% if expl.content.1 %}
														<li>
															<span class="labelNot">{{ msg.extexpl_statut }} : </span>
															<span class="labelContent">{{ expl.content.1 }}</span>
														</li>
														{% endif %}
														{% if expl.content.a %}
														<li>
															<span class="labelNot">{{ msg.extexpl_emprunteur }} : </span>
															<span class="labelContent">{{ expl.content.a }}</span>
														</li>
														{% endif %}
														{% if expl.content.e %}
														<li>
															<span class="labelNot">{{ msg.extexpl_doctype }} : </span>
															<span class="labelContent">{{ expl.content.e }}</span>
														</li>
														{% endif %}
														{% if expl.content.u %}
														<li>
															<span class="labelNot">{{ msg.extexpl_note }} : </span>
															<span class="labelContent">{{ expl.content.u }}</span>
														</li>
														{% endif %}
													</ul>
											{% endfor %}
											</div>

										</li>
										{% endif %}
									{% endblock %}
								</ul>
							</li>
						{% endif %}
					{% endblock %}

				</ul>
			{% endblock %}
		</section>
	{% endblock %}
<script>
(function () {
    const toggleButtons = document.querySelectorAll('.button-not-externe');

    toggleButtons.forEach(toggleButton => {
        if (toggleButton.dataset.bound === "true") return;
        toggleButton.dataset.bound = "true";

        const labelShowText = "Voir plus";
        const labelHideText = "Voir moins";
        const ariaLabelShow = "Afficher plus d'informations de la notice";
        const ariaLabelHide = "Masquer les informations de la notice";

        toggleButton.textContent = labelShowText;
        toggleButton.setAttribute('aria-expanded', "false");
        toggleButton.setAttribute('aria-label', ariaLabelShow);

        toggleButton.addEventListener('click', () => {
            const detailSectionId = toggleButton.getAttribute('aria-controls');
            const detailSection = document.getElementById(detailSectionId);

            const resumeId = toggleButton.dataset.resumeId;
            const resumeShort = resumeId ? document.getElementById(resumeId) : null;

            if (!detailSection) return;

            const isExpanded = toggleButton.getAttribute('aria-expanded') === "true";

            if (isExpanded) {
                detailSection.classList.add("is-hidden");
                if (resumeShort) resumeShort.classList.remove("is-hidden");

                toggleButton.textContent = labelShowText;
                toggleButton.setAttribute("aria-expanded", "false");
                toggleButton.setAttribute("aria-label", ariaLabelShow);
            } else {
                detailSection.classList.remove("is-hidden");
                if (resumeShort) resumeShort.classList.add("is-hidden");

                toggleButton.textContent = labelHideText;
                toggleButton.setAttribute("aria-expanded", "true");
                toggleButton.setAttribute("aria-label", ariaLabelHide);
            }
        });
    });
})();
</script>
</article>
