Changeset 3111


Ignore:
Timestamp:
Feb 25, 2013, 3:13:22 AM (7 years ago)
Author:
roux
Message:

add email alerte for question écrite with no answer

Location:
cpc/trunk/project
Files:
3 edited

Legend:

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

    r1760 r3111  
    2121    $alerte->no_human_query = 1;
    2222    $alerte->titre = 'Recherche relative aux travaux de '.$parlementaire->nom;
     23    $this->submit = 'Créer';
     24    $this->form = $this->processForm($request, $alerte);
     25    $this->setTemplate('form');
     26  }
     27
     28  public function executeQuestion(sfWebRequest $request)
     29  {
     30    $num = $request->getParameter('num');
     31    $this->forward404Unless($num);
     32    $question = doctrine::getTable('QuestionEcrite')->findOneByNumero($num);
     33    $this->forward404Unless($question);
     34    $alerte = new Alerte();
     35    $alerte->query = '"Question+Écrite+N°+'.$question->numero.'"&object_name=QuestionEcrite';
     36    $alerte->no_human_query = 1;
     37    $alerte->titre = 'Changements liés à la Question Écrite N° '.$question->numero;
    2338    $this->submit = 'Créer';
    2439    $this->form = $this->processForm($request, $alerte);
  • cpc/trunk/project/apps/frontend/modules/questions/templates/showSuccess.php

    r2365 r3111  
    2626      if ($question->reponse)
    2727        echo '<p>'.myTools::escape_blanks($question->reponse).'</p>';
    28       else echo '<p>Cette question n\'a pas encore de réponse.</p>';
     28      else {
     29        echo '<p>Cette question n\'a pas encore de réponse.</p>';
     30        echo '<div class="source alerte"><a href="'.url_for('@alerte_question?num='.$question->numero).'">'.image_tag('xneth/email.png')."<br/>être informé<br/>par e-mail de<br/>la réponse".'</a></div>';
     31      }
    2932    } ?>
    3033  </div>
  • cpc/trunk/project/web/css/xneth/style.css

    r3086 r3111  
    13471347  text-decoration: underline;
    13481348}
     1349.question .alerte {
     1350  margin-right: 10px;
     1351  margin-top: -60px;
     1352  text-align: center;
     1353}
    13491354.question,.loi p {
    13501355  text-align: justify;
Note: See TracChangeset for help on using the changeset viewer.