Ignore:
Timestamp:
Feb 17, 2010, 1:08:55 PM (11 years ago)
Author:
goya
Message:

update lois pour cimade + liste articles

Location:
cpc/trunk/project/apps/frontend/modules
Files:
3 edited

Legend:

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

    r1103 r1113  
    5050      ->orderBy('t.chapitre, t.section')
    5151      ->execute();
    52     if (!$this->soussections) {
    53       $this->articles = doctrine::getTable('ArticleLoi')->createquery('a')
     52    $this->articles = doctrine::getTable('ArticleLoi')->createquery('a')
    5453        ->where('a.texteloi_id = ?', $loi_id)
    5554        ->orderBy('a.ordre')
    56         ->execute();
    57       $this->amendements = $this->getAmendements($loi_id);
    58     } else $this->amendements = count(doctrine::getTable('Amendement')->createquery('a')
     55        ->fetchArray();
     56    $this->amendements = count(doctrine::getTable('Amendement')->createquery('a')
    5957        ->where('a.texteloi_id = ?', $loi_id)->execute());
    6058   
  • cpc/trunk/project/apps/frontend/modules/loi/templates/loiSuccess.php

    r1082 r1113  
    1212} ?>
    1313<div class="sommaireloi">
    14 <?php if (isset($soussections)) {
     14<?php $nart = 0;
     15if (isset($soussections)) {
    1516  $chapitre = 0;
    1617  $section = 0;
     
    4041    }
    4142    echo ')';
     43    echo '<br/> &nbsp; Article';
     44    if ($ss->nb_articles > 1) echo 's';
     45    echo ' ';
     46    for ($i=$nart;$i<$nart+$ss->nb_articles;$i++) {
     47      echo link_to($articles[$i]['titre'], '@loi_article?loi='.$loi->texteloi_id.'&article='.$articles[$i]['slug']).' &nbsp;';;
     48    }
     49    $nart += $ss->nb_articles;
    4250  }
    4351  if ($section != 0) echo '</li></ul>';
     
    4957  }
    5058} else {
    51   $nart = 0;
    5259  foreach ($articles as $a) {
    5360    if ($nart != 0) echo '</li>';
  • cpc/trunk/project/apps/frontend/modules/section/actions/components.class.php

    r1066 r1113  
    44{
    55  public function executeSimplifions() {
    6     $this->lois = Doctrine_Query::create()->select('l.texteloi_id, l.titre, l.nb_commentaires')->from('TitreLoi l')->where('l.chapitre IS NULL')->andWhere('l.section IS NULL')->orderBy('l.date DESC')->fetchArray();
     6    $this->lois = Doctrine_Query::create()->select('l.texteloi_id, l.titre, l.nb_commentaires')->from('TitreLoi l')->where('l.chapitre IS NULL')->andWhere('l.section IS NULL')->andWhere('l.nb_commentaires >= 5')->orderBy('l.date DESC')->fetchArray();
    77  }
    88
Note: See TracChangeset for help on using the changeset viewer.