Changeset 3074


Ignore:
Timestamp:
Jan 23, 2013, 2:04:10 AM (8 years ago)
Author:
roux
Message:

add infos texteloi

Location:
cpc/trunk/project
Files:
3 edited

Legend:

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

    r3065 r3074  
    6161    if ($this->loi->getDossier())
    6262      $this->dossier = $this->loi->getDossier()->id;
     63    $this->doc = Doctrine::getTable('Texteloi')->findOneBySource($this->loi->source);
    6364    $this->response->setTitle("Simplifions la loi - ".strip_tags($this->loi->titre).' - NosDéputés.fr');
    6465    $request->setParameter('rss', array(array('link' => '@loi_rss_commentaires?loi='.$loi_id, 'title'=>'Les commentaires sur '.$this->loi->titre)));
  • cpc/trunk/project/apps/frontend/modules/loi/templates/loiSuccess.php

    r3073 r3074  
     1<?php echo '<div class="precedent">'.myTools::displayDate($loi->date).'</div>'; ?>
    12<?php if (isset($dossier)) echo '<div class="source">'.link_to('Dossier relatif', '@section?id='.$dossier)."</div>"; ?>
    2 <div class="loi"><h1><?php echo $loi->titre; ?></h1></div>
     3<div class="loi"><h1><?php echo $loi->titre; ?></h1>
     4<?php if (isset($doc) && $doc != null) echo "<h2>".$doc->getShortTitreExplained()."</h2>"; ?>
     5</div>
    36<?php if ($loi->source) echo '<p class="source"><a href="'.$loi->source.'" rel="nofollow">Source</a></p><div class="clear"></div>';
    47if ($loi->expose) {
  • cpc/trunk/project/lib/model/doctrine/Texteloi.class.php

    r3034 r3074  
    278278  }
    279279
     280  public function getShortTitreExplained() {
     281    if ($this->type === "Projet de loi")
     282      return $this->type." du gouvernement n°&nbsp;".$this->numero;
     283    return $this->getShortTitre();
     284  }
     285
    280286  public function getTitre() {
    281287    $str = $this->getDetailsTitre();
Note: See TracChangeset for help on using the changeset viewer.