Skip to content

Commit

Permalink
Config : cleanup de main_color (#679)
Browse files Browse the repository at this point in the history
* Cleanup ambassador shifttimelog table

* Additional color config. move to style_config.html

* Seperate header & footer into own template

* Extra style to config
  • Loading branch information
raphodn authored Dec 23, 2022
1 parent d9036fc commit 7f7f2e0
Show file tree
Hide file tree
Showing 12 changed files with 256 additions and 251 deletions.
8 changes: 8 additions & 0 deletions app/Resources/views/_partial/footer.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<footer class="page-footer" style="background-color: {{ main_color }}">
<div class="footer-copyright">
<div class="container">
© {{ 'now'|date('Y') }} Copyright {{ project_name }}
<a class="grey-text text-lighten-4 right" href="{{ project_url }}">{{ project_url_display }}</a>
</div>
</div>
</footer>
120 changes: 120 additions & 0 deletions app/Resources/views/_partial/header.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
{% set frozen = app.user and app.user.beneficiary and app.user.beneficiary.membership.frozen %}

<header>
{% if is_granted('ROLE_PREVIOUS_ADMIN') %}
<div class="navbar-fixed">
<nav class="impersonate">
<div class="brand-logo">{% image '@AppBundle/Resources/public/img/emoticons/072-ninja.svg' %}<img height="30px" class="emoticon" src="{{ asset_url }}" alt="ninja mode" />{% endimage %}</div>
<div class="nav-wrapper">
<ul class="right">
<li>
{% if app.user.beneficiary %}
<a href="{{ path('member_show', {'member_number': app.user.beneficiary.membership.memberNumber,'_login_as': '_exit'}) }}"><i class="material-icons small right">arrow_back</i>Quitter le login as {{ app.user.username }}</a>
{% else %}
<a href="{{ path('homepage', {'_login_as': '_exit'}) }}"><i class="material-icons small right">arrow_back</i>Quitter le login as {{ app.user.username }}</a>
{% endif %}
</li>
</ul>
</div>
</nav>
</div>
{% endif %}
<nav class="main-navigation" role="navigation" style="background-color: {{ main_color }}">
<div class="nav-wrapper container">
<a id="logo-container" href="{{ path('homepage') }}" class="brand-logo hide-on-med-and-down">{{ site_name }}</a>
<a id="logo-container" href="{{ path('homepage') }}" class="brand-logo hide-on-large-only">{{ project_name }}</a>
<ul id="nav-desktop" class="right hide-on-med-and-down">
{% if is_granted("ROLE_ADMIN_PANEL") %}
<li class="highlight">
<a href="{{ path("admin") }}" title="Administration">
<i class="material-icons left">build</i>
<span class="show-on-xl-only">Administration</span>
</a>
</li>
{% endif %}
{% if is_granted("IS_AUTHENTICATED_REMEMBERED") %}
{{ render(controller("AppBundle:Service:navlist")) }}
{% if app.user.beneficiary %}
<li>
<a href="{{ path('fos_user_profile_show') }}" title="{{ app.user.firstname }}">
<i class="material-icons small left">settings</i>
<span class="show-on-xl-only">{{ app.user.firstname }}</span>
</a>
</li>
{% endif %}
<li>
<a href="{{ path('fos_user_security_logout') }}">
<i class="material-icons small right">exit_to_app</i>
</a>
</li>
{% else %}
<li>
<a href="{{ path('fos_user_security_login') }}">
{{ 'layout.login'|trans({}, 'FOSUserBundle') }}
</a>
</li>
{% endif %}
</ul>

<a href="#" data-target="nav-mobile" class="sidenav-trigger show-on-medium-and-down">
<i class="material-icons">menu</i>
</a>
<ul id="nav-mobile" class="sidenav show-on-medium-and-down">
{% if is_granted("IS_AUTHENTICATED_REMEMBERED") %}
<li>
<div class="user-view center-align">
<div class="background">
{% if frozen %}
{% image '@AppBundle/Resources/public/img/frozen.png' %}
<img class="responsive-img" src="{{ asset_url }}" alt="" />
{% endimage %}
{% else %}
{% image '@AppBundle/Resources/public/img/dumbo-in-the-air.jpg' %}
<img class="responsive-img" src="{{ asset_url }}" alt="" style="position: absolute;bottom: -46px;left: 0;" />
{% endimage %}
{% endif %}
</div>
<a href="#user">
<img class="circle" src="{{ gravatar(app.user.email) }}">
</a>
<a href="#name">
<span class="{% if not frozen %}white-text{% else %}black-text{% endif %} name">{{ app.user }}</span>
</a>
</div>
</li>
<li>
<a href="{{ path('homepage') }}">
<i class="material-icons small">home</i>Accueil
</a>
</li>
{% if app.user.beneficiary %}
<li>
<a href="{{ path('fos_user_profile_show') }}">
<i class="material-icons">settings</i>Mon profil ({{ app.user.username }})
</a>
</li>
{% endif %}
{% if is_granted("ROLE_ADMIN_PANEL") %}
<li class="indigo lighten-5">
<a href="{{ path("admin") }}" class="">
<i class="material-icons left indigo-text darken-4">build</i>Administration
</a>
</li>
{% endif %}
{{ render(controller("AppBundle:Service:navlist")) }}
<li>
<a href="{{ path('fos_user_security_logout') }}">
<i class="material-icons small">exit_to_app</i>{{ 'layout.logout'|trans({}, 'FOSUserBundle') }}
</a>
</li>
{% else %}
<li>
<a href="{{ path('fos_user_security_login') }}">
<span class="glyphicon glyphicon-log-in"></span> {{ 'layout.login'|trans({}, 'FOSUserBundle') }}
</a>
</li>
{% endif %}
</ul>
</div>
</nav>
</header>
22 changes: 22 additions & 0 deletions app/Resources/views/_partial/style_config.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<style>
.btn, .btn:hover,
.btn-small, .btn-small:hover,
.btn-large, .btn-large:hover {
background-color: {{ main_color }};
}
.homebox {
border-color: {{ main_color }};
}
.main-color-text {
color: {{ main_color }};
}
tr.withdrawn {
background-color: {{ member_withdrawn_background_color }};
}
tr.frozen {
background-color: {{ member_frozen_background_color }};
}
tr.exempted {
background-color: {{ member_exempted_background_color }};
}
</style>
71 changes: 28 additions & 43 deletions app/Resources/views/admin/user/list.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
{{ form_label(form.compteurgt) }}
</div>
<div class="col s6 center">
< &nbsp; compteur &nbsp; <
<span><</span>&nbsp;&nbsp;compteur&nbsp;&nbsp;<span><</span>
</div>
<div class="input-field col s3">
{{ form_widget(form.compteurlt) }}
Expand All @@ -133,11 +133,9 @@
</div>
<div class="col s12 m4">
<h5>Bénéficiaire(s)</h5>
<div>
<div class="input-field">
{{ form_widget(form.username) }}
{{ form_label(form.username) }}
</div>
<div class="input-field">
{{ form_widget(form.username) }}
{{ form_label(form.username) }}
</div>
<div class="input-field">
{{ form_widget(form.firstname) }}
Expand All @@ -162,40 +160,35 @@
</div>
</div>
<div class="col s12 m4">
<div>
<h5>Formations / Commissions</h5>
<div class="row">
<div class="input-field col s6">
{{ form_widget(form.formations) }}
{{ form_label(form.formations) }}
</div>
<div class="col s6 input-field">
{{ form_widget(form.or_and_exp_formations) }}
{{ form_label(form.or_and_exp_formations) }}
</div>
<h5>Formations / Commissions</h5>
<div class="row">
<div class="input-field col s6">
{{ form_widget(form.formations) }}
{{ form_label(form.formations) }}
</div>
<div class="input-field">
{{ form_widget(form.commissions) }}
{{ form_label(form.commissions) }}
<div class="col s6 input-field">
{{ form_widget(form.or_and_exp_formations) }}
{{ form_label(form.or_and_exp_formations) }}
</div>
</div>
<div>
<h5>!Formations / !Commissions</h5>
<div class="input-field">
{{ form_widget(form.not_formations) }}
{{ form_label(form.not_formations) }}
</div>
<div class="input-field">
{{ form_widget(form.not_commissions) }}
{{ form_label(form.not_commissions) }}
</div>
<div class="input-field">
{{ form_widget(form.commissions) }}
{{ form_label(form.commissions) }}
</div>
<h5>!Formations / !Commissions</h5>
<div class="input-field">
{{ form_widget(form.not_formations) }}
{{ form_label(form.not_formations) }}
</div>
<div>
<h5>Actions</h5>
{{ form_widget(form.submit) }}
{{ form_widget(form.csv) }}
{{ form_widget(form.mail) }}
<div class="input-field">
{{ form_widget(form.not_commissions) }}
{{ form_label(form.not_commissions) }}
</div>
<br />
<h5>Actions</h5>
{{ form_widget(form.submit) }}
{{ form_widget(form.csv) }}
{{ form_widget(form.mail) }}
</div>
</div>

Expand Down Expand Up @@ -363,11 +356,7 @@
th[data-col] {
cursor: pointer;
}
tr.withdrawn {
background: rgba(255, 50, 0, 0.2);
}
tr.frozen {
background-color: rgba(0, 138, 255, 0.1);
background-image: url({% image '@AppBundle/Resources/public/img/snowflakes.svg' %}{{ asset_url }}{% endimage %});
background-position: top right;
background-repeat: no-repeat;
Expand All @@ -376,10 +365,6 @@
tr.frozen td {
background-color: rgba(255, 255, 255, 0.5);
}
tr.exempted {
/* teal */
background-color: rgb(0, 150, 136, 0.1);
}
tbody tr {
cursor: pointer;
}
Expand Down
Loading

0 comments on commit 7f7f2e0

Please sign in to comment.