Skip to content

Commit

Permalink
Tender: if author is Approch, then add message above external link
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn committed Sep 26, 2023
1 parent 5e34b3f commit 9d83c4e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
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.str("APPROCH_USER_ID", "")


# 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
7 changes: 7 additions & 0 deletions lemarche/templates/tenders/_detail_contact.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ <h2>
{% if tender.can_display_contact_external_link %}
<div class="row">
<div class="col-12">
{% if tender.author.id == APPROCH_USER_ID %}
<p>
Ce projet d'achat a été publié sur la plateforme <strong>APProch</strong>.
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 }}
<i class="ri-external-link-line" aria-hidden="true"></i>
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 9d83c4e

Please sign in to comment.