Changeset 1427


Ignore:
Timestamp:
Sep 26, 2010, 2:30:13 PM (10 years ago)
Author:
teymour
Message:

Interface de gestion des alertes

Location:
cpc/trunk/project
Files:
9 added
5 edited

Legend:

Unmodified
Added
Removed
  • cpc/trunk/project/apps/frontend/config/routing.yml

    r1408 r1427  
    379379  param: {module: commentaire, action: widget}
    380380
     381alerte_create:
     382  url: /alerte/create
     383  param: {module: alerte, action: create}
     384alerte_list:
     385  url: /alerte/list
     386  param: {module: alerte, action: list}
     387alerte_edit:
     388  url: /alerte/edit/:verif
     389  param: {module: alerte, action: edit}
     390alerte_delete:
     391  url: /alerte/delete/:verif
     392  param: {module: alerte, action: delete}
     393
    381394parlementaire:
    382395  url: /:slug
  • cpc/trunk/project/apps/frontend/modules/citoyen/templates/showSuccess.php

    r1337 r1427  
    2222      </div>
    2323      <?php if ($sf_user->getAttribute('user_id') == $user->id)
    24         echo '<div class="b_c_edit"><a href="'.url_for('@edit_citoyen').'">Modifier votre profil</a></div>';
     24        echo '<div class="b_c_edit"><a href="'.url_for('alerte/list').'">Gérer mes alertes</a> - ';
     25        echo '<a href="'.url_for('@edit_citoyen').'">Modifier votre profil</a></div>';
    2526        ?>
    2627    </div>
  • cpc/trunk/project/config/doctrine/schema.yml

    r1424 r1427  
    661661    email: string(128)
    662662    query: string(128)
    663     titre: string
     663    titre: string 
    664664    confirmed: boolean
     665    no_human_query: boolean
    665666    period:
    666667      type: enum
  • cpc/trunk/project/lib/model/doctrine/Alerte.class.php

    r1327 r1427  
    1313class Alerte extends BaseAlerte
    1414{
    15   public function giveVerif() {
    16     $v = $this->get('verif');
    17     if (!$v) {
    18       $v = md5(rand(1, 999999999999));
    19       $this->setVerif($v);
    20     }
     15  public function generateVerif() {
     16    $v = md5(rand(1, 999999999999));
     17    $this->_set('verif', $v);
    2118    return $v;
    2219  }
     20  public function getTitre() {
     21    if (!$this->_get('titre'))
     22      return "Recherche correspondant aux mots clés « ".$this->query." »";
     23    return $this->_get('titre');
     24  }
     25
     26  public function save(Doctrine_Connection $c = null) {
     27    if (!$this->last_mail)
     28      $this->last_mail = date('Y-m-d H:i:s');
     29    if (!$this->verif)
     30      $this->generateVerif();
     31    return parent::save($c);
     32  }
    2333}
  • cpc/trunk/project/web/css/xneth/style.css

    r1421 r1427  
    367367  padding-right: 20px;
    368368}
     369.b_c_edit a, .b_c_edit a:visited {
     370  text-decoration: underline
     371}
    369372.b_c_edit {
    370373  float: right;
     
    372375  margin-top: 70px;
    373376  color: #CB1414;
    374   text-decoration: underline
    375377}
    376378.b_c_b {
     
    18251827    margin-top: 5px;
    18261828}
     1829
     1830table.list {
     1831    margin: auto;
     1832}
     1833table.list td {
     1834    text-align: center;
     1835}
Note: See TracChangeset for help on using the changeset viewer.