Bump to Twig 3 (#1264)

* Bump to Twig 3 and update templates

* Update composer.lock

* Fix test Box\Mod\System\ServiceTest::testrenderStringTemplate

Co-authored-by: andpavlenko <lance@xosting.net.ua>
This commit is contained in:
Andrey Pavlenkoandandpavlenko authored and GitHub committed 2022-04-09 11:02:17 +03:00
1 parent a868c9f32b
commit 9b474dee89
301 files changed
+9158 -8806

No files matched your search

@@ -1,6 +1,6 @@
{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %}
{% block meta_title %}{% trans 'Example module' %}{% endblock %}
{% block meta_title %}{{ 'Example module'|trans }}{% endblock %}
{% set active_menu = 'example' %}
@@ -8,11 +8,11 @@
<div class="widget">
<div class="head">
<h5>{% trans 'Example module for developers' %}</h5>
<h5>{{ 'Example module for developers'|trans }}</h5>
</div>
<div class="help">
<h3>{% trans 'This is an example extension' %}</h3>
<h3>{{ 'This is an example extension'|trans }}</h3>
</div>
<ul>
<li><a href="{{ 'example'|alink }}">Example module index</a></li>
@@ -28,19 +28,17 @@
{# Check if example parameters passed to template file #}
{% if youparamname %}
<div class="help">
<h3>{% trans 'Parameters from Controller' %}</h3>
<h3>{{ 'Parameters from Controller'|trans }}</h3>
</div>
<div class="body">
<p>You have passed parameter youparamname: <strong>{{ youparamname }}</strong></p>
</div>
{% endif %}
{# Check if example parameters passed to template file #}
{% if userid %}
<div class="help">
<h3>{% trans 'Parameters from URL' %}</h3>
<h3>{{ 'Parameters from URL'|trans }}</h3>
</div>
<div class="body">
<p>You have passed parameter userid: <strong>{{ userid }}</strong></p>
@@ -50,7 +48,7 @@
{% if api_example %}
{# API example #}
<div class="help">
<h3>{% trans 'API example' %}</h3>
<h3>{{ 'API example'|trans }}</h3>
</div>
<div class="body">
<h5 class="pt12">Data from API and passed to template from controller</h5>
@@ -65,12 +63,11 @@
<div class="widget">
<div class="head">
<h5>{% trans 'README' %}</h5>
<h5>{{ 'README'|trans }}</h5>
</div>
<div class="body list arrowBlue">
{{ guest.example_readme|bbmd }}
</div>
</div>
{% endblock %}
{% endblock %}
@@ -1,53 +1,53 @@
{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %}
{% import "macro_functions.phtml" as mf %}
{% block meta_title %}Example extension settings{% endblock %}
{% set active_menu = 'system' %}
{% block breadcrumbs %}
<ul>
<li class="firstB"><a href="{{ '/'|alink }}">{% trans 'Home' %}</a></li>
<li><a href="{{ 'system'|alink }}">{% trans 'Settings' %}</a></li>
<li class="lastB">{% trans 'Example module settings' %}</li>
<li class="firstB"><a href="{{ '/'|alink }}">{{ 'Home'|trans }}</a></li>
<li><a href="{{ 'system'|alink }}">{{ 'Settings'|trans }}</a></li>
<li class="lastB">{{ 'Example module settings'|trans }}</li>
</ul>
{% endblock %}
{% block content %}
<div class="widget">
<div class="head">
<h5 class="iCog">{% trans 'Example module settings' %}</h5>
<h5 class="iCog">{{ 'Example module settings'|trans }}</h5>
</div>
{% set params = admin.extension_config_get({"ext":"mod_example"}) %}
{% set params = admin.extension_config_get({ "ext": "mod_example" }) %}
<form method="post" action="{{ 'api/admin/extension/config_save'|link }}" class="mainForm api-form" data-api-msg="{% trans 'Configuration updated' %}">
<form method="post" action="{{ 'api/admin/extension/config_save'|link }}" class="mainForm api-form" data-api-msg="{{ 'Configuration updated'|trans }}">
<div class="help">
<h3>{% trans 'Example extension settings' %}</h3>
<p>{% trans 'Every extension can have settings page. Only requirement is to have mod_example_settings.phtml page in html_admin folder' %}</p>
<h3>{{ 'Example extension settings'|trans }}</h3>
<p>{{ 'Every extension can have settings page. Only requirement is to have mod_example_settings.phtml page in html_admin folder'|trans }}</p>
</div>
<fieldset>
<div class="rowElem noborder">
<label>{% trans 'Parameter title' %}</label>
<label>{{ 'Parameter title'|trans }}</label>
<div class="formRight">
<input type="text" name="custom_param" value="{{params.custom_param}}" placeholder="{% trans 'Example custom value' %}"/>
<input type="text" name="custom_param" value="{{ params.custom_param }}" placeholder="{{ 'Example custom value'|trans }}"/>
</div>
<div class="fix"></div>
</div>
<div class="rowElem">
<label>{% trans 'Public parameter title' %}</label>
<label>{{ 'Public parameter title'|trans }}</label>
<div class="formRight">
<input type="text" name="public[param]" value="{{params.public.param}}" placeholder="{% trans 'This setting will be accessible by the Guest API' %}"/>
<input type="text" name="public[param]" value="{{ params.public.param }}" placeholder="{{ 'This setting will be accessible by the Guest API'|trans }}"/>
</div>
<div class="fix"></div>
</div>
<input type="submit" value="{% trans 'Update' %}" class="greyishBtn submitForm" />
<input type="submit" value="{{ 'Update'|trans }}" class="greyishBtn submitForm" />
<input type="hidden" name="ext" value="mod_example" />
</fieldset>
</form>
</div>
{% endblock %}
{% endblock %}
@@ -1,48 +1,47 @@
{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %}
{% block meta_title %}{% trans 'Example module' %}{% endblock %}
{% block breadcrumb %} <li class="active">{% trans 'Example module' %}</li>{% endblock %}
{% block meta_title %}{{ 'Example module'|trans }}{% endblock %}
{% block breadcrumb %} <li class="active">{{ 'Example module'|trans }}</li>{% endblock %}
{% block page_header %}
<article class="page-header">
<h1>{% trans 'Example module title' %}</h1>
<h1>{{ 'Example module title'|trans }}</h1>
</article>
{% endblock%}
{% block content %}
<div class="row">
<article class="span12 data-block">
<div class="data-container">
<header>
<h1>{% trans 'Example module title' %}</h1>
<p>{% trans 'Example module description' %}</p>
<h1>{{ 'Example module title'|trans }}</h1>
<p>{{ 'Example module description'|trans }}</p>
</header>
<section>
{{ guest.example_readme|markdown }}
{% if client %}
<a class="btn btn-primary" href="{{ 'example/protected'|link }}">{% trans 'See protected content' %}</a>
<a class="btn btn-primary" href="{{ 'example/protected'|link }}">{{ 'See protected content'|trans }}</a>
{% else %}
<a class="btn btn-primary" href="{{ 'login'|link }}">{% trans 'Login to client area' %}</a>
<a class="btn btn-primary" href="{{ 'login'|link }}">{{ 'Login to client area'|trans }}</a>
{% endif %}
</section>
</div>
</article>
</div>
{% if show_protected %}
<div class="row">
<article class="span12 data-block">
<div class="data-container">
<header>
<h2>{% trans 'This content can be seen only if client is logged in' %}</h2>
<h2>{{ 'This content can be seen only if client is logged in'|trans }}</h2>
</header>
<section>
<p>{% trans 'Your protected content' %}</p>
<p><a class="btn btn-inverse" href="{{ 'client/me'|link }}">{% trans 'Manage profile' %}</a></p>
<p>{{ 'Your protected content'|trans }}</p>
<p><a class="btn btn-inverse" href="{{ 'client/me'|link }}">{{ 'Manage profile'|trans }}</a></p>
</section>
</div>
</article>
</div>
{% endif %}
{% endblock %}
{% endblock %}