diff --git a/templates/mobile/api/auth/end_user_authorization.html.twig b/templates/mobile/api/auth/end_user_authorization.html.twig index eafb6a95c6..c738c85bde 100644 --- a/templates/mobile/api/auth/end_user_authorization.html.twig +++ b/templates/mobile/api/auth/end_user_authorization.html.twig @@ -31,7 +31,7 @@

{{home_title}}

- {% if not session.is_authenticated %} + {% if not app.isAuthenticated() %}
{% for key,value in auth.getParams %} diff --git a/templates/mobile/common/index.html.twig b/templates/mobile/common/index.html.twig index 7e8638c3aa..1f12a866ad 100644 --- a/templates/mobile/common/index.html.twig +++ b/templates/mobile/common/index.html.twig @@ -1,5 +1,5 @@ - + diff --git a/templates/mobile/common/thumbnail.html.twig b/templates/mobile/common/thumbnail.html.twig index e93dd2fa5f..276e7b61c9 100644 --- a/templates/mobile/common/thumbnail.html.twig +++ b/templates/mobile/common/thumbnail.html.twig @@ -1,4 +1,4 @@ -{% macro format(thumbnail, b_w, b_h, extraclass, session)%} +{% macro format(thumbnail, b_w, b_h, extraclass)%} {% set b_width = b_w %} {% set b_height = b_h|default(b_w) %} @@ -44,7 +44,7 @@ swfobject.embedSWF("/include/FlexPaper_flash/FlexPaperViewer.swf", "preview_{{thumbnail.get_base_id()}}_{{thumbnail.get_record_id()}}_{{random}}", "100%", "100%", "9.0.0", false, false, - {menu: "false",flashvars: "SwfFile={{thumbnail.get_url()}}&Scale=0.6&ZoomTransition=easeOut&ZoomTime=0.5&ZoomInterval=0.1&FitPageOnLoad=true&FitWidthOnLoad=true&PrintEnabled=true&FullScreenAsMaxWindow=false&localeChain={{session.get_locale()}}", movie: "/include/FlexPaper_flash/FlexPaperViewer.swf", allowFullScreen :"true",wmode: "transparent"}, false); + {menu: "false",flashvars: "SwfFile={{thumbnail.get_url()}}&Scale=0.6&ZoomTransition=easeOut&ZoomTime=0.5&ZoomInterval=0.1&FitPageOnLoad=true&FitWidthOnLoad=true&PrintEnabled=true&FullScreenAsMaxWindow=false&localeChain={{ app['locale'] }}", movie: "/include/FlexPaper_flash/FlexPaperViewer.swf", allowFullScreen :"true",wmode: "transparent"}, false); {% elseif record_type == 'AUDIO_MP3' %} {% set random = thumbnail.get_random() %} @@ -70,7 +70,7 @@ {% endmacro %} -{% macro format100percent(thumbnail, extraclass, session)%} +{% macro format100percent(thumbnail, extraclass)%} {% set record_type = thumbnail.get_type() %}
{% if record_type == 'VIDEO_MP4' or record_type == 'VIDEO_FLV' %} @@ -91,7 +91,7 @@ swfobject.embedSWF("/include/FlexPaper_flash/FlexPaperViewer.swf", "preview_{{thumbnail.get_base_id()}}_{{thumbnail.get_record_id()}}_{{random}}", "100%", "100%", "9.0.0", false, false, - {menu: "false",flashvars: "SwfFile={{thumbnail.get_url()}}&Scale=0.6&ZoomTransition=easeOut&ZoomTime=0.5&ZoomInterval=0.1&FitPageOnLoad=true&FitWidthOnLoad=true&PrintEnabled=true&FullScreenAsMaxWindow=false&localeChain={{session.get_locale()}}", movie: "/include/FlexPaper_flash/FlexPaperViewer.swf", allowFullScreen :"true",wmode: "transparent"}, false); + {menu: "false",flashvars: "SwfFile={{thumbnail.get_url()}}&Scale=0.6&ZoomTransition=easeOut&ZoomTime=0.5&ZoomInterval=0.1&FitPageOnLoad=true&FitWidthOnLoad=true&PrintEnabled=true&FullScreenAsMaxWindow=false&localeChain={{app['locale']}}", movie: "/include/FlexPaper_flash/FlexPaperViewer.swf", allowFullScreen :"true",wmode: "transparent"}, false); {% elseif record_type == 'AUDIO_MP3' %} {% set random = thumbnail.get_random() %} diff --git a/templates/mobile/lightbox/basket_element.html.twig b/templates/mobile/lightbox/basket_element.html.twig index 123b03295e..2615a7257d 100644 --- a/templates/mobile/lightbox/basket_element.html.twig +++ b/templates/mobile/lightbox/basket_element.html.twig @@ -11,7 +11,7 @@ {% endblock %} {% block content %} - {% set record = basket_element.getRecord() %} + {% set record = basket_element.getRecord(app) %}
Back @@ -19,14 +19,14 @@ Home
- {{ thumbnail.format100percent(record.get_preview(),'',session, record.get_thumbnail()) }} + {{ thumbnail.format100percent(record.get_preview(),'', record.get_thumbnail()) }} {% if basket_element.getBasket().getValidation() %} - {% if basket_element.getBasket().getValidation().getParticipant(user).getCanAgree() %} + {% if basket_element.getBasket().getValidation().getParticipant(user, app).getCanAgree() %}
- + - +
{% endif %} diff --git a/templates/mobile/lightbox/feed.html.twig b/templates/mobile/lightbox/feed.html.twig index c0cba7182d..c51751b7cc 100644 --- a/templates/mobile/lightbox/feed.html.twig +++ b/templates/mobile/lightbox/feed.html.twig @@ -29,7 +29,7 @@ {% for item in feed_entry.get_content() %}
  • - {{thumbnail.format(item.get_record().get_thumbnail(), 80, 80, '', session, true)}} + {{thumbnail.format(item.get_record().get_thumbnail(), 80, 80, '', true, false)}}
  • diff --git a/templates/mobile/lightbox/feed_element.html.twig b/templates/mobile/lightbox/feed_element.html.twig index e7f7c0e31b..ce35cbbf34 100644 --- a/templates/mobile/lightbox/feed_element.html.twig +++ b/templates/mobile/lightbox/feed_element.html.twig @@ -19,7 +19,7 @@ Home
    - {{ thumbnail.format100percent(record.get_preview(),'',session, record.get_thumbnail()) }} + {{ thumbnail.format100percent(record.get_preview(),'', record.get_thumbnail()) }}
    diff --git a/templates/mobile/lightbox/index.html.twig b/templates/mobile/lightbox/index.html.twig index 8e3ce80ed3..4750b1427b 100644 --- a/templates/mobile/lightbox/index.html.twig +++ b/templates/mobile/lightbox/index.html.twig @@ -63,7 +63,7 @@

    {% trans 'a propos'%}

    -

    Phraseanet Version {{core.getVersion().getName()}} - {{core.getVersion().getNumber()}}

    +

    Phraseanet Version {{ app['phraseanet.version'].getName() }} - {{ app['phraseanet.version'].getNumber() }}

    @@ -92,7 +92,7 @@ {% set basket_length = basket.getElements().count() %}

  • {% if basket.getElements().first() %} - + {% endif %}

    {{basket.getName()}}

    {{ basket.getDescription() }}

    @@ -121,7 +121,7 @@ {% set basket_length = basket.getElements().count() %}
  • {% if basket.getElements().first() %} - + {% endif %}

    {{ basket.getName() }}

    {{ basket.getDescription() }}

    diff --git a/templates/mobile/lightbox/note_form.html.twig b/templates/mobile/lightbox/note_form.html.twig index d48ef93d13..b854d0dc95 100644 --- a/templates/mobile/lightbox/note_form.html.twig +++ b/templates/mobile/lightbox/note_form.html.twig @@ -13,13 +13,13 @@ {% block content %}
    -

    {{basket_element.getRecord().get_title}} - Note

    +

    {{basket_element.getRecord(app).get_title}} - Note

    + {% if basket_element.getUserValidationDatas(user, app).getNote() == '' %}placeholder="Note"{% endif %}>{{basket_element.getUserValidationDatas(user, app).getNote()}} diff --git a/templates/mobile/lightbox/sc_note.html.twig b/templates/mobile/lightbox/sc_note.html.twig index 8129b6cd59..bdf9d4146f 100644 --- a/templates/mobile/lightbox/sc_note.html.twig +++ b/templates/mobile/lightbox/sc_note.html.twig @@ -1,5 +1,5 @@ {% for validationDatas in basket_element.getValidationDatas() %} - {% set is_mine = validationDatas.getParticipant().getUser().get_id() == user.get_id() %} + {% set is_mine = validationDatas.getParticipant().getUser(app).get_id() == user.get_id() %} {% if validationDatas.getNote() != '' or (validationDatas.getAgreement() is not null and is_mine) %}
  • @@ -7,7 +7,7 @@ {% endif %} - {{ validationDatas.getParticipant().getUser().get_display_name() }} + {{ validationDatas.getParticipant().getUser(app).get_display_name() }}

    {% if validationDatas.getNote() != '' %}

    {% trans 'validation:: note'%} : {{ validationDatas.getNote()|nl2br }}

    diff --git a/templates/mobile/lightbox/validate.html.twig b/templates/mobile/lightbox/validate.html.twig index 08300062b1..1e89015223 100644 --- a/templates/mobile/lightbox/validate.html.twig +++ b/templates/mobile/lightbox/validate.html.twig @@ -24,12 +24,12 @@
      {% for basket_element in basket.getElements() %}
    • - {% if basket_element.getBasket().getValidation() and basket_element.getBasket().getValidation().getParticipant(user).getCanAgree() %} -
      + {% if basket_element.getBasket().getValidation() and basket_element.getBasket().getValidation().getParticipant(user, app).getCanAgree() %} +
      {% endif %} - {{thumbnail.format(basket_element.getRecord().get_thumbnail(), 80, 80, '', session, true)}} + {{thumbnail.format(basket_element.getRecord(app).get_thumbnail(), 80, 80, '', true, false)}}
    • diff --git a/templates/web/account/access.html.twig b/templates/web/account/access.html.twig index 5a8a01a788..08890ba9e7 100644 --- a/templates/web/account/access.html.twig +++ b/templates/web/account/access.html.twig @@ -11,17 +11,17 @@ {% for sbasId, baseInsc in inscriptions %} {% if baseInsc['CollsRegistered'] or baseInsc['CollsRefuse'] or baseInsc['CollsWait'] or baseInsc['CollsIntime'] or baseInsc['CollsOuttime'] or baseInsc['CollsNonactif'] or baseInsc['CollsCGU'] or baseInsc['Colls'] %} -

      {{ sbasId | sbas_names }}

      +

      {{ sbasId | sbas_names(app) }}

      {% endif %} {% if baseInsc['CollsRegistered'] is not none %} {% for base in baseInsc['CollsRegistered']%} {% for collId, isTrue in base %} - {% set base_id = sbasId |base_from_coll(collId) %} + {% set base_id = sbasId |base_from_coll(collId, app) %} - {% trans 'login::register: acces authorise sur la collection ' %}{{ sbasId |sbas_names }} + {% trans 'login::register: acces authorise sur la collection ' %}{{ sbasId |sbas_names(app) }} {% if isTrue | trim != '' %} {% trans 'login::register::CGU: lire les CGU' %} {% endif %} @@ -37,10 +37,10 @@ {% if baseInsc['CollsRefuse'] %} {% for collId, isTrue in baseInsc['CollsRefuse'] %} - {% set base_id = sbasId |base_from_coll(collId) %} + {% set base_id = sbasId |base_from_coll(collId, app) %} - {% trans 'login::register: acces refuse sur la collection ' %}{{ sbasId |sbas_names }} + {% trans 'login::register: acces refuse sur la collection ' %}{{ sbasId |sbas_names(app) }} {% if isTrue | trim != '' %} {% trans 'login::register::CGU: lire les CGU' %} {% endif %} @@ -55,10 +55,10 @@ {% if baseInsc['CollsWait'] %} {% for collId, isTrue in baseInsc['CollsWait'] %} - {% set base_id = sbasId |base_from_coll(collId) %} + {% set base_id = sbasId |base_from_coll(collId, app) %} - {% trans 'login::register: en attente d\'acces sur' %} {{ sbasId |sbas_names }} + {% trans 'login::register: en attente d\'acces sur' %} {{ sbasId |sbas_names(app) }} {% if isTrue | trim != '' %} {% trans 'login::register::CGU: lire les CGU' %} {% endif %} @@ -70,10 +70,10 @@ {% if baseInsc['CollsIntime'] %} {% for collId, isTrue in baseInsc['CollsIntime'] %} - {% set base_id = sbasId |base_from_coll(collId) %} + {% set base_id = sbasId |base_from_coll(collId, app) %} - {% trans 'login::register: acces temporaire sur' %} {{ sbasId |sbas_names }} + {% trans 'login::register: acces temporaire sur' %} {{ sbasId |sbas_names(app) }} {% if isTrue |trim != '' %} {% trans 'login::register::CGU: lire les CGU' %} {% endif %} @@ -85,10 +85,10 @@ {% if baseInsc['CollsOuttime'] %} {% for collId, isTrue in baseInsc['CollsOuttime'] %} - {% set base_id = sbasId |base_from_coll(collId) %} + {% set base_id = sbasId |base_from_coll(collId, app) %} - {% trans 'login::register: acces temporaire termine sur ' %}{{ sbasId |sbas_names }} + {% trans 'login::register: acces temporaire termine sur ' %}{{ sbasId |sbas_names(app) }} {% if isTrue |trim != '' %} {% trans 'login::register::CGU: lire les CGU' %} {% endif %} @@ -100,10 +100,10 @@ {% if baseInsc['CollsNonactif'] %} {% for collId, isTrue in baseInsc['CollsNonactif'] %} - {% set base_id = sbasId |base_from_coll(collId) %} + {% set base_id = sbasId |base_from_coll(collId, app) %} - {% trans 'login::register: acces supendu sur' %} {{ sbasId |sbas_names }} + {% trans 'login::register: acces supendu sur' %} {{ sbasId |sbas_names(app) }} {% if isTrue |trim != '' %} {% trans 'login::register::CGU: lire les CGU' %} {% endif %} @@ -124,7 +124,7 @@ {% endif %} {% for collId, collName in baseInsc['Colls'] %} - {% set base_id = sbasId |base_from_coll(collId) %} + {% set base_id = sbasId |base_from_coll(collId, app) %} {{ collName }} @@ -137,7 +137,7 @@ {% endif %} {% if baseInsc['CollsCGU'] %} {% for collId, collDesc in baseInsc['CollsCGU'] %} - {% set base_id = sbasId |base_from_coll(collId) %} + {% set base_id = sbasId |base_from_coll(collId, app) %}
      diff --git a/templates/web/account/account.html.twig b/templates/web/account/account.html.twig index e1fdb700bd..5c18f4de41 100644 --- a/templates/web/account/account.html.twig +++ b/templates/web/account/account.html.twig @@ -90,7 +90,7 @@
      - +

      diff --git a/templates/web/account/authorized_apps.html.twig b/templates/web/account/authorized_apps.html.twig index be8ed711d1..d740ee772b 100644 --- a/templates/web/account/authorized_apps.html.twig +++ b/templates/web/account/authorized_apps.html.twig @@ -76,9 +76,9 @@ $(document).ready(function(){ {% endif%} - {{app.get_created_on()|prettyDate}} + {{ app['date-formatter'].getPrettyString(app.get_created_on()) }} - {{app.get_description() }} + {{ app.get_description() }}
  • {%endfor%} diff --git a/templates/web/account/base.html.twig b/templates/web/account/base.html.twig index 2366f1dae2..cb5d2100e6 100644 --- a/templates/web/account/base.html.twig +++ b/templates/web/account/base.html.twig @@ -1,4 +1,4 @@ - + {{ home_title }} {% block title %}{% endblock %} diff --git a/templates/web/account/sessions.html.twig b/templates/web/account/sessions.html.twig index a57e14a59f..04366bd0ca 100644 --- a/templates/web/account/sessions.html.twig +++ b/templates/web/account/sessions.html.twig @@ -30,18 +30,18 @@ {% trans 'Session persistante' %} - {% for row in session.get_my_sessions() %} + {% for row in sessions %} - {% if session.get_ses_id() != row['session_id'] %} + {% if app['session'].get('phrasea_session_id') != row['session_id'] %} {% endif %} - {{ row['created_on'] |formatDate }} + {{ app['date-formatter'].getDate(row['created_on']) }} - {{ row['lastaccess'] |formatDate }} + {{ app['date-formatter'].getDate(row['lastaccess']) }} {{ row['ip'] }} diff --git a/templates/web/admin/collection/collection.html.twig b/templates/web/admin/collection/collection.html.twig index 5f4d653e36..377c447087 100644 --- a/templates/web/admin/collection/collection.html.twig +++ b/templates/web/admin/collection/collection.html.twig @@ -12,12 +12,12 @@
    -{% if app.request.query.get('success') == '1' %} +{% if app['request'].query.get('success') == '1' %}
    × {% trans 'Successful update' %}
    -{% elseif app.request.query.get('success') == '0' %} +{% elseif app['request'].query.get('success') == '0' %}
    × {% trans 'An error occured' %} @@ -118,8 +118,8 @@ {# mini logo #}
    {% trans 'admin::base:collection: minilogo actuel' %}
    - {% if collection.getLogo(bas_id) is not empty %} -
    {{ collection.getLogo(bas_id) | raw }}
    + {% if collection.getLogo(bas_id, app) is not empty %} +
    {{ collection.getLogo(bas_id, app) | raw }}
    {% if user.ACL.has_right_on_base(bas_id, 'manage') %}
    -{% if app.request.get('error') == 'name' %} +{% if app['request'].get('error') == 'name' %}
    × {% trans 'admin:: La collection n\'a pas ete creee : vous devez donner un nom a votre collection' %}
    -{% elseif app.request.get('error') == 'error' %} +{% elseif app['request'].get('error') == 'error' %}
    × {% trans 'An error occured, please retry or contact an admin if problem persist' %}
    {% endif %} -
    - +
    +
    @@ -44,7 +44,7 @@
    @@ -58,4 +58,4 @@ $("#othcollsel").attr("disabled", true); } }); - \ No newline at end of file + diff --git a/templates/web/admin/collection/reorder.html.twig b/templates/web/admin/collection/reorder.html.twig index ea16370963..bbe74ff9a3 100644 --- a/templates/web/admin/collection/reorder.html.twig +++ b/templates/web/admin/collection/reorder.html.twig @@ -62,7 +62,7 @@ dataType:'json', type:'POST', data: {order: order}, - url: '{{ path('admin_database_submit_collections_order', {'databox_id': app.request.attributes.get('databox_id')}) }}', + url: '{{ path('admin_database_submit_collections_order', {'databox_id': app['request'].attributes.get('databox_id')}) }}', beforeSend : function() { $this.attr('disabled', true); }, diff --git a/templates/web/admin/collection/suggested_value.html.twig b/templates/web/admin/collection/suggested_value.html.twig index 8055d17715..4b9d16f3a7 100644 --- a/templates/web/admin/collection/suggested_value.html.twig +++ b/templates/web/admin/collection/suggested_value.html.twig @@ -14,12 +14,12 @@
    -{% if app.request.query.get('success') == '1' %} +{% if app['request'].query.get('success') == '1' %}
    × {% trans 'Successful update' %}
    -{% elseif app.request.query.get('success') == '0' %} +{% elseif app['request'].query.get('success') == '0' %}
    × {% trans 'An error occured' %} @@ -51,7 +51,7 @@ - {% trans 'admin::sugval: Valeurs suggerees/Preferences de la collection' %} {{ app.request.attributes.get('bas_id')|bas_names }} + {% trans 'admin::sugval: Valeurs suggerees/Preferences de la collection' %} {{ app['request'].attributes.get('bas_id')|bas_names(app) }} @@ -134,7 +134,7 @@ -
    +
    diff --git a/templates/web/admin/common/iframe_wrap.html.twig b/templates/web/admin/common/iframe_wrap.html.twig index a5e5df0ba6..cc813cf448 100644 --- a/templates/web/admin/common/iframe_wrap.html.twig +++ b/templates/web/admin/common/iframe_wrap.html.twig @@ -1,5 +1,5 @@ - + diff --git a/templates/web/admin/connected-users.html.twig b/templates/web/admin/connected-users.html.twig index ae60d7cc22..10b0834ff1 100644 --- a/templates/web/admin/connected-users.html.twig +++ b/templates/web/admin/connected-users.html.twig @@ -1,37 +1,38 @@ {% macro tooltip_connected_users(row) %} +{% set user = row.getUser(app) %} - + - + - + - + - + - {% for databox in row['user'].ACL().get_granted_sbas() %} + {% for databox in user.ACL().get_granted_sbas() %} {% endfor %} @@ -47,36 +48,36 @@
    usr_id : {{ row['user'].get_id() }}usr_id : {{ user.get_id() }}
    {{ 'admin::compte-utilisateur nom' | trans }} : {{ row['user'].get_display_name() }}{{ 'admin::compte-utilisateur nom' | trans }} : {{ user.get_display_name() }}
    {{ 'admin::compte-utilisateur societe' | trans }} : {{ row['user'].get_company() }}{{ 'admin::compte-utilisateur societe' | trans }} : {{ user.get_company() }}
    {{ 'admin::compte-utilisateur telephone' | trans }} : {{ row['user'].get_tel() }}{{ 'admin::compte-utilisateur telephone' | trans }} : {{ user.get_tel() }}
    {{ 'admin::compte-utilisateur email' | trans }} : {{ row['user'].get_email() }}{{ 'admin::compte-utilisateur email' | trans }} : {{ user.get_email() }}
    {{ 'admin::monitor: bases sur lesquelles l\'utilisateur est connecte : ' | trans }} :
    {{ databox.get_viewname() }}
    - {{ row['platform'] }} / {{ row['browser'] }} - {{ row['browser_version'] }}
    - {% if row['token'] %} + {{ row.getPlatform() }} / {{ row.getBrowserName() }} - {{ row.getBrowserVersion() }}
    + {% if row.getToken() %} {{ 'Session persistente' | trans }} {%endif%}
    - + - + - + - + - + - + - + - {% if datas['applications'][0] != 0 %} + {% if data['applications'][0] != 0 %} - + {% endif %}
    {{ 'admin::monitor: module production' | trans }}{{ datas['applications'][1] }}{{ data['applications'][1] }}
    {{ 'admin::monitor: module client' | trans }}{{ datas['applications'][2] }}{{ data['applications'][2] }}
    {{ 'admin::monitor: module admin' | trans }}{{ datas['applications'][3] }}{{ data['applications'][3] }}
    {{ 'admin::monitor: module report' | trans }}{{ datas['applications'][4] }}{{ data['applications'][4] }}
    {{ 'admin::monitor: module thesaurus' | trans }}{{ datas['applications'][5] }}{{ data['applications'][5] }}
    {{ 'admin::monitor: module comparateur' | trans }}{{ datas['applications'][6] }}{{ data['applications'][6] }}
    {{ 'admin::monitor: module validation' | trans }}{{ datas['applications'][7] }}{{ data['applications'][7] }}
    {{ 'admin::monitor: total des utilisateurs uniques : ' | trans }}{{ datas['applications'][0] }}{{ data['applications'][0] }}
    @@ -96,26 +97,37 @@ - {% for row in datas['sessions'] %} - + {% for row in data['sessions'] %} + - {% if row["session_id"] == session.get_ses_id() %} - {{ row['user'].get_display_name() }} + {% if row.getId() == app['session'].get('session_id') %} + {{ user.get_display_name() }} {% else %} - {{ row['user'].get_display_name() }} + {{ user.get_display_name() }} {% endif %} - {% for app in row["app"] %} - {% if app != 0 %} - {{ app | AppName }}
    - {% endif %} + {% for module in row.getModules() %} + {{ module.getmoduleId() | AppName }}
    {% endfor %} - {{ row["ip"] }}
    {{ row["ip_infos"] }} - {{ row['created_on'] | formatDate }} - {{ row['lastaccess'] | prettyDate }} + {% set geoname = app['geonames'].find_geoname_from_ip(row.getIpAddress()) %} + + {% if geoname['city'] %} + {% set ip_infos = geoname['city'] ~ ' (' ~ geoname['country'] ~ ')' %} + {% elseif geoname['fips'] %} + {% set ip_infos = geoname['fips'] ~ ' (' ~ geoname['country'] ~ ')' %} + {% elseif geoname['country'] %} + {% set ip_infos = geoname['country'] %} + {% else %} + {% set ip_infos = '' %} + {% endif %} + + + {{ row.getIpAddress() }}
    {{ ip_infos }} + {{ app['date-formatter'].getDate(row.getCreated()) }} + {{ app['date-formatter'].getPrettyString(row.getUpdated()) }} {% endfor %} diff --git a/templates/web/admin/dashboard.html.twig b/templates/web/admin/dashboard.html.twig index bf64157a07..8b8e46cebf 100644 --- a/templates/web/admin/dashboard.html.twig +++ b/templates/web/admin/dashboard.html.twig @@ -146,8 +146,8 @@

    {% trans 'setup:: Serveur Memcached' %}

      - {% if core.getCache().isServer() %} - {% set stats = core.getCache().getStats() %} + {% if app['cache'].isServer() %} + {% set stats = app['cache'].getStats() %}
    • {% trans 'setup::Serveur actif sur %s' %} {{registry.get('GV_cache_server_host')}} : {{registry.get('GV_cache_server_port')}}
    • {% for name, stat in stats%} @@ -158,7 +158,7 @@
    • {% trans 'setup::Aucun serveur memcached rattache.' %}
    • {% endif %} - {% if core.getCache().isServer() %} + {% if app['cache'].isServer() %} @@ -166,10 +166,10 @@

      {% trans 'OPCode cache' %}

        - {% if core['OpcodeCache'].getName() == 'array' %} + {% if app['opcode-cache'].getName() == 'array' %}
      • {% trans 'Array opcode cache is activated, but phrasea strongly recommand the use of APC or Xcache in production' %}
      • {% else %} -
      • {{ core['OpcodeCache'].getName() }}
      • +
      • {{ app['opcode-cache'].getName() }}
      • {% endif %}
      diff --git a/templates/web/admin/databases.html.twig b/templates/web/admin/databases.html.twig index 7dae563bdf..8ea4dbf4a9 100644 --- a/templates/web/admin/databases.html.twig +++ b/templates/web/admin/databases.html.twig @@ -1,9 +1,9 @@ -{% if app.request.query.get('success') == '1' %} +{% if app['request'].query.get('success') == '1' %}
      × {% trans 'Successful update' %}
      -{% elseif app.request.query.get('success') == '0' %} +{% elseif app['request'].query.get('success') == '0' %}
      × {% trans 'An error occured' %} @@ -13,7 +13,7 @@
      {% endif %} -{% if app.request.query.get('notice') == 'restart' %} +{% if app['request'].query.get('notice') == 'restart' %}
      × {% trans 'Do not forget to restart the tasks scheduler' %} @@ -37,14 +37,14 @@
      -{% if user.is_admin() %} +{% if user.ACL().is_admin() %}

      {% trans 'admin::base: Version' %}

      {% if upgrade_available %} -

      {% trans 'update::Votre application necessite une mise a jour vers : ' %} {{ version_number }}

      +

      {% trans 'update::Votre application necessite une mise a jour vers : ' %} {{ app['phraseanet.version'].getNumber() }}

      {% else %} -

      {% trans 'update::Votre version est a jour : ' %} {{ version_number }}

      +

      {% trans 'update::Votre version est a jour : ' %} {{ app['phraseanet.version'].getNumber() }}

      {% endif %} {% if recommendations | length > 0%} diff --git a/templates/web/admin/databox/cgus.html.twig b/templates/web/admin/databox/cgus.html.twig index 829a398d67..94d6b1bd7e 100644 --- a/templates/web/admin/databox/cgus.html.twig +++ b/templates/web/admin/databox/cgus.html.twig @@ -1,9 +1,9 @@

      {% trans'Terms Of Use' %}

      -
      -
      - -
      @@ -186,7 +186,7 @@ --> @@ -203,7 +203,7 @@ diff --git a/templates/web/admin/editusers_masks.html.twig b/templates/web/admin/editusers_masks.html.twig index e1c537006c..b468d48b74 100644 --- a/templates/web/admin/editusers_masks.html.twig +++ b/templates/web/admin/editusers_masks.html.twig @@ -1,9 +1,9 @@

      Masks

      -Base {{base_id|sbasFromBas|sbas_names}} +Base {{ collection.get_databox().get_viewname() }}
      -Collection {{base_id|bas_names}} +Collection {{base_id|bas_names(app)}}
      - {% if app.request.query.get('sort') == 'col' %} + {% if app['request'].query.get('sort') == 'col' %} {% endif %} {% trans 'phraseanet:: collection' %} - {% if app.request.query.get('sort') == 'obj' %} + {% if app['request'].query.get('sort') == 'obj' %} {% endif %} {% trans 'admin::base: objet' %} diff --git a/templates/web/admin/editusers.html.twig b/templates/web/admin/editusers.html.twig index f501d5159a..baf8ff6033 100644 --- a/templates/web/admin/editusers.html.twig +++ b/templates/web/admin/editusers.html.twig @@ -163,7 +163,7 @@ - +
      - +
      - {{rights['sbas_id']|sbas_names}} + {{rights['sbas_id']|sbas_names(app)}}
      @@ -353,7 +353,7 @@ {% endif %}
      - {{rights['base_id']|bas_names}} + {{rights['base_id']|bas_names(app)}} {{_self.format_checkbox(user, rights, 'access', users, 'base')}} @@ -519,7 +519,7 @@ {% trans 'admin::compte-utilisateur ville' %} - +
      diff --git a/templates/web/admin/editusers_quotas.html.twig b/templates/web/admin/editusers_quotas.html.twig index 01b3b280c6..9d274fddd7 100644 --- a/templates/web/admin/editusers_quotas.html.twig +++ b/templates/web/admin/editusers_quotas.html.twig @@ -38,11 +38,11 @@

      {% trans 'Quotas' %}

      -{% set base = base_id|sbasFromBas|sbas_names %} +{% set base = collection.get_databox().get_viewname() %} {% trans %}Base {{base}}{% endtrans %}
      -{% set collection = base_id|bas_names %} +{% set collection = base_id|bas_names(app) %} {% trans %}Collection {{collection}}{% endtrans %}
      diff --git a/templates/web/admin/editusers_timelimit.html.twig b/templates/web/admin/editusers_timelimit.html.twig index 452a32c975..9469d1a801 100644 --- a/templates/web/admin/editusers_timelimit.html.twig +++ b/templates/web/admin/editusers_timelimit.html.twig @@ -1,10 +1,10 @@

      {% trans 'Limite temporelle' %}

      -{% set base = base_id|sbasFromBas|sbas_names %} +{% set base = collection.get_databox().get_viewname() %} {% trans %}Base {{base}}{% endtrans %}
      -{% set collection = base_id|bas_names %} +{% set collection = base_id|bas_names(app) %} {% trans %}Collection {{collection}}{% endtrans %}
      diff --git a/templates/web/admin/index.html.twig b/templates/web/admin/index.html.twig index f94ff88cc9..a5edbb2b43 100644 --- a/templates/web/admin/index.html.twig +++ b/templates/web/admin/index.html.twig @@ -59,7 +59,7 @@ dataType: 'json', data: { app : 3, - usr : {{ session.get_usr_id() }} + usr : {{ app['phraseanet.user'].get_id() }} }, error: function(){ window.setTimeout("sessionactive();", 10000); diff --git a/templates/web/admin/publications/list.html.twig b/templates/web/admin/publications/list.html.twig index 5f3ea7a843..4b7b81199d 100644 --- a/templates/web/admin/publications/list.html.twig +++ b/templates/web/admin/publications/list.html.twig @@ -66,8 +66,8 @@ - - {% endfor %} @@ -249,4 +249,4 @@ {% else %} {% trans 'No application for registration has been recorded' %} - {% endif %} \ No newline at end of file + {% endif %} diff --git a/templates/web/admin/user/import/file.html.twig b/templates/web/admin/user/import/file.html.twig index 1a8becb736..67ef58bbd4 100644 --- a/templates/web/admin/user/import/file.html.twig +++ b/templates/web/admin/user/import/file.html.twig @@ -2,8 +2,8 @@

      {% trans 'Upload a "csv" file for users creation' %}

      -{% if app.request.query.get('error') is not none %} - {% set error = app.request.query.get('error') %} +{% if app['request'].query.get('error') is not none %} + {% set error = app['request'].query.get('error') %}
      {% if error == 'file-invalid' %} diff --git a/templates/web/admin/users.html.twig b/templates/web/admin/users.html.twig index c4e497f29f..2f5047790a 100644 --- a/templates/web/admin/users.html.twig +++ b/templates/web/admin/users.html.twig @@ -3,10 +3,10 @@ {% block content %} -{% if app.request.query.get('user-updated') is not none%} +{% if app['request'].query.get('user-updated') is not none%}
      - {% set user_count = app.request.get('user-updated') %} + {% set user_count = app['request'].get('user-updated') %} {% trans %} {{ user_count }} user has been crreated {% plural user_count %} @@ -140,7 +140,7 @@ {{usr.get_applied_template()}}
      {% endfor %} diff --git a/templates/web/api/auth/end_user_authorization.html.twig b/templates/web/api/auth/end_user_authorization.html.twig index eafb6a95c6..c738c85bde 100644 --- a/templates/web/api/auth/end_user_authorization.html.twig +++ b/templates/web/api/auth/end_user_authorization.html.twig @@ -31,7 +31,7 @@

      {{home_title}}

      - {% if not session.is_authenticated %} + {% if not app.isAuthenticated() %}
      {% for key,value in auth.getParams %} diff --git a/templates/web/common/HTML5Video.html.twig b/templates/web/common/HTML5Video.html.twig index 704f7af5d6..89ec55fe74 100644 --- a/templates/web/common/HTML5Video.html.twig +++ b/templates/web/common/HTML5Video.html.twig @@ -1,4 +1,4 @@ -{% macro format(arraySubdefs, displayWidth, displayHeight, extraclass, session, wrap)%} +{% macro format(arraySubdefs, displayWidth, displayHeight, extraclass, wrap)%} {% set displayWidth = displayWidth %} {% set displayHeight = displayHeight|default(displayWidth) %} @@ -20,7 +20,7 @@ {% set s_width = subdef.get_width() %} {% set s_height = subdef.get_height() %} {% endif %} - {% if session.is_authenticated() == true %} + {% if app.isAuthenticated() == true %} {% set url = subdef.get_url() %} {% else %} {% set url = subdef.get_permalink().get_url() %} diff --git a/templates/web/common/dialog_export.html.twig b/templates/web/common/dialog_export.html.twig index 757277f20e..59e5b197ff 100644 --- a/templates/web/common/dialog_export.html.twig +++ b/templates/web/common/dialog_export.html.twig @@ -120,7 +120,7 @@ {% endif %} @@ -187,7 +187,7 @@ {% endif %} @@ -233,7 +233,7 @@ {% endif %} @@ -329,7 +329,7 @@
      - +
      @@ -391,7 +391,7 @@ {% endif %} diff --git a/templates/web/common/index_bootstrap.html.twig b/templates/web/common/index_bootstrap.html.twig index 715ab0f84d..ce097f37e7 100644 --- a/templates/web/common/index_bootstrap.html.twig +++ b/templates/web/common/index_bootstrap.html.twig @@ -1,5 +1,5 @@ - + {% if local_title is defined%}{{local_title}} | {% endif %}{{home_title}} - {{ module_name }} diff --git a/templates/web/common/indexfloat.html.twig b/templates/web/common/indexfloat.html.twig index c2e88bde13..44054f01f5 100644 --- a/templates/web/common/indexfloat.html.twig +++ b/templates/web/common/indexfloat.html.twig @@ -1,5 +1,5 @@ - + {% if local_title is defined%}{{local_title}} | {% endif %}{{home_title}} - {{ module_name }} diff --git a/templates/web/common/menubar.html.twig b/templates/web/common/menubar.html.twig index 6551655e57..db5ca8ac06 100644 --- a/templates/web/common/menubar.html.twig +++ b/templates/web/common/menubar.html.twig @@ -6,7 +6,7 @@ Phraseanet - {% if module != "lightbox" and session.is_authenticated %} + {% if module != "lightbox" and app.isAuthenticated() %}
    • {% if module == "prod" %} @@ -15,7 +15,7 @@ {% else %} - {% if browser.isNewGeneration %} + {% if app['browser'].isNewGeneration %} {% if module == "client" %} @@ -33,7 +33,7 @@ {% endif %}
    • - {% if browser.isNewGeneration and registry.get('GV_thesaurus') == true and user.ACL.has_access_to_module('thesaurus') %} + {% if app['browser'].isNewGeneration and registry.get('GV_thesaurus') == true and user.ACL.has_access_to_module('thesaurus') %}
    • @@ -81,7 +81,7 @@
    • {% set link = '/prod/upload/' %} - {% if not browser.supportFileAPI() %} + {% if not app['browser'].supportFileAPI() %} {% set link = '/prod/upload/flash-version/' %} {% endif %} @@ -127,9 +127,9 @@ {% trans 'Notifications' %} - @@ -138,7 +138,7 @@ {% endif %}
    • - {% if session.is_authenticated %} + {% if app.isAuthenticated() %} {% if user.is_guest %} {% trans 'Guest' %} @@ -172,7 +172,7 @@
    • {% endif %} +
      ">{% trans 'phraseanet:: a propos' %} @@ -181,7 +181,7 @@
      {{ feed.get_title() }} - {{ feed.get_created_on()|formatDate }} + + {{ app['date-formatter'].getDate(feed.get_created_on()) }} {% if feed.get_collection() != null %} diff --git a/templates/web/admin/sphinx/configuration.html.twig b/templates/web/admin/sphinx/configuration.html.twig index ffcbad706a..fbc3bb94cc 100644 --- a/templates/web/admin/sphinx/configuration.html.twig +++ b/templates/web/admin/sphinx/configuration.html.twig @@ -1,4 +1,4 @@ -{% if app.request.query.get('success') == '1' %} +{% if app['request'].query.get('success') == '1' %}
      × {% trans 'Successful update' %} diff --git a/templates/web/admin/statusbit/edit.html.twig b/templates/web/admin/statusbit/edit.html.twig index c125cefe46..3058522423 100644 --- a/templates/web/admin/statusbit/edit.html.twig +++ b/templates/web/admin/statusbit/edit.html.twig @@ -5,104 +5,105 @@
      {% endif %} -

      {% trans 'status:: numero de bit' %} {{ app.request.get('bit') }}

      - -
      -
      - -
      -
      - {% trans'admin::status: case A'%} -
      - -
      - -
      -
      -
      - -
      - -
      - {% if status['img_off'] is defined and status['img_off'] %} - - {% endif %} +

      {% trans 'status:: numero de bit' %} {{ app['request'].get('bit') }}

      + + +
      +
      +
      -
      -
      -
      - -
      - -
      -
      -
      -
      - {% trans'admin::status: case B'%} -
      - -
      - -
      -
      -
      - -
      - -
      - {% if status['img_on'] is defined and status['img_on'] %} - - {% endif %} -
      -
      -
      -
      - -
      - -
      -
      -
      -
      - - -
      -
      -
      - - {% trans 'boutton::retour' %} - -
      -
      -
      - +
      +{% trans'admin::status: case A'%} +
      + +
      + +
      +
      +
      + +
      + +
      + {% if status['img_off'] is defined and status['img_off'] %} + + {% endif %} +
      +
      +
      +
      + +
      + +
      +
      +
      +
      +{% trans'admin::status: case B'%} +
      + +
      + +
      +
      +
      + +
      + +
      + {% if status['img_on'] is defined and status['img_on'] %} + + {% endif %} +
      +
      +
      +
      + +
      + +
      +
      +
      +
      + + +
      +
      +
      + + {% trans 'boutton::retour' %} + +
      +
      + + \ No newline at end of file + diff --git a/templates/web/admin/tree.html.twig b/templates/web/admin/tree.html.twig index 4244ee2dc0..fb3e245a2f 100644 --- a/templates/web/admin/tree.html.twig +++ b/templates/web/admin/tree.html.twig @@ -2,7 +2,7 @@
      - {{ row["date_modif"]|prettyDate }} + + {{ app['date-formatter'].getPrettyString(row["date_modif"]) }} {# Delete this when the JS 'll be updated -- @@ -202,7 +202,7 @@ - {{ basId| bas_names }} + {{ basId| bas_names(app) }}
      - {{usr.get_creation_date()|formatDate}} + {{ app['date-formatter'].getDate(usr.get_creation_date()) }}
    • - {% if session.is_authenticated %} + {% if app.isAuthenticated() %} {% trans 'phraseanet:: deconnection' %} @@ -196,6 +196,6 @@
    diff --git a/templates/web/common/preview.html.twig b/templates/web/common/preview.html.twig index c75830a833..c0295a8bf3 100644 --- a/templates/web/common/preview.html.twig +++ b/templates/web/common/preview.html.twig @@ -18,4 +18,4 @@ {% set width = preview_obj.get_width() %} {% set height = preview_obj.get_height() %} -{{ thumbnail.format(preview_obj, preview_obj.get_width(), preview_obj.get_height(), '', session, wrap, false) }} +{{ thumbnail.format(preview_obj, preview_obj.get_width(), preview_obj.get_height(), '', wrap, false) }} diff --git a/templates/web/common/thumbnail.html.twig b/templates/web/common/thumbnail.html.twig index 85ef7cd840..d10793a92d 100644 --- a/templates/web/common/thumbnail.html.twig +++ b/templates/web/common/thumbnail.html.twig @@ -1,4 +1,4 @@ -{% macro format(thumbnail, b_w, b_h, extraclass, session, wrap, lazyload)%} +{% macro format(thumbnail, b_w, b_h, extraclass, wrap, lazyload)%} {% set record_type = thumbnail.get_type() %} @@ -42,7 +42,7 @@ - {% if session.is_authenticated() == true %} + {% if app.isAuthenticated() == true %} {% set url = thumbnail.get_url() %} {% else %} {% set url = thumbnail.get_permalink().get_url() %} @@ -76,7 +76,7 @@ swfobject.embedSWF("/include/FlexPaper_flash/FlexPaperViewer.swf", "preview_{{thumbnail.get_sbas_id()}}_{{thumbnail.get_record_id()}}_{{random}}", "100%", "100%", "9.0.0", false, false, - {menu: "false",flashvars: "SwfFile={{url}}&Scale=0.6&ZoomTransition=easeOut&ZoomTime=0.5&ZoomInterval=0.1&FitPageOnLoad=true&FitWidthOnLoad=true&PrintEnabled=true&FullScreenAsMaxWindow=false&localeChain={{session.get_locale()}}", movie: "/include/FlexPaper_flash/FlexPaperViewer.swf", allowFullScreen :"true",wmode: "transparent"}, false); + {menu: "false",flashvars: "SwfFile={{url}}&Scale=0.6&ZoomTransition=easeOut&ZoomTime=0.5&ZoomInterval=0.1&FitPageOnLoad=true&FitWidthOnLoad=true&PrintEnabled=true&FullScreenAsMaxWindow=false&localeChain={{app['locale']}}", movie: "/include/FlexPaper_flash/FlexPaperViewer.swf", allowFullScreen :"true",wmode: "transparent"}, false); {% elseif record_type == 'AUDIO_MP3' %} {% set random = thumbnail.get_random() %} @@ -107,7 +107,7 @@ -{% macro format_fit(thumbnail, b_w, b_h, extraclass, session, wrap)%} +{% macro format_fit(thumbnail, b_w, b_h, extraclass, wrap)%} {% set record_type = thumbnail.get_type() %} {% if record_type == 'AUDIO_MP3' %} @@ -146,7 +146,7 @@ - {% if session.is_authenticated() == true %} + {% if app.isAuthenticated() == true %} {% set url = thumbnail.get_url() %} {% else %} {% set url = thumbnail.get_permalink().get_url() %} @@ -178,7 +178,7 @@ swfobject.embedSWF("/include/FlexPaper_flash/FlexPaperViewer.swf", "preview_{{thumbnail.get_sbas_id()}}_{{thumbnail.get_record_id()}}_{{random}}", "100%", "100%", "9.0.0", false, false, - {menu: "false",flashvars: "SwfFile={{url}}&Scale=0.6&ZoomTransition=easeOut&ZoomTime=0.5&ZoomInterval=0.1&FitPageOnLoad=true&FitWidthOnLoad=true&PrintEnabled=true&FullScreenAsMaxWindow=false&localeChain={{session.get_locale()}}", movie: "/include/FlexPaper_flash/FlexPaperViewer.swf", allowFullScreen :"true",wmode: "transparent"}, false); + {menu: "false",flashvars: "SwfFile={{url}}&Scale=0.6&ZoomTransition=easeOut&ZoomTime=0.5&ZoomInterval=0.1&FitPageOnLoad=true&FitWidthOnLoad=true&PrintEnabled=true&FullScreenAsMaxWindow=false&localeChain={{app['locale']}}", movie: "/include/FlexPaper_flash/FlexPaperViewer.swf", allowFullScreen :"true",wmode: "transparent"}, false); {% elseif record_type == 'AUDIO_MP3' %} {% set random = thumbnail.get_random() %} @@ -204,4 +204,4 @@ {% endif %} -{% endmacro %} \ No newline at end of file +{% endmacro %} diff --git a/templates/web/lightbox/IE6/agreement_box.html.twig b/templates/web/lightbox/IE6/agreement_box.html.twig index 36a88eecb6..46b106d939 100644 --- a/templates/web/lightbox/IE6/agreement_box.html.twig +++ b/templates/web/lightbox/IE6/agreement_box.html.twig @@ -14,11 +14,11 @@ {% if basket.getValidation() %}
    - {{ basket.getValidation().getValidationString(user) }} + {{ basket.getValidation().getValidationString(app, user) }}
      {% for validation_data in basket_element.getValidationDatas() %} - {% if basket.getValidation().getParticipant(user).getCanSeeOthers() or validation_data.getParticipant().getUser() == core.getAuthenticatedUser() %} + {% if basket.getValidation().getParticipant(user, app).getCanSeeOthers() or validation_data.getParticipant().getUser(app) == app['phraseanet.user'] %} {% if validation_data.getAgreement() == true %} {% set classuser = 'agree' %} {% elseif validation_data.getAgreement() is null %} @@ -26,20 +26,20 @@ {% else %} {% set classuser = 'disagree' %} {% endif %} - {% set participant = validation_data.getParticipant().getUser() %} + {% set participant = validation_data.getParticipant().getUser(app) %}
    • {{participant.get_display_name()}}
    • {% endif %} {% endfor %}
    {% endif %} - {% if basket_element and basket_element.getBasket().getValidation() and basket.getValidation().getParticipant(user).getCanAgree() %} + {% if basket_element and basket_element.getBasket().getValidation() and basket.getValidation().getParticipant(user, app).getCanAgree() %}
    - {% set agreement = basket_element.getUserValidationDatas(user).getAgreement() %} + {% set agreement = basket_element.getUserValidationDatas(user, app).getAgreement() %}
    {% trans 'validation:: OUI' %}
    diff --git a/templates/web/lightbox/IE6/basket_options.html.twig b/templates/web/lightbox/IE6/basket_options.html.twig index 2506376d28..26fca197ed 100644 --- a/templates/web/lightbox/IE6/basket_options.html.twig +++ b/templates/web/lightbox/IE6/basket_options.html.twig @@ -1,4 +1,4 @@ -{% if basket.getValidation() and basket.getValidation().getParticipant(user).getCanAgree() %} +{% if basket.getValidation() and basket.getValidation().getParticipant(user, app).getCanAgree() %}
    {% if basket_length > 0%} - {{thumbnail.format(basket.getELements().first().getRecord().get_thumbnail, 170, 170, '', session, true, false)}} + {{thumbnail.format(basket.getELements().first().getRecord(app).get_thumbnail, 170, 170, '', true, false)}} {% endif %} @@ -56,7 +56,7 @@ {% if basket.getValidation().isFinished() %} {% trans '(validation) session terminee' %} - {% elseif basket.getValidation().getParticipant(user).getIsConfirmed() %} + {% elseif basket.getValidation().getParticipant(user, app).getIsConfirmed() %} {% trans '(validation) envoyee' %} {% else %} {% trans '(validation) a envoyer' %} @@ -72,7 +72,7 @@
    {{ basket.getDescription() }}
    -
    {{ basket.getValidation.getValidationString(user) }}
    +
    {{ basket.getValidation.getValidationString(app, user) }}
    @@ -106,7 +106,7 @@ {% if basket_length > 0%} - {{thumbnail.format(basket.getElements().first().getRecord().get_thumbnail, 170, 170, '', session, true, false)}} + {{thumbnail.format(basket.getElements().first().getRecord(app).get_thumbnail, 170, 170, '', true, false)}} {% endif %} diff --git a/templates/web/lightbox/IE6/sc_container.html.twig b/templates/web/lightbox/IE6/sc_container.html.twig index 6c63f7a94c..5fe0663dbf 100644 --- a/templates/web/lightbox/IE6/sc_container.html.twig +++ b/templates/web/lightbox/IE6/sc_container.html.twig @@ -5,20 +5,20 @@
    diff --git a/templates/web/lightbox/IE6/sc_options_box.html.twig b/templates/web/lightbox/IE6/sc_options_box.html.twig index ff4197a9de..9a8af17768 100644 --- a/templates/web/lightbox/IE6/sc_options_box.html.twig +++ b/templates/web/lightbox/IE6/sc_options_box.html.twig @@ -22,7 +22,7 @@
    - +
    | {% if basket_element.getBasket().getValidation() %} diff --git a/templates/web/lightbox/IE6/validate.html.twig b/templates/web/lightbox/IE6/validate.html.twig index 55009e166f..3114a148ee 100644 --- a/templates/web/lightbox/IE6/validate.html.twig +++ b/templates/web/lightbox/IE6/validate.html.twig @@ -30,8 +30,8 @@
    {% if basket_element %}{{basket_element.getOrd()}}{% endif %}
    -
    - {% if basket_element %}{{basket_element.getRecord().get_title}}{% endif %} +
    + {% if basket_element %}{{basket_element.getRecord(app).get_title}}{% endif %}
    @@ -45,12 +45,12 @@
    {% if basket_element %} - {% set bask_prev = basket_element.getRecord().get_preview() %} + {% set bask_prev = basket_element.getRecord(app).get_preview() %} {% set width = bask_prev.get_width() %} {% set height = bask_prev.get_height() %} - {{ thumbnail.format(bask_prev, width,height, '', session, false, false) }} + {{ thumbnail.format(bask_prev, width,height, '', false, false) }} {% endif %} {% include 'lightbox/selector_box.html.twig' %} @@ -66,8 +66,8 @@
    -
    - {% if basket_element %}{{basket_element.getRecord().get_title}}{% endif %} +
    + {% if basket_element %}{{basket_element.getRecord(app).get_title}}{% endif %}
    @@ -102,8 +102,8 @@
    {% if basket_element %} - {% set business = user.ACL().has_right_on_base(basket_element.getRecord().get_base_id(), 'canmodifrecord') %} - {{caption.format_caption(basket_element.getRecord(), '', null, business)}} + {% set business = user.ACL().has_right_on_base(basket_element.getRecord(app).get_base_id(), 'canmodifrecord') %} + {{caption.format_caption(basket_element.getRecord(app), '', null, business)}} {% endif %}
    diff --git a/templates/web/lightbox/agreement_box.html.twig b/templates/web/lightbox/agreement_box.html.twig index 326d10dd0c..f84c6d8f0f 100644 --- a/templates/web/lightbox/agreement_box.html.twig +++ b/templates/web/lightbox/agreement_box.html.twig @@ -13,10 +13,10 @@ {% if basket.getValidation() %} -
    {{ basket.getValidation().getValidationString(user) }}
    +
    {{ basket.getValidation().getValidationString(app, user) }}
      {% for choice in basket_element.getValidationDatas() %} - {% if basket.getValidation().getParticipant(user).getCanSeeOthers() or choice.getParticipant().getUser() == core.getAuthenticatedUser() %} + {% if basket.getValidation().getParticipant(user, app).getCanSeeOthers() or choice.getParticipant().getUser(app) == app['phraseanet.user'] %} {% if choice.getAgreement() == true %} {% set classuser = 'agree' %} {% elseif choice.getAgreement() is null %} @@ -24,7 +24,7 @@ {% else %} {% set classuser = 'disagree' %} {% endif %} - {% set participant = choice.getParticipant().getUser() %} + {% set participant = choice.getParticipant().getUser(app) %}
    • {{participant.get_display_name()}}
    • {% endif %} {% endfor %} @@ -32,10 +32,10 @@ {% endif %}
    -{% if basket_element and basket_element.getBasket().getValidation() and basket.getValidation().getParticipant(user).getCanAgree() %} +{% if basket_element and basket_element.getBasket().getValidation() and basket.getValidation().getParticipant(user, app).getCanAgree() %}
    - {% set agreement = basket_element.getUserValidationDatas(user).getAgreement() %} + {% set agreement = basket_element.getUserValidationDatas(user, app).getAgreement() %}
    {% trans 'validation:: OUI' %}
    diff --git a/templates/web/lightbox/basket_content_report.html.twig b/templates/web/lightbox/basket_content_report.html.twig index bb5722d842..1c0f50bfe5 100644 --- a/templates/web/lightbox/basket_content_report.html.twig +++ b/templates/web/lightbox/basket_content_report.html.twig @@ -3,7 +3,7 @@
    {% for basket_element in basket.getElements() %} - {% set record = basket_element.getRecord() %} + {% set record = basket_element.getRecord(app) %}
    @@ -14,7 +14,7 @@
    {{basket_element.getOrd()}}
    - {{thumbnail.format(record.get_thumbnail(),165, 125, '', session, true, false)}} + {{thumbnail.format(record.get_thumbnail(),165, 125, '', true, false)}}
    @@ -33,7 +33,7 @@ {% set imguser = '' %} {% set styleuser = '' %} {% endif %} - {{imguser|raw}} {{validationDatas.getParticipant().getUser().get_display_name()}} + {{imguser|raw}} {{validationDatas.getParticipant().getUser(app).get_display_name()}} {% if validationDatas.getNote() != '' %} : {{validationDatas.getNote()|nl2br}} {% endif %} diff --git a/templates/web/lightbox/basket_options.html.twig b/templates/web/lightbox/basket_options.html.twig index bc1735d9d8..fb8fa514a2 100644 --- a/templates/web/lightbox/basket_options.html.twig +++ b/templates/web/lightbox/basket_options.html.twig @@ -1,4 +1,4 @@ -{% if basket.getValidation() and basket.getValidation().getParticipant(user).getCanAgree() %} +{% if basket.getValidation() and basket.getValidation().getParticipant(user, app).getCanAgree() %}
    {% if basket_length > 0%} - {{thumbnail.format(basket.getElements().first().getRecord().get_thumbnail, 170, 170, '', session, true, false)}} + {{thumbnail.format(basket.getElements().first().getRecord(app).get_thumbnail, 170, 170, '', true, false)}} {% endif %} @@ -57,7 +57,7 @@ {% if basket.getValidation().isFinished() %} {% trans '(validation) session terminee' %} - {% elseif basket.getValidation().getParticipant(user).getIsConfirmed() %} + {% elseif basket.getValidation().getParticipant(user, app).getIsConfirmed() %} {% trans '(validation) envoyee' %} {% else %} {% trans '(validation) a envoyer' %} @@ -73,7 +73,7 @@
    {{ basket.getDescription() }}
    -
    {{ basket.getValidation().getValidationString(user) }}
    +
    {{ basket.getValidation().getValidationString(app, user) }}
    @@ -107,7 +107,7 @@ {% if basket_length > 0%} - {{thumbnail.format(basket.getElements().first().getRecord().get_thumbnail, 170, 170, '', session, true, false)}} + {{thumbnail.format(basket.getElements().first().getRecord(app).get_thumbnail, 170, 170, '', true, false)}} {% endif %} diff --git a/templates/web/lightbox/sc_container.html.twig b/templates/web/lightbox/sc_container.html.twig index 07b71ba313..817a91d93b 100644 --- a/templates/web/lightbox/sc_container.html.twig +++ b/templates/web/lightbox/sc_container.html.twig @@ -5,21 +5,21 @@ diff --git a/templates/web/lightbox/sc_note.html.twig b/templates/web/lightbox/sc_note.html.twig index 19052320b3..cf950e5555 100644 --- a/templates/web/lightbox/sc_note.html.twig +++ b/templates/web/lightbox/sc_note.html.twig @@ -9,16 +9,16 @@
    {% for validationDatas in basket_element.getValidationDatas() %} {% if validationDatas.getNote() != '' %} -
    +
    - {{validationDatas.getParticipant().getUser().get_display_name()}} + {{validationDatas.getParticipant().getUser(app).get_display_name()}} : {{ validationDatas.getNote()|nl2br }}
    {% endif %} {% endfor %}
    - +
    - + | {% if basket_element.getBasket().getValidation() %} diff --git a/templates/web/lightbox/selector_box.html.twig b/templates/web/lightbox/selector_box.html.twig index 6ce75c7340..c99317894d 100644 --- a/templates/web/lightbox/selector_box.html.twig +++ b/templates/web/lightbox/selector_box.html.twig @@ -1,8 +1,8 @@ {% if basket_element and basket_element.getBasket().getValidation() %} {% endif %} diff --git a/templates/web/lightbox/validate.html.twig b/templates/web/lightbox/validate.html.twig index 0c0d40e1f1..1f2979a8fe 100644 --- a/templates/web/lightbox/validate.html.twig +++ b/templates/web/lightbox/validate.html.twig @@ -36,9 +36,9 @@
    -
    +
    {% if basket_element %} - {{basket_element.getRecord().get_title}} + {{basket_element.getRecord(app).get_title}} {% endif %}
    @@ -53,12 +53,12 @@
    {% if basket_element %} - {% set bask_prev = basket_element.getRecord().get_preview() %} + {% set bask_prev = basket_element.getRecord(app).get_preview() %} {% set width = bask_prev.get_width() %} {% set height = bask_prev.get_height() %} - {{ thumbnail.format(bask_prev, width,height, '', session, false, false) }} + {{ thumbnail.format(bask_prev, width,height, '', false, false) }} {% endif %} {% include 'lightbox/selector_box.html.twig' %} @@ -74,8 +74,8 @@
    -
    - {% if basket_element %}{{basket_element.getRecord().get_title}}{% endif %} +
    + {% if basket_element %}{{basket_element.getRecord(app).get_title}}{% endif %}
    @@ -100,8 +100,8 @@
    {% if basket_element %} - {% set business = user.ACL().has_right_on_base(basket_element.getRecord().get_base_id(), 'canmodifrecord') %} - {{caption.format_caption(basket_element.getRecord(), '', null, business)}} + {% set business = user.ACL().has_right_on_base(basket_element.getRecord(app).get_base_id(), 'canmodifrecord') %} + {{caption.format_caption(basket_element.getRecord(app), '', null, business)}} {% endif %}
    @@ -184,7 +184,7 @@ {% endblock %} diff --git a/templates/web/login/forgot-password.html.twig b/templates/web/login/forgot-password.html.twig index f840c5a4f5..a8abd36e21 100644 --- a/templates/web/login/forgot-password.html.twig +++ b/templates/web/login/forgot-password.html.twig @@ -60,7 +60,7 @@ {% if tokenize %} - {% if app.request.get('salt') %} + {% if app['request'].get('salt') %}
    {% trans 'Pour ameliorer la securite de l\'application, vous devez mettre a jour votre mot de passe.' %}
    {% trans 'Cette tache ne pouvant etre automatisee, merci de bien vouloir la realiser.' %} @@ -109,7 +109,7 @@ - + diff --git a/templates/web/login/index.html.twig b/templates/web/login/index.html.twig index 20f86ca5e7..dbb60820f5 100644 --- a/templates/web/login/index.html.twig +++ b/templates/web/login/index.html.twig @@ -1,4 +1,4 @@ - + {% include 'login/head.html.twig' %} @@ -10,13 +10,13 @@
    - {% if browser.isOldBrowser %} + {% if app['browser'].isOldBrowser %} {% endif %} - {% if display_chrome_frame and session.get_cookie('gfc_box') == false %} + {% if display_chrome_frame and app['request'].cookies.get('gfc_box') == false %}