Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add wizard "template" #118

Merged
merged 7 commits into from
Oct 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -35,14 +35,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 @@ -158,4 +152,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 @@ -39,14 +39,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>