Skip to content

Commit

Permalink
Move all Twig templates to "legacy" subdirectory
Browse files Browse the repository at this point in the history
Issue #116
  • Loading branch information
TomaszGasior committed Aug 22, 2020
1 parent 17ba68c commit 05269d4
Show file tree
Hide file tree
Showing 30 changed files with 28 additions and 25 deletions.
4 changes: 3 additions & 1 deletion config/packages/twig.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
twig:
default_path: '%kernel.project_dir%/templates'
paths:
- '%kernel.project_dir%/templates'
- '%kernel.project_dir%/templates/legacy'
debug: '%kernel.debug%'
strict_variables: '%kernel.debug%'
exception_controller: null
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends 'layout.html.twig' %}
{% extends 'legacy_layout.html.twig' %}

{% block head_closing %}
<link rel="stylesheet" href="{{ asset('admin.css') }}">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends 'admin/_admin_layout.html.twig' %}
{% extends 'admin/_admin_legacy_layout.html.twig' %}

{% block page_content %}
<header>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends 'admin/_admin_layout.html.twig' %}
{% extends 'admin/_admin_legacy_layout.html.twig' %}

{% block page_content %}
<header>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends 'admin/_admin_layout.html.twig' %}
{% extends 'admin/_admin_legacy_layout.html.twig' %}

{% block page_content %}
<header>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends 'layout.html.twig' %}
{% extends 'legacy_layout.html.twig' %}

{% block page_title %}{{ 'general.static_page.about_service'|trans }}{% endblock %}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends 'layout.html.twig' %}
{% extends 'legacy_layout.html.twig' %}

{% block page_title %}{{ 'general.all_radio_tables.title'|trans }}{% endblock %}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends 'layout.html.twig' %}
{% extends 'legacy_layout.html.twig' %}

{% block page_title %}{{ 'general.static_page.contact'|trans }}{% endblock %}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends 'layout.html.twig' %}
{% extends 'legacy_layout.html.twig' %}

{% macro print_date(date) %}
<time datetime="{{ date.format('Y-m-d') }}">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends 'layout.html.twig' %}
{% extends 'legacy_layout.html.twig' %}

{% block page_title %}{{ 'general.search_radio_tables.title'|trans }}{% endblock %}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends 'layout.html.twig' %}
{% extends 'legacy_layout.html.twig' %}

{% block page_title %}{{ 'general.static_page.terms_of_service'|trans }}{% endblock %}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<!doctype html>

{% deprecated 'This page uses old layout which is deprecated. Page must be ported to new layout.' %}

{% set current_locale = app.request.locale %}
{% set route_name = app.request.attributes.get('_route') %}
{% set route_params = app.request.attributes.get('_route_params') %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% use 'form_div_layout.html.twig' %}
{% use 'form_div_legacy_layout.html.twig' %}
{% use 'common/form/overwritten_types.html.twig' %}
{% use 'common/form/custom_types.html.twig' %}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends 'layout.html.twig' %}
{% extends 'legacy_layout.html.twig' %}

{% block page_title %}{{ 'radio_station.add.title'|trans }}{% endblock %}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends 'layout.html.twig' %}
{% extends 'legacy_layout.html.twig' %}

{% block page_title %}{{ 'radio_station.edit.title'|trans }}{% endblock %}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends 'layout.html.twig' %}
{% extends 'legacy_layout.html.twig' %}

{% block page_title %}{{ 'radio_table.create.title'|trans }}{% endblock %}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends 'layout.html.twig' %}
{% extends 'legacy_layout.html.twig' %}

{% block page_title %}{{ 'radio_table.remove.title'|trans }}{% endblock %}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends 'layout.html.twig' %}
{% extends 'legacy_layout.html.twig' %}

{% block page_title %}{{ 'radio_table.settings.title'|trans }}{% endblock %}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends 'layout.html.twig' %}
{% extends 'legacy_layout.html.twig' %}

{% set appearance = radio_table.appearance %}

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends 'layout.html.twig' %}
{% extends 'legacy_layout.html.twig' %}

{% block page_title %}{{ 'session.login.title'|trans }}{% endblock %}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{# This ugly copy-paste from `form_label` in 'form_div_layout.html.twig' #}
{# This ugly copy-paste from `form_label` in 'form_div_legacy_layout.html.twig' #}
{# is needed to be able to use HTML code in `label_translation_parameters`. #}
{% block _user_register_acceptServiceTerms_label %}
{% set label_attr = label_attr|merge({'for': id}) %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends 'layout.html.twig' %}
{% extends 'legacy_layout.html.twig' %}

{% block page_title %}{{ 'user.settings.title_long'|trans }}{% endblock %}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends 'layout.html.twig' %}
{% extends 'legacy_layout.html.twig' %}

{% block page_title %}{{ 'user.my_radio_tables.title'|trans }}{% endblock %}

Expand All @@ -25,4 +25,3 @@
</p>
{% endif %}
{% endblock %}

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends 'layout.html.twig' %}
{% extends 'legacy_layout.html.twig' %}

{% block page_title %}{{ user.name }}{% endblock %}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% form_theme form 'user/_register_theme.html.twig' %}

{% extends 'layout.html.twig' %}
{% extends 'legacy_layout.html.twig' %}

{% block page_title %}{{ 'user.register.title'|trans }}{% endblock %}

Expand Down

0 comments on commit 05269d4

Please sign in to comment.