|
@@ -20,7 +20,7 @@ function template_preprocess_edlp_compositions_list(&$vars){
|
|
|
|
|
|
$title = $entity->getName();
|
|
|
|
|
|
- $vars['compositions']['#items'][] = array(
|
|
|
+ array_unshift($vars['compositions']['#items'], array(
|
|
|
'compo_link' => array(
|
|
|
'#title' => $title,
|
|
|
'#type' => 'link',
|
|
@@ -29,7 +29,7 @@ function template_preprocess_edlp_compositions_list(&$vars){
|
|
|
'attributes' => array(
|
|
|
'data-drupal-link-system-path' => $url->getInternalPath(),
|
|
|
'cid' => $entity->id(),
|
|
|
- 'class' => ['composition-link', $i==0 ? 'is-active':''],
|
|
|
+ 'class' => ['composition-link', $i==count($vars['composition_entities'])-1 ? 'is-active':''],
|
|
|
'title'=>$title,
|
|
|
),
|
|
|
),
|
|
@@ -47,11 +47,11 @@ function template_preprocess_edlp_compositions_list(&$vars){
|
|
|
),
|
|
|
),
|
|
|
)
|
|
|
- );
|
|
|
+ ));
|
|
|
$i++;
|
|
|
}
|
|
|
|
|
|
- $vars['compositions']['#items'][] = array(
|
|
|
+ array_unshift($vars['compositions']['#items'], array(
|
|
|
'#title' => t('New composition'),
|
|
|
'#type' => 'link',
|
|
|
'#url' => $vars['new_composition_url'],
|
|
@@ -61,5 +61,5 @@ function template_preprocess_edlp_compositions_list(&$vars){
|
|
|
'class' => ['new-composition-link']
|
|
|
),
|
|
|
),
|
|
|
- );
|
|
|
+ ));
|
|
|
}
|