aboutsummaryrefslogtreecommitdiff
path: root/pages/videolist/add.php
blob: 6dd6a2f1fd29725b47bb123cadbd262dddf8161d (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
<?php
/**
 * Add a new video
 *
 * @package ElggVideolist
 */

$page_owner = elgg_get_page_owner_entity();

gatekeeper();
group_gatekeeper();

$title = elgg_echo('videolist:add');

// set up breadcrumbs
elgg_push_breadcrumb(elgg_echo('videolist'), "file/all");
if (elgg_instanceof($page_owner, 'user')) {
	elgg_push_breadcrumb($page_owner->name, "videolist/owner/$page_owner->username");
} else {
	elgg_push_breadcrumb($page_owner->name, "videolist/group/$page_owner->guid/all");
}
elgg_push_breadcrumb($title);

// create form
$form_vars = array();
$body_vars = array(
	'container_guid' => $page_owner->guid,
	'access_id' => elgg_instanceof($page_owner, 'user') ? ACCESS_DEFAULT : $page_owner->group_acl,
);

$content = elgg_view_form('videolist/edit', $form_vars, $body_vars);

$body = elgg_view_layout('content', array(
	'content' => $content,
	'title' => $title,
	'filter' => '',
));

echo elgg_view_page($title, $body);