Compare commits

...

5 Commits
main ... master

Author SHA1 Message Date
Daniel Muyshond 383b15a876 Upgrade publik-base-theme submodule with latest changes
gitea/imio-publik-themes/pipeline/head This commit looks good Details
2023-06-05 15:13:48 +02:00
Daniel Muyshond ce78ad73e1 Delete obsolete variants
gitea/imio-publik-themes/pipeline/head This commit looks good Details
2023-06-05 15:13:04 +02:00
Daniel Muyshond 6b5bfb4776 use python3 instead of python
gitea/imio-publik-themes/pipeline/head This commit looks good Details
2023-06-05 15:10:50 +02:00
Benoit Suttor 3e9fb82ead fix: update my imio login page
gitea/imio-publik-themes/pipeline/head This commit looks good Details
2022-06-14 12:27:38 +02:00
Nicolas Hislaire 2132e02a32 [MPP-3] add new plaines displayer for portail parent 2021-02-25 17:01:40 +01:00
13 changed files with 105 additions and 1228 deletions

View File

@ -20,7 +20,7 @@ css: publik-base-theme/static/includes/_data_uris.scss $(shell python3 get_theme
rm -rf static/*/.sass-cache/
for inode2 in $(shell ls -d templates/variants/*/) ; do \
if [ -f $$inode2/prepare-template.py ]; then \
cd $$inode2 && python prepare-template.py; \
cd $$inode2 && python3 prepare-template.py; \
cd ../../..; \
fi \
done

@ -1 +1 @@
Subproject commit 88094baff5473b48588e1baf24da63941ceaf4a6
Subproject commit e3e5b5990f3b3cbf2e9333d695abb4f5e23b537a

View File

@ -0,0 +1,71 @@
{% extends "qommon/forms/widget.html" %}
{% block widget-content %}
{% with webservice.get_available_plaines as activities %}
<h2>Activités proposées</h2>
<div id="imio_plaine_weeks">
{% for week in activities %}
<div class="imio_plaine_week">
<p>{{ week.text }}</p>
{% for activity in week.activities %}
<div id="{{ activity.id }}" class="activity">
{{ activity.text }}
</div>
{% endfor %}
</div>
{% endfor %}
</div>
{% endwith %}
<script type="text/javascript">
dom_activities = document.querySelectorAll('.activity')
function doing_stuff(index){
element_id = document.querySelector('#var_activities_plaines input').id
element_name = element_id + "$element" + index
linked_element = document.getElementsByName(element_name)[0]
linked_element.checked = !linked_element.checked
}
for(i=0; i<dom_activities.length; i++){
dom_activities[i].addEventListener('click', function(e){
let selected = this.parentNode.querySelector('.selected')
if (this.isSameNode(selected)) {
this.classList.remove('selected');
} else if (selected != null) {
selected.classList.remove('selected');
this.classList.add('selected');
doing_stuff(selected.id)
} else {
this.classList.add('selected');
}
doing_stuff(this.id);
})
}
</script>
<style>
#imio_plaine_weeks {
display: flex;
}
.activity {
border: 1px solid #bd1f68;
margin: 2px;
padding: 2px 4px;
cursor: pointer;
}
.activity:hover {
box-shadow: 0 0 10px #bd1f68;
color: #bd1f68;
}
.activity.selected {
background-color: rgba(189, 31, 104, 1);
font-weight: bold;
color: #FFF;
}
</style>
{% endblock %}

View File

@ -1,10 +1,13 @@
{% extends "authentic2/base.html" %}
{% load i18n %}
{% load staticfiles %}
{% load static %}
{% block extra-body-class %}{{ block.super }} login-page{% endblock %}
{% block bodyargs %}
{% endblock %}
{% block title %}
{% trans "Login" %}
{% endblock %}
@ -13,28 +16,25 @@
{% endblock %}
{% block content %}
{% include "authentic2/service_info_fragment.html" %}
<div id="login-page" class="clearfix">
{% block login-pre %}{% endblock %}
<div id="login-page" class="clearfix methods{{ blocks|length }}">
{% block login-top %}{% endblock %}
{% block login %}
<div id ="wca-login-box">
<h2>CONNEXION AVEC <span class="highlight">Wallonie Connect</span></h2>
<picture>
<img id="wca-login-img" src="{{ portal_url }}static/imio-pwa-2020/images/wca.png" alt="Illustration de Wallonie connect">
</picture>
<ul>
<li>
<a id="agent-connect-button" href="{{ login_url }}">Je suis un agent</a>
</li>
<li>
<a id="user-connect-button" href="#">Je suis un usager</a>
</li>
</ul>
{% block login-blocks %}
{% for id, login_block in blocks.items %}
{% if id == "oidc_1" %}
<div class="block block-{{login_block.authenticator.id}} block-{{id}}">
<div {% if login_block.extra_css_class %} class="{{ login_block.extra_css_class }}"{% endif %}>
{{ login_block.content|safe }}
</div>
{% endif %}
</div>
{% endfor %}
{% endblock %}
</div>
{% endblock %}

View File

@ -0,0 +1,15 @@
<div id="wca-login-box">
<picture>
<img
id="wca-login-img"
src="{{ portal_url }}static/imio-pwa-2020/images/wca.png"
alt="Illustration de Wallonie-Connect"
/>
</picture>
<h2>Connexion avec <span class="highlight">Wallonie-Connect</span></h2>
<ul>
<li>
<a id="agent-connect-button" href="{{ login_url }}">Je suis un agent</a>
</li>
</ul>
</div>

View File

@ -1,26 +0,0 @@
{% load i18n %}
{% if regies %}
<h2>{% trans "Basket" %}</h2>
{% for regie_info in regies %}
{% if regies|length != 1 %}<h3 class="regie-name">{{regie_info.regie.label}}</h3>{% endif %}
<form action="{% url 'lingo-pay' %}" method="POST">
{% csrf_token %}
<input type="hidden" name="next_url" value="{{ cell.page.get_online_url }}" />
{% if regies|length != 1 %}<input type="hidden" name="regie" value="{{regie_info.regie.id}}" />{% endif %}
<ul>
{% for item in regie_info.items %}
<li><label><input type="checkbox" style="display:none" name="item" value="{{ item.id }}" checked/>
<a href="{{ item.source_url }}">{{ item.subject }}</a> {{ item.amount }} &euro;</label>
{% if item.user_cancellable %}
<a class="remove-item" rel="popup" href="{% url 'lingo-cancel-item' pk=item.id %}">{% trans 'remove' %}</a>
{% endif %}
</li>
{% endfor %}
<li><strong>{% trans "Total:" %}</strong> {{ regie_info.total }} &euro;</li>
</ul>
<input id="pay" type="submit" value="Payer votre commande"/>
<a href="{{portal_url}}demarches" id="new-command">Commander un autre document</a>
<!--input type="submit" value="{% trans "Pay" %}"/-->
</form>
{% endfor %}
{% endif %}

View File

@ -1,88 +0,0 @@
#! /usr/bin/env python
import os
import subprocess
import re
import sys
FILENAME = 'tmp.html'
if os.path.exists(FILENAME):
os.unlink(FILENAME)
URL = 'https://www.liege.be/fr/@@teleservice-template'
subprocess.call(['wget', '--quiet', '-O', FILENAME, '--convert-links', URL])
content = '{% load i18n static combo %}' + open(FILENAME).read().strip()
if len(content) < 500:
sys.exit(0)
# replace action of "subscribe newsletter" form
content = content.replace('action="tmp.html"', 'action="https://liege-preprod.imio.be/fr/"')
# remove tmp.html that have been added to anchor links
content = content.replace('tmp.html#', '#')
content = content.replace('</head>',
'<title>{% firstof global_title "e-Guichet" %} {% block title %}{% endblock %}</title>\n</head>')
content = content.replace('</head>',
'''
{% block extra_top_head %}
{% endblock %}
{{ media }}
<link rel="stylesheet" type="text/css" href="{{site_base}}{% static 'site-liege/style.css' %}?{{statics_hash}}">
{% block extra_css %}
{% endblock %}
{% block extra_scripts %}
{% endblock %}
</head>''')
content = re.sub('<body(.*?)>',
r'<body\1 {% block bodyargs %}{% endblock %}>',
content)
content = content.replace('<div id="teleservice-nav"></div>',
'<div id="teleservice-nav"><div id="nav">{% block nav %}{% block menu %}{% endblock %}{% endblock %}</div></div>')
content = content.replace('<div id="teleservice-content"></div>',
'<div id="teleservice-content"><div id="content">{% block content %}{% endblock %}</div></div>')
# =============================================================================================================
# =============================================================================================================
content = content.replace('<div id="top-slogan-inner">','<div id="top-slogan-inner"><h1>Guichet en ligne</h1>')
content = content.replace('<style media="screen" type="text/css">@import url(https://liege-preprod.imio.be/portal_css/Sunburst%20Theme/++theme++cpskin.theme.base/css/fontello.css);</style>','')
content = content.replace('<link href="http://fonts.googleapis.com/css?family=Open+Sans:400,400italic,700|Montserrat|Merriweather" media="all" rel="stylesheet" title="Google font Open Sans" type="text/css"/>','')
content = content.replace('<link href="http://fonts.googleapis.com/css?family=Open+Sans:400,400italic,700" media="all" rel="stylesheet" title="Google font Open Sans" type="text/css"/>','')
content = content.replace('<script src="https://liege-preprod.imio.be/portal_javascripts/Sunburst%20Theme/resourceplonetruegallery-portlet-cachekey-3d4c482deb7057b84aa5ff9c3b380c1d.js" type="text/javascript"></script>','')
content = content.replace('<script src="https://liege-preprod.imio.be/portal_javascripts/Sunburst%20Theme/geoMailDecoder-cachekey-58ed32e59563d02d7f7b98aabeb5189b.js" type="text/javascript"></script>','')
#content = re.sub(r'<div id="teleservice-nav">.*</div>',
# '<div id="nav">{% block nav %}{% block menu %}{% endblock %}{% endblock %}</div>',
# content, flags=re.DOTALL)
#content = re.sub(r'<div id="teleservice-content">.*</div>',
# '<div id="content">{% block content %}{% endblock %}</div>',
# content, flags=re.DOTALL)
#content = re.sub(r'<article id="content">.*</article>',
# '<div id="nav">{% block nav %}{% block menu %}{% endblock %}{% endblock %}</div>'
# '<div id="content">{% block content %}{% endblock %}</div>',
# content, flags=re.DOTALL)
#
#content = re.sub(r'<p class="hiddenStructure">Outils personnels</p>(.*?</ul>)',
# '{% block user-info %} {% endblock %}',
# content, flags=re.DOTALL)
open('theme.html', 'w').write(content)

View File

@ -1,21 +0,0 @@
{% extends "emails/body_base.html" %}
{% block content %}
<p>Bonjour,</p>
<p>
Vous venez de créer un accès à votre compte personnel sur l'E-guichet de la Ville de Namur. <!--{% firstof hobo_city %}-->.
Nous vous en remercions.
</p>
<p>
Pour activer votre compte personnel, veuillez cliquer sur le bouton suivant :
</p>
{% include "emails/button-link.html" with url=registration_url label="Activation de mon compte" %}
<p>
Attention, sans validation de votre part dans les {{expiration_days}} jours,
votre demande de compte sera annulée.
</p>
{% endblock %}

File diff suppressed because one or more lines are too long

View File

@ -1,26 +0,0 @@
{% load i18n %}
{% if regies %}
<h2>{% trans "Basket" %}</h2>
{% for regie_info in regies %}
{% if regies|length != 1 %}<h3 class="regie-name">{{regie_info.regie.label}}</h3>{% endif %}
<form action="{% url 'lingo-pay' %}" method="POST">
{% csrf_token %}
<input type="hidden" name="next_url" value="{{ cell.page.get_online_url }}" />
{% if regies|length != 1 %}<input type="hidden" name="regie" value="{{regie_info.regie.id}}" />{% endif %}
<ul>
{% for item in regie_info.items %}
<li><label><input type="checkbox" style="display:none" name="item" value="{{ item.id }}" checked/>
<a href="{{ item.source_url }}">{{ item.subject }}</a> {{ item.amount }} &euro;</label>
{% if item.user_cancellable %}
<a class="remove-item" rel="popup" href="{% url 'lingo-cancel-item' pk=item.id %}">{% trans 'remove' %}</a>
{% endif %}
</li>
{% endfor %}
<li><strong>{% trans "Total:" %}</strong> {{ regie_info.total }} &euro;</li>
</ul>
<input id="pay" type="submit" value="Payer votre commande"/>
<a href="{{portal_url}}demarches" id="new-command">Commander un autre document</a>
<!--input type="submit" value="{% trans "Pay" %}"/-->
</form>
{% endfor %}
{% endif %}

View File

@ -1,88 +0,0 @@
#! /usr/bin/env python
import os
import subprocess
import re
import sys
FILENAME = 'tmp.html'
if os.path.exists(FILENAME):
os.unlink(FILENAME)
URL = 'https://www.namur.be/fr/@@teleservice-template'
subprocess.call(['wget', '--quiet', '-O', FILENAME, '--convert-links', URL])
content = '{% load i18n static combo %}' + open(FILENAME).read().strip()
if len(content) < 500:
sys.exit(0)
# replace action of "subscribe newsletter" form
content = content.replace('action="tmp.html"', 'action="https://namur-preprod.imio.be/fr/"')
# remove tmp.html that have been added to anchor links
content = content.replace('tmp.html#', '#')
content = content.replace('</head>',
'<title>{% firstof global_title "e-Guichet" %} {% block title %}{% endblock %}</title>\n</head>')
content = content.replace('</head>',
'''
{% block extra_top_head %}
{% endblock %}
{{ media }}
<link rel="stylesheet" type="text/css" href="{{site_base}}{% static 'site-namur/style.css' %}?{{statics_hash}}">
{% block extra_css %}
{% endblock %}
{% block extra_scripts %}
{% endblock %}
</head>''')
content = re.sub('<body(.*?)>',
r'<body\1 {% block bodyargs %}{% endblock %}>',
content)
content = content.replace('<div id="teleservice-nav"></div>',
'<div id="teleservice-nav"><div id="nav">{% block nav %}{% block menu %}{% endblock %}{% endblock %}</div></div>')
content = content.replace('<div id="teleservice-content"></div>',
'<div id="teleservice-content"><div id="content">{% block content %}{% endblock %}</div></div>')
# =============================================================================================================
# =============================================================================================================
content = content.replace('<div id="top-slogan-inner">','<div id="top-slogan-inner"><h1>Guichet en ligne</h1>')
content = content.replace('<style media="screen" type="text/css">@import url(https://namur-preprod.imio.be/portal_css/Sunburst%20Theme/++theme++cpskin.theme.base/css/fontello.css);</style>','')
content = content.replace('<link href="http://fonts.googleapis.com/css?family=Open+Sans:400,400italic,700|Montserrat|Merriweather" media="all" rel="stylesheet" title="Google font Open Sans" type="text/css"/>','')
content = content.replace('<link href="http://fonts.googleapis.com/css?family=Open+Sans:400,400italic,700" media="all" rel="stylesheet" title="Google font Open Sans" type="text/css"/>','')
content = content.replace('<script src="https://namur-preprod.imio.be/portal_javascripts/Sunburst%20Theme/resourceplonetruegallery-portlet-cachekey-3d4c482deb7057b84aa5ff9c3b380c1d.js" type="text/javascript"></script>','')
content = content.replace('<script src="https://namur-preprod.imio.be/portal_javascripts/Sunburst%20Theme/geoMailDecoder-cachekey-58ed32e59563d02d7f7b98aabeb5189b.js" type="text/javascript"></script>','')
#content = re.sub(r'<div id="teleservice-nav">.*</div>',
# '<div id="nav">{% block nav %}{% block menu %}{% endblock %}{% endblock %}</div>',
# content, flags=re.DOTALL)
#content = re.sub(r'<div id="teleservice-content">.*</div>',
# '<div id="content">{% block content %}{% endblock %}</div>',
# content, flags=re.DOTALL)
#content = re.sub(r'<article id="content">.*</article>',
# '<div id="nav">{% block nav %}{% block menu %}{% endblock %}{% endblock %}</div>'
# '<div id="content">{% block content %}{% endblock %}</div>',
# content, flags=re.DOTALL)
#
#content = re.sub(r'<p class="hiddenStructure">Outils personnels</p>(.*?</ul>)',
# '{% block user-info %} {% endblock %}',
# content, flags=re.DOTALL)
open('theme.html', 'w').write(content)

View File

@ -1,21 +0,0 @@
{% extends "emails/body_base.html" %}
{% block content %}
<p>Bonjour,</p>
<p>
Vous venez de créer un accès à votre compte personnel sur l'E-guichet de la Ville de Namur. <!--{% firstof hobo_city %}-->.
Nous vous en remercions.
</p>
<p>
Pour activer votre compte personnel, veuillez cliquer sur le bouton suivant :
</p>
{% include "emails/button-link.html" with url=registration_url label="Activation de mon compte" %}
<p>
Attention, sans validation de votre part dans les {{expiration_days}} jours,
votre demande de compte sera annulée.
</p>
{% endblock %}

File diff suppressed because one or more lines are too long