From dd489f623628930e527e8112142576bb0de24b57 Mon Sep 17 00:00:00 2001 From: Pete Harris Date: Mon, 29 Mar 2010 16:59:14 +0000 Subject: Beginnings of updating VideoList to v1.8 interface, edit, delete, favorite added. Amongst other updates Friends view and breadcrumbs added. --- views/default/object/videolist.php | 75 +++++++++++++------------------------- 1 file changed, 25 insertions(+), 50 deletions(-) (limited to 'views/default/object/videolist.php') diff --git a/views/default/object/videolist.php b/views/default/object/videolist.php index b3c070495..4563f04b4 100644 --- a/views/default/object/videolist.php +++ b/views/default/object/videolist.php @@ -23,59 +23,34 @@ if(!empty($video_file)) { $mime = "image/html"; $thumbnail = $videothumbnail; $watch_URL = $vars['url']."pg/videolist/watch/".$video_guid; - if (get_input('search_viewtype') == "gallery") { - $videodiv .= ""; - $videodiv .= "
"; - print $videodiv; - } else if(get_input('show_viewtype') == "all") { - $info .= '

'.$title.'

'; - $info .= "

username}\">{$owner->name} {$friendlytime}"; + + $object_acl = get_readable_access_level($video_file->access_id); + // metadata block, - access level, edit, delete, + options view extender + $info = "

" . $object_acl . ""; + + // view for plugins to extend + $info .= elgg_view('videolist/options', array('entity' => $video_file)); + + // include edit and delete options + if ($owner->canEdit()) { + $info .= "" . elgg_echo('edit') . ""; + $info .= "" . elgg_view('output/confirmlink',array('href' => $vars['url'] . "action/videolist/delete?file=" . $video_guid, 'text' => elgg_echo("delete"),'confirm' => elgg_echo("videolist:delete:confirm"),)). ""; + } + $info .= "
"; + + if(get_input('show_viewtype') == "all") { + $info .= '

'.$title.'

'; + $info .= "

username}\">{$owner->name} {$friendlytime}"; $info .= "

"; - $icon = "" . elgg_view("videolist/icon", array("mimetype" => $mime, 'thumbnail' => $thumbnail, 'video_guid' => $video_guid, 'size' => 'small')) . ""; - - echo elgg_view_listing($icon, $info); + $icon = "" . elgg_view("videolist/icon", array("mimetype" => $mime, 'thumbnail' => $thumbnail, 'video_guid' => $video_guid, 'size' => 'small')) . ""; + echo "
".elgg_view_listing($icon, $info)."
"; } else { - /* - $videodiv .= ""; - $videodiv .= "unable to fetch image"; - $videodiv .= "   Title : ".$title; - $videodiv .= "
"; - */ - //video list-entity view - $info = '

'.$title.'

'; - $info .= "

username}\">{$owner->name} {$friendlytime}"; + $info .= '

'.$title.'

'; + $info .= "

username}\">{$owner->name} {$friendlytime}"; $info .= "

"; - $icon = "" . elgg_view("videolist/icon", array("mimetype" => $mime, 'thumbnail' => $thumbnail, 'video_guid' => $video_guid, 'size' => 'small')) . ""; - - echo elgg_view_listing($icon, $info); + $icon = "" . elgg_view("videolist/icon", array("mimetype" => $mime, 'thumbnail' => $thumbnail, 'video_guid' => $video_guid, 'size' => 'small')) . ""; + echo "
".elgg_view_listing($icon, $info)."
"; } } else { - echo "No videos were found."; + echo "

".elgg_echo('videolist:none:found')."

"; } \ No newline at end of file -- cgit v1.2.3