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/forms/add.php | 10 +- views/default/forms/browsetube.php | 2 +- views/default/object/videolist.php | 75 +++++-------- views/default/staticvideo/index.php | 16 +-- views/default/videolist/css.php | 116 +++++---------------- views/default/videolist/groupprofile_videolist.php | 1 - views/default/videolist/videoprofile.php | 0 7 files changed, 58 insertions(+), 162 deletions(-) delete mode 100644 views/default/videolist/videoprofile.php (limited to 'views') diff --git a/views/default/forms/add.php b/views/default/forms/add.php index 2da5353b7..3933af251 100644 --- a/views/default/forms/add.php +++ b/views/default/forms/add.php @@ -116,8 +116,7 @@ if(isset($confirm_action) && ($confirm_action == 'add_video')) { $_SESSION['videolisttags'] = $tags; $_SESSION['Pagecontainer'] = $Pagecontainer; $_SESSION['container_guid'] = $container_guid; - //echo $_SESSION['candidate_profile_video']; - $url = "action/videolist/addvideo?__elgg_ts={$timestamp}&__elgg_token={$token}"; + $url = "action/videolist/add?__elgg_ts={$timestamp}&__elgg_token={$token}"; forward($url); } else @@ -128,9 +127,7 @@ if(isset($confirm_action) && ($confirm_action == 'add_video')) { } } -$body = '
'; - -$body .= '
'; +$body = ''; $body .= elgg_view('input/hidden',array('internalname'=>'video_action', 'value'=>'add_video')); $body .= elgg_view('input/hidden',array('internalname'=>'guid', 'value'=>$vars['guid'])); @@ -151,6 +148,5 @@ $body .= elgg_view('input/access',array('internalname'=>'access_id', 'value' => $body .= '

'; $body .= elgg_view('input/submit', array('internalname'=>'submit','value'=>elgg_echo('videolist:submit'))); $body .= '
'; -$body .= '
'; -print $body."

"; +print $body; diff --git a/views/default/forms/browsetube.php b/views/default/forms/browsetube.php index 0a54f0d10..52c8145a0 100644 --- a/views/default/forms/browsetube.php +++ b/views/default/forms/browsetube.php @@ -243,7 +243,7 @@ function InsertVideoUrl(param, param2){ var elggToken = ""; $.ajax({ type: "GET", - url: ""+"action/videolist/addvideo", + url: ""+"action/videolist/add", data: "bustcache="+new Date().getTime()+"&__elgg_ts="+elggTS+"&__elgg_token="+elggToken+"&video_action="+actionAction+"&title_videourl="+param+"&videolisttags="+param2+"&access_id="+access_id, success: function(html){ $("#loadingSearch").html(""); 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 diff --git a/views/default/staticvideo/index.php b/views/default/staticvideo/index.php index 256eb5b92..d8619917e 100644 --- a/views/default/staticvideo/index.php +++ b/views/default/staticvideo/index.php @@ -37,22 +37,16 @@ if(!empty($owner_videos)) { $videodiv .= "
"; $videodiv .= elgg_view("output/confirmlink", array( - 'href' => $vars['url'] . "action/videolist/remove?video_id=" . $video_guid, - 'text' => elgg_echo('delete'), - 'confirm' => elgg_echo('deleteconfirm'), - )); - /* - $videodiv .= ""; - $videodiv .= "delete"; - $videodiv .= ""; - */ + 'href' => $vars['url'] . "action/videolist/remove?video_id=" . $video_guid, + 'text' => elgg_echo('delete'), + 'confirm' => elgg_echo('deleteconfirm'), + )); $videodiv .= "
"; - $videodiv .= "
"; } print $videodiv; } else { - echo "No videos were found."; + echo "

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

"; } ?> diff --git a/views/default/videolist/css.php b/views/default/videolist/css.php index e2b9250b3..0b181458e 100644 --- a/views/default/videolist/css.php +++ b/views/default/videolist/css.php @@ -13,8 +13,31 @@ .videolist_error{ color:red; font-weight:bold; - font-size:11px; } + +/* video listing */ +.video_entity .entity_listing:first-child { + border-top:0; +} +.entity_listing_icon .video_icon { + width:150px; + height:95px; + display:table-cell; + text-align:center; + vertical-align: middle; + background-color: black; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; +} +.video_entity .entity_listing_info { + width:560px; + margin-left:15px; +} + + + + +/* /////////////////////////////////////////// @todo clean up / update rules below */ #video-list-main{ padding:10px; } @@ -22,9 +45,6 @@ width:100%; margin-bottom:10px; } -.search_gallery_item{ - border:0px solid #CCCCCC; -} #videobox{ width:98%; text-align:center; @@ -39,69 +59,6 @@ margin:0px 5px 0px 8px; float:left; } -#videothumbnail-box{ - float:left; - width:35%; - background: #333333; - text-align:center; - padding:3px 1px 3px 0px; -} -#videotitle-box{ - width:60%; - float:left; - font-size:12px; - font-weight:bold; - text-align:left; - padding-left:5px; - color:#474B9F; -} -.title{ - font-weight:bold; -} -#profile_video_widget_container{ - margin:0px 10px 10px 10px; - padding:8px; - -moz-border-radius-topleft:8px; - -moz-border-radius-topright:8px; - -moz-border-radius-bottomleft:8px; - -moz-border-radius-bottomright:8px; - border:0px solid #C3C3C3; - background: #FFFFFF; - max-height:250px; - overflow-y:auto; -} -#profile_video_image_container{ - float:left; - width:95%; - margin:6px 2px 0px 6px; - border-bottom:1px solid #CCC; - padding-bottom:3px; -} - -#widget_container_header{ - color:#474B9F; - margin:0px 0px 5px 0px; - font-weight:bold; - font-size:13px; -} -#loadingSearch{ - width:100%; -} -#SearchContainer{ - width:100%; -} -#responseSearch{ - padding:15px; -} -#paginateSearch{ - -moz-border-radius-topleft:5px; - -moz-border-radius-topright:5px; - padding:2px 5px 2px 0px; - text-align:right; - background:#FFF; - border:0px solid #CCC; - color:#666; -} th{ text-align:center; font-weight:bold; @@ -141,17 +98,6 @@ th{ background:#FFFFFF; z-index:300000; } -.videolist-content{ - -moz-border-radius-topleft:5px; - -moz-border-radius-topright:5px; - -moz-border-radius-bottomleft:5px; - -moz-border-radius-bottomright:5px; - border:1px solid #C3C3C3; - width:675px; - margin:10px 0px 10px 10px; - padding:10px; - background:#FFFFFF; -} .tubesearch{ -moz-border-radius-topleft:5px; -moz-border-radius-topright:5px; @@ -159,20 +105,6 @@ th{ -moz-border-radius-bottomright:5px; border:1px solid #666666; } -#comment_area_video_title{ - padding:10px; - -moz-border-radius-topleft:5px; - -moz-border-radius-topright:5px; - -moz-border-radius-bottomleft:5px; - -moz-border-radius-bottomright:5px; - border:1px solid #CCCCCC; - border:1px solid #CCCCCC; - background:#FFFFFF; -} -.vid-comment-widget{ - font-size:11px; - font-weight:normal; -} .searchvideorow{ padding:10px; -moz-border-radius-topleft:5px; diff --git a/views/default/videolist/groupprofile_videolist.php b/views/default/videolist/groupprofile_videolist.php index d89b8e566..2151a8f87 100644 --- a/views/default/videolist/groupprofile_videolist.php +++ b/views/default/videolist/groupprofile_videolist.php @@ -56,5 +56,4 @@ if ($videos) { } ?> -
diff --git a/views/default/videolist/videoprofile.php b/views/default/videolist/videoprofile.php deleted file mode 100644 index e69de29bb..000000000 -- cgit v1.2.3