diff --git a/assets/styles/app.css b/assets/styles/app.css index e40715f45bdfd7e4657597a83f8f0600ccbf7626..7148b334a1317fe046b779087d4597f6c36203aa 100644 --- a/assets/styles/app.css +++ b/assets/styles/app.css @@ -170,6 +170,17 @@ button { font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif; } +.btn-pauvre { + color: white; + width: 500px; + background-color: rgb(85, 85, 85); + border-radius: 5px; + font-size: 20px; + padding: 15px; + margin: 5px; + font-family: "Trebuchet MS",sans-serif; +} + .annonce { position: relative; } diff --git a/templates/annonce_detail/annonce.html.twig b/templates/annonce_detail/annonce.html.twig index ce2364e0efe285b5a14a4711e88ed20f5aba07d8..c0cdff427d36ba46d9fd8e14266f952ca1b1e4b6 100644 --- a/templates/annonce_detail/annonce.html.twig +++ b/templates/annonce_detail/annonce.html.twig @@ -64,7 +64,23 @@ <a href=""><button class="btn-connexion2" id="btnListeAttente">Se mettre en liste d'attente</button></a> {% endif %} {% else %} - <a href="{{ path('app_reserver_prestation', {'id': annonce.id, 'interet': true}) }}"><button class="btn-connexion" id="btnRepondre">Répondre à l'annonce</button></a> + {% if annonce.type == "Pret" %} + {% if user.statusAbonnement() == "0" %} + <a href="{{ path('app_modif_user_abonnement') }}"><button class="btn-connexion2" id="btnRepondre">Améliorer mon abonnement</button></a> + {% else %} + {% if user.NbFlorains() >= annonce.CoutPrestation %} + <a href="{{ path('app_reserver_prestation', {'id': annonce.id, 'interet': true}) }}"><button class="btn-connexion" id="btnRepondre">Répondre à l'annonce</button></a> + {% else %} + <a href=""><button class="btn-pauvre" id="btnRepondre">Trop pauvre pour payer</button></a> + {% endif %} + {% endif %} + {% else %} + {% if user.nb_florains >= annonce.cout_prestation %} + <a href="{{ path('app_reserver_prestation', {'id': annonce.id, 'interet': true}) }}"><button class="btn-connexion" id="btnRepondre">Répondre à l'annonce</button></a> + {% else %} + <a href=""><button class="btn-connexion" id="btnRepondre">Trop pauvre pour payer</button></a> + {% endif %} + {% endif %} {% endif %} {% endif %} {% endif %}