Line 17... |
Line 17... |
17 |
// | |
|
17 |
// | |
|
18 |
// | You should have received a copy of the GNU General Public |
|
18 |
// | You should have received a copy of the GNU General Public |
|
19 |
// | License along with this library; if not, write to the Free Software |
|
19 |
// | License along with this library; if not, write to the Free Software |
|
20 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
20 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
21 |
// +------------------------------------------------------------------------------------------------------+
|
21 |
// +------------------------------------------------------------------------------------------------------+
|
22 |
// CVS : $Id: HTML_listeParticipants.class.php,v 1.4 2007-06-25 12:15:06 alexandre_tb Exp $
|
22 |
// CVS : $Id: HTML_listeParticipants.class.php,v 1.5 2008-08-25 15:13:17 alexandre_tb Exp $
|
23 |
/**
|
23 |
/**
|
24 |
* Application projet
|
24 |
* Application projet
|
25 |
*
|
25 |
*
|
26 |
* La classe HTML_listeParticipants
|
26 |
* La classe HTML_listeParticipants
|
27 |
*
|
27 |
*
|
Line 29... |
Line 29... |
29 |
//Auteur original :
|
29 |
//Auteur original :
|
30 |
*@author Alexandre Granier <alexandre@tela-botanica.org>
|
30 |
*@author Alexandre Granier <alexandre@tela-botanica.org>
|
31 |
//Autres auteurs :
|
31 |
//Autres auteurs :
|
32 |
*@author Aucun
|
32 |
*@author Aucun
|
33 |
*@copyright Tela-Botanica 2000-2004
|
33 |
*@copyright Tela-Botanica 2000-2004
|
34 |
*@version $Revision: 1.4 $
|
34 |
*@version $Revision: 1.5 $
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
36 |
*/
|
36 |
*/
|
Line 37... |
Line 37... |
37 |
|
37 |
|
Line 101... |
Line 101... |
101 |
for ($i = 0; $i < count ($elements) ; $i++) {
|
101 |
for ($i = 0; $i < count ($elements) ; $i++) {
|
102 |
// L'identifiant de l'utilisateur est le premier élément du tableau
|
102 |
// L'identifiant de l'utilisateur est le premier élément du tableau
|
103 |
$id_utilisateur = array_shift ($elements[$i]) ;
|
103 |
$id_utilisateur = array_shift ($elements[$i]) ;
|
Line 104... |
Line 104... |
104 |
|
104 |
|
- |
|
105 |
// L'identifiant du statut est le dernier
|
105 |
// L'identifiant du statut est le dernier
|
106 |
if (count ($elements)>5) $inscrit_liste = (int) array_pop ($elements[$i]);
|
106 |
$id_statut = (int) array_pop ($elements[$i]) ;
|
107 |
$id_statut = (int) array_pop ($elements[$i]) ;
|
107 |
// En mode modif on ajoute la colonne supprimer
|
108 |
// En mode modif on ajoute la colonne supprimer
|
108 |
if ($this->_mode == 1) {
|
109 |
if ($this->_mode == 1) {
|
109 |
$this->_url->addQueryString ('id_utilisateur', $id_utilisateur) ;
|
110 |
$this->_url->addQueryString ('id_utilisateur', $id_utilisateur) ;
|
110 |
$this->_url->addQueryString('statut', 4) ;
|
111 |
$this->_url->addQueryString('statut', 4) ;
|
111 |
array_push ($elements[$i], '', '<a href="'.$this->_url->getURL().'" onclick="javascript:return confirm(\''.PROJET_SUPPRIMER.' ?\')">'
|
112 |
$supprimer = '<a href="'.$this->_url->getURL().'" onclick="javascript:return confirm(\''.PROJET_SUPPRIMER.' ?\')">'.PROJET_SUPPRIMER.'</a>';
|
- |
|
113 |
if (count ($elements) > 5) array_push ($elements[$i], '');
|
112 |
.PROJET_SUPPRIMER.'</a>');
|
114 |
array_push ($elements[$i], '', $supprimer);
|
113 |
$this->_url->removeQueryString('statut') ;
|
115 |
$this->_url->removeQueryString('statut') ;
|
Line 114... |
Line 116... |
114 |
}
|
116 |
}
|
Line 138... |
Line 140... |
138 |
}
|
140 |
}
|
139 |
$select .= '>'.$element_statut.'</option>'."\n" ;
|
141 |
$select .= '>'.$element_statut.'</option>'."\n" ;
|
140 |
}
|
142 |
}
|
141 |
$select .= '</select>'."\n".'</form>'."\n" ;
|
143 |
$select .= '</select>'."\n".'</form>'."\n" ;
|
142 |
$this->setCellContents($i+1, 4, $select) ;
|
144 |
$this->setCellContents($i+1, 4, $select) ;
|
- |
|
145 |
|
- |
|
146 |
// Colonne avec l inscription a la liste de discussion
|
- |
|
147 |
if (count ($elements)>5) {
|
- |
|
148 |
$this->_url->addQueryString ('id_utilisateur', $id_utilisateur) ;
|
- |
|
149 |
|
- |
|
150 |
$select = '<form action="'.$this->_url->getURL().'" method="post">'."\n" ;
|
- |
|
151 |
$select .= '<select name="inscription_liste" onchange="javascript:this.form.submit();">' ;
|
- |
|
152 |
$select .= '<option value="0">Non inscrit</option>';
|
- |
|
153 |
$select .= '<option value="1"'.($inscrit_liste ? ' selected="selected"': '').'>Inscrit</option>';
|
- |
|
154 |
$select .= '</select>'."\n".'</form>'."\n" ;
|
- |
|
155 |
$this->setCellContents($i+1, 5, $select) ;
|
- |
|
156 |
}
|
143 |
}
|
157 |
}
|
144 |
if ($id_statut == 1 && $this->_mode != 1) {
|
158 |
if ($id_statut == 1 && $this->_mode != 1) {
|
145 |
$this->setCellContents($i + 1, 4, PROJET_CHEF) ;
|
159 |
$this->setCellContents($i + 1, 4, PROJET_CHEF) ;
|
146 |
$this->updateRowAttributes ($i + 1, array('style' => 'font-weight:bold'), true) ;
|
160 |
$this->updateRowAttributes ($i + 1, array('style' => 'font-weight:bold'), true) ;
|
147 |
}
|
161 |
}
|