aboutsummaryrefslogtreecommitdiff
path: root/mod/embed/views/default/embed/layout.php
blob: 73c26810da1cd91e524ef15b64871ed99eda7aef (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
<?php
/**
 * Layout of embed panel loaded in lightbox
 */

$title =  elgg_view_title(elgg_echo('embed:media'));

$menu = elgg_view_menu('embed');

$selected = elgg_get_config('embed_tab');
switch ($selected->getData('tab_type')) {
	case 'select':
		$tab = elgg_list_entities(
				embed_get_list_options($selected->getData('options')),
				'elgg_get_entities',
				'embed_list_items'
				);
		if (!$tab) {
			$tab = elgg_echo('embed:no_section_content');
		}
		break;
	case 'upload':
		$tab = elgg_view($selected->getData('view'), $vars);
		break;
}

echo <<<HTML
<div class="embed-wrapper">
	$title
	$menu
	$tab
</div>
HTML;