Changeset 1113 for cpc/trunk/project/apps
- Timestamp:
- Feb 17, 2010, 1:08:55 PM (11 years ago)
- 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 50 50 ->orderBy('t.chapitre, t.section') 51 51 ->execute(); 52 if (!$this->soussections) { 53 $this->articles = doctrine::getTable('ArticleLoi')->createquery('a') 52 $this->articles = doctrine::getTable('ArticleLoi')->createquery('a') 54 53 ->where('a.texteloi_id = ?', $loi_id) 55 54 ->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') 59 57 ->where('a.texteloi_id = ?', $loi_id)->execute()); 60 58 -
cpc/trunk/project/apps/frontend/modules/loi/templates/loiSuccess.php
r1082 r1113 12 12 } ?> 13 13 <div class="sommaireloi"> 14 <?php if (isset($soussections)) { 14 <?php $nart = 0; 15 if (isset($soussections)) { 15 16 $chapitre = 0; 16 17 $section = 0; … … 40 41 } 41 42 echo ')'; 43 echo '<br/> 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']).' ';; 48 } 49 $nart += $ss->nb_articles; 42 50 } 43 51 if ($section != 0) echo '</li></ul>'; … … 49 57 } 50 58 } else { 51 $nart = 0;52 59 foreach ($articles as $a) { 53 60 if ($nart != 0) echo '</li>'; -
cpc/trunk/project/apps/frontend/modules/section/actions/components.class.php
r1066 r1113 4 4 { 5 5 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(); 7 7 } 8 8
Note: See TracChangeset
for help on using the changeset viewer.