From 76260364aa621f361cb9e485d84db8abdcbf1388 Mon Sep 17 00:00:00 2001 From: Ysolyne Gresille Date: Mon, 14 May 2012 11:46:13 +0200 Subject: [PATCH 1/3] Updtae bootstrap / skins --- lib/Alchemy/Phrasea/Controller/Prod/Query.php | 20 +- .../web/common/index_bootstrap.html.twig | 28 + templates/web/prod/actions/edit_default.twig | 740 ++- templates/web/prod/index.html.twig | 2166 ++++--- .../web/prod/results/answerabstract.twig | 2 +- templates/web/prod/results/answerlist.html | 40 +- templates/web/prod/results/record.html | 184 +- templates/web/report/generate_tab.twig | 8 +- www/prod/jquery.edit.js | 2 +- www/prod/page0.js | 19 +- .../bootstrap/css/bootstrap-responsive.css | 953 +-- .../css/bootstrap-responsive.min.css | 9 + www/skins/html5/bootstrap/css/bootstrap.css | 3268 ++++++++--- .../html5/bootstrap/css/bootstrap.min.css | 9 + .../img/glyphicons-halflings-white.png | Bin 4352 -> 8777 bytes .../bootstrap/img/glyphicons-halflings.png | Bin 4352 -> 13826 bytes .../html5/bootstrap/js/bootstrap-alert.js | 91 - .../html5/bootstrap/js/bootstrap-button.js | 98 - .../html5/bootstrap/js/bootstrap-carousel.js | 154 - .../html5/bootstrap/js/bootstrap-collapse.js | 136 - .../html5/bootstrap/js/bootstrap-dropdown.js | 92 - .../html5/bootstrap/js/bootstrap-modal.js | 210 - .../html5/bootstrap/js/bootstrap-popover.js | 95 - .../html5/bootstrap/js/bootstrap-scrollspy.js | 125 - www/skins/html5/bootstrap/js/bootstrap-tab.js | 130 - .../html5/bootstrap/js/bootstrap-tooltip.js | 270 - .../bootstrap/js/bootstrap-transition.js | 51 - .../html5/bootstrap/js/bootstrap-typeahead.js | 271 - www/skins/html5/bootstrap/js/bootstrap.js | 1824 ++++++ www/skins/html5/bootstrap/js/bootstrap.min.js | 6 + www/skins/prod/000000/prodcolor.css | 5186 +++++++++-------- www/skins/prod/959595/prodcolor.css | 4106 +++++++------ www/skins/prod/Basket.css | 4 - www/skins/prod/Prod.css | 18 +- 34 files changed, 11393 insertions(+), 8922 deletions(-) create mode 100644 templates/web/common/index_bootstrap.html.twig create mode 100644 www/skins/html5/bootstrap/css/bootstrap-responsive.min.css create mode 100644 www/skins/html5/bootstrap/css/bootstrap.min.css delete mode 100644 www/skins/html5/bootstrap/js/bootstrap-alert.js delete mode 100644 www/skins/html5/bootstrap/js/bootstrap-button.js delete mode 100644 www/skins/html5/bootstrap/js/bootstrap-carousel.js delete mode 100644 www/skins/html5/bootstrap/js/bootstrap-collapse.js delete mode 100644 www/skins/html5/bootstrap/js/bootstrap-dropdown.js delete mode 100644 www/skins/html5/bootstrap/js/bootstrap-modal.js delete mode 100644 www/skins/html5/bootstrap/js/bootstrap-popover.js delete mode 100644 www/skins/html5/bootstrap/js/bootstrap-scrollspy.js delete mode 100644 www/skins/html5/bootstrap/js/bootstrap-tab.js delete mode 100644 www/skins/html5/bootstrap/js/bootstrap-tooltip.js delete mode 100644 www/skins/html5/bootstrap/js/bootstrap-transition.js delete mode 100644 www/skins/html5/bootstrap/js/bootstrap-typeahead.js create mode 100644 www/skins/html5/bootstrap/js/bootstrap.js create mode 100644 www/skins/html5/bootstrap/js/bootstrap.min.js diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Query.php b/lib/Alchemy/Phrasea/Controller/Prod/Query.php index 9b62944c46..470b14ffff 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Query.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/Query.php @@ -114,38 +114,38 @@ class Query implements ControllerProviderInterface if ($d2bottom < 4) { for ($i = 1; ($i <= 4 && (($i <= $npages) === true)); $i ++ ) { if ($i == $page) - $string .= ''; + $string .= ''; else - $string .= "" . $i . ""; + $string .= "" . $i . ""; } if ($npages > 4) - $string .= ">>"; + $string .= ">>"; } else { $start = $npages - 4; if (($start) > 0) - $string .= "<<"; + $string .= "<<"; else $start = 1; for ($i = ($start); $i <= $npages; $i ++ ) { if ($i == $page) - $string .= ''; + $string .= ''; else - $string .= "" . $i . ""; + $string .= "" . $i . ""; } } } else { - $string .= "<<"; + $string .= "<<"; for ($i = ($page - 2); $i <= ($page + 2); $i ++ ) { if ($i == $page) - $string .= ''; + $string .= ''; else - $string .= "" . $i . ""; + $string .= "" . $i . ""; } - $string .= ">>"; + $string .= ">>"; } } $string .= '
'; diff --git a/templates/web/common/index_bootstrap.html.twig b/templates/web/common/index_bootstrap.html.twig new file mode 100644 index 0000000000..40871516c3 --- /dev/null +++ b/templates/web/common/index_bootstrap.html.twig @@ -0,0 +1,28 @@ + + + + + {% if local_title is defined%}{{local_title}} | {% endif %}{{home_title}} - {{ module_name }} + + + + + + + + + {% block stylesheet %}{% endblock %} + {% block icon %}{% endblock %} + {% block rss %}{% endblock %} + {% block javascript %}{% endblock %} + + +
+ {% include 'common/menubar.twig' %} +
+ {% block content %}{% endblock %} +
+
+ {% include 'common/analytics.twig' %} + + diff --git a/templates/web/prod/actions/edit_default.twig b/templates/web/prod/actions/edit_default.twig index cfd9a8e2ae..97449f4fde 100644 --- a/templates/web/prod/actions/edit_default.twig +++ b/templates/web/prod/actions/edit_default.twig @@ -1,107 +1,106 @@ - {% macro format_diapo(record, user, resizable) %} - {% if resizable == false %} - {% set cont_width = 130 %} - {% set cont_height = 140 %} - {% else %} - {% set cont_width = user.getPrefs('editing_images_size') %} - {% set cont_height = user.getPrefs('editing_images_size') %} - {% endif %} + {% if resizable == false %} + {% set cont_width = 130 %} + {% set cont_height = 140 %} + {% else %} + {% set cont_width = user.getPrefs('editing_images_size') %} + {% set cont_height = user.getPrefs('editing_images_size') %} + {% endif %} - {% set i = record.get_number() %} - {% set thumbnail = record.get_thumbnail().get_url() %} - {% set ratio = 80 %} - {% set width = record.get_thumbnail().get_width() %} - {% set height = record.get_thumbnail().get_height() %} + {% set i = record.get_number() %} + {% set thumbnail = record.get_thumbnail().get_url() %} + {% set ratio = 80 %} + {% set width = record.get_thumbnail().get_width() %} + {% set height = record.get_thumbnail().get_height() %} - {% if width > height %} - {% set top = 50 - ( (ratio / 2) * height / width ) %} - {% set left = 50 - ( (ratio * height / (2 * width)) * width / height ) %} - {% set width = ratio ~ "%" %} - {% set height = "auto" %} - {% else %} - {% set top = (100 - ratio) / 2 %} - {% set left = ((100 - (ratio * width / height)) / 2) %} - {% set width = "auto" %} - {% set height = ratio ~ "%" %} - {% endif %} + {% if width > height %} + {% set top = 50 - ( (ratio / 2) * height / width ) %} + {% set left = 50 - ( (ratio * height / (2 * width)) * width / height ) %} + {% set width = ratio ~ "%" %} + {% set height = "auto" %} + {% else %} + {% set top = (100 - ratio) / 2 %} + {% set left = ((100 - (ratio * width / height)) / 2) %} + {% set width = "auto" %} + {% set height = ratio ~ "%" %} + {% endif %} - {% set class_status = 'nostatus' %} - {% if user.ACL().has_right_on_base(record.get_base_id(), 'chgstatus') %} - {% set class_status = '' %} - {% endif %} + {% set class_status = 'nostatus' %} + {% if user.ACL().has_right_on_base(record.get_base_id(), 'chgstatus') %} + {% set class_status = '' %} + {% endif %} -
-
- {{record.get_original_name()}} +
+
+ {{record.get_original_name()}} +
+ +
+ +
+
+
+ +
+ +
- -
- -
-
-
- -
- - -
{% endmacro %} {% macro HTML_fieldlist(editing, user) %} -
- {%trans 'prod::editing::fields: status ' %} -
- {% set cssfile = '000000' %} - {% if user.getPrefs('css') %} - {% set cssfile = user.getPrefs('css') %} - {% endif %} - {% for field in editing.get_fields() %} - {% set i = field.get_id() %} - {% if field.is_readonly() is empty %} -
- - - {% if field.get_dces_element %} - {% trans 'Ce champ est decrit comme un element DublinCore' %} - {% endif %} - {% if field.get_thumbtitle %} - - {% endif %} - - {{field.get_name()}} {% if field.is_required() %} * {% endif %} : - - ??? -
+
+ {%trans 'prod::editing::fields: status ' %} +
+ {% set cssfile = '000000' %} + {% if user.getPrefs('css') %} + {% set cssfile = user.getPrefs('css') %} {% endif %} - {% endfor %} + {% for field in editing.get_fields() %} + {% set i = field.get_id() %} + {% if field.is_readonly() is empty %} +
+ + + {% if field.get_dces_element %} + {% trans 'Ce champ est decrit comme un element DublinCore' %} + {% endif %} + {% if field.get_thumbtitle %} + + {% endif %} + + {{field.get_name()}} {% if field.is_required() %} * {% endif %} : + + ??? +
+ {% endif %} + {% endfor %} {% endmacro %} {% macro HTML_Train(editing, user, is_reg) %} - {% for record in editing.get_elements %} - {% if loop.index != 1 or is_reg != '1' %} - {{_self.format_diapo(record, user, true)}} - {% endif %} - {% endfor %} + {% for record in editing.get_elements %} + {% if loop.index != 1 or is_reg != '1' %} + {{_self.format_diapo(record, user, true)}} + {% endif %} + {% endfor %} {% endmacro %} @@ -121,314 +120,303 @@ -
+
-
-
- -
-
- - -
-
-
-
+
+
+ +
- - - {% if edit.is_single_grouping %} - -
-
- {{_self.format_diapo(edit.get_grouping_head, user, false)}} -
-
-
- {{_self.HTML_Train(edit, user, '1')}} -
- - {% else %} -
- {{_self.HTML_Train(edit, user)}} -
- {% endif %} - - -
- -
- -
- - - -
-
- {{_self.HTML_fieldlist(edit, user)}} -
-
- - -
-
-
- - - - - - -
- - - -
-
-
-
-
- - +
+
+
- -
- -
-
- - {% if edit.has_thesaurus() %} -
-
-

- +{{edit.get_sbas_id()|sbas_names}} -

-
{% trans 'phraseanet::chargement' %}
-
- -
{% endif %} -
-
- -
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - -
{% trans 'prod::editing::replace: remplacer dans le champ' %} - -
{% trans 'prod::editing:replace: chaine a rechercher' %}
{% trans 'prod::editing:remplace: chaine remplacante' %}
{% trans 'prod::editing:remplace: options de remplacement' %} - - {% trans 'prod::editing:remplace::option : utiliser une expression reguliere' %} - {% set help_link = 'https://secure.wikimedia.org/wikipedia/en/wiki/Regular_expression' %} - {% if session.get_I18n == 'de' %} - {% set help_link = 'https://secure.wikimedia.org/wikipedia/de/wiki/Regul%C3%A4rer_Ausdruck' %} - {% elseif session.get_I18n == 'fr' %} - {% set help_link = 'https://secure.wikimedia.org/wikipedia/fr/wiki/Expression_rationnelle' %} - {% elseif session.get_I18n == 'ar' %} - {% set help_link = 'https://secure.wikimedia.org/wikipedia/ar/wiki/%D8%AA%D8%B9%D8%A7%D8%A8%D9%8A%D8%B1_%D9%86%D9%85%D8%B7%D9%8A%D8%A9' %} - {% endif %} - - -
-
- -
- - {% trans 'prod::editing:remplace::option la valeur du cahmp doit etre exacte' %} -
- - {% trans 'prod::editing:remplace::option la valeur est comprise dans le champ' %} -
- - {% trans 'prod::editing:remplace::option respecter la casse' %} -
-
-
-
- -
-
-
-
- -
-
    -
-
-
-
-
- - -
+ + + +
+
+
+
+ {{_self.HTML_fieldlist(edit, user)}} +
+
+
+
+
+ + + + + + +
+ + + +
+
+
+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+ {% trans 'Aucun statut editable' %} +
+
+ {% trans'Les status de certains documents ne sont pas accessibles par manque de droits' %} +
+
+ + {% for n, status in edit.get_status() %} + + + + + {% endfor %} +
+ +
+ {% if status['img_off'] %} + + {% endif %} + {{ status['label0'] }} +
+
+ +
+ {% if status['img_on'] %} + + {% endif %} + {{ status['label1'] }} +
+
+
+
+
+
+ + + +
+
+
+
+ +
+
+ + {% if edit.has_thesaurus() %} +
+
+

+ +{{edit.get_sbas_id()|sbas_names}} +

+
{% trans 'phraseanet::chargement' %}
+
+ +
+ {% endif %} +
+
+ +
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + +
{% trans 'prod::editing::replace: remplacer dans le champ' %} + +
{% trans 'prod::editing:replace: chaine a rechercher' %} + +
{% trans 'prod::editing:remplace: chaine remplacante' %} + +
{% trans 'prod::editing:remplace: options de remplacement' %} + + {% trans 'prod::editing:remplace::option : utiliser une expression reguliere' %} + {% set help_link = 'https://secure.wikimedia.org/wikipedia/en/wiki/Regular_expression' %} + {% if session.get_I18n == 'de' %} + {% set help_link = 'https://secure.wikimedia.org/wikipedia/de/wiki/Regul%C3%A4rer_Ausdruck' %} + {% elseif session.get_I18n == 'fr' %} + {% set help_link = 'https://secure.wikimedia.org/wikipedia/fr/wiki/Expression_rationnelle' %} + {% elseif session.get_I18n == 'ar' %} + {% set help_link = 'https://secure.wikimedia.org/wikipedia/ar/wiki/%D8%AA%D8%B9%D8%A7%D8%A8%D9%8A%D8%B1_%D9%86%D9%85%D8%B7%D9%8A%D8%A9' %} + {% endif %} + + + +
+
+ +
+ + {% trans 'prod::editing:remplace::option la valeur du cahmp doit etre exacte' %} +
+ + {% trans 'prod::editing:remplace::option la valeur est comprise dans le champ' %} +
+ + {% trans 'prod::editing:remplace::option respecter la casse' %} +
+
+
+ +
+
+
+
+
+ +
+
    +
    +
    +
    +
    + +
    + + +
    +
    -