Changeset 1483
- Timestamp:
- Sep 29, 2010, 12:08:35 AM (10 years ago)
- Location:
- cpc/trunk/project/apps/frontend/modules/solr
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
cpc/trunk/project/apps/frontend/modules/solr/actions/actions.class.php
r1469 r1483 17 17 case 'Intervention': 18 18 if ($obj->getParlementaire()) 19 return url_for('@resized_photo_parlementaire?height=70&slug='.$obj->getIntervenant()->getSlug()); 20 return ''; 19 return $this->getPartial('parlementaire/photoParlementaire', array('parlementaire'=>$obj->getIntervenant(), 'height'=>70)); 21 20 case 'QuestionEcrite': 22 return url_for('@resized_photo_parlementaire?height=70&slug='.$obj->getParlementaire()->getSlug());21 return $this->getPartial('parlementaire/photoParlementaire', array('parlementaire'=>$obj->getParlementaire(), 'height'=>70)); 23 22 case 'Amendement': 24 23 return ''; 25 24 case 'Parlementaire': 26 return url_for('@resized_photo_parlementaire?height=70&slug='.$obj->getSlug());25 return $this->getPartial('parlementaire/photoParlementaire', array('parlementaire'=>$obj, 'height'=>70)); 27 26 case 'Commentaire': 28 return url_for('@photo_citoyen?slug='.$obj->getCitoyen()->getSlug());27 return '<img width="53" src="'.url_for('@photo_citoyen?slug='.$obj->getCitoyen()->getSlug()).'"/>'; 29 28 case 'Citoyen': 30 return url_for('@photo_citoyen?slug='.$obj->getSlug());29 return '<img width="53" src="'.url_for('@photo_citoyen?slug='.$obj->getSlug()).'"/>'; 31 30 } 32 31 } … … 115 114 $this->sort_type = 'date'; 116 115 } 116 if ($from) { 117 $to = $request->getParameter('to', 'NOW'); 118 $query .= ' date:['.$from.' TO '.$to.']'; 119 $params['facet.date.start']=$from; 120 $params['facet.date.end'] = $to; 121 $params['facet.date.gap'] = '+1MONTH'; 122 $this->selected['from'][$from] = 1; 123 $this->selected['to'][$to] = 1; 124 } 117 125 if ($date) { 118 $dates = explode(',', $date);119 $date = array_pop($dates);120 $period = 'MONTH';121 if (count($dates) == 1)122 $period = 'DAY';123 $query .= ' date:['.$date.' TO '.$date.'+1'.$period.']';124 126 $this->selected['date'][$date] = 1; 125 $params['facet.date.start']=$date;126 $params['facet.date.end'] = $date.'+1'.$period;127 $params['facet.date.gap'] = '+1DAY';128 }else { 129 if ($from) { 130 $to = $request->getParameter('to', 'NOW');131 $query .= ' date:['.$from.' TO '.$to.']';132 $params['facet.date.start']=$from;133 $params['facet.date.end'] = $to;134 $params['facet.date.gap'] = '+1MONTH';127 if (!$from) { 128 $dates = explode(',', $date); 129 $date = array_pop($dates); 130 $period = 'MONTH'; 131 if (count($dates) == 1) 132 $period = 'DAY'; 133 $query .= ' date:['.$date.' TO '.$date.'+1'.$period.']'; 134 $params['facet.date.start']=$date; 135 $params['facet.date.end'] = $date.'+1'.$period; 136 $params['facet.date.gap'] = '+1DAY'; 135 137 } 136 138 } -
cpc/trunk/project/apps/frontend/modules/solr/templates/searchSuccess.php
r1477 r1483 229 229 <div class="item"> 230 230 <h4><a href="<?php echo $record['link']; ?>"><?php echo $record['titre']; ?></a></h4> 231 <?php if ($record['photo']) { ?><p class="photo"><a href="<?php echo $record['link']; ?>" rel="nofollow">< img width="53" src="<?php echo $record['photo']; ?>"/></a></p><?php } ?>231 <?php if ($record['photo']) { ?><p class="photo"><a href="<?php echo $record['link']; ?>" rel="nofollow"><?php echo $record['photo']; ?></a></p><?php } ?> 232 232 <p class="intervenant"><a href="<?php echo $record['link']; ?>" rel="nofollow"><?php echo $record['personne']; ?></a></p> 233 233 <p class="content"><?php echo $record['highlighting']; ?></p>
Note: See TracChangeset
for help on using the changeset viewer.