Révision c06bd9a4
Ajouté par Assos Assos il y a presque 4 ans
drupal7/sites/all/modules/panels/panels.module | ||
---|---|---|
58 | 58 |
'image' => NULL, |
59 | 59 |
'link' => NULL, |
60 | 60 |
'class' => NULL, |
61 |
'options' => NULL, |
|
61 | 62 |
), |
62 | 63 |
); |
63 | 64 |
$theme['panels_layout_icon'] = array( |
... | ... | |
552 | 553 |
function panels_stylizer_lipsum() { |
553 | 554 |
return <<<LIPSUM |
554 | 555 |
<p> |
555 |
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus at
|
|
556 |
velit dolor. Donec egestas tellus sit amet urna rhoncus adipiscing. Proin
|
|
556 |
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus at |
|
557 |
velit dolor. Donec egestas tellus sit amet urna rhoncus adipiscing. Proin |
|
557 | 558 |
nec porttitor sem. Maecenas aliquam, purus nec tempus dignissim, nulla arcu |
558 | 559 |
aliquam diam, non tincidunt massa ante vel dolor. Aliquam sapien sapien, |
559 | 560 |
tincidunt id tristique at, pretium sagittis libero. |
... | ... | |
805 | 806 |
$this->add_pane($pane, $location); |
806 | 807 |
} |
807 | 808 |
|
809 |
/** |
|
810 |
* Clone a pane. |
|
811 |
*/ |
|
812 |
public function clone_pane($pid) { |
|
813 |
$pane = clone $this->content[$pid]; |
|
814 |
$pane->uuid = ctools_uuid_generate(); |
|
815 |
return $pane; |
|
816 |
} |
|
817 |
|
|
808 | 818 |
/** |
809 | 819 |
* Get the title from a display. |
810 | 820 |
* |
... | ... | |
1368 | 1378 |
* @todo Why does this take 4 arguments but only makes use of two? |
1369 | 1379 |
*/ |
1370 | 1380 |
function theme_panels_layout_link($vars) { |
1371 |
$output = '<div class="' . implode(' ', $vars['class']) . '">'; |
|
1372 |
$output .= $vars['image']; |
|
1373 |
$output .= '<div>' . $vars['title'] . '</div>'; |
|
1374 |
$output .= '</div>'; |
|
1375 |
return $output; |
|
1381 |
$options = !empty($vars['options']) ? $vars['options'] : array(); |
|
1382 |
if (!isset($options['attributes']['class'])) { |
|
1383 |
$options['attributes']['class'] = array(); |
|
1384 |
} |
|
1385 |
$options['attributes']['class'] = array_merge($options['attributes']['class'], $vars['class']); |
|
1386 |
|
|
1387 |
$content = $vars['image'] . '<span>' . $vars['title'] . '</span>'; |
|
1388 |
return l($content, $vars['link'], $options + array('html' => TRUE)); |
|
1376 | 1389 |
} |
1377 | 1390 |
|
1378 | 1391 |
/** |
... | ... | |
1394 | 1407 |
|
1395 | 1408 |
ctools_add_css('panels_admin', 'panels'); |
1396 | 1409 |
$file = $layout['path'] . '/' . $layout['icon']; |
1397 |
$image = l( |
|
1398 |
theme('image', array('path' => $file)), |
|
1399 |
$link, |
|
1400 |
array('html' => TRUE) + $options |
|
1401 |
); |
|
1402 |
$title = l($layout['title'], $link, $options); |
|
1410 |
$image = theme('image', array('path' => $file)); |
|
1403 | 1411 |
return theme( |
1404 | 1412 |
'panels_layout_link', |
1405 | 1413 |
array( |
1406 |
'title' => $title,
|
|
1414 |
'title' => $layout['title'],
|
|
1407 | 1415 |
'image' => $image, |
1416 |
'link' => $link, |
|
1408 | 1417 |
'class' => $class, |
1418 |
'options' => $options, |
|
1409 | 1419 |
) |
1410 | 1420 |
); |
1411 | 1421 |
} |
... | ... | |
2057 | 2067 |
$subtype_prefix_hyphen = $exploded_subtype[0] . '-'; |
2058 | 2068 |
|
2059 | 2069 |
// Remove the prefix block- to get the name. |
2060 |
$name_of_block = ltrim($prefixed_name, $subtype_prefix_hyphen);
|
|
2070 |
$name_of_block = preg_replace("/^$subtype_prefix_hyphen/", '', $prefixed_name, 1);
|
|
2061 | 2071 |
|
2062 | 2072 |
// Check for user added menus created at /admin/structure/menu/add |
2063 | 2073 |
// menus of that type have a subtype that is prefixed with menu-menu-. |
Formats disponibles : Unified diff
Weekly update of contrib modules