diff --git a/lemarche/fixtures/django/01_siaes.json b/lemarche/fixtures/django/01_siaes.json index 1511d14d0..867ce0488 100644 --- a/lemarche/fixtures/django/01_siaes.json +++ b/lemarche/fixtures/django/01_siaes.json @@ -103967,7 +103967,8 @@ "source": "ASP", "created_at": "2020-04-09T13:36:57.328Z", "updated_at": "2020-12-18T10:40:08.674Z", - "slug": "ei-garage-martinet-siege-13" + "slug": "ei-garage-martinet-siege-13", + "super_badge": true } }, { @@ -103994,7 +103995,8 @@ "source": "GEIQ", "created_at": "2020-04-14T16:09:19.471Z", "updated_at": "2020-12-18T09:56:51.812Z", - "slug": "geiq-vertigo-films-13" + "slug": "geiq-vertigo-films-13", + "super_badge": true } }, { @@ -104022,7 +104024,8 @@ "source": "ASP", "created_at": "2020-12-01T10:30:23.006Z", "updated_at": "2020-12-18T10:40:07.948Z", - "slug": "job-insertion-90-90" + "slug": "job-insertion-90-90", + "super_badge": true } }, { @@ -104053,7 +104056,8 @@ "source": "USER_CREATED", "created_at": "2020-12-18T13:08:07.627Z", "updated_at": "2020-12-18T13:08:08.043Z", - "slug": "el-garage-martinet-nord-13" + "slug": "el-garage-martinet-nord-13", + "super_badge": true } }, { @@ -104114,4 +104118,4 @@ "slug": "les-moulins-de-limmobilier-13" } } -] +] \ No newline at end of file diff --git a/lemarche/static/itou_marche/sections/_siae.scss b/lemarche/static/itou_marche/sections/_siae.scss index 9b1b52dca..caa43b1a9 100644 --- a/lemarche/static/itou_marche/sections/_siae.scss +++ b/lemarche/static/itou_marche/sections/_siae.scss @@ -255,7 +255,9 @@ .siae-card { margin-bottom: 1.5rem; - + &[data-url]{ + cursor: pointer; + }; .sc-profile-type, .sc-profile-sectors { span.ml-1 { @@ -309,6 +311,10 @@ $super-badge-color: #ffbe18; line-height: 20px; letter-spacing: 0px; text-align: left; + + &:hover { + cursor: help; + } } .super-badge-tab { diff --git a/lemarche/static/itou_marche/utils.scss b/lemarche/static/itou_marche/utils.scss index cd58a32e2..e5dc55d38 100644 --- a/lemarche/static/itou_marche/utils.scss +++ b/lemarche/static/itou_marche/utils.scss @@ -27,3 +27,18 @@ transform: rotate(360deg); } } + +.tooltip-inner { + max-width: 50em; + padding: 3px 8px; + background-color: #fff; + color: #000; + text-align: left; + border: 1px solid #cccdd7; + border-radius: 0.25rem; +} + +.icon-success { + color: $green; + font-weight: bold; +} diff --git a/lemarche/static/js/utils.js b/lemarche/static/js/utils.js index f8abfffb8..0c094685e 100644 --- a/lemarche/static/js/utils.js +++ b/lemarche/static/js/utils.js @@ -22,6 +22,26 @@ window.addEventListener('DOMContentLoaded', function () { initModalMessages(); + $('.super-badge-badge').each(function (element) { + $(this).tooltip( + { + html: true, + placement: "bottom", + title: $('#tooltip-super-badge').html() + }); + }); + + document.querySelectorAll('.siae-card[data-url]').forEach(function (card) { + card.addEventListener('click', function (event) { + if (event.target.className == 'ri-star-line ri-xl') { + // manage case of favorites + event.preventDefault() + } + else if (this.dataset.url) window.open(this.dataset.url, '_blank'); + + }); + }); + $('.s-tabs-01__nav .nav-item').on('click', function (event) { event.preventDefault() let tabContent = this.parentElement.parentElement.querySelector(".tab-content"); diff --git a/lemarche/templates/dashboard/home_siae.html b/lemarche/templates/dashboard/home_siae.html index 147261aef..0af26e529 100644 --- a/lemarche/templates/dashboard/home_siae.html +++ b/lemarche/templates/dashboard/home_siae.html @@ -139,5 +139,6 @@

Tableau de bord

{% endif %} {% include "dashboard/_aides_territoires_section.html" with extra_class="pt-3" %} +{% include "includes/_super_siae_arguments_badge.html" %} {% endblock %} diff --git a/lemarche/templates/favorites/dashboard_favorite_list_detail.html b/lemarche/templates/favorites/dashboard_favorite_list_detail.html index c2aca979c..97fbe9934 100644 --- a/lemarche/templates/favorites/dashboard_favorite_list_detail.html +++ b/lemarche/templates/favorites/dashboard_favorite_list_detail.html @@ -72,6 +72,8 @@

+ {% include "includes/_super_siae_arguments_badge.html" %} + {% endblock %} {% block modals %} diff --git a/lemarche/templates/includes/_super_siae_arguments_badge.html b/lemarche/templates/includes/_super_siae_arguments_badge.html new file mode 100644 index 000000000..9795b1156 --- /dev/null +++ b/lemarche/templates/includes/_super_siae_arguments_badge.html @@ -0,0 +1,10 @@ +
+
+
    +
  • Fiche commerciale complète et mise à jour régulièrement
  • +
  • Taux de réponse élevé
  • +
  • Délai moyen de réponse élevé
  • +
  • Coordonnées de contact à jour
  • +
+
+
diff --git a/lemarche/templates/networks/dashboard_network_tender_siae_list.html b/lemarche/templates/networks/dashboard_network_tender_siae_list.html index b27bc23e4..70d455a29 100644 --- a/lemarche/templates/networks/dashboard_network_tender_siae_list.html +++ b/lemarche/templates/networks/dashboard_network_tender_siae_list.html @@ -76,4 +76,6 @@

Mes adhérents notifiés et intéressés par cette oppo +{% include "includes/_super_siae_arguments_badge.html" %} + {% endblock %} diff --git a/lemarche/templates/siaes/_card_search_result.html b/lemarche/templates/siaes/_card_search_result.html index c6e14abc2..8a4a05628 100644 --- a/lemarche/templates/siaes/_card_search_result.html +++ b/lemarche/templates/siaes/_card_search_result.html @@ -1,7 +1,7 @@ {% load static siae_sectors_display %} {% load theme_inclusion %} -
+
diff --git a/lemarche/templates/siaes/_card_tender.html b/lemarche/templates/siaes/_card_tender.html index 6f03dd817..c0a10ddff 100644 --- a/lemarche/templates/siaes/_card_tender.html +++ b/lemarche/templates/siaes/_card_tender.html @@ -1,6 +1,6 @@ {% load static %} -
+
diff --git a/lemarche/templates/siaes/detail.html b/lemarche/templates/siaes/detail.html index 419f3b8cf..284db2594 100644 --- a/lemarche/templates/siaes/detail.html +++ b/lemarche/templates/siaes/detail.html @@ -264,6 +264,8 @@

+{% include "includes/_super_siae_arguments_badge.html" %} + {% endblock %} {% block modals %} diff --git a/lemarche/templates/siaes/search_results.html b/lemarche/templates/siaes/search_results.html index f6a0c7d3d..4ef907f54 100644 --- a/lemarche/templates/siaes/search_results.html +++ b/lemarche/templates/siaes/search_results.html @@ -300,6 +300,8 @@

+ {% include "includes/_super_siae_arguments_badge.html" %} + {% endblock %} {% block modals %} {% include "auth/_login_or_signup_modal.html" %} diff --git a/lemarche/templates/tenders/siae_interested_list.html b/lemarche/templates/tenders/siae_interested_list.html index 4d227ff87..c151b94f5 100644 --- a/lemarche/templates/tenders/siae_interested_list.html +++ b/lemarche/templates/tenders/siae_interested_list.html @@ -137,6 +137,8 @@

{{ siaes.count }} prestataire{{ siaes.count|pluralize } {% endblock %}

+{% include "includes/_super_siae_arguments_badge.html" %} + {% endblock %}