kind of combo

This commit is contained in:
Frédéric Péters 2015-02-18 16:52:39 +01:00
parent 8d4d527781
commit 8a6de1c3ab
14 changed files with 546 additions and 3 deletions

View File

@ -132,3 +132,67 @@ form {
padding: 32px 0 50px 25px;*/
background: url(../img/cont-bg.png) no-repeat 0 5px;
}
div.textcell.horaires,
div.textcell.accueil-mairie {
background: #EEEEEE;
padding: 13px 18px;
}
div.textcell.accueil-mairie {
width: 45%;
float: left;
}
div.textcell.horaires {
width: 45%;
float: right;
}
div.textcell.fin {
clear: both;
padding-top: 2em;
border-bottom: 1px dashed #bbb;
margin-bottom: 1em;
}
#real-content div.menucell.categories > div > ul > li:before {
content: "";
}
div.menucell.categories > div > ul > li {
padding: 0;
margin: 0px 0px 30px 0px;
display: inline-block;
color: #333;
width: 33%;
overflow: hidden;
min-height: 160px;
max-height: 290px;
vertical-align: top;
list-style: none;
}
#real-content div.menucell.categories > div > ul > li > a {
padding-top: 0;
border-bottom: none;
margin-bottom: 3px;
padding-bottom: 3px;
margin-top: 0;
text-align: left;
font-size: 14px;
font-weight: 600;
margin-top: -5px;
display: block;
color: #428BCA;
}
li.menu-famille {
background: url(https://demarches-vincennes.test.au-quotidien.com/themes/vincennes/img/vignettes/famille_small.jpg) no-repeat 0px 25px;
}
li.menu-famille ul {
padding-left: 110px;
}

View File

@ -0,0 +1,2 @@
{% load i18n sekizai_tags %}
test

View File

@ -0,0 +1,30 @@
<div class="block">
<h2>Compte lecteur</h2>
{% with data=compte_lecteur %}
{% if data.d.ClientAccount.ShortAccount %}
<p>Votre carte d'abonnement numéro {{ data.d.ClientAccount.Identity.BarCode }} est valable jusqu'au {{ data.d.ClientAccount.Identity.ExpirationDate }}.</p>
<p>Vous avez actuellement {{ data.d.ClientAccount.ShortAccount.NombrePrets }} oeuvre(s) en prêt :
<ul>
{% for loan in data.d.ClientAccount.Loans %}
<li {% if loan.IsLate %}style="color: red"{% endif %}> {{ loan.DisplayName }} - {{ loan.SearchItemAdapter.Resource.Crtr }} {% if loan.IsLate %}(en retard){% endif %}</li>
{% endfor %}
</ul>
</p>
<p>Vous avec actuellement {{ data.d.ClientAccount.ShortAccount.NombreDemandeReservations }} oeuvre(s) en réservation
</p>
{% if data.d.ClientAccount.ShortAccount.NombreMessages %}
<p>Vous avez <a href="{{ compte_lecteur_url }}/EXPLOITATION/DEFAULT/my-account.aspx#/Messages">{{ data.d.ClientAccount.ShortAccount.NombreMessages }}</a></p>
{% else %}
<p>Vous n'avez pas de message</p>
{% endif %}
<p><a href="{{ compte_lecteur_url }}/mandaye/sso?next_url=/EXPLOITATION/DEFAULT/my-account.aspx">Cliquer ici</a> pour accéder à votre compte lecteur sur le site des médiathèques.</a></p>
{% else %}
<p>Vous n'avez actuellement pas de compte médiathèque raccordé ou votre compte n'est plus valide.</p>
<p><a href="{{ compte_lecteur_url }}/mandaye/sso">Cliquer ici</a> pour raccorder votre compte médiathèque</p>
{% endif %}
{% endwith %}
</div>

View File

@ -0,0 +1,136 @@
{% load i18n sekizai_tags static blurp_tags %}
{% with demarches=agglo.data %}
{% if demarches %}
<h3 class="aq-catgr-plg-title"><a href="{{ wcs_url }}/login">Démarches de Montpellier Agglomération</a></h3>
<ul class="aq-forms-plg-listing demarches-agglo" {% if demarches|length <= 1 %}style="-moz-column-count: 1; -webkit-column-count: 1; column-count: 1"{% endif %}>
{% for data in demarches %}
<li class="aq-forms-plg-item">
<a class="aq-forms-plg-link" href="{{ wcs_url}}/login/?ReturnUrl={{ data.url }}">{{ data.title }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
{% endwith %}
<div class="ma_commune">
<ul class="aq-forms-plg-listing">
</ul>
</div>
<div class="aq-catgr-plg" data-empty="{% trans "Other procedures.." %}">
<h3 class="aq-catgr-plg-title">{% trans "Les démarches dans les autres communes" %}</h3>
<div class="aq-catgr-plg-selector-container">
</div>
</div>
{% addtoblock "js" %}
<script type="text/javascript">
function get_base_url(url) {
var urlArray = url.split('/');
return urlArray[0] + '//' + urlArray[2];
}
$(document).ready(function () {
var demarches = {};
var city_to_id_map = {};
var id_to_city_map = {};
{% if clapiers %}
demarches['clapiers'] = {{ clapiers.data|jsonify }};
city_to_id_map['Clapiers'] = 'clapiers';
id_to_city_map['clapiers'] = 'Clapiers';
{% endif %}
{% if laverune %}
demarches['laverune'] = {{ laverune.data|jsonify }};
city_to_id_map['Lavérune'] = 'laverune';
id_to_city_map['laverune'] = 'Lavèrune';
{% endif %}
{% if vendargues %}
demarches['vendargues'] = {{ vendargues.data|jsonify }};
city_to_id_map['Vendargues'] = 'vendargues';
id_to_city_map['vendargues'] = 'Vendargues';
{% endif %}
{% if villeneuve %}
demarches['villeneuve'] = {{ villeneuve.data|jsonify }};
city_to_id_map['Villeneuve-lès-Maguelone'] = 'villeneuve';
id_to_city_map['villeneuve'] = 'Villeneuve-lès-Maguelone';
{% endif %}
{% if fabregues %}
demarches['fabregues'] = {{ fabregues.data|jsonify }};
city_to_id_map['Fabrègues'] = 'fabregues';
id_to_city_map['fabregues'] = 'Fabrègues';
{% endif %}
{% if saint_georges_dorques %}
demarches['saint-georges'] = {{ saint_georges_dorques.data|jsonify }};
city_to_id_map['Saint-Georges-d\'Orques'] = 'saint-georges';
id_to_city_map['saint-georges'] = 'Saint-Georges-d\'Orques';
{% endif %}
var city = '{{ user.socialaccount_set.all.0.extra_data.ville }}';
var city_id = city_to_id_map[city];
if (demarches[city_id] != undefined && demarches[city_id].length > 0) {
var base_url = get_base_url(demarches[city_id][0].url) + '/login/';
var ma_commune = '{% trans "Démarches de ma commune : " %} <a href="'+ base_url + '">' + city + '</a>';
var h3 = '<h3 class="aq-catgr-plg-title">' + ma_commune + '</h3>';
$('.ma_commune').prepend(h3);
$.each(demarches[city_id], function(index, value) {
var li = '<li class="aq-forms-plg-item"><a class="aq-forms-plg-link" href="' + base_url + '?ReturnUrl=' + value.url + '">' + value.title + '</a><li>';
$('.ma_commune .aq-forms-plg-listing').append(li);
});
}
var $p = $('<p/>');
var $select = $('<select/>');
$select.append('<option value="">Vos Communes...</option>');
$.each(demarches, function (name, elements) {
if (name == city_id)
return;
if (elements.length == 0) return;
var $option = $('<option/>');
var id = name;
var city_name = id_to_city_map[name];
$option.text(city_name);
$option.val(id);
$select.append($option);
var $container = $('<div/>');
var $title = $('<h3/>');
var $listing = $('<ul/>');
if (elements.length <= 1)
$listing.attr('style', "-moz-column-count: 1; -webkit-column-count: 1; column-count: 1");
$listing.attr('class', 'aq-forms-plg-listing');
$container.attr({'id': id, 'class': "aq-catgr-plg-body"});
$title.attr('class', "aq-catgr-plg-title");
var base_url;
if (elements.length > 0) {
base_url = get_base_url(elements[0].url) + '/login/';
var title_link = '<a href="' + base_url + '">{% trans "Démarches de" %} ' + city_name + '</a>';
$title.append(title_link);
} else {
$title.text(name);
}
$container.append($title);
$.each(elements, function(index, elt) {
var item = '<li class="aq-forms-plg-item"><a class="aq-forms-plg-link" href="' + base_url + '?ReturnUrl=' + elt.url + '">' + elt.title + '</a><li>';
$listing.append(item);
});
$container.append($listing);
$("div.aq-catgr-plg").append($container);
$container.hide();
});
$p.append($select);
$('.aq-catgr-plg-selector-container').append($p);
// Show selected categories
var on_select_change = function(event) {
var $option = $('option:selected', event.target);
if ($option.val()) {
var id = '#' + $option.val();
$('.aq-catgr-plg .aq-catgr-plg-body').not(id).hide();
$(id).show();
} else {
$('.aq-catgr-plg .aq-catgr-plg-body').hide();
}
}
$select.bind('change', on_select_change);
});
</script>
{% endaddtoblock %}

View File

@ -0,0 +1,12 @@
{% if demarches_en_cours %}
<ul class="aq-forms-plg-listing" {% if demarches_en_cours|length <= 1 %}style="-moz-column-count: 1; -webkit-column-count: 1; column-count: 1"{% endif %}>
{% for data in demarches_en_cours %}
{% if not data.form_status_is_endpoint %}
<li class="aq-forms-plg-item">
<a class="aq-forms-plg-link"
href="{{ data.url }}">{{ data.title }}</a>
</li>
{% endif %}
{% endfor %}
</ul>
{% endif %}

View File

@ -0,0 +1,219 @@
{% load i18n sekizai_tags %}
{% addtoblock "js" %}
<script type="text/javascript">
var popup;
var timer;
var log = true;
var dgfip_url = 'https://www.tipi.budget.gouv.fr/tpa/paiement.web';
var saisie = 'M';
// for logging purposes
if (window.XMLHttpRequest) {
xmlhttp = new XMLHttpRequest();
} else {
xmlhttp = new ActiveXObject('Microsoft.XMLHTTP');
}
function reinit() {
document.getElementById('refdet_error').style.display='none';
document.getElementById('montant_error').style.display='none';
document.getElementById('mel_error').style.display='none';
}
function checkLen(element,y) {
if (y.length==element.maxLength) {
var next=element.tabIndex;
if (next<document.forms["tipi"].length) {
document.forms["tipi"].elements[next].focus();
}
}
}
function checkpopup() {
if(popup.closed) {
document.getElementById('wip').style.display='none';
document.forms['tipi'].reset();
clearInterval(timer);
}
}
function call_tipi() {
var params = {'refdet': function(id) {
var idpiece = document.getElementById('idpiece').value.trim();
var idligne = document.getElementById('idligne').value.trim();
var idpiece_padding = '';
var idligne_padding = '';
var exer = params.exer('exer');
if (!idpiece || isNaN(idpiece)) {
document.getElementById('refdet_error').style.display='inline';
return false;
}
if (!idligne || isNaN(idligne)) {
document.getElementById('refdet_error').style.display='inline';
return false;
}
for (var i=0;i<8-idpiece.length;i++)
idpiece_padding += '0';
idpiece = idpiece_padding + idpiece;
for (var i=0;i<6-idligne.length;i++)
idligne_padding += '0';
idligne = idligne_padding + idligne;
if (saisie == 'T')
return "999900000000999999";
else
return exer + idpiece + idligne;
}, 'montant': function(id) {
var euros = document.getElementById(id + '_euros').value.trim();
var cents = document.getElementById(id + '_cents').value.trim();
if (euros && cents) {
if (isNaN(euros) && isNaN(cents)) {
document.getElementById(value + '_error').style.display='inline';
return false;
}
return parseInt(euros) * 100 + parseInt(cents);
}
document.getElementById(id + '_error').style.display='inline';
return false;
}, 'mel': function(id) {
var mel = document.getElementById(id).value.trim();
var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
if(re.test(mel))
return mel;
document.getElementById(id + '_error').style.display='inline';
return false;
}, 'exer': function(id) {
var exer = document.getElementById(id).value.trim();
if (isNaN(exer)) {
document.getElementById('refdet_error').style.display='inline';
return false;
}
if (saisie == 'T')
return "9999";
else
return exer;
}};
var tipi_url = dgfip_url + '?saisie=' + saisie + '&numcli=' + document.getElementById('numcli').value;
var log_url = '/?saisie=' + saisie + '&numcli=' + document.getElementById('numcli').value;
var url_params = '&';
reinit();
for (var field in params) {
var valid = params[field](field);
if(!valid) {
return false;
} else {
if (document.getElementById(field + '_error'))
document.getElementById(field + '_error').style.display='none';
url_params += field + '=' + valid + '&';
}
}
var url = tipi_url;
url = tipi_url + url_params;
log_url = log_url + url_params;
if (log) {
xmlhttp.open('GET', log_url, true);
xmlhttp.send();
}
popup = window.open(url, 'tipi', 'height=800, width=900, toolbar=no, menubar=no, scrollbars=no, resizable=yes, location=no, directories=no, status=no');
document.getElementById('wip').style.display='block';
timer = setInterval(checkpopup, 400);
return false;
}
</script>
{% endaddtoblock %}
{% addtoblock "css" %}
<style>
#tipi_block {
position: relative;
}
#tipi_block ul {
padding-left: 1em;
}
#tipi_block li {
list-style-type: none;
margin-bottom: .3em;
padding: .2em 0;
}
#tipi_block li label {
float: left;
width: 11.5em;
}
#tipi_block li label:after {
content: ':';
margin-left: .5em;
}
#tipi_block li input[type=text], #tipi_block li input[type=email] {
border: 1px solid #bbb;
}
#tipi_block .error {
color: #f00;
font-size:.8em;
display: none;
}
#tipi_block #wip {
position: absolute;
background: #fff;
opacity: .8;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: none;
text-align: center;
}
</style>
{% endaddtoblock %}
<div class="block">
<h2 style="">Paiement en ligne</h2>
<p style=""><em>Vous pouvez payer ici les factures &eacute;mises par Montpellier Agglom&eacute;ration (service T&eacute;l&eacute;alarme, d&eacute;chets verts,...)</em></p>
<p style="">Apr&egrave;s avoir rempli les champs du formulaire ci-dessous et cliqu&eacute; sur le bouton &quot;Payer&quot;, vous serez redirig&eacute; vers le serveur de paiement s&eacute;curis&eacute; de la direction g&eacute;n&eacute;rale des finances publiques sur lequel vous pourrez finaliser votre paiement gr&acirc;ce &agrave; votre carte bancaire. Vous recevrez ensuite un courriel de confirmation de la transaction.</p>
<div id="tipi_block">
<div id="wip">
<h3>{% trans "Paiement en cours..." %}</h3>
</div>
<form name='tipi'>
<ul>
<li>
<label>{% trans "Identifiant collectivité" %}</label>
<select id="numcli">
<option value="005955">005955</option>
<option value="005956">005956</option>
<option value="005957">005957</option>
<option value="006483">006483</option>
<option value="006484">006484</option>
<option value="006485">006485</option>
</select>
</li>
<li>
<label>{% trans "Réference titre" %}</label>
<input type='text' id='exer' maxlength=4 size=4 tabindex="2" onkeyup="checkLen(this, this.value)" /> -
<input type='text' id='idpiece' maxlength=8 size=7 tabindex="3" onkeyup="checkLen(this, this.value)" /> -
<input type='text' id='idligne' maxlength=5 size=4 tabindex="4" onkeyup="checkLen(this, this.value)" />
<span class="error" id="refdet_error">{% trans "numéro invalide" %}</span>
</li>
<li>
<label>{% trans "Montant" %}</label>
<input type='text' id='montant_euros' size="4" maxlength="4" placeholder="0000" tabindex="5" onkeyup="checkLen(this, this.value)" /> ,
<input type='text' id='montant_cents' size="2" maxlength="2" placeholder="00" tabindex="6" onkeyup="checkLen(this, this.value)" value="00" />
<span class="error" id="montant_error">{% trans "montant invalide" %}</span>
</li>
<li>
<label>{% trans "Votre courriel" %}</label>
<input type='email' id='mel' {% if request.user.email %}value="{{ request.user.email }}" {% else %}placeholder="{% trans "nom@domaine.com" %}"{% endif %} />
<span class="error" id="mel_error">{% trans "courriel invalide" %}</span></li>
<li>
<input type='button' value='{% trans "Payer" %}' onclick='call_tipi()'/>
</li>
</ul>
</form>
</div>
</div>

View File

@ -0,0 +1,9 @@
{% extends "base.html" %}
{% load combo %}
{% block title %}Vincennes - {{ page.title }}{% endblock %}
{% block content %}
<h2>{{ page.title }}</h2>
{% placeholder "content" %}
{% endblock %}

Binary file not shown.

View File

@ -0,0 +1,16 @@
<div class="wcs-forms-of-category-{{slug}}">
{{ description|safe }}
<h3 class="introduction">Téléservices</h3>
<ul>
{% for form in forms %}
<li><a href="{{ form.url }}">{{ form.title }}</a>
{% if form.authentication_required %}(identification requise){% endif %}
</li>
{% endfor %}
</ul>
<div class="lien-du-bas">Si aucun des téléservices ci-dessus ne correspond à votre besoin, <a href="/question/votre-question-enfance/">posez ici votre question</a>.</div>
</div>

View File

@ -16,9 +16,6 @@
<li><a href="{{ wcs_url }}/myspace/">Mes démarches en cours</a></li>
<li><a href="{{ wcs_url }}/login">Démarches en ligne</a></li>
<li><a href="{% url 'auth_logout' %}">Déconnexion</a></li>
{% if request.user.is_superuser %}
<li><a href="{% url 'a2-manager-users' %}">Gestion des utilisateurs</a></li>
{% endif %}
</ul>
</div>
</div>

View File

@ -0,0 +1,27 @@
<div class="news_single box box-full">
<div class="box-title news_single--title clearfix">
<div class="trapezoidal trapezoidal-sm">
<h3 class="trapezoidal-title">
<i class="fa fa-file-text-o ">
</i>
Actualités </h3>
</div>
</div>
<div class="news_single--body">
<div class="list-group">
{% for item in menu %}
<a href="{{ item.link }}" class="list-group-item">
<h4 class="list-group-item-heading">{{ item.title }}</h4>
<p class="list-group-item-text">{{ item.date }}</p>
</a>
{% endfor %}
<a href="{{site_vincennes_url}}/Actualites" class="list-group-item see-all">
<p class="list-group-view-all color2">
<i class="fa fa-plus-circle">
</i>
Voir toute l'actualité
</p>
</a>
</div>
</div>
</div>

View File

@ -0,0 +1,25 @@
<div class="events_single box box-full">
<div class="box-title events_single--title clearfix">
<div class="trapezoidal trapezoidal-sm">
<h3 class="trapezoidal-title">
<i class="fa fa-calendar"></i> Agenda
</h3>
</div>
</div>
<div class="events_single--body">
<div class="list-group">
{% for item in menu %}
<a href="{{ item.link }}" class="list-group-item">
<h4 class="list-group-item-heading">{{ item.title }}</h4>
<p class="list-group-item-text">{{ item.date }}</p>
</a>
{% endfor %}
<a href="https://www.vincennes/Agenda" class="list-group-item see-all">
<p class="list-group-view-all color1">
<i class="fa fa-plus-circle"></i> Voir tout l'agenda
</p>
</a>
</div>
</div>
</div>

View File

@ -0,0 +1,3 @@
<a href="{{ menu.link }}" class="good_to_know box box-full" style="margin-top: 1em">
<img src="{{ menu.image }}" width="100%" class="img-responsive">
</a>

View File

@ -0,0 +1,3 @@
<a href="{{ menu.link }}" class="good_to_know box box-full">
<img src="{{ menu.image }}" width="100%" class="img-responsive">
</a>