Subversion Repositories Applications.projet

Rev

Rev 15 | Rev 85 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 15 Rev 37
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_listeProjet.class.php,v 1.4 2005-09-28 16:29:39 ddelon Exp $
22
// CVS : $Id: HTML_listeProjet.class.php,v 1.5 2005-10-14 08:56:53 alexandre_tb Exp $
23
/**
23
/**
24
* Application projet
24
* Application projet
25
*
25
*
26
* La classe controleur projet
26
* La classe controleur projet
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 110... Line 110...
110
    {
110
    {
111
        for ($i = 0; $i < count ($label_liste) ; $i++) {
111
        for ($i = 0; $i < count ($label_liste) ; $i++) {
112
            if ($this->_mode == 1) {
112
            if ($this->_mode == 1) {
113
                $id_projet = array_shift ($label_liste[$i]) ;
113
                $id_projet = array_shift ($label_liste[$i]) ;
114
                $id_statut = array_pop ($label_liste[$i]) ;
114
                $id_statut = array_pop ($label_liste[$i]) ;
-
 
115
                
115
            }
116
            }
116
            
-
 
-
 
117
            $resume = array_shift ($label_liste[$i]) ;
117
            $this->addRow ($label_liste[$i]) ;
118
            $this->addRow ($label_liste[$i]) ;
Line -... Line 119...
-
 
119
            
118
            
120
            
119
            if ($this->_mode == 1 && $id_statut < 3) {
121
            if ($this->_mode == 1 && $id_statut < 3) {
120
                $this->_url->addQueryString ('identifiant_projet', $id_projet) ;
122
                $this->_url->addQueryString ('identifiant_projet', $id_projet) ;
121
                $this->_url->removeQueryString (PROJET_VARIABLE_ID_PROJET) ;
123
                $this->_url->removeQueryString (PROJET_VARIABLE_ID_PROJET) ;
122
                $select = '<form action="'.$this->_url->getURL().'" method="post" class="magali">'."\n" ;
124
                $select = '<form action="'.$this->_url->getURL().'" method="post" class="magali">'."\n" ;
Line 133... Line 135...
133
                    $this->setCellContents($i+1, 2, $select) ;
135
                    $this->setCellContents($i+1, 2, $select) ;
134
                } else {
136
                } else {
135
                    $this->setCellContents($i+1, 2, PROJET_PAS_DE_LISTE) ;
137
                    $this->setCellContents($i+1, 2, PROJET_PAS_DE_LISTE) ;
136
                }
138
                }
137
            }
139
            }
-
 
140
            // On affiche le résumé dans la deuxième ligne
-
 
141
            if (PROJET_LISTE_RESUME) {
-
 
142
            	$this->addRow (array ($resume), array('colspan' => $this->getColCount()));	
-
 
143
            }
138
        }
144
        }
139
        $this->altRowAttributes(1, array('class' => 'ligne_impaire'), array('class' => 'ligne_paire')) ;
145
        $this->altRowAttributes(1, array('class' => 'ligne_impaire'), array('class' => 'ligne_paire')) ;
Line 140... Line 146...
140
        
146
        
Line 160... Line 166...
160
     */
166
     */
161
    function setURL(& $url )
167
    function setURL(& $url )
162
    {
168
    {
163
        $this->_url = $url ;
169
        $this->_url = $url ;
164
    } // end of member function setURL
170
    } // end of member function setURL
-
 
171
    
-
 
172
	/**
-
 
173
     * Alternates the row attributes starting at $start
-
 
174
     * @param    int      $start          Row index of row in which alternating begins
-
 
175
     * @param    mixed    $attributes1    Associative array or string of table row attributes
-
 
176
     * @param    mixed    $attributes2    Associative array or string of table row attributes
-
 
177
     * @param    bool     $inTR           false if attributes are to be applied in TD tags
-
 
178
     *                                    true if attributes are to be applied in TR tag
-
 
179
     * @access   public
-
 
180
     */
-
 
181
     
-
 
182
     function altRowAttributes($start, $attributes1, $attributes2, $inTR = false)
-
 
183
     {
-
 
184
         for ($row = $start ; $row < $this->_rows ; $row++) {
-
 
185
             $attributes = ( ($row+$start)%2 == 0 ) ? $attributes1 : $attributes2;
-
 
186
             $this->updateRowAttributes($row, $attributes, $inTR);
-
 
187
             if (PROJET_LISTE_RESUME) {
-
 
188
	             $row++;
-
 
189
	             $this->updateRowAttributes($row, $attributes, $inTR);
-
 
190
	             $start++;
-
 
191
             }
-
 
192
        }
-
 
193
	} // end func altRowAttributes
Line 165... Line 194...
165
 
194
 
166
} // end of HTML_listeProjet
195
} // end of HTML_listeProjet