Update tooltips display

This commit is contained in:
Romain Neutron
2012-05-23 13:12:40 +02:00
parent 266b400726
commit 8ad282cd1e
14 changed files with 277 additions and 230 deletions

View File

@@ -1,56 +0,0 @@
{% set field_name = field.get_name() %}
<h1>
{{field_name}}
{% if field.get_type() == 'text' %}
({% trans 'Type texte' %})
{% elseif field.get_type() == 'number' %}
({% trans 'Type nombre' %})
{% elseif field.get_type() == 'date' %}
({% trans 'Type date' %})
{% endif %}
</h1>
<hr/>
<div>
{% trans 'Source' %} : {{ field.get_tag().getGroupName() }} / {{ field.get_tag().getName() }}
</div>
{% if field.is_indexable() is empty %}
<div>
{% trans 'Ce champ n\'est pas indexe' %}
</div>
{% endif %}
{% if field.is_multi() %}
<div>
{% trans 'Ce champ est multivalue' %}
</div>
{% endif %}
{% if field.is_readonly() %}
<div>
{% trans 'Ce champ est en lecture seule' %}
</div>
{% endif %}
{% if field.get_tbranch() %}
<div>
{% trans 'Ce champ est relie a une branche de thesaurus' %}
</div>
{% endif %}
{% if field.get_thumbtitle() %}
<div>
{% trans 'Ce champ est utilise en titre a l\'affichage' %}
</div>
{% endif %}
{% if field.is_required() %}
<div>
{% trans 'Ce champ est requis' %}
</div>
{% endif %}
{% if field.get_dces_element() %}
<hr/>
<div>
{% set DublinCoreElementSet = '<a href="http://dublincore.org/documents/dces/" target="_blank">DublinCore Element Set</a>' %}
{% trans %}
Ce champ est decrit comme element du {{ DublinCoreElementSet }}
{% endtrans %}
</div>
{% endif %}

View File

@@ -1,21 +0,0 @@
{% if field.get_dces_element() %}
{% set element_name = field.get_dces_element().get_label() %}
<div>
<p>
{% trans %}
Ce champ est decrit comme l'element DublinCore {{element_name}}
{% endtrans %}
</p>
<p>
{% trans 'Description' %} : {{ field.get_dces_element().get_definition() }}
</p>
<p>
{% set lien = '<a href="' ~ field.get_dces_element().get_documentation_link() ~ '" target="_blank">' ~ field.get_dces_element().get_documentation_link() ~ '</a>' %}
{% trans %}
Pour davantage d'informations, consulter le lien suivant {{ lien }}
{% endtrans %}
</p>
</div>
{% endif %}

View File

@@ -1,26 +0,0 @@
<div>
<p style="font-style:italic;">
{% trans 'Les indications donnees ci dessous sont a titre informatif.' %}<br/>
{% trans 'Si vous ne les respectez pas, les documents seront correctement indexes, mais les metadonnees inscrites risquent d\'etre erronnees' %}<br/>
{% set norm_name = '<span style="font-style:normal;font-weight:bold;">' ~ field.get_tag().getGroupName() ~ '</span>' %}
{% trans %}
Ces informations sont directement fournies par la norme de metadonnees de ce champ : {{ norm_name }}
{% endtrans %}
</p>
</div>
<hr/>
<div>
{% if field.get_tag().getMinLength() > 0 %}
{% set minLength = field.get_tag().getMinLength() %}
{% trans %}
Le champ doit contenir {{ minLength }} caracteres minimum.
{% endtrans %}<br/>
{% endif %}
{% if field.get_tag().getMaxLength() > 0 %}
{% set maxLength = field.get_tag().getMaxLength() %}
{% trans %}
Le champ ne peut contenir plus de {{ maxLength }} caracteres.
{% endtrans %}<br/>
{% endif %}
</div>

View File

@@ -4,63 +4,37 @@
{% set document = record.get_subdef('document') %}
{% if document %}
{% if document.get_width() %}
{% trans 'Size' %} :
{{document.get_width()}} x {{document.get_height()}}
{% endif %}
{% endif %}
<hr/>
{% if record.get_original_name() %}
{% trans 'Nom Original' %} :
{{record.get_original_name() }}
<br/>
{% endif %}
{% if record.get_mime() %}
{% trans 'Type Mime' %} :
{{record.get_mime() }}
{% if document and document.get_size() %}
- {{document.get_size()|formatoctet}}
{% endif %}
<br/>
{% endif %}
{% if document %}
{% if document.get_size() %}
{% trans 'Taille' %} :
{{document.get_size()|formatoctet}}
{% if document and document.get_width() and document.get_height() %}
{% trans 'Size' %} :
{{document.get_width()}} x {{document.get_height()}} px
<br/>
{% endif %}
{% endif %}
{% if record.get_technical_infos(constant('media_subdef::TC_DATA_SHUTTERSPEED')) is not empty %}
{% trans 'Shutter speed' %} :
{{record.get_technical_infos(constant('media_subdef::TC_DATA_SHUTTERSPEED')) }} s.
<br />
{% endif %}
{% if record.get_technical_infos(constant('media_subdef::TC_DATA_FOCALLENGTH')) is not empty %}
{% trans 'Focal length' %} :
{{record.get_technical_infos(constant('media_subdef::TC_DATA_FOCALLENGTH')) }} mm
<br />
{% endif %}
{% if document %}
{% if record.get_type() == 'image' and document.get_width() and document.get_height() %}
{% trans 'Dimensions a l\'impression' %}
:
{% set size_w = (document.get_width() * (254/100) / 300) %}
{% set size_h = (document.get_height() * (254/100) / 300) %}
300 dpi : {{size_w|round(1)}}x{{size_h|round(1)}} cm
{% set size_w = (document.get_width() * (254/100) / 72) %}
{{ size_w|round(1) }} x {{ size_h|round(1) }} cm (300dpi)
{% set size_w = (document.get_width() * (254/100) / 72) %}<br/>
{% set size_h = (document.get_height() * (254/100) / 72) %}
/ 72 dpi : {{size_w|round(1)}}x{{size_h|round(1)}} cm
{{ size_w|round(1) }} x {{ size_h|round(1) }} cm (72dpi)
{% endif %}
{% endif %}
<hr/>
{% if record.get_technical_infos(constant('media_subdef::TC_DATA_CAMERAMODEL')) is not empty %}
{% trans 'Camera Model' %} :
{{record.get_technical_infos(constant('media_subdef::TC_DATA_CAMERAMODEL')) }}
<br />
{% endif %}
{% if record.get_technical_infos(constant('media_subdef::TC_DATA_COLORSPACE')) is not empty %}
{% trans 'Color space' %} :
{{record.get_technical_infos(constant('media_subdef::TC_DATA_COLORSPACE')) }}
@@ -73,12 +47,12 @@
{% endif %}
{% if record.get_technical_infos(constant('media_subdef::TC_DATA_COLORDEPTH')) is not empty %}
{% trans 'Color Depth' %} :
{{record.get_technical_infos(constant('media_subdef::TC_DATA_COLORDEPTH')) }}
{{record.get_technical_infos(constant('media_subdef::TC_DATA_COLORDEPTH')) }} bits
<br />
{% endif %}
{% if record.get_technical_infos(constant('media_subdef::TC_DATA_CAMERAMODEL')) is not empty %}
{% trans 'Camera Model' %} :
{{record.get_technical_infos(constant('media_subdef::TC_DATA_CAMERAMODEL')) }}
{% if record.get_technical_infos(constant('media_subdef::TC_DATA_ISO')) is not empty %}
{% trans 'ISO sensibility' %} :
{{record.get_technical_infos(constant('media_subdef::TC_DATA_ISO')) }}
<br />
{% endif %}
{% if record.get_technical_infos(constant('media_subdef::TC_DATA_FLASHFIRED')) is not null %}
@@ -90,36 +64,40 @@
{% endif %}
<br />
{% endif %}
{% if record.get_technical_infos(constant('media_subdef::TC_DATA_SHUTTERSPEED')) is not empty %}
{% trans 'Shutter speed' %} :
{{record.get_technical_infos(constant('media_subdef::TC_DATA_SHUTTERSPEED')) }} s.
<br />
{% endif %}
{% if record.get_technical_infos(constant('media_subdef::TC_DATA_APERTURE')) is not empty %}
{% trans 'Aperture' %} :
{{record.get_technical_infos(constant('media_subdef::TC_DATA_APERTURE')) }}
{{record.get_technical_infos(constant('media_subdef::TC_DATA_APERTURE')) | round(2) }}
<br />
{% endif %}
{% if record.get_technical_infos(constant('media_subdef::TC_DATA_FOCALLENGTH')) is not empty %}
{% trans 'Focal length' %} :
{{record.get_technical_infos(constant('media_subdef::TC_DATA_FOCALLENGTH')) }} mm
<br />
{% endif %}
{% if record.get_technical_infos(constant('media_subdef::TC_DATA_HYPERFOCALDISTANCE')) is not empty %}
{% trans 'Hyperfocal distance' %} :
{{record.get_technical_infos(constant('media_subdef::TC_DATA_HYPERFOCALDISTANCE')) }}
<br />
{% endif %}
{% if record.get_technical_infos(constant('media_subdef::TC_DATA_ISO')) is not empty %}
{% trans 'ISO sensibility' %} :
{{record.get_technical_infos(constant('media_subdef::TC_DATA_ISO')) }}
{{record.get_technical_infos(constant('media_subdef::TC_DATA_HYPERFOCALDISTANCE')) | round(2) }} mm
<br />
{% endif %}
{% if record.get_technical_infos(constant('media_subdef::TC_DATA_LIGHTVALUE')) is not empty %}
{% trans 'Light Value' %} :
{{record.get_technical_infos(constant('media_subdef::TC_DATA_LIGHTVALUE')) }}
{{record.get_technical_infos(constant('media_subdef::TC_DATA_LIGHTVALUE')) | round(2) }}
<br />
{% endif %}
<hr/>
{% if record.get_formated_duration() %}
{% trans 'Duree' %} :
{{record.get_formated_duration() }}
{{record.get_formated_duration() | round(2) }}
<br />
{% endif %}
{% if record.get_technical_infos(constant('media_subdef::TC_DATA_FRAMERATE')) is not empty %}
{% trans 'Images par secondes' %} :
{{record.get_technical_infos(constant('media_subdef::TC_DATA_FRAMERATE')) }} ips
{{record.get_technical_infos(constant('media_subdef::TC_DATA_FRAMERATE')) | round(2) }} ips
<br />
{% endif %}
{% if record.get_technical_infos(constant('media_subdef::TC_DATA_AUDIOCODEC')) %}
@@ -134,7 +112,7 @@
{% endif %}
{% if record.get_technical_infos(constant('media_subdef::TC_DATA_AUDIOSAMPLERATE')) %}
{% trans 'Frequence d\'echantillonage' %} :
{{record.get_technical_infos(constant('media_subdef::TC_DATA_AUDIOSAMPLERATE')) }} kHz
{{record.get_technical_infos(constant('media_subdef::TC_DATA_AUDIOSAMPLERATE')) | round(2) }} kHz
<br />
{% endif %}

View File

@@ -1,10 +1,13 @@
{% import 'common/thumbnail.html' as thumbnail %}
<div class="noToolTipResize" style="margin:5px;width:280px;height:300px;position:relative;">
<div>
<span style="font-weight:bold;font-size:14px;">
{{ basket.getName() }}
</span>
</div>
{% extends 'prod/Tooltip/Tooltip.html.twig'%}
{% set title %} {{ basket.getName() }} {% endset %}
{% set width = 300 %}
{% set maxwidth = null %}
{% block content %}
<div class="noToolTipResize" style="margin:5px;width:{{ width - 40 }}px;height:300px;position:relative;">
<div style="margin:5px 0">
{{ basket.getDescription()|nl2br }}
</div>
@@ -27,3 +30,4 @@
</div>
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,9 @@
{% extends 'prod/Tooltip/Tooltip.html.twig'%}
{% set title %}{% trans 'Caption' %}{% endset %}
{% set width = 400 %}
{% set maxwidth = 700 %}
{% block content %}
{% include 'common/caption.html' %}
{% endblock %}

View File

@@ -0,0 +1,27 @@
{% extends 'prod/Tooltip/Tooltip.html.twig'%}
{% set title %} DC {{ field.get_dces_element().get_label() }} {% endset %}
{% set width = 600 %}
{% set maxwidth = null %}
{% block content %}
{% if field.get_dces_element() %}
{% set element_name = field.get_dces_element().get_label() %}
<div>
<p>
{% trans %}
Ce champ est decrit comme l'element DublinCore {{element_name}}
{% endtrans %}
</p>
<p>
{% trans 'Description' %} : {{ field.get_dces_element().get_definition() }}
</p>
<p>
{% set lien = '<a href="' ~ field.get_dces_element().get_documentation_link() ~ '" target="_blank">' ~ field.get_dces_element().get_documentation_link() ~ '</a>' %}
{% trans %}
Pour davantage d'informations, consulter le lien suivant {{ lien }}
{% endtrans %}
</p>
</div>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,66 @@
{% extends 'prod/Tooltip/Tooltip.html.twig'%}
{% set title %}
{{ field.get_name() }}
{% if field.get_type() == 'text' %}
({% trans 'Type texte' %})
{% elseif field.get_type() == 'number' %}
({% trans 'Type nombre' %})
{% elseif field.get_type() == 'date' %}
({% trans 'Type date' %})
{% endif %}
{% endset %}
{% set width = 300 %}
{% set maxwidth = null %}
{% block content %}
<div>
{% trans 'Source' %} : {{ field.get_tag().getGroupName() }} / {{ field.get_tag().getName() }}
</div>
{% if field.is_indexable() is empty %}
<div>
{% trans 'Ce champ n\'est pas indexe' %}
</div>
{% endif %}
{% if field.is_multi() %}
<div>
{% trans 'Ce champ est multivalue' %}
</div>
{% endif %}
{% if field.is_readonly() %}
<div>
{% trans 'Ce champ est en lecture seule' %}
</div>
{% endif %}
{% if field.get_tbranch() %}
<div>
{% trans 'Ce champ est relie a une branche de thesaurus' %}
</div>
{% endif %}
{% if field.get_thumbtitle() %}
<div>
{% trans 'Ce champ est utilise en titre a l\'affichage' %}
</div>
{% endif %}
{% if field.is_required() %}
<div>
{% trans 'Ce champ est requis' %}
</div>
{% endif %}
{% if field.get_dces_element() %}
<hr/>
<div>
{% set DublinCoreElementSet = '<a href="http://dublincore.org/documents/dces/" target="_blank">DublinCore Element Set</a>' %}
{% trans %}
Ce champ est decrit comme element du {{ DublinCoreElementSet }}
{% endtrans %}
</div>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,35 @@
{% extends 'prod/Tooltip/Tooltip.html.twig'%}
{% set title %} {{ field.get_name() }} ({{ field.get_tag().getTagname() }}) {% endset %}
{% set width = 600 %}
{% set maxwidth = null %}
{% block content %}
<div>
{% if field.get_tag().getMinLength() > 0 %}
{% set minLength = field.get_tag().getMinLength() %}
{% trans %}
Le champ doit contenir {{ minLength }} caracteres minimum.
{% endtrans %}<br/>
{% endif %}
{% if field.get_tag().getMaxLength() > 0 %}
{% set maxLength = field.get_tag().getMaxLength() %}
{% trans %}
Le champ ne peut contenir plus de {{ maxLength }} caracteres.
{% endtrans %}<br/>
{% endif %}
</div>
<hr/>
<div>
<blockquote>
<small>
{% trans 'Les indications donnees ci dessous sont a titre informatif.' %}<br/>
{% trans 'Si vous ne les respectez pas, les documents seront correctement indexes, mais les metadonnees inscrites risquent d\'etre erronnees' %}<br/>
{% set norm_name = '<span style="font-style:normal;font-weight:bold;">' ~ field.get_tag().getGroupName() ~ '</span>' %}
{% trans %}
Ces informations sont directement fournies par la norme de metadonnees de ce champ : {{ norm_name }}
{% endtrans %}
</small>
</blockquote>
</div>
{% endblock %}

View File

@@ -0,0 +1,9 @@
{% extends 'prod/Tooltip/Tooltip.html.twig'%}
{% set title %} {{ record.get_title() }} {% endset %}
{% set width = null %}
{% set maxwidth = null %}
{% block content %}
{% include 'common/preview.html' %}
{% endblock %}

View File

@@ -1,12 +1,13 @@
{% import 'common/thumbnail.html' as thumbnail %}
<div class="noToolTipResize" style="margin:5px;width:280px;height:300px;position:relative;">
<div>
<span style="font-weight:bold;font-size:14px;">
{{ Story.get_title() }}
</span>
</div>
<div style="margin:5px 0">
</div>
{% extends 'prod/Tooltip/Tooltip.html.twig'%}
{% set title %} {{ Story.get_title() }} {% endset %}
{% set width = 300 %}
{% set maxwidth = null %}
{% block content %}
<div class="noToolTipResize" style="margin:5px;width:{{ width - 40 }}px;height:300px;position:relative;">
<div style="margin:5px 0;text-align:right;font-style:italic;position:relative;">
{% set nb_records = Story.get_children().get_elements()|length %}
{% set date = Story.get_modification_date()|prettyString %}
@@ -26,3 +27,4 @@
</div>
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,9 @@
{% extends 'prod/Tooltip/Tooltip.html.twig'%}
{% set title %}{% trans 'Caption' %}{% endset %}
{% set width = 280 %}
{% set maxwidth = null %}
{% block content %}
{% include 'common/technical_datas.twig' %}
{% endblock %}

View File

@@ -1,4 +1,13 @@
<div class="UserTooltip" style="position:relative;width:300px;height:100px;">
{% extends 'prod/Tooltip/Tooltip.html.twig'%}
{% set title %}
user.get_display_name()
{% endset %}
{% set width = 300 %}
{% set maxwidth = null %}
{% block content %}
<div class="UserTooltip" style="position:relative;width:{{ width }}px;height:100px;">
<div class="PNB" style="width:100px;right:auto;">
<img style="margin:14px 8px;" src="/skins/icons/user.png"/>
</div>
@@ -12,3 +21,5 @@
</ul>
</div>
</div>
{% endblock %}