Skip to content

Commit

Permalink
Fix stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn committed Sep 8, 2023
1 parent 25daec1 commit 50f778c
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions app/Resources/views/_partial/header.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
<div class="nav-wrapper container">
<a id="logo-container" href="{{ path('homepage') }}" class="brand-logo hide-on-med-and-down">
{{ site_name }}
{% include "admin/openinghour/_partial/open_closed_badge.html.twig" with { float_unset: true } %}
{% include "admin/openinghour/_partial/open_closed_badge.html.twig" %}
</a>
<a id="logo-container" href="{{ path('homepage') }}" class="brand-logo hide-on-large-only">
{{ project_name }}
{% include "admin/openinghour/_partial/open_closed_badge.html.twig" with { float_unset: true } %}
{% include "admin/openinghour/_partial/open_closed_badge.html.twig" %}
</a>
<ul id="nav-desktop" class="right hide-on-med-and-down">
{% if is_granted("ROLE_ADMIN_PANEL") %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{% set float_unset = float_unset ?? null %}

{% if not opening_hour_service.isEmpty %}
{% if opening_hour_service.isOpen %}
<span class="badge green white-text" style="font-family:'Raleway',sans-serif;{% if float_unset %}float:unset;{% endif %}">Ouvert</span>
<span class="badge green white-text" style="font-family:'Raleway',sans-serif;float:unset;">Ouvert</span>
{% else %}
<span class="badge red white-text" style="font-family:'Raleway',sans-serif;{% if float_unset %}float:unset;{% endif %}">Fermé</span>
<span class="badge red white-text" style="font-family:'Raleway',sans-serif;float:unset;">Fermé</span>
{% endif %}
{% endif %}
10 changes: 6 additions & 4 deletions app/Resources/views/admin/openinghour/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@
<h4>Horaires d'ouverture</h4>

{% if openingHours %}
<div class="row">
<div class="col m6">
<span>{{ date('now') | date_fr_full_with_time }}</span>
{% include "admin/openinghour/_partial/open_closed_badge.html.twig" %}
<div class="row" style="margin-bottom:0">
<div class="col">
<div class="card-panel">
<span>{{ date('now') | date_fr_full_with_time }}</span>
{% include "admin/openinghour/_partial/open_closed_badge.html.twig" %}
</div>
</div>
</div>
<div class="row">
Expand Down
2 changes: 1 addition & 1 deletion app/Resources/views/card_reader/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<a id="logo-container" class="brand-logo hide-on-med-and-down" style="margin-left: 10px">Lecteur carte membre</a>
<ul class="right" style="margin-right:10px;">
<li>{{ date('now') | date_fr_full_with_time }}</li>
<li>{% include "admin/openinghour/_partial/open_closed_badge.html.twig" with { float_unset: true } %}</li>
<li>{% include "admin/openinghour/_partial/open_closed_badge.html.twig" %}</li>
</ul>
</div>
</nav>
Expand Down
2 changes: 1 addition & 1 deletion src/AppBundle/Service/OpeningHourService.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ public function isOpen(\DateTime $date = null)

public function isClosed(\DateTime $date = null)
{
return !$self->isOpen($date);
return !$this->isOpen($date);
}
}

0 comments on commit 50f778c

Please sign in to comment.