From: julia <> Date: Mon, 14 Apr 2008 16:36:08 +0000 (+0000) Subject: Hide empty fields on collection and item detail display X-Git-Tag: 1.1~840 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=2cbb530bcda400c50d1e06969c131312fade1e34;p=telemeta.git Hide empty fields on collection and item detail display --- diff --git a/telemeta/htdocs/css/telemeta.css b/telemeta/htdocs/css/telemeta.css index 3d46d7ba..d4f59ed5 100644 --- a/telemeta/htdocs/css/telemeta.css +++ b/telemeta/htdocs/css/telemeta.css @@ -358,9 +358,6 @@ dl { position: relative; margin: .5em 0; } -/* ie5 mac \*/ -dt { clear: both; } -/* end hack */ dl dt, dl dd { position: relative; margin: 0; @@ -370,22 +367,37 @@ dl dt, dl dd { line-height: 1.4em; min-height: 1.4em; } -dl.listing dt { - clear: both; +dl dd { border: 1px solid transparent; +} +dl dt { + clear: both; float: left; +} +/* ie5 mac \*/ +dt { clear: both;} +/* end hack */ + +dl.listing dt { width: 18em; background-color: #f9f9f9; - border: 1px solid #eee; - border-right: 3px solid #ddd; + border: .1em solid #eee; + border-right: .3em solid #ddd; padding-left: .3em; margin-right: .8em; color: #444; } +dl.listing dt.group { + float: none; + margin-top: .9em; + background-color: #DDDDDD; + border-color: #ccc; + border-right: .1em solid #ccc; + width: 18.2em; +} dl.listing dd { margin-left: 19.4em; font-weight: bold; - border: 1px solid transparent; } /* dublin core display */ @@ -397,15 +409,15 @@ h4.dublincore { } dl.dublincore dt { margin-right: .8em; - width: 28em !important; + width: 23em !important; font-style: italic; } dl.dublincore dd { - width: 50em; + margin-left: 23.4em; font-weight: bold; } dl.dublincore dt span { - width: 18em; + width: 13em; display: block; float: left; font-style: normal; @@ -419,6 +431,7 @@ dl.dublincore dt span { dl.dublincore .caption { background-color: #B8B7C1; margin: .5em 0; + margin-top: 0; border-bottom: 1px dotted #666; padding-top: .4em; padding-bottom: .4em; @@ -434,8 +447,9 @@ dl.dublincore dt.caption span { color: #fff; } dl.dublincore dd.caption { - padding-bottom: .4em; + padding-top: .3em; padding-left: .4em; + margin-left: 23.4em; } /* infos item/collection */ @@ -443,7 +457,8 @@ dl.dublincore dd.caption { margin-bottom: 15px; } .extraInfos div { - padding: 0 5px; + padding: 0; + margin-bottom: 5px; } .extraInfos .nett { position: relative; diff --git a/telemeta/htdocs/css/telemeta_ie.css b/telemeta/htdocs/css/telemeta_ie.css index 1f291c3e..2881ac68 100644 --- a/telemeta/htdocs/css/telemeta_ie.css +++ b/telemeta/htdocs/css/telemeta_ie.css @@ -4,5 +4,10 @@ dl.listing { } dl.listing dd { margin-top: .2em; +} +dl dd { border-color: #fff; +} +dl.dublincore dd.caption { + margin-top: -.1em; } \ No newline at end of file diff --git a/telemeta/htdocs/js/application.js b/telemeta/htdocs/js/application.js index 255494fa..8ab350f2 100755 --- a/telemeta/htdocs/js/application.js +++ b/telemeta/htdocs/js/application.js @@ -1,17 +1,15 @@ -function ployBlocks() { - var blocks = $$('.extraInfos div'); - for (i = 0; i - - -{% endblock %} - -{% if object %} - -{% block submenu %} -

Collection: {{ object.title }}

-
Dublin Core
-{% endblock %} - -{% block content %} - {% if object.has_mediafile %} -
-
-

Listen to this collection - (M3U, - XSPF)

- {% if 0 %} {# Use 1/0 for alternate player #} - - - - - {% else %} - -

- Get Flash to see this player. -

- - {% endif %} -
-
- {% endif %} -
-
- {% if object.items.count %}{{ object.items.count }} {% ifequal object.items.count 1 %}item{% else %}items{% endifequal %}{% else %}No item{% endif %} -
-
-
-
Auteur / Cédant
{{ object.creator }}
-
Date
{% if object.is_published %}{{ object.date_published }}{% else %}{{ object.annee_enr }}{% endif %}
-
Titre
{{ object.title }}
- {% if object.native_title %}
Traduction du titre
{{ object.native_title }}
{% endif %} -
Durée
{{ object.duree_approx }}
- {% if object.is_published %} -
Éditeur
{{ object.publisher }}
-
Référence
{{ object.publisher_reference }}
- {% endif %} -
-
-
-
-

Données ethnographiques

-
-
-
État / Nation
{{object.get_countries|join:", "}}
-
Ethnie / Groupe social
{{ object.get_ethnic_groups|join:", " }}
-
Contexte de l’enregistrement
{{ object.terrain_ou_autre }}
-
-
-
-
- {% if object.is_published %} -
-

Détails du document édité

-
-
-
Réédition
{{ object.publishing_status }}
-
Auteur Notice
{{ object.booklet_writer }}
-
Notice
{{ object.booklet_description }}
-
-
-
-
- {% endif %} -
-

Identification du document

-
-
-
Cote
{{ object.id }}
-
Format de l'original
{{ object.physical_format }}
-
-
-
-
-
-

Informations documentaires

-
-
-
a informer
{{ object.a_informer }}
-
acquisition mode
{{ object.acquisition_mode }}
-
champ36
{{ object.champ36 }}
-
collector
{{ object.collector }}
-
comment
{{ object.comment }}
- -
deposant cnrs
{{ object.deposant_cnrs }}
-
fiches
{{ object.fiches }}
-
is full copy
{{ object.is_full_copy }}
-
is original
{{ object.is_original }}
-
numerisation
{{ object.numerisation }}
-
physical items num
{{ object.physical_items_num }}
-
publisher collection
{{ object.publisher_collection }}
-
publisher serial id
{{ object.publisher_serial_id }}
-
record author
{{ object.record_author }}
-
record writer
{{ object.record_writer }}
-
ref biblio
{{ object.ref_biblio }}
-
rights
{{ object.rights }}
-
travail
{{ object.travail }}
-
tri dibm
{{ object.tri_dibm }}
-
-
-
-
-

Items

- {% with object.ordered_items as items %} - {% include "inc/mediaitem_list.html" %} - {% endwith %} -
- - -{% endblock %} -{% else %} -

No such collection

-{% endif %} - +{% extends "base.html" %} +{% load telemeta_utils %} + +{% block extra_javascript %} + + + +{% endblock %} + +{% if object %} + +{% block submenu %} +

Collection: {{ object.title }}

+
Dublin Core
+{% endblock %} + +{% block content %} + {% if object.has_mediafile %} +
+
+

Listen to this collection + (M3U, + XSPF)

+ {% if 0 %} {# Use 1/0 for alternate player #} + + + + + {% else %} + +

+ Get Flash to see this player. +

+ + {% endif %} +
+
+ {% endif %} +
+
+ {% if object.items.count %}{{ object.items.count }} {% ifequal object.items.count 1 %}item{% else %}items{% endifequal %}{% else %}No item{% endif %} +
+
+
+ {% if object.creator %}
Auteur / Cédant
{{ object.creator }}
{% endif %} + + {% if object.is_published %} + {% if object.date_published %}
Date
{{ object.date_published }}
{% endif %} + {% else %} + {% if object.annee_enr %}
Date
{{ object.annee_enr }}
{% endif %} + {% endif %} + + {% if object.title %}
Titre
{{ object.title }}
{% endif %} + {% if object.native_title %}
Traduction du titre
{{ object.native_title }}
{% endif %} + {% if object.duree_approx %}
Durée
{{ object.duree_approx }}
{% endif %} + + {% if object.is_published %} + {% if object.publisher %}
Éditeur
{{ object.publisher }}
{% endif %} + {% if object.publisher_reference %}
Référence
{{ object.publisher_reference }}
{% endif %} + {% endif %} + +
+
+
+
+

Données ethnographiques

+
+
+ + {% if object.get_countries %} +
État / Nation
{{object.get_countries|join:", "}}
+ {% endif %} + + {% if object.get_ethnic_groups %} +
Ethnie / Groupe social
{{ object.get_ethnic_groups|join:", " }}
+ {% endif %} + + {% if object.terrain_ou_autre %}
Contexte de l’enregistrement
{{ object.terrain_ou_autre }}
{% endif %} + +
+
+
+
+ {% if object.is_published %} +
+

Détails du document édité

+
+
+ {% if object.publishing_status %}
Réédition
{{ object.publishing_status }}
{% endif %} + {% if object.booklet_writer %}
Auteur Notice
{{ object.booklet_writer }}
{% endif %} + {% if object.booklet_description %}
Notice
{{ object.booklet_description }}
{% endif %} +
+
+
+
+ {% endif %} +
+

Identification du document

+
+
+ {% if object.id %}
Cote
{{ object.id }}
{% endif %} + {% if object.physical_format %}
Format de l'original
{{ object.physical_format }}
{% endif %} +
+
+
+
+
+

Informations documentaires

+
+
+ {% if object.a_informer %}
a informer
{{ object.a_informer }}
{% endif %} + {% if object.acquisition_mode %}
acquisition mode
{{ object.acquisition_mode }}
{% endif %} + {% if object.champ36 %}
champ36
{{ object.champ36 }}
{% endif %} + {% if object.collector %}
collector
{{ object.collector }}
{% endif %} + {% if object.comment %}
comment
{{ object.comment }}
{% endif %} + + {% if object.deposant_cnrs %}
deposant cnrs
{{ object.deposant_cnrs }}
{% endif %} + {% if object.fiches %}
fiches
{{ object.fiches }}
{% endif %} + {% if object.is_full_copy %}
is full copy
{{ object.is_full_copy }}
{% endif %} + {% if object.is_original %}
is original
{{ object.is_original }}
{% endif %} + {% if object.numerisation %}
numerisation
{{ object.numerisation }}
{% endif %} + {% if object.physical_items_num %}
physical items num
{{ object.physical_items_num }}
{% endif %} + {% if object.publisher_collection %}
publisher collection
{{ object.publisher_collection }}
{% endif %} + {% if object.publisher_serial_id %}
publisher serial id
{{ object.publisher_serial_id }}
{% endif %} + {% if object.record_author %}
record author
{{ object.record_author }}
{% endif %} + {% if object.record_writer %}
record writer
{{ object.record_writer }}
{% endif %} + {% if object.ref_biblio %}
ref biblio
{{ object.ref_biblio }}
{% endif %} + {% if object.rights %}
rights
{{ object.rights }}
{% endif %} + {% if object.travail %}
travail
{{ object.travail }}
{% endif %} + {% if object.tri_dibm %}
tri dibm
{{ object.tri_dibm }}
{% endif %} +
+
+
+
+

Items

+ {% with object.ordered_items as items %} + {% include "inc/mediaitem_list.html" %} + {% endwith %} +
+ + +{% endblock %} +{% else %} +

No such collection

+{% endif %} + diff --git a/telemeta/templates/mediaitem_detail.html b/telemeta/templates/mediaitem_detail.html index 7f17733a..a9c8a181 100644 --- a/telemeta/templates/mediaitem_detail.html +++ b/telemeta/templates/mediaitem_detail.html @@ -58,14 +58,14 @@
-
Auteur
{{ item.auteur }}
-
Année d'enregistrement
{{ item.annee_enr }}
-
Date d'enregistrement
{{ item.dates_enregistr }}
-
Titre
{{ item.title }}
-
Traduction du titre
{{ item.transcrip_trad }}
+ {% if item.auteur %}
Auteur
{{ item.auteur }}
{% endif %} + {% if item.annee_enr %}
Année d'enregistrement
{{ item.annee_enr }}
{% endif %} + {% if item.dates_enregistr %}
Date d'enregistrement
{{ item.dates_enregistr }}
{% endif %} + {% if item.title %}
Titre
{{ item.title }}
{% endif %} + {% if item.transcrip_trad %}
Traduction du titre
{{ item.transcrip_trad }}
{% endif %}
Collection
{{ item.collection.title }}
-
Durée
{{ item.duree }}
- {% if item.collection.ispublished %} + {% if item.duree %}
Durée
{{ item.duree }}
{% endif %} + {% if item.collection.ispublished and item.Ref %}
Ref
{{ item.Ref }}
{% endif %}
@@ -75,24 +75,26 @@

Informations géographiques et ethnographiques

-
Continent
{{ item.continent }}
-
État / Nation
{{ item.etat }}
-
Région / Village
{{ item.region_village }}
-
Ethnie/ Groupe social
{{ item.ethnie_grsocial }}
-
Aire culturelle
{{ item.aire_geo_cult }}
+ {% if item.continent %}
Continent
{{ item.continent }}
{% endif %} + {% if item.etat %}
État / Nation
{{ item.etat }}
{% endif %} + {% if item.region_village %}
Région / Village
{{ item.region_village }}
{% endif %} + {% if item.ethnie_grsocial %}
Ethnie/ Groupe social
{{ item.ethnie_grsocial }}
{% endif %} + {% if item.aire_geo_cult %}
Aire culturelle
{{ item.aire_geo_cult }}
{% endif %} + {% if item.fonction_usage and item.comm_fonctusage %}
Contexte ethnographique
-
Mots clés
{{ item.fonction_usage }}
-
Commentaires
{{ item.comm_fonctusage }}
+ {% if item.fonction_usage %}
Mots clés
{{ item.fonction_usage }}
{% endif %} + {% if item.comm_fonctusage %}
Commentaires
{{ item.comm_fonctusage }}
{% endif %} + {% endif %}

Formation musicale

-
+
-
Forme / genre vernaculaire
{{ item.form_genr_style }}
-
Forme / genre générique
{{ item.formstyl_generi }}
+ {% if item.form_genr_style %}
Forme / genre vernaculaire
{{ item.form_genr_style }}
{% endif %} + {% if item.formstyl_generi %}
Forme / genre générique
{{ item.formstyl_generi }}
{% endif %}
@@ -100,32 +102,32 @@

Identification du document

-
+
-
Format
{{ item.format }}
-
Cote item
{{ item.id }}
-
N° de l'item
{{ item.face_plage }}
+ {% if item.format %}
Format
{{ item.format }}
{% endif %} + {% if item.id %}
Cote item
{{ item.id }}
{% endif %} + {% if item.face_plage %}
N° de l'item
{{ item.face_plage }}
{% endif %}

Informations documentaires

-
+
-
choixcollecteur
{{ item.choixcollecteur }}
-
comm fonctusage
{{ item.comm_fonctusage }}
-
Copie de
{{ item.copie_de }}
-
Enregistré par
{{ item.enregistre_par }}
-
File
{{ item.file }}
-
get duration
{{ item.get_duration }}
-
moda execut
{{ item.moda_execut }}
-
nroband nropiec
{{ item.nroband_nropiec }}
-
Remarques
{{ item.remarques }}
-
Repère bande
{{ item.repere_bande }}
-
Struct modale
{{ item.struct_modale }}
-
Struct rythm
{{ item.struct_rythm }}
-
Titre support
{{ item.titre_support }}
+ {% if item.choixcollecteur %}
choixcollecteur
{{ item.choixcollecteur }}
{% endif %} + {% if item.comm_fonctusage %}
comm fonctusage
{{ item.comm_fonctusage }}
{% endif %} + {% if item.copie_de %}
Copie de
{{ item.copie_de }}
{% endif %} + {% if item.enregistre_par %}
Enregistré par
{{ item.enregistre_par }}
{% endif %} + {% if item.file %}
File
{{ item.file }}
{% endif %} + {% if item.get_duration %}
get duration
{{ item.get_duration }}
{% endif %} + {% if item.moda_execut %}
moda execut
{{ item.moda_execut }}
{% endif %} + {% if item.nroband_nropiec %}
nroband nropiec
{{ item.nroband_nropiec }}
{% endif %} + {% if item.remarques %}
Remarques
{{ item.remarques }}
{% endif %} + {% if item.repere_bande %}
Repère bande
{{ item.repere_bande }}
{% endif %} + {% if item.struct_modale %}
Struct modale
{{ item.struct_modale }}
{% endif %} + {% if item.struct_rythm %}
Struct rythm
{{ item.struct_rythm }}
{% endif %} + {% if item.titre_support %}
Titre support
{{ item.titre_support }}
{% endif %}
diff --git a/telemeta/templates/mediaitem_detail_dc.html b/telemeta/templates/mediaitem_detail_dc.html index fc16c79c..ae0226a6 100644 --- a/telemeta/templates/mediaitem_detail_dc.html +++ b/telemeta/templates/mediaitem_detail_dc.html @@ -1,25 +1,27 @@ -{% extends "base.html" %} -{% load telemeta_utils %} - -{% if item %} -{% block submenu %} -

Item: {{ item.title }}

- -{% endblock %} - -{% block content %} -

Dublin Core Expression

-
-
ElementRefinement
Value
- {% for element in item.to_dublincore.elements %} - {% if element.value %} -
{{ element.name }}{{ element.refinement|default:" " }}
{% ifequal element.field "collection" %}{{ element.value }}{% else %}{{ element.value }}{% endifequal %}
- {% endif %} - {% endfor %} -
-{% endblock %} -{% else %} -

No such item

-{% endif %} - - +{% extends "base.html" %} +{% load telemeta_utils %} + +{% if item %} +{% block submenu %} +

Item: {{ item.title }}

+ +{% endblock %} + +{% block content %} +
+

Dublin Core Expression

+
+
ElementRefinement
Value
+ {% for element in item.to_dublincore.elements %} + {% if element.value %} +
{{ element.name }}{{ element.refinement|default:" " }}
{% ifequal element.field "collection" %}{{ element.value }}{% else %}{{ element.value }}{% endifequal %}
+ {% endif %} + {% endfor %} +
+
+{% endblock %} +{% else %} +

No such item

+{% endif %} + +