Changeset 60892 in spip-zone
- Timestamp:
- May 4, 2012, 8:06:38 AM (9 years ago)
- Location:
- _plugins_/Association/Associaspip
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/Association/Associaspip/association_options.php
r60835 r60892 510 510 } 511 511 $res .= '<select name ="exercice" onchange="form.submit()">'; 512 $res .= '<option value="0" ';513 if (!$exercice) {514 $res .= ' selected="selected"';515 }516 $res .= '>'. _L("choisir l'exercice ?") .'</option>';512 # $res .= '<option value="0" '; 513 # if (!$exercice) { 514 # $res .= ' selected="selected"'; 515 # } 516 # $res .= '>'. _L("choisir l'exercice ?") .'</option>'; 517 517 $sql = sql_select('id_exercice, intitule', 'spip_asso_exercices','', 'intitule DESC'); 518 518 while ($val = sql_fetch($sql)) { … … 613 613 } 614 614 $res .= '</select>'; 615 if ($exec) { 616 $res .= '<noscript><input type="submit" value="'._T('asso:bouton_lister').'" /></noscript>'; 617 $res .= '</div></form>'; 618 } 619 return $res; 620 } 621 622 /* selecteur de statut de membres*/ 623 function association_selectionner_id($id='', $exec='') { 624 if ($exec) { 625 $res = '<form method="post" action="'. generer_url_ecrire($exec) .'"><div>'; 626 $res .= '<input type="hidden" name="exec" value="'.$exec.'" />'; 627 } else { 628 $res = ''; 629 } 630 $res .= '<input type="text" name="id" onfocus=\'this.value=""\' size="5" value="'. $id .'" onchange="form.submit()" />'; 631 if ($exec) { 632 $res .= '<noscript><input type="submit" value="'._T('asso:bouton_lister').'" /></noscript>'; 633 $res .= '</div></form>'; 634 } 635 return $res; 636 } 637 638 /* selecteur d'annee parmi celles disponibles dans une table */ 639 function association_selectionner_annee($annee='', $dtable, $dchamp, $exec='') { 640 if ($exec) { 641 $res = '<form method="post" action="'. generer_url_ecrire($exec) .'"><div>'; 642 $res .= '<input type="hidden" name="exec" value="'.$exec.'" />'; 643 } else { 644 $res = ''; 645 } 646 $pager = ''; 647 $res .= '<select name ="annee" onchange="form.submit()">'; 648 # $res .= '<option value="0" '; 649 # if (!$exercice) { 650 # $res .= ' selected="selected"'; 651 # } 652 # $res .= '>'. _L("choisir l'exercice ?") .'</option>'; 653 $sql = sql_select("DATE_FORMAT(date_$dchamp, '%Y') AS annee", "spip_asso_$dtable",'', 'annee DESC', 'annee'); 654 while ($val = sql_fetch($sql)) { 655 $res .= '<option value="'.$val['annee'].'" '; 656 if ($annee==$val['annee']) { 657 $res .= ' selected="selected"'; 658 $pager .= "\n<strong>$val[annee]</strong>"; 659 } else { 660 $pager .= ' <a href="'. generer_url_ecrire($exec, '&annee='.$val['annee']) .'">'.$val['annee']."</a>\n"; 661 } 662 $res .= '>'.$val['annee'].'</option>'; 663 } 664 $res .= '</select>'; 615 665 if ($exec) { 616 666 $res .= '<noscript><input type="submit" value="'._T('asso:bouton_lister').'" /></noscript>'; -
_plugins_/Association/Associaspip/exec/activites.php
r60137 r60892 50 50 debut_cadre_association('activites.gif','activite_titre_toutes_activites'); 51 51 // FILTRES 52 echo "<table class='asso_tablo_filtres'><tr>\n<td width='40%'><p class='pagination'>"; 53 $query = sql_select("DATE_FORMAT(date_debut, '%Y') AS annee", 'spip_evenements', '', 'annee', 'annee'); 54 while ($data = sql_fetch($query)) { 55 if ($data['annee']==$annee) { 56 echo ' <strong>'.$data['annee'].'</strong> '; 57 } else { 58 echo ' <a href="'. generer_url_ecrire('activites','annee='.$data['annee'].($id_mot?'&id_mot='.$id_mot:'')).'">'.$data['annee'].'</a> '; 59 } 60 } 52 echo '<table width="100%" class="asso_tablo_filtre"><tr>'; 53 echo '<td>'. association_selectionner_annee($annee, 'activites', 'inscription','activites'.($id_mot?'&id_mot='.$id_mot:'')) .'</td>'; // evenements/asso_activites debut/inscription activites/activites 61 54 if (test_plugin_actif('AGENDA')) { /* le plugin "Agenda 2" peut associer des mots-cles aux evenements */ 62 55 if ($id_mot) { … … 68 61 $mc_sel = $mc_join = $mc_where = ''; 69 62 } 70 echo "</p></td><td width='60%' class='formulaire'>";63 echo '<td width="60%">'; 71 64 echo '<form method="get"><div>'; 72 65 echo '<input type="hidden" name="exec" value="activites" />'; … … 88 81 } 89 82 echo '</select><noscript><input type="submit" value="'._T('asso:bouton_lister').'" /></noscript></div></form></td>'; 90 } else { /* le plugin "Agenda Simple" par contre n'associee pas directement les mots-cles aux evenements */91 echo '</p></td>';92 83 } 93 echo "</tr></table>\n";84 echo '</tr></table>'; 94 85 //TABLEAU 95 86 echo "<table width='100%' class='asso_tablo' id='asso_tablo_activites'>\n"; -
_plugins_/Association/Associaspip/exec/adherents.php
r60835 r60892 97 97 debut_cadre_association('annonce.gif', 'adherent_titre_liste_actifs'); 98 98 // FILTRES 99 echo "<table width='100%' class='asso_tablo_filtres'>\n"; 100 echo '<tr>'; 99 echo "<table width='100%' class='asso_tablo_filtres'>\n<tr>"; 101 100 // Pagination alphabetique 102 101 echo '<td width="30%" class="pagination0">'; … … 126 125 echo '</td><td width="16%" class="formulaire">'; 127 126 echo '<form method="post" action="'.generer_url_ecrire('adherents').'"><div>'; 128 echo '<input type="text" name="id" onfocus=\'this.value=""\' size="5" value="'. $id .'" onchange="form.submit()" />';127 echo association_selectionner_statut($id, ''); 129 128 echo '<noscript><input type="submit" value="'._T('asso:bouton_lister').'" /></noscript></div></form>'; 130 129 //Filtre statut … … 133 132 echo '<input type="hidden" name="lettre" value="'.$lettre.'" />'; 134 133 echo association_selectionner_statut($statut_interne, ''); 135 echo '<noscript><input type="submit" value="'._T('asso:bouton_lister').'" /></noscript></div></form>'; 136 echo '</td>'; 137 echo '</tr>'; 138 echo '</table>'; 134 echo '<noscript><input type="submit" value="'._T('asso:bouton_lister').'" /></noscript></div></form></td>'; 135 echo '</tr></table>'; 139 136 //Affichage de la liste 140 137 echo $code_liste_membres; -
_plugins_/Association/Associaspip/exec/bilan.php
r60835 r60892 72 72 } 73 73 debut_cadre_association('finances-24.png', 'resultat_courant'); 74 // Filtres 75 filtres_association(array( 76 'exercice'=>$exercice, 77 ), 'bilan'); 74 78 if ($plan) { 75 79 $join = ' RIGHT JOIN spip_asso_plan ON imputation=code'; -
_plugins_/Association/Associaspip/exec/compte_bilan.php
r60835 r60892 62 62 */ 63 63 debut_cadre_association('finances-24.jpg', 'cpte_bilan_titre_general', $exercice_data['intitule']); 64 echo "\n<form method='get' action=''>\n<input type='hidden' name='exec' value='compte_bilan' />\n<table width='100%'><tr>";65 echo '<td width="40%">'. association_selectionner_exercice($id_exercice, '') .'</td>';66 echo '<td width="40%">'. association_selectionner_destination($id_destination, '') .'</td>';67 echo '<td width="20%" class="boutons"><noscript><input type="submit" value="'._T('asso:bouton_lister').'" /></noscript></td>';68 echo "</tr>\n</table>\n</form>\n";64 // Filtres 65 filtres_association(array( 66 'exercice'=>$id_exercice, 67 'destination'=>$id_destination, 68 ), 'compte_bilan'); 69 69 // les autres classes a prendre en compte ici 70 70 $classes_bilan = array(); -
_plugins_/Association/Associaspip/exec/compte_resultat.php
r60835 r60892 71 71 } 72 72 debut_cadre_association('finances-24.jpg', 'cpte_resultat_titre_general', $exercice_data['intitule']); 73 echo "\n<form method='get' action=''>\n<input type='hidden' name='exec' value='compte_resultat' />\n<table width='100%'><tr>";74 echo '<td width="50%" align="left">'. association_selectionner_exercice($id_exercice, '') .'</td>';75 echo '<td width="50%" align="right">'. association_selectionner_destination($id_destination, '') .'</td>';76 echo '<td width="20%" class="boutons"><noscript><input type="submit" value="'._T('asso:bouton_lister').'" /></noscript></td>';77 echo "</tr>\n</table>\n</form>\n";73 // Filtres 74 filtres_association(array( 75 'exercice'=>$id_exercice, 76 'destination'=>$id_destination, 77 ), 'compte_resultat'); 78 78 // liste des charges (depenses d'exploitation) cumulees par comptes 79 79 $charges = association_liste_totaux_comptes_classes($GLOBALS['association_metas']['classe_charges'], 'cpte_resultat', '-1', $id_exercice, $id_destination); -
_plugins_/Association/Associaspip/exec/dons.php
r59668 r60892 47 47 )); 48 48 debut_cadre_association('dons-24.gif', 'tous_les_dons'); 49 // PAGINATION ET FILTRES 50 echo '<table width="100%" class="asso_tablo_filtre">'; 51 echo '<tr>'; 52 echo '<td>'; 53 $query = sql_select("DATE_FORMAT(date_don, '%Y') AS annee", 'spip_asso_dons', '', 'annee', 'annee'); 54 while ($data = sql_fetch($query)) { 55 if ($data['annee']==$annee) { 56 echo "\n<strong>".$data['annee'].'</strong>'; 57 } else { 58 echo ' <a href="'. generer_url_ecrire('dons', '&annee='.$data['annee']) .'">'.$data['annee']."</a>\n"; 59 } 60 } 61 echo '</td></tr>'; 62 echo '</table>'; 49 // Filtres 50 echo '<table width="100%" class="asso_tablo_filtre"><tr>'; 51 echo '<td>'. association_selectionner_annee($annee, 'dons', 'don','dons') .'</td>'; 52 echo '</tr></table>'; 63 53 //TABLEAU 64 54 echo "<table width='100%' class='asso_tablo' id='asso_tablo_dons'>\n"; -
_plugins_/Association/Associaspip/exec/edit_relances.php
r60835 r60892 32 32 $id_groupe = intval(_request('groupe')); 33 33 debut_cadre_association('relance-24.png', 'tous_les_membres_a_relancer'); 34 // FILTRES 35 echo "\n<form method='get' action=''>\n<input type='hidden' name='exec' value='edit_relances' />\n<table width='100%'><tr>"; 36 echo '<td width="40%">'. association_selectionner_groupe($id_groupe, '') .'</td>'; // filtre groupe 37 echo '<td width="40%">'. association_selectionner_statut($statut_interne, '') .'</td>'; // filtre statut : la selection de "tous" est pratique pour faire une newsletter (mail d'information) 38 echo '<td width="20%" class="boutons"><noscript><input type="submit" value="'._T('asso:bouton_lister').'" /></noscript></td>'; 39 echo "</tr>\n</table>\n</form>\n"; 34 // Filtres 35 filtres_association(array( 36 'groupe'=>$id_groupe, 37 'statut'=>$statut_interne, 38 ), 'edit_relances'); 40 39 // MAILING 41 40 $res = '<div class="formulaire_spip formulaire_edit_relance"><form>' … … 53 52 // destinataires (liste des resultats de filtrage, a affiner en decochant les membres a exclure) 54 53 . "<table width='100%' class='asso_tablo' id='asso_tablo_relances'>\n" 55 . '<caption>'. _T('asso:adherent_entete_statut_'.$statut_interne) .'</caption>'54 # . '<caption>'. _T('asso:adherent_entete_statut_'.$statut_interne) .'</caption>' 56 55 . "<thead>\n<tr>" 57 56 . '<th>'. _T('asso:entete_id') .'</th>' -
_plugins_/Association/Associaspip/exec/ventes.php
r59668 r60892 49 49 ) ); 50 50 debut_cadre_association('ventes.gif', 'toutes_les_ventes'); 51 // PAGINATION ET FILTRES 52 echo "\n<table><tr><td>"; 53 $query = sql_select("DATE_FORMAT(date_vente, '%Y') AS annee", 'spip_asso_ventes', '', 'annee', 'annee'); 54 while ($data = sql_fetch($query)) { 55 $a = $data['annee']; 56 if ($a==$annee) {echo ' <strong>'.$a.'</strong>';} 57 else {echo ' <a href="'. generer_url_ecrire('ventes','annee='.$a).'">'.$a.'</a>';} 58 } 59 echo "</td></tr></table>\n"; 51 // Filtres 52 echo '<table width="100%" class="asso_tablo_filtre"><tr>'; 53 echo '<td>'. association_selectionner_annee($annee, 'ventes', 'vente','ventes') .'</td>'; 54 echo '</tr></table>'; 60 55 //TABLEAU 61 56 echo "<table width='100%' class='asso_tablo' id='asso_tablo_ventes'>\n"; -
_plugins_/Association/Associaspip/inc/navigation_modules.php
r59908 r60892 129 129 } 130 130 131 // Bloc (tableau en ligne) d'affinage (filtrage) des resultats dans les pages principales 132 function filtres_association($liste_filtres, $exec='') 133 { 134 echo '<form method="get" action="'. ($exec?generer_url_ecrire($exec):'') .'">'; 135 if ($exec) 136 echo "\n<input type='hidden' name='exec' value='$exec' />"; 137 echo "\n<table width='100%'><tr>"; 138 $largeur_cellules = ceil((100/count($liste_filtres)+1)); 139 foreach($liste_filtres as $filtre_selection =>$id_selectionne) { 140 echo "<td width='$largeur_cellules%'>". call_user_func("association_selectionner_$filtre_selection", $id_selectionne) .'</td>'; 141 } 142 echo "<td width='$largeur_cellules%' class='boutons'><noscript><input type='submit' value='". _T('asso:bouton_lister') ."' /></noscript></td>"; 143 echo "</tr></table>\n</form>\n"; 144 } 131 145 132 146 ?>
Note: See TracChangeset
for help on using the changeset viewer.