Skip to content

Commit

Permalink
Added wizard "template" (#118)
Browse files Browse the repository at this point in the history
* Add wizard "template"
* Join logo code into one include
  • Loading branch information
cavasinf authored Oct 16, 2022
1 parent 82cb28c commit f9f99d3
Show file tree
Hide file tree
Showing 6 changed files with 96 additions and 17 deletions.
12 changes: 12 additions & 0 deletions templates/includes/logo.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<a href="{{ path('tabler_welcome'|tabler_route) }}">
{% if tabler_bundle.getLogoUrl() is not empty %}
<img
class="navbar-brand-image"
src="{% if '://' in tabler_bundle.getLogoUrl() %}{{ tabler_bundle.getLogoUrl() }}{% else %}{{ asset(tabler_bundle.getLogoUrl()) }}{% endif %}"
width="110" height="32"
alt=""
>
{% else %}
<i class="far fa-smile" style="font-size: 32px"></i>
{% endif %}
</a>
12 changes: 3 additions & 9 deletions templates/layout-horizontal.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,8 @@ Enjoy your theme!
<span class="navbar-toggler-icon"></span>
</button>
{% block app_logo %}
<h1 class="navbar-brand d-none-navbar-horizontal pe-0 pe-md-3{% block navbar_brand_class %} navbar-brand-autodark{% endblock %}">
<a href="{{ path('tabler_welcome'|tabler_route) }}">
{% if tabler_bundle.getLogoUrl() is not empty %}
<img src="{% if '://' in tabler_bundle.getLogoUrl() %}{{ tabler_bundle.getLogoUrl() }}{% else %}{{ asset(tabler_bundle.getLogoUrl()) }}{% endif %}" width="110" height="32" alt="Logo" class="navbar-brand-image">
{% else %}
<i class="far fa-smile" style="font-size: 32px"></i>
{% endif %}
</a>
<h1 class="{% block navbar_brand_classes %}navbar-brand d-none-navbar-horizontal pe-0 pe-md-3 {% block navbar_brand_class %}navbar-brand-autodark{% endblock %}{% endblock %}">
{% include '@Tabler/includes/logo.html.twig' %}
</h1>
{% endblock %}
<div class="navbar-nav flex-row order-md-last">
Expand Down Expand Up @@ -156,4 +150,4 @@ Enjoy your theme!
<script src="{{ asset('bundles/tabler/tabler.js') }}"></script>
{% endblock %}
</body>
</html>
</html>
10 changes: 2 additions & 8 deletions templates/layout-vertical.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,8 @@ Enjoy your theme!
<span class="navbar-toggler-icon"></span>
</button>
{% block app_logo %}
<h1 class="navbar-brand{% block navbar_brand_class %} navbar-brand-autodark{% endblock %}">
<a href="{{ path('tabler_welcome'|tabler_route) }}">
{% if tabler_bundle.getLogoUrl() is not empty %}
<img src="{% if '://' in tabler_bundle.getLogoUrl() %}{{ tabler_bundle.getLogoUrl() }}{% else %}{{ asset(tabler_bundle.getLogoUrl()) }}{% endif %}" width="110" height="32" alt="Logo" class="navbar-brand-image">
{% else %}
<i class="far fa-smile" style="font-size: 32px"></i>
{% endif %}
</a>
<h1 class="{% block navbar_brand_classes %}navbar-brand {% block navbar_brand_class %}navbar-brand-autodark{% endblock %}{% endblock %}">
{% include '@Tabler/includes/logo.html.twig' %}
</h1>
{% endblock %}
<div class="navbar-nav flex-row d-lg-none">
Expand Down
63 changes: 63 additions & 0 deletions templates/wizard.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{% extends '@Tabler/fullpage.html.twig' %}

{% from '@Tabler/components/progress_bar.html.twig' import progress_bar %}
{% from '@Tabler/components/button.html.twig' import button %}
{% from '@Tabler/components/buttons.html.twig' import submit_button %}

{% block page_content %}

<div
class="container {% block container_size %}container-narrow{% endblock %} {% block container_class %}py-4{% endblock %}"
{% block container_attr %}{% endblock %}
>
{% block wizard_before %}{% endblock %}

{% block wizard_logo %}
<div class="text-center mb-4">
<h1 class="{% block navbar_brand_classes %}navbar-brand {% block navbar_brand_class %}navbar-brand-autodark{% endblock %}{% endblock %}">
{% include '@Tabler/includes/logo.html.twig' %}
</h1>
</div>
{% endblock %}

{% block wizard_header_before %}{% endblock %}
{% block wizard_header %}{% endblock %}
{% block wizard_header_after %}{% endblock %}

<div
class="card {% block card_class %}card-md{% endblock %}"
{% block card_attr %}{% endblock %}
>
{% block wizard_content_before %}{% endblock %}
{% block wizard_content %}{% endblock %}
{% block wizard_content_after %}{% endblock %}
</div>

{% block wizard_footer_before %}{% endblock %}
{% block wizard_footer %}
<div class="row align-items-center mt-3">
<div class="col-4">
{% block wizard_progress_bar %}
{{ progress_bar() }}
{% endblock %}
</div>
<div class="col">
<div class="btn-list justify-content-end">
{% block wizard_previous_button %}
{{ button(false, { title : 'Previous'|trans({}, 'TablerBundle'), combined: true, url : '#' }, 'link') }}
{% endblock %}

{% block wizard_next_button %}
{{ submit_button(false, { title : 'Next'|trans({}, 'TablerBundle'), combined: true }, 'primary') }}
{% endblock %}
</div>
</div>
</div>
{% endblock %}
{% block wizard_footer_after %}{% endblock %}

{% block wizard_after %}{% endblock %}
</div>

{% endblock %}

8 changes: 8 additions & 0 deletions translations/TablerBundle.en.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,14 @@
<source>http_error_403.suggestion</source>
<target>Sorry, but you don't have sufficient permissions to see this page. Please talk to your administrator if you think this is an error.</target>
</trans-unit>
<trans-unit id="F35zef" resname="Previous">
<source>Previous</source>
<target>Previous</target>
</trans-unit>
<trans-unit id="68zefF" resname="Next">
<source>Next</source>
<target>Next</target>
</trans-unit>
</body>
</file>
</xliff>
8 changes: 8 additions & 0 deletions translations/TablerBundle.fr.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,14 @@
<source>http_error_403.suggestion</source>
<target>Désolé, mais vous n'avez pas les autorisations suffisantes pour voir cette page. Si vous pensez qu'il s'agit d'une anomalie, veuillez contacter votre administrateur.</target>
</trans-unit>
<trans-unit id="F35zef" resname="Previous">
<source>Previous</source>
<target>Précédent</target>
</trans-unit>
<trans-unit id="68zefF" resname="Next">
<source>Next</source>
<target>Suivant</target>
</trans-unit>
</body>
</file>
</xliff>

0 comments on commit f9f99d3

Please sign in to comment.