Skip to content

Commit

Permalink
integrate feedback form via product fruits
Browse files Browse the repository at this point in the history
CPCN-194
  • Loading branch information
petrjasek committed Mar 26, 2024
1 parent 0955093 commit d5dc687
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 12 deletions.
22 changes: 11 additions & 11 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions server/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,3 +370,5 @@
"en": "CP NewsPro",
"fr_ca": "PC NouvellesPro",
}

PRODUCTFRUITS_WORKSPACE_CODE = os.environ.get("PRODUCTFRUITS_WORKSPACE_CODE")
15 changes: 14 additions & 1 deletion server/theme/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,24 @@
{% if get_locale() == "fr_CA" %}
<title>PC NouvellesPro pour RP</title>
{% else %}
<title>CP NewsPro for PR</title>
<title>CP NewsPro for PR v2</title>
{% endif %}
{% endblock %}

{% block logo %}
{% include 'logo.html' %}
{% include 'logo-additional.html' %}
{% endblock %}

{% block layout_script %}
{% if config.PRODUCTFRUITS_WORKSPACE_CODE and auth_user %}
<script type="text/javascript">
(function(w,d,u){
w.$productFruits=w.$productFruits||[];
w.productFruits=w.productFruits||{};w.productFruits.scrV='2';
let a=d.getElementsByTagName('head')[0];let r=d.createElement('script');r.async=1;r.src=u;a.appendChild(r);
})(window,document,'https://app.productfruits.com/static/script.js');
$productFruits.push(['init', '{{ config.PRODUCTFRUITS_WORKSPACE_CODE }}', '{{ get_locale()[:2] }}', { username: '{{ hash(auth_user._id) }}' }]);
</script>
{% endif %}
{% endblock %}
4 changes: 4 additions & 0 deletions server/theme/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,8 @@
margin-block-start: 0;
max-width: 160px;
}
}

.productfruits--feedback-button {
z-index: 500;
}

0 comments on commit d5dc687

Please sign in to comment.