]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Added the beginnings of a bookmark view for group profile pages.
authorpete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 30 Mar 2010 19:31:37 +0000 (19:31 +0000)
committerpete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 30 Mar 2010 19:31:37 +0000 (19:31 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@5556 36083f99-b078-4883-b0ff-0f9b5a30f544

mod/bookmarks/languages/en.php
mod/bookmarks/start.php
mod/bookmarks/views/default/bookmarks/group_bookmarks.php [new file with mode: 0755]
mod/groups/views/default/groups/css.php

index 87d7772ca280466c9d3213a813ce671dc28b25ae..2ba00a8ddd571e05d034c0a7e63b4f29b8897b2d 100644 (file)
@@ -12,7 +12,7 @@ $english = array(
                'bookmarks:friends' => "Friends' bookmarks",
                'bookmarks:all' => "All site bookmarks",
                'bookmarks:user' => "%s's bookmarks",
-               'bookmarks:workgroup' => "Work Group bookmarks",
+               'bookmarks:group' => "Group bookmarks",
                'bookmarks:this' => "Bookmark this",
                'bookmarks:this:group' => "Bookmark in %s",
                'bookmarks:bookmarklet' => "Get bookmarklet",
index 3df44f724a7d073b5ce7363ca3da9f061e9f604f..9588f7a8a09a6929838ae9208be8f887f7399378 100644 (file)
@@ -42,6 +42,9 @@ function bookmarks_init() {
 
        // Add group menu option
        add_group_tool_option('bookmarks',elgg_echo('bookmarks:enablebookmarks'),true);
+       
+       // Extend Groups profile page   
+       elgg_extend_view('groups/tool_latest','bookmarks/group_bookmarks');
 
 }
 
diff --git a/mod/bookmarks/views/default/bookmarks/group_bookmarks.php b/mod/bookmarks/views/default/bookmarks/group_bookmarks.php
new file mode 100755 (executable)
index 0000000..c99ffe7
--- /dev/null
@@ -0,0 +1,36 @@
+<?php
+                       
+//grab the groups bookmarks 
+//@todo adjust so it actually grabs the group bookmarks rather than the users
+$bookmarks = get_entities('object', 'bookmarks',$vars['entity']->owner_guid, "", 6, 0, false);
+
+echo "<div class='group_tool_widget'><h3>".elgg_echo('bookmarks:group')."</h3>";
+       
+if($bookmarks){
+       foreach($bookmarks as $b){
+                       
+               //get the owner
+               $owner = $b->getOwnerEntity();
+
+               //get the time
+               $friendlytime = friendly_time($b->time_created);
+
+               //get the bookmark title
+               $info = "<div class='river_object_bookmarks_create'><p class=\"shares_title\"><a href=\"{$b->address}\">{$b->title}</a></p></div>";
+                               
+               //get the user details
+               $info .= "<p class=\"shares_timestamp\"><small>{$friendlytime} ";
+
+               //get the bookmark description
+               if($s->description)
+                       $info .= "<a href=\"javascript:void(0);\" class=\"share_more_info\">".elgg_echo('bookmarks:more')."</a></small></p><div class=\"share_desc\"><p>{$s->description}</p></div>";
+               else 
+                       $info .= "</small></p>";
+       
+               //display 
+               echo "<div class='shares_widget_content'>" . $info . "</div>";
+       } 
+} else {
+       echo "<p class='margin_top'>" . elgg_echo("bookmarks:none") . "</p>";
+}
+echo "</div>";
\ No newline at end of file
index 3bb551035c7ce9817f8593c692ba5dbbc50fd420..502c35f52114c5c14a5afc06868200314f1d270c 100644 (file)
@@ -97,6 +97,7 @@
 .group_profile.forum_latest h3 {
        border-bottom:1px solid #CCCCCC;
        padding-bottom:5px;
+       color:#555555;
 }
 
 /* tool content boxes on group profile page */
 .group_tool_widget h3 {
        border-bottom:1px solid #CCCCCC;
        padding-bottom:5px;
+       color:#555555;
 }
 /*
 .group_profile_column.right {