Changeset 470

Show
Ignore:
Timestamp:
11/25/08 16:47:14 (1 month ago)
Author:
nicolas
Message:

Homepage : tri des RDV par date

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/apps/intranet/modules/homepage/templates/indexSuccess.php

    r461 r470  
    312312$tmps = array(); 
    313313foreach($visits as $visit): 
    314   $tmps[] = array('id' => $visit->getId(), 'type' => 'visit', 'start_at' => $visit->getVisitDate(), 'end_at' => $visit->getEndAt(), 'group' => ucfirst('visite'), 'location' => ($visit->getSales() ? $visit->getSales()->getEstate()->getAddress1().', '.$visit->getSales()->getEstate()->getCityValue() : null), 'description' => ($visit->getContact() ? $visit->getContact()->getLastname().' '.$visit->getContact()->getTelFirst() : null)); 
     314  $tmps[$visit->getVisitDate().$visit->getId().'1'] = array('id' => $visit->getId(), 'type' => 'visit', 'start_at' => $visit->getVisitDate(), 'end_at' => $visit->getEndAt(), 'group' => ucfirst('visite'), 'location' => ($visit->getSales() ? $visit->getSales()->getEstate()->getAddress1().', '.$visit->getSales()->getEstate()->getCityValue() : null), 'description' => ($visit->getContact() ? $visit->getContact()->getLastname().' '.$visit->getContact()->getTelFirst() : null)); 
    315315endforeach; 
    316316 
    317317foreach($calendars as $calendar): 
    318   $tmps[] = array('id' => $calendar->getId(), 'type' => 'calendar', 'start_at' => $calendar->getDateStart(), 'end_at' => $calendar->getDateEnd(), 'group' => $calendar->getCalendar_group(), 'location' => $calendar->getLocation(), 'description' => $calendar->getDescription()); 
     318  $tmps[$calendar->getDateStart().$calendar->getId().'2'] = array('id' => $calendar->getId(), 'type' => 'calendar', 'start_at' => $calendar->getDateStart(), 'end_at' => $calendar->getDateEnd(), 'group' => $calendar->getCalendar_group(), 'location' => $calendar->getLocation(), 'description' => $calendar->getDescription()); 
    319319endforeach; 
     320 
     321ksort($tmps); 
    320322?> 
    321323<h3>Rendez-vous à venir</h3>