From a1d056d0bf0a28fc2589995b3eff66d5425dd06d Mon Sep 17 00:00:00 2001
From: Dave Tosh
Date: Wed, 26 May 2010 16:07:09 +0000
Subject: videos now work for groups
git-svn-id: http://code.elgg.org@6234 36083f99-b078-4883-b0ff-0f9b5a30f544
---
views/default/forms/add.php | 8 +++++++-
views/default/videolist/group_video_header.php | 3 ++-
2 files changed, 9 insertions(+), 2 deletions(-)
(limited to 'views/default')
diff --git a/views/default/forms/add.php b/views/default/forms/add.php
index 765bb9c09..2ee5d9c2e 100644
--- a/views/default/forms/add.php
+++ b/views/default/forms/add.php
@@ -30,6 +30,12 @@ if(page_owner_entity() instanceof ElggGroup){
}else{
$access_id = get_default_access(get_loggedin_user());
}
+//if it is a group, pull out the group access view
+if(page_owner_entity() instanceof ElggGroup){
+ $options = group_access_options(page_owner_entity());
+}else{
+ $options = '';
+}
$title_videourl = get_input('title_videourl');
$Pagecontainer = get_input('page');
$get_addvideourl = get_input('add_videourl');
@@ -149,7 +155,7 @@ $body .= elgg_view('input/tags', array('internalname' => 'videolisttags', 'value
$body .= '
';
$body .= '';
$body .= elgg_view('input/submit', array('internalname'=>'submit','value'=>elgg_echo('videolist:submit')));
$body .= '';
diff --git a/views/default/videolist/group_video_header.php b/views/default/videolist/group_video_header.php
index d3f59b773..dd12d1d96 100644
--- a/views/default/videolist/group_video_header.php
+++ b/views/default/videolist/group_video_header.php
@@ -6,7 +6,8 @@
$user = page_owner_entity();
$user_name = elgg_view_title($user->name . "'s " . elgg_echo('videos'));
$url = $CONFIG->wwwroot . "pg/videolist/browse/". $user->username . "/";
-if(isloggedin())
+//if the user is a memebr of the group, show find button
+if($user->isMember(get_loggedin_user()))
$upload_link = "" . elgg_echo('videolist:browsemenu') . '';
else
$upload_link = '';
--
cgit v1.2.3