Skip to content

Commit

Permalink
[Dépôt de besoin] Rajouter un message pour les besoins en provenance …
Browse files Browse the repository at this point in the history
…d'APProch (#923)

* Tender: if author is Approch, then add message above external link

* Improve message display
  • Loading branch information
raphodn authored Sep 28, 2023
1 parent 0dc9056 commit 9278b47
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
5 changes: 4 additions & 1 deletion config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@
HUBSPOT_API_KEY = env.str("HUBSPOT_API_KEY", "set-it")
HUBSPOT_IS_ACTIVATED = env.bool("HUBSPOT_IS_ACTIVATED", False)


# Security
# ------------------------------------------------------------------------------

Expand Down Expand Up @@ -771,7 +772,7 @@
}


# External URLs
# Internal & external
# (if you need these settings in the template, add them to settings_context_processor.expose_settings)
# ------------------------------------------------------------------------------

Expand All @@ -784,6 +785,7 @@
"https://docs.google.com/forms/d/e/1FAIpQLScx1k-UJ-962_rSgPJGabc327gGjFUho6ypgcZHCubuwTl7Lg/viewform"
)
TALLY_NPS_FORM_ID = env.str("TALLY_NPS_FORM_ID", "")
APPROCH_USER_ID = env.int("APPROCH_USER_ID", 0)


# Misc
Expand Down Expand Up @@ -837,6 +839,7 @@
]
FORM_RENDERER = "django.forms.renderers.TemplatesSetting"


# MTCAPTCHA
# ------------------------------------------------------------------------------
MTCAPTCHA_PRIVATE_KEY = env.str("MTCAPTCHA_PRIVATE_KEY", "")
Expand Down
15 changes: 14 additions & 1 deletion lemarche/templates/tenders/_detail_contact.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,24 @@ <h2>
</div>
{% endif %}
</div>

{% if tender.can_display_contact_external_link %}
<div class="row">
<div class="col-12">
{% if tender.author.id == APPROCH_USER_ID %}
<p>
<i class="ri-lightbulb-line ri-lg mr-1"></i>Ce projet d'achat a été publié sur la plateforme <strong>APProch</strong>.
<br />
Pour plus d'informations, pour être informé des mises à jour sur ce projet
ou pour indiquer votre intérêt auprès de l'acheteur public, cliquez sur le lien ci-dessous.
</p>
{% endif %}
<a href="{{ tender.external_link }}" target="_blank" class="btn btn-outline-primary float-right">
{{ tender.external_link_title|safe }}
{% if tender.author.id == APPROCH_USER_ID %}
Ça m'intéresse
{% else %}
{{ tender.external_link_title|safe }}
{% endif %}
<i class="ri-external-link-line" aria-hidden="true"></i>
</a>
</div>
Expand Down
1 change: 1 addition & 0 deletions lemarche/utils/settings_context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def expose_settings(request):
"CONTACT_EMAIL": settings.CONTACT_EMAIL,
"TEAM_CONTACT_EMAIL": settings.TEAM_CONTACT_EMAIL,
"GIP_CONTACT_EMAIL": settings.GIP_CONTACT_EMAIL,
"APPROCH_USER_ID": settings.APPROCH_USER_ID,
# forms & docs
"FACILITATOR_SLIDE": settings.FACILITATOR_SLIDE,
"FACILITATOR_LIST": settings.FACILITATOR_LIST,
Expand Down

0 comments on commit 9278b47

Please sign in to comment.