{
global $globals;
- new_groupadmin_page('xnet/groupe/evt-modif.tpl');
+ new_groupadmin_page('xnetevents/edit.tpl');
$page->assign('logged', logged());
$page->assign('admin', may_update());
$evt['fin'] = Post::get('fin_Year')."-".Post::get('fin_Month')
. "-".Post::get('fin_Day')." ".Post::get('fin_Hour')
. ":".Post::get('fin_Minute').":00";
- $evt['membres_only'] = Post::get('membres_only');
- $evt['advertise'] = Post::get('advertise');
$evt['show_participants'] = Post::get('show_participants');
$evt['noinvite'] = Post::get('noinvite');
if (!$short_name) {
$short_name = '';
}
$evt['short_name'] = $short_name;
- $evt['deadline_inscription'] = Post::get('deadline', 'off') == 'on' ? null
- : (Post::get('inscr_Year')."-".Post::get('inscr_Month')
- ."-".Post::get('inscr_Day'));
+ $evt['deadline_inscription'] = null;
+ if (Post::get('deadline')) {
+ $evt['deadline_inscription'] = Post::get('inscr_Year')."-"
+ . Post::get('inscr_Month')."-"
+ . Post::get('inscr_Day');
+ }
// Store the modifications in the database
- $globals->xdb->execute("REPLACE INTO groupex.evenements
+ $globals->xdb->execute("REPLACE INTO groupex.evenements
SET eid={?}, asso_id={?}, organisateur_uid={?}, intitule={?},
paiement_id = {?}, descriptif = {?},
- debut = {?}, fin = {?},
- membres_only = {?}, advertise = {?}, show_participants = {?},
+ debut = {?}, fin = {?}, show_participants = {?},
short_name = {?}, deadline_inscription = {?}, noinvite = {?}",
$evt['eid'], $evt['asso_id'], $evt['organisateur_uid'], $evt['intitule']
, $evt['paiement_id'], $evt['descriptif'],
$evt['debut'], $evt['fin'],
- $evt['membres_only'], $evt['advertise'], $evt['show_participants'],
+ $evt['show_participants'],
$evt['short_name'], $evt['deadline_inscription'], $evt['noinvite']);
// if new event, get its id
if ($eid) {
$res = $globals->xdb->query(
"SELECT eid, intitule, descriptif, debut, fin,
- membres_only, advertise, show_participants,
- paiement_id, short_name, deadline_inscription,
- noinvite
+ show_participants, paiement_id, short_name,
+ deadline_inscription, noinvite
FROM groupex.evenements
WHERE eid = {?}", $eid);
$evt = $res->fetchOneAssoc();
+++ /dev/null
-{**************************************************************************}
-{* *}
-{* Copyright (C) 2003-2006 Polytechnique.org *}
-{* http://opensource.polytechnique.org/ *}
-{* *}
-{* This program is free software; you can redistribute it and/or modify *}
-{* it under the terms of the GNU General Public License as published by *}
-{* the Free Software Foundation; either version 2 of the License, or *}
-{* (at your option) any later version. *}
-{* *}
-{* This program is distributed in the hope that it will be useful, *}
-{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
-{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
-{* GNU General Public License for more details. *}
-{* *}
-{* You should have received a copy of the GNU General Public License *}
-{* along with this program; if not, write to the Free Software *}
-{* Foundation, Inc., *}
-{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
-{* *}
-{**************************************************************************}
-
-<h1>{$asso.nom} : Création d'une liste de diffusion</h1>
-
-<p class="descr">
-<strong>Note :</strong> Les listes de diffusion sont un outil particulièrement adapté pour des
-échanges entre 6 personnes, ou plus (newsletter, débat interne au groupe ...). En revanche, elles
-s'avèrent peu praticables pour des discussions plus restreintes. Il est alors préférable
-d'utiliser <a href="{rel}/{$platal->ns}alias/create">un alias</a>, à la gestion beaucoup plus souple.
-</p>
-<p class="descr">
-D'autre part, il est impossible d'inscrire une liste de diffusion à une autre liste de diffusion.
-Si tu as besoin de cette fonctionnalité, il faut alors <strong>impérativement</strong> utiliser
-<a href="{rel}/{$platal->ns}alias/create">un alias</a> qui, lui, est capable de regrouper plusieurs listes.
-</p>
-<form action='{rel}/{$platal->ns}lists/create' method='post'>
- <table class="large">
- <tr>
- <th colspan='2'>Caractéristiques de la Liste</th>
- </tr>
- <tr>
- <td><strong>Addresse souhaitée :</strong></td>
- <td>
- <input type='text' name='liste' value='{$smarty.post.liste}' />@{$asso.mail_domain}
- </td>
- </tr>
- <tr>
- <td><strong>Sujet (bref) :</strong></td>
- <td>
- <input type='text' name='desc' size='40' value="{$smarty.post.desc}" />
- </td>
- </tr>
- <tr>
- <td><strong>Propriétés :</strong></td>
- <td>
- <table style='width: 100%' class="normal">
- <tr>
- <td>visibilité :</td>
- <td>
- <input type='radio' name='advertise' value='0'
- {if $smarty.post.advertise && $smarty.post}checked='checked'{/if} />publique
- </td>
- <td>
- <input type='radio' name='advertise' value='1'
- {if !$smarty.post.advertise || !$smarty.post}checked='checked'{/if} />privée
- </td>
- <td></td>
- </tr>
- <tr>
- <td>diffusion :</td>
- <td>
- <input type='radio' name='modlevel' value='0'
- {if !$smarty.post.modlevel}checked='checked'{/if} />libre
- </td>
- <td>
- <input type='radio' name='modlevel' value='1'
- {if $smarty.post.modlevel eq 1}checked='checked'{/if} />restreinte
- </td>
- <td><input type='radio' name='modlevel' value='2'
- {if $smarty.post.modlevel eq 2}checked='checked'{/if} />modérée
- </td>
- </tr>
- <tr>
- <td>inscription :</td>
- <td>
- <input type='radio' name='inslevel' value='0'
- {if !$smarty.post.inslevel && $smarty.post}checked='checked'{/if} />libre
- </td>
- <td>
- <input type='radio' name='inslevel' value='1'
- {if $smarty.post.inslevel || !$smarty.post}checked='checked'{/if} />modérée
- </td>
- <td></td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- <p class="center"><input name='submit' type='submit' value="Créer !" /></p>
-</form>
-
-{* vim:set et sw=2 sts=2 sws=2: *}
+++ /dev/null
-{**************************************************************************}
-{* *}
-{* Copyright (C) 2003-2006 Polytechnique.org *}
-{* http://opensource.polytechnique.org/ *}
-{* *}
-{* This program is free software; you can redistribute it and/or modify *}
-{* it under the terms of the GNU General Public License as published by *}
-{* the Free Software Foundation; either version 2 of the License, or *}
-{* (at your option) any later version. *}
-{* *}
-{* This program is distributed in the hope that it will be useful, *}
-{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
-{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
-{* GNU General Public License for more details. *}
-{* *}
-{* You should have received a copy of the GNU General Public License *}
-{* along with this program; if not, write to the Free Software *}
-{* Foundation, Inc., *}
-{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
-{* *}
-{**************************************************************************}
-
-{include file='listes/header_listes.tpl' on='sync'}
-<h1>Non abonnés à la liste {$platal->argv[1]}@{$asso.mail_domain}</h1>
-
-<form action="{rel}/{$platal->ns}lists/sync/{$platal->argv[1]}" method="post">
-
- <table cellspacing="2" cellpadding="0" class="tiny">
- <tr>
- <th>Membre</th>
- <th></th>
- </tr>
- {foreach from=$not_in_list item=u}
- <tr>
- <td>{$u.prenom} {$u.nom}</td>
- <td><input type="checkbox" name="add[{$u.email}]" /></td>
- </tr>
- {/foreach}
- <tr>
- <td colspan='2' class="center">
- <input type='submit' value='forcer inscription' />
- </td>
- </tr>
- </table>
-
-</form>
-
-{* vim:set et sw=2 sts=2 sws=2: *}
+++ /dev/null
-{**************************************************************************}
-{* *}
-{* Copyright (C) 2003-2006 Polytechnique.org *}
-{* http://opensource.polytechnique.org/ *}
-{* *}
-{* This program is free software; you can redistribute it and/or modify *}
-{* it under the terms of the GNU General Public License as published by *}
-{* the Free Software Foundation; either version 2 of the License, or *}
-{* (at your option) any later version. *}
-{* *}
-{* This program is distributed in the hope that it will be useful, *}
-{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
-{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
-{* GNU General Public License for more details. *}
-{* *}
-{* You should have received a copy of the GNU General Public License *}
-{* along with this program; if not, write to the Free Software *}
-{* Foundation, Inc., *}
-{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
-{* *}
-{**************************************************************************}
-
-{if $smarty.get.del_alias}
-
-<p class="error">Est tu sur de supprimer l'alias {$smarty.get.del_alias} ?</p>
-<form action='{rel}/{$platal->ns}lists' method="post">
- <div class="center">
- <input type='submit' value="Oui, je suis sur" />
- <input type='hidden' name='del_alias' value="{$smarty.get.del_alias}" />
- </div>
-</form>
-<p>[<a href='{rel}/{$platal->ns}lists'>retour à la page des listes</a>]</p>
-
-{else}
-
-<h1>{$asso.nom} : Listes de diffusion</h1>
-
-<h2>Listes de diffusion du groupe {$asso.nom} :</h2>
-
-<p class="descr">
-Une liste dont <strong>la diffusion</strong> est modérée est une liste dont les mails sont validés
-par les administrateurs avant d'être transmis aux membres de la liste. Une liste dont
-<strong>l'inscription</strong> est modérée est une liste pour laquelle l'abonnement est soumis à
-l'accord préalable des responsables du groupe.
-</p>
-<p class="descr">
-La dernière colonne du tableau t'indique si tu es inscrit{if $smarty.session.femme}e{/if} ou non à
-la liste. Dans le premier cas, une croix rouge te permet de te désabonner. Dans le second cas, une
-croix verte te permet de t'inscrire, après accord des responsables si l'inscription est modérée.
-</p>
-
-<table cellpadding="0" cellspacing="0" class='large'>
- <tr>
- <th>Liste</th>
- <th>Description</th>
- <th>Diffusion</th>
- <th>Inscription</th>
- <th>Nb</th>
- <th> </th>
- </tr>
- {foreach from=$listes item=l}
- <tr>
- <td>
- <a href="mailto:{$l.list}@{$asso.mail_domain}"><img src="{rel}/images/mail.png" alt='[mail]' /></a>
- <a href='{rel}/{$platal->ns}lists/members/{$l.list}'>{$l.list} {if $l.priv}<sup>#</sup>{/if}{if $l.own}<sup>o</sup>{/if}</a>
- </td>
- <td>{$l.desc}</td>
- <td class='center'>
- {if $l.diff eq 2}modérée{elseif $l.diff eq 1}restreinte{else}libre{/if}
- </td>
- <td class='center'>{if $l.ins}modérée{else}libre{/if}</td>
- <td align='right'>{$l.nbsub}</td>
- <td align='right'>
- {if $l.sub eq 2}
- <a href="{rel}/{$platal->ns}lists?del={$l.list}"><img src="{rel}/images/del.png" alt="[désinscrire]" title="me désinscrire" /></a>
- {elseif $l.sub eq 1}
- <img src="{rel}/images/flag.png" alt="[en attente]" title="en attente de modération" />
- {else}
- <a href="{rel}/{$platal->ns}lists?add={$l.list}"><img src="{rel}/images/ajouter.gif" alt="[m'inscrire]" title="m'inscrire" /></a>
- {/if}
- </td>
- </tr>
- {foreachelse}
- <tr><td colspan='6'>Pas de listes pour ce groupe</td></tr>
- {/foreach}
-</table>
-
-<p class="descr">
-<sup>o</sup>: tu es {if $smarty.session.femme}modératrice{else}moderateur{/if} sur cette liste<br />
-<sup>#</sup>: cette liste est invisible aux non-membres de la liste. S'en désabonner
-t'empêcherait de t'y réabonner par la suite sans l'aide d'un administrateur.
-</p>
-
-<h2>Voici les alias existants pour le groupe {$asso.nom} :</h2>
-
-{if $alias->total()}
-<table cellspacing="0" cellpadding="0" class='large'>
- <tr>
- <th{if $may_update} colspan='3'{/if}>Alias</th>
- </tr>
- {iterate from=$alias item=a}
- <tr>
- {if $may_update}
- <td class="center"><a href='mailto:{$a.alias}'><img src='{rel}/images/mail.png' alt='[mail]' /></a></td>
- <td><a href="{rel}/{$platal->ns}alias/admin/{$a.alias}">{$a.alias}</a></td>
- <td class="center"><a href="{rel}/{$platal->ns}lists?del_alias={$a.alias}"><img src='{rel}/images/del.png' alt='[supprimer]' /></a></td>
- {else}
- <td><a href='mailto:{$a.alias}'><img src='{rel}/images/mail.png' alt='[mail]' /> {$a.alias}</a></td>
- {/if}
- </tr>
- {/iterate}
-</table>
-{else}
-<p>Aucun alias pour ce groupe</p>
-{/if}
-
-{/if}
-
-{* vim:set et sw=2 sts=2 sws=2: *}
{* *}
{**************************************************************************}
+<script type='text/javascript'>
+{literal}
+function deadlineChange(box)
+{
+ var nd = document.getElementById('no_deadline');
+ var dd = document.getElementById('do_deadline');
+
+ if (box.checked) {
+ nd.style.display = 'none';
+ dd.style.display = 'inline';
+ } else {
+ nd.style.display = 'inline';
+ dd.style.display = 'none';
+ }
+}
+{/literal}
+</script>
+
+<h1>{$asso.nom} : {$evt.intitule}</h1>
+
<p class="descr">
Un événement peut être une réunion, un séminaire, une conférence, un voyage promo,
etc... Pour en organiser un et bénéficier des outils de suivi d'inscription et de
restaurant.
</p>
+<hr />
+
<form method="post" action="{rel}/{$platal->ns}events/edit/{$platal->argv[1]}">
- <hr />
- <table>
+ <table class='bicol' cellspacing='0' cellpadding='0'>
+ <colgroup>
+ <col width='30%' />
+ </colgroup>
<tr>
- <td>Intitulé de l'événement :</td>
+ <td class='titre'>
+ Intitulé de l'événement :
+ </td>
<td>
<input type="hidden" name="eid" value="{$evt.eid}" />
<input type="text" name="intitule" value="{$evt.intitule}" size="45" maxlength="100" />
</td>
</tr>
<tr>
- <td>Evénement en raccourci (pour les mailings listes) :</td>
- <td><input type="text" name="short_name" value="{$evt.short_name|default:$smarty.request.short_name}" size="20"/></td>
- </tr>
- <tr>
- <td>Descriptif :</td>
- <td><textarea name="descriptif" cols="45" rows="6">{$evt.descriptif}</textarea></td>
- </tr>
- <tr>
- <td>Date de début :</td>
+ <td class='titre'>
+ Raccourci :<br />
+ <small>(pour les mailings listes)</small>
+ </td>
<td>
- le
- {html_select_date prefix='deb_' end_year='+5' day_value_format='%02d' field_order='DMY' field_separator=' / ' month_format='%m' time=$evt.debut}
- à
- {html_select_time use_24_hours=true display_seconds=false time=$evt.debut prefix='deb_' minute_interval=5}
+ <input type="text" name="short_name" size="20" maxlength="20"
+ value="{$evt.short_name|default:$smarty.request.short_name}" />
+ <small><br />(n'utiliser que chiffres, lettres, tiret et point. garder court)</small>
</td>
</tr>
<tr>
- <td>Date de fin :</td>
+ <td class='titre'>
+ Descriptif :
+ </td>
<td>
- le
- {html_select_date prefix='fin_' end_year='+5' day_value_format='%02d' field_order='DMY' field_separator=' / ' month_format='%m' time=$evt.fin}
- à
- {html_select_time use_24_hours=true display_seconds=false time=$evt.fin prefix='fin_' minute_interval=5}
+ <textarea name="descriptif" cols="45" rows="10">{$evt.descriptif}</textarea>
</td>
</tr>
<tr>
- <td>Fin des inscriptions</td>
- <td>pas de deadline <input type='checkbox' name='deadline' {if !$evt.deadline_inscription}checked='checked'{/if}/>
- {html_select_date prefix='inscr_' end_year='+5' day_value_format='%02d' field_order='DMY' field_separator=' / ' month_format='%m' time=$evt.deadline_inscription}
+ <td class='titre'>
+ Date de début :
+ </td>
+ <td>
+ le {html_select_date prefix='deb_' end_year='+5' day_value_format='%02d'
+ field_order='DMY' field_separator=' / ' month_format='%m' time=$evt.debut}
+ à {html_select_time use_24_hours=true display_seconds=false
+ time=$evt.debut prefix='deb_' minute_interval=5}
</td>
</tr>
<tr>
- <td colspan="2">Ouvert aux membres du groupe uniquement :
- <input type="radio" name="membres_only" value="1" {if $evt.membres_only}checked="checked"{/if} /> oui
- <input type="radio" name="membres_only" value="0" {if !$evt.membres_only}checked="checked"{/if} /> non
+ <td class='titre'>
+ Date de fin :
+ </td>
+ <td>
+ le {html_select_date prefix='fin_' end_year='+5' day_value_format='%02d'
+ field_order='DMY' field_separator=' / ' month_format='%m' time=$evt.fin}
+ à {html_select_time use_24_hours=true display_seconds=false
+ time=$evt.fin prefix='fin_' minute_interval=5}
</td>
</tr>
<tr>
- <td colspan="2">Annoncer l'événement publiquement sur le site :
- <input type="radio" name="advertise" value="1" {if $evt.advertise}checked="checked"{/if} /> oui
- <input type="radio" name="advertise" value="0" {if !$evt.advertise}checked="checked"{/if} /> non
+ <td class='titre'>
+ Fin des inscriptions :
+ </td>
+ <td>
+ <input type='checkbox' name='deadline' value='1' onchange='deadlineChange(this)'
+ {if $evt.deadline_inscription}checked='checked'{/if} />
+ <span id='no_deadline' {if $evt.deadline_inscription}style='display: none'{/if}>
+ Pas de deadline
+ </span>
+ <span id='do_deadline' {if !$evt.deadline_inscription}style='display: none'{/if}>
+ le {html_select_date prefix='inscr_' end_year='+5' day_value_format='%02d'
+ field_order='DMY' field_separator=' / ' month_format='%m' time=$evt.deadline_inscription}
+ compris.
+ </span>
</td>
</tr>
<tr>
- <td colspan="2">Montrer la liste des participants à tous les membres :
+ <td class='titre'>
+ Options :
+ </td>
+ <td>
+ Montrer la liste des inscrits aux membres :
<input type="radio" name="show_participants" value="1" {if $evt.show_participants}checked="checked"{/if} /> oui
<input type="radio" name="show_participants" value="0" {if !$evt.show_participants}checked="checked"{/if}/> non
- </td>
- </tr>
- <tr>
- <td colspan="2">Autoriser les invités :
+
+ <br />
+ Autoriser les invités :
<input type="radio" name="noinvite" value="0" {if !$evt.noinvite}checked="checked"{/if} /> oui
<input type="radio" name="noinvite" value="1" {if $evt.noinvite}checked="checked"{/if}/> non
</td>
</tr>
<tr>
- <td>Référence de paiement :
- </td>
+ <td>Référence de paiement :</td>
<td>
<select name="paiement_id" onchange="document.getElementById('new_pay').style.display=(value < 0?'block':'none')">
{if $evt.paiement_id eq -2}
</td>
</tr>
</table>
- <div id="new_pay" style="display:none">
- Nouveau paiement, message de confirmation :<br />
- <textarea name="confirmation" rows="12" cols="65"><salutation> <prenom> <nom>,
- Ton inscription à [METS LE NOM DE L'EVENEMENT ICI] a bien été enregistrée et ton paiement de <montant> a bien été reçu.
- [COMPLETE EN PRECISANT LA DATE ET LA PERSONNE A CONTACTER]
+ <table class='bicol' cellspacing='0' cellpadding='0' id="new_pay" style="display:none">
+ <tr>
+ <th>
+ Nouveau paiement, message de confirmation :
+ </th>
+ </tr>
+ <tr>
+ <td>
+ <textarea name="confirmation" rows="12" cols="65"><salutation> <prenom> <nom>,
- A très bientot,
+ Ton inscription à [METS LE NOM DE L'EVENEMENT ICI] a bien été enregistrée et ton paiement de <montant> a bien été reçu.
+ [COMPLETE EN PRECISANT LA DATE ET LA PERSONNE A CONTACTER]
+
+ A très bientot,
+
+ [SIGNE ICI]</textarea>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Page internet de l'événement : <input size="40" name="site" value="{$asso.site}" />
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Le nouveau paiement n'est pas rajouté automatiquement mais doit être
+ validé par le trésorier de l'association Polytechnique.org, ce qui sera
+ fait sous peu.
+ </td>
+ </tr>
+ </table>
- [SIGNE ICI]</textarea><br />
- Le nouveau paiement n'est pas rajouté automatiquement mais doit être validé par le trésorier de l'association Polytechnique.org, ce qui sera fait sous peu.<br /><br />
- Page internet de l'événement :<br />
- <input size="40" name="site" value="{$asso.site}" />
- </div>
-
{foreach from=$moments item=i}
{assign var='moment' value=$items[$i]}
<hr />
</td>
</tr>
- {if (!$e.membres_only or $is_member or $e.inscrit) and $e.inscr_open}
+ {if $e.inscr_open}
<tr>
<td colspan='2' class='center'>
<strong>
--- /dev/null
+use groupex
+alter table evenements drop column advertise;
+alter table evenements drop column membres_only;
+use x4dat
+
--- /dev/null
+#!/bin/bash
+
+. ../inc/pervasive.sh
+
+mailman_stop
+mailman_templates
+mailman_start
+
+
+###########################################################
+for sql in *.sql
+do
+ echo -n $sql
+ $MYSQL x4dat < $sql &>/dev/null || echo -n " ERROR"
+ echo .
+done
+
+###########################################################
+
+echo "we will now upgrade the search table (this may be a long operation)
+
+please hit ^D to continue
+"
+
+cat
+
+pushd ../../bin
+./search.rebuild_db.php
+popd
+
+###########################################################
+