added bornes date in classical home perf list
This commit is contained in:
@@ -258,6 +258,8 @@ function perfart_get_performances(){
|
||||
$count = $count_query->count()->execute();
|
||||
pager_default_initialize($count, $limit);
|
||||
|
||||
|
||||
$borne_date = null;
|
||||
foreach ($result['node'] as $eff) {
|
||||
$eff = node_load($eff->nid);
|
||||
//$eff = entity_load('node', array($eff->nid), NULL, FALSE);
|
||||
@@ -268,7 +270,7 @@ function perfart_get_performances(){
|
||||
continue;
|
||||
|
||||
$debut = $eff->field_date_de_debut['und'][0]['value'];
|
||||
|
||||
|
||||
//1969/06/06-18:00
|
||||
$pattern = '/^(\d{4})\/?(\d{2})?\/?(\d{2})?-?(\d{2})?:?+(\d{2})?$/';
|
||||
|
||||
@@ -284,6 +286,17 @@ function perfart_get_performances(){
|
||||
$fin = false;
|
||||
}
|
||||
|
||||
$annee_splited = str_split($debutMatches[1]);
|
||||
$annee_dizaine = $annee_splited[0] . $annee_splited[1] . $annee_splited[2] . '0';
|
||||
if ($borne_date !== $annee_dizaine) {
|
||||
$borne_date = $annee_dizaine;
|
||||
|
||||
$list['items'][] = array(
|
||||
'data' => "<span class='date'>$borne_date</span>",
|
||||
'class' => array('borne-date'),
|
||||
);
|
||||
}
|
||||
|
||||
# lieu
|
||||
// $lieu_values = field_get_items('node',$eff,'field_lieu');
|
||||
// $lieu_values = $lieu_values ? $lieu_values : array();
|
||||
|
||||
Reference in New Issue
Block a user