aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorPete Harris <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-29 16:59:14 +0000
committerPete Harris <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-29 16:59:14 +0000
commitdd489f623628930e527e8112142576bb0de24b57 (patch)
tree553f57964d3995b61c4cb1d0dfeaeb405e370a3d /views
parente8123c694c232509ea0c96ab19edf7cb1168b571 (diff)
downloadelgg-dd489f623628930e527e8112142576bb0de24b57.tar.gz
elgg-dd489f623628930e527e8112142576bb0de24b57.tar.bz2
Beginnings of updating VideoList to v1.8 interface, edit, delete, favorite added. Amongst other updates Friends view and breadcrumbs added.
Diffstat (limited to 'views')
-rw-r--r--views/default/forms/add.php10
-rw-r--r--views/default/forms/browsetube.php2
-rw-r--r--views/default/object/videolist.php75
-rw-r--r--views/default/staticvideo/index.php16
-rw-r--r--views/default/videolist/css.php116
-rw-r--r--views/default/videolist/groupprofile_videolist.php1
-rw-r--r--views/default/videolist/videoprofile.php0
7 files changed, 58 insertions, 162 deletions
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 = '<div class="videolist-content">';
-
-$body .= '<form action="'.$_SERVER['php_self'].'" method="post">';
+$body = '<form action="'.$_SERVER['php_self'].'" method="post" class="margin_top">';
$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 .= '</label></p>';
$body .= elgg_view('input/submit', array('internalname'=>'submit','value'=>elgg_echo('videolist:submit')));
$body .= '</form>';
-$body .= '</div>';
-print $body."<br /><br />";
+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 = "<?php echo generate_action_token(time()); ?>";
$.ajax({
type: "GET",
- url: "<?php echo $vars['url']; ?>"+"action/videolist/addvideo",
+ url: "<?php echo $vars['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 .= "<div class=\"filerepo_gallery_item\">";
- $videodiv .= "<div id='videobox'>";
- $videodiv .= $title."<br />";
- $videodiv .= "<a href='".$watch_URL."'>";
- $videodiv .= "<img src='".$thumbnail."' width='120' class='tubesearch'/>";
- $videodiv .= "</a>";
-
- $videodiv .= "</div>";
- //$videodiv .= "<div id='videoDescbox'>";
- //$videodiv .= "<span class='title'>".elgg_echo('videolist:videoTitle')." : </span>".$title."<br />";
- //$videodiv .= "</div>";
-
- $numcomments = elgg_count_comments($video_file);
- $videodiv .= "<div id='videoActionbox'>";
-
- if ($numcomments) {
- $videodiv .= "<a href=\"{$watch_URL}\">" . sprintf(elgg_echo("comments")) . " (" . $numcomments . ")</a> <br />";
- }
-
- if($video_file->canEdit()) {
- $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 .= "</div></div>";
- $videodiv .= "<div class=\"clearfloat\"></div>";
- print $videodiv;
- } else if(get_input('show_viewtype') == "all") {
- $info .= '<p><a href="' .$watch_URL. '">'.$title.'</a></p>';
- $info .= "<p class=\"owner_timestamp\"><a href=\"{$vars['url']}pg/profile/{$owner->username}\">{$owner->name}</a> {$friendlytime}";
+
+ $object_acl = get_readable_access_level($video_file->access_id);
+ // metadata block, - access level, edit, delete, + options view extender
+ $info = "<div class='entity_metadata'><span class='access_level'>" . $object_acl . "</span>";
+
+ // view for plugins to extend
+ $info .= elgg_view('videolist/options', array('entity' => $video_file));
+
+ // include edit and delete options
+ if ($owner->canEdit()) {
+ $info .= "<span class='entity_edit'><a href=\"{$vars['url']}mod/videolist/edit.php?file_guid={$video_guid}\">" . elgg_echo('edit') . "</a></span>";
+ $info .= "<span class='delete_button'>" . elgg_view('output/confirmlink',array('href' => $vars['url'] . "action/videolist/delete?file=" . $video_guid, 'text' => elgg_echo("delete"),'confirm' => elgg_echo("videolist:delete:confirm"),)). "</span>";
+ }
+ $info .= "</div>";
+
+ if(get_input('show_viewtype') == "all") {
+ $info .= '<p class="entity_title"><a href="' .$watch_URL. '">'.$title.'</a></p>';
+ $info .= "<p class='entity_subtext'><a href=\"{$vars['url']}pg/profile/{$owner->username}\">{$owner->name}</a> {$friendlytime}";
$info .= "</p>";
- $icon = "<a href=\"{$watch_URL}\">" . elgg_view("videolist/icon", array("mimetype" => $mime, 'thumbnail' => $thumbnail, 'video_guid' => $video_guid, 'size' => 'small')) . "</a>";
-
- echo elgg_view_listing($icon, $info);
+ $icon = "<a class='video_icon' href=\"{$watch_URL}\">" . elgg_view("videolist/icon", array("mimetype" => $mime, 'thumbnail' => $thumbnail, 'video_guid' => $video_guid, 'size' => 'small')) . "</a>";
+ echo "<div class='video_entity'>".elgg_view_listing($icon, $info)."</div>";
} else {
- /*
- $videodiv .= "<a href='".$vars['url']."pg/videolist/watch/".$video_guid."'>";
- $videodiv .= "<img src='http://img.youtube.com/vi/".$video_id."/default.jpg' width='50' alt='unable to fetch image'/>";
- $videodiv .= "</a> &nbsp;&nbsp;<a href='".$vars['url']."pg/videolist/watch/".$video_guid."'><span class='title'>Title : </span>".$title;
- $videodiv .= "</a><br />";
- */
- //video list-entity view
- $info = '<p><a href="' .$watch_URL. '">'.$title.'</a></p>';
- $info .= "<p class=\"owner_timestamp\"><a href=\"{$vars['url']}pg/profile/{$owner->username}\">{$owner->name}</a> {$friendlytime}";
+ $info .= '<p class="entity_title"><a href="' .$watch_URL. '">'.$title.'</a></p>';
+ $info .= "<p class='entity_subtext'><a href=\"{$vars['url']}pg/profile/{$owner->username}\">{$owner->name}</a> {$friendlytime}";
$info .= "</p>";
- $icon = "<a href=\"{$watch_URL}\">" . elgg_view("videolist/icon", array("mimetype" => $mime, 'thumbnail' => $thumbnail, 'video_guid' => $video_guid, 'size' => 'small')) . "</a>";
-
- echo elgg_view_listing($icon, $info);
+ $icon = "<a class='video_icon' href=\"{$watch_URL}\">" . elgg_view("videolist/icon", array("mimetype" => $mime, 'thumbnail' => $thumbnail, 'video_guid' => $video_guid, 'size' => 'small')) . "</a>";
+ echo "<div class='video_entity'>".elgg_view_listing($icon, $info)."</div>";
}
} else {
- echo "No videos were found.";
+ echo "<p class='margin_top'>".elgg_echo('videolist:none:found')."</p>";
} \ 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 .= "<div id='videoActionbox'>";
$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 .= "<a href='".$vars['url']."pg/videolist/remove/".$video_id."'>";
- $videodiv .= "delete";
- $videodiv .= "</a>";
- */
+ 'href' => $vars['url'] . "action/videolist/remove?video_id=" . $video_guid,
+ 'text' => elgg_echo('delete'),
+ 'confirm' => elgg_echo('deleteconfirm'),
+ ));
$videodiv .= "</div>";
- $videodiv .= "<div class=\"clearfloat\"></div>";
}
print $videodiv;
} else {
- echo "No videos were found.";
+ echo "<p class='margin_top'>".elgg_echo('videolist:none:found')."</p>";
}
?>
</div>
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) {
}
?>
-<div class="clearfloat" /></div>
</div>
diff --git a/views/default/videolist/videoprofile.php b/views/default/videolist/videoprofile.php
deleted file mode 100644
index e69de29bb..000000000
--- a/views/default/videolist/videoprofile.php
+++ /dev/null