[opencimetiere-Commits] r850 - in branches/4.0.0-vue_synthetique: app/css obj

0 views
Skip to first unread message

gmal...@adullact.net

unread,
Oct 31, 2018, 6:48:32 AM10/31/18
to openmairie-o...@googlegroups.com
Author: gmalvolti
Date: 2018-10-31 11:48:28 +0100 (Wed, 31 Oct 2018)
New Revision: 850

Modified:
branches/4.0.0-vue_synthetique/app/css/app.css
branches/4.0.0-vue_synthetique/obj/emplacement.class.php
Log:
Fin de la modification de la vue synth?\195?\169tique et ajout de css bootstrap pour les tables.


Modified: branches/4.0.0-vue_synthetique/app/css/app.css
===================================================================
--- branches/4.0.0-vue_synthetique/app/css/app.css 2018-10-31 08:14:24 UTC (rev 849)
+++ branches/4.0.0-vue_synthetique/app/css/app.css 2018-10-31 10:48:28 UTC (rev 850)
@@ -121,6 +121,211 @@
padding: .4em;
}

+/**
+ * BOOTSTRAP - TABLE
+ */
+.table {
+ border-spacing: 0;
+ border-collapse: collapse;
+ background-color: transparent;
+}
+.table td,
+.table th {
+ padding: 0;
+}
+.table th {
+ text-align: left;
+}
+.table {
+ width: 100%;
+ max-width: 100%;
+ margin-bottom: 20px;
+}
+.table > thead > tr > th,
+.table > tbody > tr > th,
+.table > tfoot > tr > th,
+.table > thead > tr > td,
+.table > tbody > tr > td,
+.table > tfoot > tr > td {
+ padding: 8px;
+ line-height: 1.42857143;
+ vertical-align: top;
+ border-top: 1px solid #ddd;
+}
+.table > thead > tr > th {
+ vertical-align: bottom;
+ border-bottom: 2px solid #ddd;
+}
+.table > caption + thead > tr:first-child > th,
+.table > colgroup + thead > tr:first-child > th,
+.table > thead:first-child > tr:first-child > th,
+.table > caption + thead > tr:first-child > td,
+.table > colgroup + thead > tr:first-child > td,
+.table > thead:first-child > tr:first-child > td {
+ border-top: 0;
+}
+.table > tbody + tbody {
+ border-top: 2px solid #ddd;
+}
+.table .table {
+ background-color: #fff;
+}
+.table-condensed > thead > tr > th,
+.table-condensed > tbody > tr > th,
+.table-condensed > tfoot > tr > th,
+.table-condensed > thead > tr > td,
+.table-condensed > tbody > tr > td,
+.table-condensed > tfoot > tr > td {
+ padding: 5px;
+}
+.table-bordered {
+ border: 1px solid #ddd;
+}
+.table-bordered > thead > tr > th,
+.table-bordered > tbody > tr > th,
+.table-bordered > tfoot > tr > th,
+.table-bordered > thead > tr > td,
+.table-bordered > tbody > tr > td,
+.table-bordered > tfoot > tr > td {
+ border: 1px solid #ddd;
+}
+.table-bordered > thead > tr > th,
+.table-bordered > thead > tr > td {
+ border-bottom-width: 2px;
+}
+.table-striped > tbody > tr:nth-child(odd) > td,
+.table-striped > tbody > tr:nth-child(odd) > th {
+ background-color: #f9f9f9;
+}
+.table-hover > tbody > tr:hover > td,
+.table-hover > tbody > tr:hover > th {
+ background-color: #f5f5f5;
+}
+table col[class*="col-"] {
+ position: static;
+ display: table-column;
+ float: none;
+}
+table td[class*="col-"],
+table th[class*="col-"] {
+ position: static;
+ display: table-cell;
+ float: none;
+}
+.table > thead > tr > td.active,
+.table > tbody > tr > td.active,
+.table > tfoot > tr > td.active,
+.table > thead > tr > th.active,
+.table > tbody > tr > th.active,
+.table > tfoot > tr > th.active,
+.table > thead > tr.active > td,
+.table > tbody > tr.active > td,
+.table > tfoot > tr.active > td,
+.table > thead > tr.active > th,
+.table > tbody > tr.active > th,
+.table > tfoot > tr.active > th {
+ background-color: #f5f5f5;
+}
+.table-hover > tbody > tr > td.active:hover,
+.table-hover > tbody > tr > th.active:hover,
+.table-hover > tbody > tr.active:hover > td,
+.table-hover > tbody > tr:hover > .active,
+.table-hover > tbody > tr.active:hover > th {
+ background-color: #e8e8e8;
+}
+.table > thead > tr > td.success,
+.table > tbody > tr > td.success,
+.table > tfoot > tr > td.success,
+.table > thead > tr > th.success,
+.table > tbody > tr > th.success,
+.table > tfoot > tr > th.success,
+.table > thead > tr.success > td,
+.table > tbody > tr.success > td,
+.table > tfoot > tr.success > td,
+.table > thead > tr.success > th,
+.table > tbody > tr.success > th,
+.table > tfoot > tr.success > th {
+ background-color: #dff0d8;
+}
+.table-hover > tbody > tr > td.success:hover,
+.table-hover > tbody > tr > th.success:hover,
+.table-hover > tbody > tr.success:hover > td,
+.table-hover > tbody > tr:hover > .success,
+.table-hover > tbody > tr.success:hover > th {
+ background-color: #d0e9c6;
+}
+.table > thead > tr > td.info,
+.table > tbody > tr > td.info,
+.table > tfoot > tr > td.info,
+.table > thead > tr > th.info,
+.table > tbody > tr > th.info,
+.table > tfoot > tr > th.info,
+.table > thead > tr.info > td,
+.table > tbody > tr.info > td,
+.table > tfoot > tr.info > td,
+.table > thead > tr.info > th,
+.table > tbody > tr.info > th,
+.table > tfoot > tr.info > th {
+ background-color: #d9edf7;
+}
+.table-hover > tbody > tr > td.info:hover,
+.table-hover > tbody > tr > th.info:hover,
+.table-hover > tbody > tr.info:hover > td,
+.table-hover > tbody > tr:hover > .info,
+.table-hover > tbody > tr.info:hover > th {
+ background-color: #c4e3f3;
+}
+.table > thead > tr > td.warning,
+.table > tbody > tr > td.warning,
+.table > tfoot > tr > td.warning,
+.table > thead > tr > th.warning,
+.table > tbody > tr > th.warning,
+.table > tfoot > tr > th.warning,
+.table > thead > tr.warning > td,
+.table > tbody > tr.warning > td,
+.table > tfoot > tr.warning > td,
+.table > thead > tr.warning > th,
+.table > tbody > tr.warning > th,
+.table > tfoot > tr.warning > th {
+ background-color: #fcf8e3;
+}
+.table-hover > tbody > tr > td.warning:hover,
+.table-hover > tbody > tr > th.warning:hover,
+.table-hover > tbody > tr.warning:hover > td,
+.table-hover > tbody > tr:hover > .warning,
+.table-hover > tbody > tr.warning:hover > th {
+ background-color: #faf2cc;
+}
+.table > thead > tr > td.danger,
+.table > tbody > tr > td.danger,
+.table > tfoot > tr > td.danger,
+.table > thead > tr > th.danger,
+.table > tbody > tr > th.danger,
+.table > tfoot > tr > th.danger,
+.table > thead > tr.danger > td,
+.table > tbody > tr.danger > td,
+.table > tfoot > tr.danger > td,
+.table > thead > tr.danger > th,
+.table > tbody > tr.danger > th,
+.table > tfoot > tr.danger > th {
+ background-color: #f2dede;
+}
+.table-hover > tbody > tr > td.danger:hover,
+.table-hover > tbody > tr > th.danger:hover,
+.table-hover > tbody > tr.danger:hover > td,
+.table-hover > tbody > tr:hover > .danger,
+.table-hover > tbody > tr.danger:hover > th {
+ background-color: #ebcccc;
+}
+.table thead th {
+ background-color: rgb(242, 242, 242);
+ background-image: -moz-linear-gradient(center top , rgb(242, 242, 242), rgb(232, 232, 232));
+ border: 1px solid rgb(220, 220, 220) !important;
+}
+.table thead th {
+ vertical-align: bottom;
+}
+
/*
*
*/

Modified: branches/4.0.0-vue_synthetique/obj/emplacement.class.php
===================================================================
--- branches/4.0.0-vue_synthetique/obj/emplacement.class.php 2018-10-31 08:14:24 UTC (rev 849)
+++ branches/4.0.0-vue_synthetique/obj/emplacement.class.php 2018-10-31 10:48:28 UTC (rev 850)
@@ -1947,11 +1947,12 @@

// Template d'un bloc d'information
$template_bloc = '<div class="bloc %s-bloc-%s col_12"><div class="bloc-titre"><span class="text">%s</span></div>%s</div>';
-
- // Template d'un champ d'information de l'établissement
+ // Template d'un champ d'information de l'emplacement
$template_field_empl = '<div class="field field-type-static"><div class="form-libelle"><label for="%1$s" class="libelle-%1$s" id="lib-%1$s">%2$s</label></div><div class="form-content"><span class="field_value" id="%1$s">%3$s</span></div></div>';
- // Template d'un tableau à 6 colonnes
- $template_table_6_columns = '<table id="%s" class="tab-tab %s"><thead><tr class="ui-tabs-nav ui-accordion ui-state-default tab-title"><th class="title">%s</th><th class="title">%s</th><th class="title">%s</th><th class="title">%s</th><th class="title">%s</th><th class="title">%s</th></tr></thead><tbody>%s</tbody></table>';
+ // Template d'un tableau à 5 colonnes
+ $template_table_5_columns = '<table id="%s" class="tab-tab %s"><thead><tr class="ui-tabs-nav ui-accordion ui-state-default tab-title"><th class="title">%s</th><th class="title">%s</th><th class="title">%s</th><th class="title">%s</th><th class="title">%s</th></tr></thead><tbody>%s</tbody></table>';
+ // Template d'un tableau à 4 colonnes
+ $template_table_4_columns = '<table id="%s" class="tab-tab %s"><thead><tr class="ui-tabs-nav ui-accordion ui-state-default tab-title"><th class="title">%s</th><th class="title">%s</th><th class="title">%s</th><th class="title">%s</th></tr></thead><tbody>%s</tbody></table>';
// Template d'un tableau à 3 colonnes
$template_table_3_columns = '<table id="%s" class="tab-tab %s"><thead><tr class="ui-tabs-nav ui-accordion ui-state-default tab-title"><th class="title">%s</th><th class="title">%s</th><th class="title">%s</th></tr></thead><tbody>%s</tbody></table>';
// Template ligne et cellule d'un tableau
@@ -1959,6 +1960,10 @@
$template_table_tr = '<tr class="tab-data %s">%s</tr>';
// Template lorsqu'il n'y a pas de resultat
$template_colspan = '<td colspan="%s" align="center">%s</td>';
+ // Template d'un lien
+ $template_link_edition = '<a id="%1$s_%3$s" target="blank" href="../app/index.php?module=form&obj=%2$s&idx=%3$s%4$s" title="%5$s"><span class="om-prev-icon om-icon-16 pdf-16">%5$s</span></a>';
+ // Template pour les téléchargement de dossier
+ $template_link_dl_dossier = '<a id="%1$s_%2$s" target="blank" href="../app/index.php?module=form&snippet=file&uid=%2$s" title="%3$s"><span class="om-prev-icon om-icon-16 pdf-16">%3$s</span></a>';

$res = $this->f->db->query($sql_emplacement);
$this->f->isDatabaseError($res);
@@ -1966,212 +1971,182 @@
while ($row=& $res->fetchRow(DB_FETCHMODE_ASSOC)) {
//Bloc n°1 - Informations de l'empalcement
//Liste des champs composant les caractéristiques de l'emplacement
- $empl_fields = sprintf($template_field_empl, 'id', '', trim($row["nature"]." ".$row["famille"]));
- $empl_fields .= sprintf($template_field_empl, 'id', '', trim($row["numero"]." ".$row["complement"]." ".$row["voietype"]." ".$row["voielib"]));
- $empl_fields .= sprintf($template_field_empl, 'id', '', trim($row["cimetierelib"]." ".$row["zonetype"]." ".$row["zonelib"]));
- $empl_fields .= sprintf($template_field_empl, 'id', 'Observation :', $row["observation"]);
- $bloc_empl = sprintf($template_bloc, 'id', 'id' ,__('Emplacement'), $empl_fields);
+ $empl_fields = sprintf($template_field_empl, 'emplacement', 'Nature et Famille', trim($row["nature"]." ".$row["famille"]));
+ $empl_fields .= sprintf($template_field_empl, 'emplacement', 'Adresse', trim($row["numero"]." ".$row["complement"]." ".$row["voietype"]." ".$row["voielib"]));
+ $empl_fields .= sprintf($template_field_empl, 'emplacement', 'Emplacement cimetiere', trim($row["cimetierelib"]." ".$row["zonetype"]." ".$row["zonelib"]));
+ $empl_fields .= sprintf($template_field_empl, 'emplacement', 'Observation', $row["observation"]);
+ $bloc_empl = sprintf($template_bloc, 'emplacement', 'emplacement' ,__('emplacement'), $empl_fields);

//Bloc n°2 - Informations des places
- $empl_fields = sprintf($template_field_empl, 'id', 'nombre de place(s) libre(s)', $row["nombreplace"]);
- $empl_fields .= sprintf($template_field_empl, 'id', 'nombre de place(s) occupée(s)', $row["placeoccupe"]);
- $empl_fields .= sprintf($template_field_empl, 'id', 'nombre de place(s)', $row["placeconstat"]);
- $empl_fields .= sprintf($template_field_empl, 'id', 'constate le', $row["dateconstat"]);
- $bloc_place = sprintf($template_bloc, 'id', 'id' ,__('Place'), $empl_fields);
+ $empl_fields = sprintf($template_field_empl, 'place', 'nombre de place(s) libre(s)', $row["nombreplace"]);
+ $empl_fields .= sprintf($template_field_empl, 'place', 'nombre de place(s) occupée(s)', $row["placeoccupe"]);
+ $empl_fields .= sprintf($template_field_empl, 'place', 'nombre de place(s)', $row["placeconstat"]);
+ $empl_fields .= sprintf($template_field_empl, 'place', 'constate le', $row["dateconstat"]);
+ $bloc_place = sprintf($template_bloc, 'place', 'place' ,__('place'), $empl_fields);

//Bloc n°3 - Informations des defunts
$res1=$this->f->db->query($sql_defunt);
$this->f->isDatabaseError($res1);
+ //
+ $defunt_lines = '';
+ $odd_even = 0;
while ($row1=& $res1->fetchRow(DB_FETCHMODE_ASSOC)) {
+ $defunt_cells = sprintf($template_table_td, '', trim($row1['nom']." ".$row1['prenom']." ".$row1['marital']));
+ $defunt_cells .= sprintf($template_table_td, '', $row1['datenaissance']);
+ $defunt_cells .= sprintf($template_table_td, '', $row1['dateinhumation']);
+ $defunt_cells .= sprintf($template_table_td, '', $row1['dateexhumation']);
+ $defunt_cells .= sprintf($template_table_td, '', trim($row1['nature']." [".$row1['taille'].']'));
+ $defunt_lines .= sprintf($template_table_tr, ($odd_even % 2 == 0 ? 'odd' : 'even'), $defunt_cells);
+ $odd_even++;
+ }
+
+ if ($defunt_lines === '') {
+ $defunt_lines = sprintf($template_colspan, 5, __('Aucun enregistrement.'));
+ }
+
+ $table_defunt = sprintf($template_table_5_columns, 'tab-defunt', 'ui-widget', __('nom'), __('né(e) le'), __('inhume le'), __('exhume le'), __('nature et place'), $defunt_lines);
+ $bloc_defunt = sprintf($template_bloc, 'defunt', 'defunt', __('defunt'), $table_defunt);
+
+ //Bloc n°4 - Informations des concessionnaires
+ $res2=$this->f->db->query($sql_concessionnaire);
+ $this->f->isDatabaseError($res2);
+ //
+ $concess_lines = '';
+ $odd_even = 0;
+ while ($row2=& $res2->fetchRow(DB_FETCHMODE_ASSOC)) {
+ $concess_cells = sprintf($template_table_td, '', trim($row2['nom']." ".$row2['prenom']." ".$row2['marital']));
+ $concess_cells .= sprintf($template_table_td, '', $row2['datenaissance']);
+ $concess_cells .= sprintf($template_table_td, '', $row2['dcd']);
+ $concess_lines .= sprintf($template_table_tr, ($odd_even % 2 == 0 ? 'odd' : 'even'), $concess_cells);
+ $odd_even++;
+ }
+
+ if ($concess_lines === '') {
+ $concess_lines = sprintf($template_colspan, 3, __('Aucun enregistrement.'));
+ }
+
+ $table_concess = sprintf($template_table_3_columns, 'tab-concess', 'ui-widget', __('nom'), __('datenaissance'), 'dcd', $concess_lines);
+ $bloc_concess = sprintf($template_bloc, 'concessionnaire', 'concessionnaire', __('concessionnaire'), $table_concess);
+
+ //Bloc n°5 - Informations des ayantdroits
+ $res3=$this->f->db->query($sql_ayantdroit);
+ $this->f->isDatabaseError($res3);
+ //
+ $ayantdroit_lines = '';
+ $odd_even = 0;
+ while ($row3=& $res3->fetchRow(DB_FETCHMODE_ASSOC)) {
+ $ayantdroit_cells = sprintf($template_table_td, '', trim($row3['nom']." ".$row3['prenom']." ".$row3['marital']));
+ $ayantdroit_cells .= sprintf($template_table_td, '', $row3['datenaissance']);
+ $ayantdroit_cells .= sprintf($template_table_td, '', $row3['dcd']);
+ $ayantdroit_cells .= sprintf($template_table_td, '', $row3['parente']);
+ $ayantdroit_lines .= sprintf($template_table_tr, ($odd_even % 2 == 0 ? 'odd' : 'even'), $ayantdroit_cells);
+ $odd_even++;
+ }
+
+ if ($ayantdroit_lines === '') {
+ $ayantdroit_lines = sprintf($template_colspan, 4, __('Aucun enregistrement.'));
+ }
+
+ $table_ayantdroit = sprintf($template_table_4_columns, 'tab-concess', 'ui-widget', __('nom'), __('datenaissance'), __('dcd'), __('parente'), $ayantdroit_lines);
+ $bloc_ayantdroit = sprintf($template_bloc, 'ayantdroit', 'ayantdroit', __('ayantdroit'), $table_ayantdroit);
+ //Bloc n°6 - Informations des courriers
+ $res4=$this->f->db->query($sql_courrier);
+ $this->f->isDatabaseError($res4);
+
+ $courrier_lines = '';
+ $odd_even = 0;
+ while ($row4=& $res4->fetchRow(DB_FETCHMODE_ASSOC)) {

+
+ $courrier_edition = sprintf($template_link_edition, 'edition_courrier', 'courrier', $row4['id'], '&action=31', __("télécharger le courrier"));
+ $courrier_cells = sprintf($template_table_td, '', $courrier_edition);
+ $courrier_cells .= sprintf($template_table_td, '', $row4['nom']);
+ $courrier_cells .= sprintf($template_table_td, '', $row4['lettretype']);
+ $courrier_cells .= sprintf($template_table_td, '', $row4['date']);
+ $courrier_lines .= sprintf($template_table_tr, ($odd_even % 2 == 0 ? 'odd' : 'even'), $courrier_cells);
+ $odd_even++;
}

+ if ($courrier_lines === '') {
+ $courrier_lines = sprintf($template_colspan, 4, __('Aucun enregistrement.'));
+ }

+ $table_courrier = sprintf($template_table_4_columns, 'tab-concess', 'ui-widget', __('id'), __('nom'), __('lettretype'), __('date'), $courrier_lines);
+ $bloc_courrier = sprintf($template_bloc, 'courrier', 'courrier', __('courrier'), $table_courrier);

+ //Bloc n°7 - Informations des operations
+ $res5=$this->f->db->query($sql_operation);
+ $this->f->isDatabaseError($res5);
+ //
+ $operation_lines = '';
+ $odd_even = 0;
+ while ($row5=& $res5->fetchRow(DB_FETCHMODE_ASSOC)) {
+ $operation_cells = sprintf($template_table_td, '', $row5['numdossier']);
+ $operation_cells .= sprintf($template_table_td, '', $row5['nom']);
+ $operation_cells .= sprintf($template_table_td, '', $row5['categorie']);
+ $operation_cells .= sprintf($template_table_td, '', $row5['date']);
+ $operation_cells .= sprintf($template_table_td, '', $row5['etat']);
+ $operation_lines .= sprintf($template_table_tr, ($odd_even % 2 == 0 ? 'odd' : 'even'), $operation_cells);
+ $odd_even++;
+ }

- printf('<div class="formEntete ui-corner-all">%s%s</div>', $bloc_empl, $bloc_place);
+ if ($operation_lines === '') {
+ $operation_lines = sprintf($template_colspan, 5, __('Aucun enregistrement.'));
+ }

- }
- }
-} // $bloc_demande_licence, $bloc_courrier, $bloc_dossier);
+ $table_operation = sprintf($template_table_5_columns, 'tab-operation', 'ui-widget', __('numdossier'), __('nom'), __('categorie'), __('date'), __('etat') , $operation_lines);
+ $bloc_operation = sprintf($template_bloc, 'operation', 'operation', __('operation'), $table_operation);

- // $res = $this->f->db->query($sql_emplacement);
- // $this->f->isDatabaseError($res);
- // while ($row=& $res->fetchRow(DB_FETCHMODE_ASSOC)) {
- // // dossier
- // echo "<fieldset class=\"cadre ui-corner-all ui-widget-content \">\n";
- // echo "\t<legend class=\"ui-corner-all ui-widget-content ui-state-active\">";
- // echo __("emplacement")."</legend>";
- // echo "<table width='95%'><tr><td>";
- // echo "<b>".$row['nature']." ".$row['famille']."</b>";
- // echo "</td></tr>";
- // echo "<tr><td>";
- // echo "".$row['numero']." ".$row['complement']." ".$row['voietype']." ".$row['voielib']."<br />";
- // echo "".$row['cimetierelib']." ".$row['zonetype']." ".$row['zonelib']."<br />";
- // echo "</td></tr>";
- // echo "<tr><td><b>".__("observation")." :</b><br /><pre>";
- // echo $row['observation'];
- // echo "</pre></td></tr>";
- // echo "</table>";
- // echo "</fieldset>";
+ //Bloc n°8 - Informations des dossiers
+ $res6=$this->f->db->query($sql_dossier);
+ $this->f->isDatabaseError($res6);

+ $dossier_lines = '';
+ $odd_even = 0;
+ while ($row6=& $res6->fetchRow(DB_FETCHMODE_ASSOC)) {
+ $dossier_dl = sprintf($template_link_dl_dossier, 'dl_dossier', $row6['fichier'], __("télécharger la pièce"));
+ $dossier_cells = sprintf($template_table_td, '', $dossier_dl);
+ $dossier_cells .= sprintf($template_table_td, '', $row6['date']);
+ $dossier_cells .= sprintf($template_table_td, '', $row6['typedossier']);
+ $dossier_lines .= sprintf($template_table_tr, ($odd_even % 2 == 0 ? 'odd' : 'even'), $dossier_cells);
+ $odd_even++;
+ }

- // echo "<fieldset class=\"cadre ui-corner-all ui-widget-content collapsible\">\n";
- // echo "\t<legend class=\"ui-corner-all ui-widget-content ui-state-active\">";
- // echo __("place")."</legend>";
- // echo "<table width='95%'><tr><td>";
- // echo __("nombre de place(s) libre(s)")." ".$row['nombreplace']." ".
- // __("occupee(s)")." ".$row['placeoccupe']."<br />";
- // echo "</td></tr><tr><td>".__("nombre de place(s)")." ".$row['placeconstat']." ".
- // __("constate le")." ".$row['dateconstat']."<br />";
- // echo "</td></tr></table>";
- // echo "</fieldset>";
+ if ($dossier_lines === '') {
+ $dossier_lines = sprintf($template_colspan, 3, __('Aucun enregistrement.'));
+ }


- // defunt
- // $res1=$this->f->db->query($sql_defunt);
- // $this->f->isDatabaseError($res1);
- // echo "<fieldset class=\"cadre ui-corner-all ui-widget-content collapsible\">\n";
- // echo "\t<legend class=\"ui-corner-all ui-widget-content ui-state-active\">";
- // echo __("defunt")."</legend>";
- // echo "<table width='95%'>";
- // echo "<tr><td>".__("nom")."</td><td>".__("ne(e) le")."</td><td>".__("inhume le").
- // "</td><td>".__("exhume le")."</td><td>".__("nature")." ".__("place")."</td></tr>";
- // while ($row1=& $res1->fetchRow(DB_FETCHMODE_ASSOC)) {
- // echo "<tr><td>".
- // $row1['nom'].' '.$row1['prenom'].' '.$row1['marital']."</td>";
- // echo "<td>".$row1['datenaissance']."</td><td>".
- // $row1['dateinhumation']."</td><td>".
- // $row1['dateexhumation']."</td><td>".
- // $row1['nature']." [".$row1['taille']."]</td></tr>";
- // }
- // echo "</table>";
- // echo "</fieldset>";
+ $table_dossier = sprintf($template_table_3_columns, 'tab-dossier', 'ui-widget', __('fichier'), __('date'), __('typedossier'), $dossier_lines);
+ $bloc_dossier = sprintf($template_bloc, 'dossier', 'dossier', __('dossier'), $table_dossier);

+ //Bloc n°9 - Informations des travaux
+ $res7=$this->f->db->query($sql_travaux);
+ $this->f->isDatabaseError($res7);
+ //
+ $travaux_lines = '';
+ $odd_even = 0;

-
- // // concessionnaire
- // $res2=$this->f->db->query($sql_concessionnaire);
- // $this->f->isDatabaseError($res2);
- // echo "<fieldset class=\"cadre ui-corner-all ui-widget-content collapsible\">\n";
- // echo "\t<legend class=\"ui-corner-all ui-widget-content ui-state-active\">";
- // echo __("concessionnaire")."</legend>";
- // echo "<table width='95%'>";
- // echo "<tr><td>".__("nom")."</td><td>".__("datenaissance")."</td><td>".__("dcd").
- // "</td></tr>";
- // while ($row2=& $res2->fetchRow(DB_FETCHMODE_ASSOC)) {
- // echo "<tr>";
- // echo "<td>".$row2['nom'].' '.$row2['prenom'].' '.$row2['marital']."</td>";
- // echo "<td>".$row2['datenaissance']."</td>";
- // echo "<td>".$row2['dcd']."</td>";
- // echo "</tr>";
- // }
- // echo "</table>";
- // echo "</fieldset>";
+ while ($row7=& $res7->fetchRow(DB_FETCHMODE_ASSOC)) {
+ $travaux_cells = sprintf($template_table_td, '', $row5['entreprise']);
+ $travaux_cells .= sprintf($template_table_td, '', $row5['debut']);
+ $travaux_cells .= sprintf($template_table_td, '', $row5['fin']);
+ $travaux_cells .= sprintf($template_table_td, '', $row5['demandeur']);
+ $travaux_cells .= sprintf($template_table_td, '', $row5['nature']);
+ $travaux_lines .= sprintf($template_table_tr, ($odd_even % 2 == 0 ? 'odd' : 'even'), $travaux_cells);
+ $odd_even++;
+ }
+
+ if ($travaux_lines === '') {
+ $travaux_lines = sprintf($template_colspan, 5, __('Aucun enregistrement.'));
+ }
+
+ $table_travaux = sprintf($template_table_5_columns, 'tab-travaux', 'ui-widget', __('entreprise'), __('debut'), __('fin'), __('demandeur'), __('nature') , $travaux_lines);
+ $bloc_travaux = sprintf($template_bloc, 'travaux', 'travaux', __('travaux'), $table_travaux);

- // // ayantdroit
- // $res3=$this->f->db->query($sql_ayantdroit);
- // $this->f->isDatabaseError($res3);
- // echo "<fieldset class=\"cadre ui-corner-all ui-widget-content collapsible\">\n";
- // echo "\t<legend class=\"ui-corner-all ui-widget-content ui-state-active\">";
- // echo __("ayantdroit")."</legend>";
- // echo "<table width='95%'>";
- // echo "<tr><td>".__("nom")."</td><td>".__("datenaissance")."</td><td>".__("dcd").
- // "</td><td>".__("dcd")."</td><td>".__("parente")."</td></tr>";
- // while ($row3=& $res3->fetchRow(DB_FETCHMODE_ASSOC)) {
- // echo "<tr>";
- // echo "<td>".$row3['nom'].' '.$row3['prenom'].' '.$row3['marital']."</td>";
- // echo "<td>".$row3['datenaissance']."</td>";
- // echo "<td>".$row3['dcd']."</td>";
- // echo "<td>".$row3['parente']."</td>";
- // echo "</tr>";
- // }
- // echo "</table>";
- // echo "</fieldset>";
-
-
- // // courrier
- // $res4=$this->f->db->query($sql_courrier);
- // $this->f->isDatabaseError($res4);
- // echo "<fieldset class=\"cadre ui-corner-all ui-widget-content collapsible\">\n";
- // echo "\t<legend class=\"ui-corner-all ui-widget-content ui-state-active\">";
- // echo __("courrier")."</legend>";
- // echo "<table width='95%'>";
- // echo "<tr><td>".__("id")."</td><td>".__("nom")."</td><td>".__("lettretype").
- // "</td><td>".__("date")."</td></tr>";
- // while ($row4=& $res4->fetchRow(DB_FETCHMODE_ASSOC)) {
- // echo "<tr>";
- // echo "<td><a href='".OM_ROUTE_FORM."&obj=courrier&idx=".$row4['id']."&action=31' target=\"_blank\"><span class=\"om-prev-icon om-icon-16 pdf-16\" title=\"".__("télécharger le courrier")."\">".__("télécharger le courrier")."</span></a></td>";
- // echo "<td>".$row4['nom']."</td>";
- // echo "<td>".$row4['lettretype']."</td>";
- // echo "<td>".$row4['date']."</td>";
- // echo "</tr>";
- // }
- // echo "</table>";
- // echo "</fieldset>";
-
- // // operation
- // $res5=$this->f->db->query($sql_operation);
- // $this->f->isDatabaseError($res5);
- // echo "<fieldset class=\"cadre ui-corner-all ui-widget-content collapsible\">\n";
- // echo "\t<legend class=\"ui-corner-all ui-widget-content ui-state-active\">";
- // echo __("operation")."</legend>";
- // echo "<table width='95%'>";
- // echo "<tr><td><b>".__("numdossier")."</b></td><td><b>".__("nom")."</b></td><td><b>".__("categorie").
- // "</b></td><td><b>".__("date")."</b></td><td><b>".__("etat")."</b></td></tr>";
- // while ($row5=& $res5->fetchRow(DB_FETCHMODE_ASSOC)) {
- // echo "<tr>";
- // echo "<td>".$row5['numdossier']."</td>";
- // echo "<td>".$row5['nom']."</td>";
- // echo "<td>".$row5['categorie']."</td>";
- // echo "<td>".$row5['date']."</td>";
- // echo "<td>".$row5['etat']."</td>";
- // echo "</tr>";
- // }
- // echo "</table>";
- // echo "</fieldset>";
-
- // // dossier
- // $res6=$this->f->db->query($sql_dossier);
- // $this->f->isDatabaseError($res6);
- // echo "<fieldset class=\"cadre ui-corner-all ui-widget-content collapsible\">\n";
- // echo "\t<legend class=\"ui-corner-all ui-widget-content ui-state-active\">";
- // echo __("dossier")."</legend>";
- // echo "<table width='95%'>";
- // echo "<tr><td><b>".__("fichier")."</b></td><td><b>".__("date")."</b></td><td><b>".__("typedossier")."</b></td></tr>";
- // while ($row6=& $res6->fetchRow(DB_FETCHMODE_ASSOC)) {
- // echo "<tr>";
- // echo "<td>";
- // echo "<a href='".OM_ROUTE_FORM."&snippet=file&uid=".$row6['fichier']."' target=\"_blank\">";
- // echo "<span class=\"om-prev-icon om-icon-16 arrow-right-16\" title=\"".__("télécharger la pièce")."\">".__("télécharger la pièce")."</span>";
- // echo "</a></td>";
- // echo "<td>".$row6['date']."</td>";
- // echo "<td>".$row6['typedossier']."</td>";
- // echo "</tr>";
- // }
- // echo "</table>";
- // echo "</fieldset>";
-
- // // travaux
- // $res7=$this->f->db->query($sql_travaux);
- // $this->f->isDatabaseError($res7);
- // echo "<fieldset class=\"cadre ui-corner-all ui-widget-content collapsible\">\n";
- // echo "\t<legend class=\"ui-corner-all ui-widget-content ui-state-active\">";
- // echo __("travaux")."</legend>";
- // echo "<table width='95%'>";
- // echo "<tr><td><b>".__("entreprise")."</b></td><td><b>".__("debut")."</b></td><td><b>".
- // __("fin")."</b></td><td><b>".__("demandeur")."</b></td><td><b>".__("nature")."</b></td></tr>";
- // while ($row7=& $res7->fetchRow(DB_FETCHMODE_ASSOC)) {
- // echo "<tr>";
- // echo "<td>".$row7['entreprise']."</td>";
- // echo "<td>".$row7['debut']."</td>";
- // echo "<td>".$row7['fin']."</td>";
- // echo "<td>".$row7['demandeur']."</td>";
- // echo "<td>".$row7['nature']."</td>";
- // echo "</tr>";
- // }
- // echo "</table>";
- // echo "</fieldset>";
-
- // }
-// }
\ No newline at end of file
+ // Affichage de la fiche
+ printf('<div class="formEntete ui-corner-all">%s%s%s%s%s%s%s%s%s</div>', $bloc_empl, $bloc_place, $bloc_defunt, $bloc_concess, $bloc_ayantdroit, $bloc_courrier, $bloc_operation, $bloc_dossier, $bloc_travaux);
+
+ }
+ }
+}

Reply all
Reply to author
Forward
0 new messages