blob: 8a4a804492d010f7b71d3d3e1f37f588133c5745 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
<?php
/**
* Header for theme preview pages
*
* @uses $vars['title']
* @uses $vars['page']
* @uses $vars['pages']
*/
$index_url = 'pg/theme_preview/';
$index_url = elgg_normalize_url($index_url);
$url = current_page_url();
$title = elgg_echo("theme_preview:{$vars['page']}");
$index = array_search($vars['page'], $vars['pages']);
$previous = '< previous';
if ($index > 0) {
$previous = elgg_view('output/url', array(
'href' => "pg/theme_preview/{$vars['pages'][$index - 1]}",
'text' => $previous,
));
}
$next = 'next >';
if ($index < (count($vars['pages']) - 1)) {
$next = elgg_view('output/url', array(
'href' => "pg/theme_preview/{$vars['pages'][$index + 1]}",
'text' => $next,
));
}
echo <<<HTML
<h1 class="mbs">
<a href="$index_url">Index</a> >
<a href="$url">$title</a>
</h1>
<div class="mbl">
$previous $next
</div>
HTML;
|