Go to the documentation of this file.00001 <?php
00002
00003
00004 ?><?php
00005 echo HtmlInput::title_box(_('Etiquette'), 'tag_div');
00006 $max=$this->cn->count($ret);
00007 if ( $max == 0 ) {
00008 echo h2(_("Aucune étiquette disponible"),' class="notice"');
00009 return;
00010 }
00011 ?>
00012 <table>
00013 <tr>
00014 <th>
00015 Tag
00016 </th>
00017 <th>
00018 Description
00019 </th>
00020 </tr>
00021 <?php
00022 $gDossier=Dossier::id();
00023 if (isNumber($_REQUEST['ag_id']) == 0 ) die ('ERROR : parameters invalid');
00024 for ($i=0;$i<$max;$i++):
00025 $row=Database::fetch_array($ret, $i);
00026 ?>
00027 <tr class="<?php echo (($i%2==0)?'even':'odd');?>">
00028 <td>
00029 <?php
00030 $js=sprintf("action_tag_add('%s','%s','%s')",$gDossier,$_REQUEST['ag_id'],$row['t_id']);
00031 echo HtmlInput::anchor($row['t_tag'], "", "onclick=\"$js\"");
00032 ?>
00033 </td>
00034 <td>
00035 <?php
00036 echo $row['t_description'];
00037 ?>
00038 </td>
00039 </tr>
00040 <?php
00041 endfor;
00042 ?>
00043 </table>
00044 <?php
00045 $js=sprintf("onclick=\"show_tag('%s','%s','%s','j')\"",Dossier::id(),"none",'-1');
00046 echo HtmlInput::button("tag_add", "Ajout d'une étiquette", $js);
00047 ?>