Ignore:
Timestamp:
Feb 21, 2010, 11:31:12 PM (11 years ago)
Author:
goya
Message:

insertion texte loi dans dossier

Location:
cpc/trunk/project/apps/frontend/modules/section
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpc/trunk/project/apps/frontend/modules/section/actions/actions.class.php

    r1062 r1120  
    5252    foreach($amdmts_lois as $loi)
    5353      array_push($this->lois_amendees, $loi['distinct']);
     54    sort($this->lois_amendees);
     55   
     56    $this->textes_loi = Doctrine_Query::create()->select('t.texteloi_id, t.titre')->from('TitreLoi t')->whereIn('t.texteloi_id', $this->lois)->andWhere('t.chapitre IS NULL')->andWhere('t.section is NULL')->orderBy('t.texteloi_id')->fetchArray();
    5457    sort($this->lois);
    55     sort($this->lois_amendees);
    56     
     58    sort($this->textes_loi);
     59   
    5760    $inters = Doctrine_Query::create()
    5861      ->select('i.id')
  • cpc/trunk/project/apps/frontend/modules/section/templates/showSuccess.php

    r976 r1120  
    1616<?php }
    1717  if ($lois && ! preg_match('/(questions?\s|ordre\sdu\sjour|nomination|suspension\sde\séance|rappels?\sau\srèglement)/i', $section->titre)) { ?>
    18 <span>Texte<?php if (count($lois) > 1) echo 's'; ?> de loi<?php if (count($lois) > 1) echo 's'; ?> N°
    19 <?php foreach ($lois as $loi) echo myTools::getLinkLoi($loi).' ';
    20 echo '('.link_to('tous les amendements à ce dossier',  '@find_amendements_by_loi_and_numero?loi='.urlencode(implode(',',$lois_amendees)).'&numero=all').')';
    21 // foreach ($lois_amendees as $loi) echo link_to('loi N°'.$loi, '@find_amendements_by_loi_and_numero?loi='.$loi.'&numero=all').' ('.myTools::getLiasseLoiImpr($loi).', '.myTools::getLiasseLoiAN($loi).') '; ?>
    22 </span>
     18<span><?php if (count($textes_loi)) foreach ($textes_loi as $texte) echo link_to(strip_tags($texte['titre']), '@loi?loi='.$texte['texteloi_id']); else { echo 'Texte'; if (count($lois) > 1) echo 's'; echo 'de loi'; if (count($lois) > 1) echo 's'; echo 'N°'; foreach ($lois as $loi) echo myTools::getLinkLoi($loi).' '; echo '('.link_to('tous les amendements à ce dossier',  '@find_amendements_by_loi_and_numero?loi='.urlencode(implode(',',$lois_amendees)).'&numero=all').')'; } ?></span>
    2319<?php } ?>
    2420</div>
Note: See TracChangeset for help on using the changeset viewer.