Changeset 1548


Ignore:
Timestamp:
Oct 3, 2010, 4:37:37 AM (10 years ago)
Author:
roux
Message:

alt et title pour images solr

File:
1 edited

Legend:

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

    r1546 r1548  
    2626      return $this->getPartial('parlementaire/photoParlementaire', array('parlementaire'=>$obj, 'height'=>70));
    2727    case 'Commentaire':
    28       return '<img width="53" src="'.url_for('@photo_citoyen?slug='.$obj->getCitoyen()->getSlug()).'"/>';
     28      return '<img width="53" class="jstitle" title="'.$obj->getCitoyen()->getLogin().'" alt="'.$obj->getCitoyen()->getLogin().'" src="'.url_for('@photo_citoyen?slug='.$obj->getCitoyen()->getSlug()).'"/>';
    2929    case 'Citoyen':
    30       return '<img width="53" src="'.url_for('@photo_citoyen?slug='.$obj->getSlug()).'"/>';
     30      return '<img width="53" class="jstitle" title="'.$obj->getLogin().'" alt="'.$obj->getLogin().'" src="'.url_for('@photo_citoyen?slug='.$obj->getSlug()).'"/>';
    3131    case 'NonObjectPage':
    32       $num = strtolower(Parlementaire::getNumeroDepartement(str_replace(' ', '_', preg_replace('/^.*\/([^\/]+)$/', '\\1', $obj->getLink()))));
     32      $dep = preg_replace('/^.*\/([^\/]+)$/', '\\1', $obj->getLink());
     33      $num = strtolower(Parlementaire::getNumeroDepartement(str_replace(' ', '_', $dep)));
    3334      if (preg_match('/^\d$/', $num))
    3435        $num = sprintf("%02d",$num);
     
    3637        $fixednum = '0'.$num;
    3738      else $fixednum = sprintf('%03d',$num);
    38       return '<img width="53" src="'.url_for("@circo_image_png?circo=".$fixednum."&w=53&h=0").'"/>';
     39      return '<img width="53" class="jstitle" title="'.$dep.' ('.$num.')" alt="'.$dep.' ('.$num.')" src="'.url_for("@circo_image_png?circo=".$fixednum."&w=53&h=0").'"/>';
    3940    }
    4041  }
Note: See TracChangeset for help on using the changeset viewer.