Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDG sprint 2024-10 t/m 2024-12 #1020

Merged
merged 23 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
96da767
Small commit with the removal of several unused files
stefrado Oct 16, 2024
1164163
Passing CI checks - Forgot to remove a scss import
stefrado Oct 16, 2024
129cbca
Passing CI checks - Forgot to remove a js imports
stefrado Oct 16, 2024
655039a
Small commit with the removal of several unused files (#1003)
stefrado Oct 17, 2024
15a72a2
997 remove blue bar and implement publication links (#1001)
stefrado Nov 15, 2024
ed438b4
:fire: 987 REMOVE locks so every field is always editable (#1002)
stefrado Nov 15, 2024
61f0c20
:lipstick: [#995] RENEW and REFACTOR update form and set the fields n…
stefrado Nov 15, 2024
5c434ba
:sparkles: [#995] Implement feebdack on productlist page (#1005)
stefrado Nov 15, 2024
2d3f7c5
:fire: REMOVE shown variable that shouldn't be there
stefrado Nov 18, 2024
a50a809
:sparkles: 990 Implement new header (#1006)
stefrado Nov 25, 2024
9a0f9f8
#989 fix sorted product history. (#1008)
stefrado Nov 25, 2024
f25a12a
:recycle: [#999] REFACTOR some incorrect nested semantics (#1011)
stefrado Nov 25, 2024
b42c912
:rewind: REVERT some changes
stefrado Nov 27, 2024
6679e7c
:art: CHANGE small styling improvement
stefrado Dec 3, 2024
3b59762
:green_heart: [DEV] FIX sudden CI fails
stefrado Dec 6, 2024
1c3b648
:green_heart: [DEV] FIX sudden CI fails
stefrado Dec 6, 2024
94fe187
988 sort locations (#1019)
stefrado Dec 10, 2024
1b41492
998 producten aanbieden optioneel standaard op nee zetten (#1016)
stefrado Dec 10, 2024
f742b05
:sparkles: #993 ADD celery task 1: every day check that extracts ever…
stefrado Dec 10, 2024
0ccf3f0
Some small improvements. (NEW) (#1015)
stefrado Dec 10, 2024
36c6a81
:sparkles: [#994] IMPLEMENT celery task that presses through referenc…
stefrado Dec 10, 2024
27ed347
:goal_net: [DEV] CATCH request readtimeout errors
stefrado Dec 10, 2024
45233f7
:fire: [DEV] REMOVE a unittest that behaves strange in github CI. Tes…
stefrado Dec 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions src/sdg/components/templates/components/fields/base.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{% if as_row %}
<tr {% if hide_element %}style="display: none"{% endif %}>
<td>
{% endif %}

<div
class="form__field {% if inline %}form__field--inline{% endif %}"
{% if render_hidden %} style="display:none" {% endif %}
>
<header class="form__field-header">
{% block header %}{% endblock %}
</header>

<div class="form__field-body">
{% block body %}{% endblock %}
</div>

{% block footer %}{% endblock %}
</div>

{% if as_row %}
</td>
</tr>
{% endif %}
18 changes: 18 additions & 0 deletions src/sdg/components/templates/components/fields/checkbox.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{% extends 'components/fields/base.html' %}
{% load fields %}

{% block header %}
<label class="form__field-label">
{{field.label|capfirst}}
<i class="fas fa-info-circle fa-xs dark" title="{{ field.help_text }}"></i>
</label>
{% endblock %}

{% block body %}
<div class="form__control">
<div class="form__control-body">
{{ field }}
{{ field.errors }}
</div>
</div>
{% endblock %}
23 changes: 23 additions & 0 deletions src/sdg/components/templates/components/fields/core.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{% extends 'components/fields/base.html' %}
{% load fields utils %}

{% block header %}
<label class="form__field-label">
{{label|capfirst}}
<i class="fas fa-info-circle fa-xs dark" title="{{ tooltip }}"></i>
</label>
{% endblock %}

{% block body %}
<div class="form__control">
<div class="form__control-body">
{% if field %}
{{ field|addclass:'form__input' }}
{% elif value %}
<p>{{ value }}</p>
{% elif fallback_value %}
<p>{{ fallback_value }}</p>
{% endif %}
</div>
</div>
{% endblock %}
91 changes: 91 additions & 0 deletions src/sdg/components/templates/components/fields/localized.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{% extends 'components/fields/base.html' %}
{% load fields utils i18n %}

{% block header %}
{% for field in object.bound_fields %}
{% if field.language == 'nl' %}
<label class="form__field-label">
{{field.label|capfirst}}
<i class="fas fa-info-circle fa-xs dark" title="{{ field.help_text }}"></i>
</label>
{% endif %}
{% endfor %}
{% endblock %}

{% block body %}
{% for field in object.bound_fields %}
<div class="form__control" lang="{{ field.language }}">
<header class="form__control-header">
<p class="form__control-hint">
{% if field.language == 'nl' %}
{% trans 'Nederlands' %}
{% else %}
{% trans 'Engels' %}
{% endif %}

<i class="fas fa-info-circle fa-xs dark" title="{% trans 'De waarde voor deze taal is aangepast.' %}" aria-hidden="true"></i>
</p>
</header>
<div class="form__control-body" lang="{{ field.language }}">
{% if inline != True and 'dynamic_array' not in field.field.widget.template_name %}
<div class="diff" aria-hidden="true">
<header class="diff__versions">
<ins></ins>
<del></del>
</header>
<div class="form__input form__input--preview diff__preview"></div>
</div>
{% endif %}

{# Field. #}
<div class="form__input form__input--wrapper">
{{ field|addclass:"form__input" }}
{{ field.errors }}
</div>
</div>

{% if inline != True and 'dynamic_array' not in field.field.widget.template_name %}
<footer class="form__control-footer reference" aria-hidden="true">
<p class="form__control-hint">Standaardtekst {% if field.language == 'nl' %}{% trans 'Nederlands' %}{% else %}{% trans 'Engels' %}{% endif %}</p>
<div class="reference__versions" aria-hidden="true">
<del></del>
<ins></ins>
</div>
<div class="form__input form__input--preview reference__preview">
<p class="italic">Geen standaardtekst beschikbaar</p>
</div>
<div class="button-group">
<button class="button button--light button--small form__reference-btn" type="button" lang="{{field.language}}">
<i class="fa fa-undo fa-xs"></i>
{% trans 'Gebruik standaardtekst' %} {% if field.language == 'nl' %}{% trans 'Nederlands' %}{% else %}{% trans 'Engels' %}{% endif %}
</button>
</div>
</footer>
{% endif %}
</div>
{% endfor %}
{% endblock %}

{% block footer %}
{% for field in object.bound_fields %}
{% if forloop.counter == 1 and inline != True and 'dynamic_array' not in field.field.widget.template_name %}
<footer class="form__field-footer button-group">
<button class="button button--light button--small form__display-btn" type="button">
<i class="fa fa-chevron-right"></i>
{% trans 'Toon standaardtekst' %}
</button>
<section class="form__field-toolbar button-group" aria-hidden="true">
<button class="button button--light button--small form__diff-btn" type="button" title="{% trans "Toon de verschillen tussen mijn tekst en de standaardtekst" %}">
<i class="fa fa-eye fa-xs"></i>
{% trans 'Vergelijk met mijn teksten' %}
</button>
<button class="button button--light button--small reference__diff-btn" type="button"
title="{% trans "Toon de verschillen tussen mijn tekst en de standaardtekst" %}">
<i class="fa fa-eye fa-xs"></i>
{% trans 'Vergelijk met vorige versie' %}
</button>
</section>
</footer>
{% endif %}
{% endfor %}
{% endblock %}
51 changes: 51 additions & 0 deletions src/sdg/components/templates/components/fields/localized_url.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{% extends 'components/fields/base.html' %}
{% load utils fields i18n %}

{% block header %}
{% for field in bound_fields %}
{% if field.link and field.label and field.language == 'nl' %}
<label class="form__field-label">
{{field.link.label|capfirst}}
<i class="fas fa-info-circle fa-xs dark" title="{{ field.link.help_text }}"></i>
</label>
{% endif %}
{% endfor %}
{% endblock %}

{% block body %}
{% for field in bound_fields %}
{% if field.link and field.label %}
<section class="form__control">
<header class="form__control-header">
<p class="form__control-hint">
{% if field.language == 'nl' %}
{% trans 'Nederlands' %}
{% else %}
{% trans 'Engels' %}
{% endif %}

<i class="fas fa-info-circle fa-xs dark" title="{% trans 'De waarde voor deze taal is aangepast.' %}" aria-hidden="true"></i>
</p>
</header>
<div class="form__control-body">
<div class="url_label_field">
<div
class="url_label_field__container"
data-initialized="true"
>
<div class="url_label_field__container-item">
{{ field.label|addlabelclass:"form__input form__input--left" }}
{{ field.link|addlinkclass:"form__input form__input--right" }}
</div>
{% if field.label.errors or field.link.errors %}
<div class="url_label_field__container-item url_label_field__container-item--errorlist">
{{ field.label.errors }}{{ field.link.errors}}
</div>
{% endif %}
</div>
</div>
</div>
</section>
{% endif %}
{% endfor %}
{% endblock %}
23 changes: 23 additions & 0 deletions src/sdg/components/templates/components/fields/nonlocalized.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{% extends 'components/fields/base.html' %}
{% load fields utils %}

{% block header %}
{% for field in object.bound_fields %}
<label class="form__field-label">
{{field.label|capfirst}}
<i class="fas fa-info-circle fa-xs dark" title="{{ field.help_text }}"></i>
</label>
{% endfor %}
{% endblock %}

{% block body %}
{% for field in object.bound_fields %}
{# Field. #}
<div class="form__control">
<div class="form__control-body">
{{ field|addclass:"form__input" }}
{{ field.errors }}
</div>
</div>
{% endfor %}
{% endblock %}
43 changes: 43 additions & 0 deletions src/sdg/components/templates/components/fields/readonly.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{% extends 'components/fields/base.html' %}
{% load producten fields i18n %}

{% block header %}
{% for field in object.bound_fields %}
{% if field.language == 'nl' %}
<label class="form__field-label">
{{field.configuration.label|default:field.verbose_name|capfirst}}
<i class="fas fa-info-circle fa-xs dark" title="{{ field.configuration.tooltip|default:field.help_text }}"></i>
</label>
{% endif %}
{% endfor %}
{% endblock %}


{% block body %}
{% for field in object.bound_fields %}
<section class="form__control" lang={{field.language}}>
<header class="form__control-header">
<p class="form__control-hint">
{% if field.language == 'nl' %}
{% trans 'Nederlands' %}
{% else %}
{% trans 'Engels' %}
{% endif %}

<i class="fas fa-info-circle fa-xs dark" title="{% trans 'De waarde voor deze taal is aangepast.' %}" aria-hidden="true"></i>
</p>
</header>
<div class="form__control-body">
<section class="form__input form__input--preview">
{% if field.name == "product_titel" and field.landelijke_link %}
<a href="{{ field.landelijke_link }}" target="_blank">
{% field_info field %}
</a>
{% else %}
{% field_info field %}
{% endif %}
</section>
</div>
</section>
{% endfor %}
{% endblock %}
22 changes: 22 additions & 0 deletions src/sdg/components/templates/components/fields/select.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{% extends 'components/fields/base.html' %}
{% load utils fields %}

{% block header %}
<label class="form__field-label">
{{field.label|capfirst}}
<i class="fas fa-info-circle fa-xs dark" title="{{ field.help_text }}"></i>
</label>
{% endblock %}

{% block body %}
<div class="form__control">
<div class="form__control-body">
<fieldset class="form__group--nopad">
<div class="select">
{{ field }}
</div>
</fieldset>
{{ field.errors }}
</div>
</div>
{% endblock %}
Loading
Loading