From 2c9ea2cd34a1dd782e165b163899d7ba1ec1f41c Mon Sep 17 00:00:00 2001 From: pete Date: Tue, 9 Mar 2010 18:17:16 +0000 Subject: Blogs updated to new UI (needs Brett to look over first) git-svn-id: http://code.elgg.org/elgg/trunk@5335 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/blog/views/default/object/blog.php | 311 +++++++++++++++++---------------- 1 file changed, 161 insertions(+), 150 deletions(-) (limited to 'mod/blog/views/default/object/blog.php') diff --git a/mod/blog/views/default/object/blog.php b/mod/blog/views/default/object/blog.php index 898705911..8a7cd52b8 100644 --- a/mod/blog/views/default/object/blog.php +++ b/mod/blog/views/default/object/blog.php @@ -1,150 +1,161 @@ - - * @copyright Curverider Ltd 2008-2010 - * @link http://elgg.com/ - * - * @uses $vars['entity'] Optionally, the blog post to view - */ - - if (isset($vars['entity'])) { - - //display comments link? - if ($vars['entity']->comments_on == 'Off') { - $comments_on = false; - } else { - $comments_on = true; - } - - if (get_context() == "search" && $vars['entity'] instanceof ElggObject) { - - //display the correct layout depending on gallery or list view - if (get_input('search_viewtype') == "gallery") { - - //display the gallery view - echo elgg_view("blog/gallery",$vars); - - } else { - - echo elgg_view("blog/listing",$vars); - - } - - - } else { - - if ($vars['entity'] instanceof ElggObject) { - - $url = $vars['entity']->getURL(); - $owner = $vars['entity']->getOwnerEntity(); - $canedit = $vars['entity']->canEdit(); - - } else { - - $url = 'javascript:history.go(-1);'; - $owner = $vars['user']; - $canedit = false; - - } -?> - -
- -
-

title; ?>

- -
- $owner, 'size' => 'tiny')); - ?> -
-

- time_created) - ); - - ?> - name; ?>   - - -
- -

- - $vars['entity']->tags)); - if (!empty($tags)) { - echo '

' . $tags . '

'; - } - - $categories = elgg_view('categories/view', $vars); - if (!empty($categories)) { - echo '

' . $categories . '

'; - } - - ?> -
-
- - - $vars['entity']->description)); - - ?> -
- -

- -   - $vars['url'] . "action/blog/delete?blogpost=" . $vars['entity']->getGUID(), - 'text' => elgg_echo('delete'), - 'confirm' => elgg_echo('deleteconfirm'), - )); - - // Allow the menu to be extended - echo elgg_view("editmenu",array('entity' => $vars['entity'])); - - ?> - -

-
-
- - +comments_on == 'Off') { + $comments_on = false; + } else { + $comments_on = true; + } + if (get_context() == "search" && $vars['entity'] instanceof ElggObject) { + //display the correct layout depending on gallery or list view + if (get_input('search_viewtype') == "gallery") { + //display the gallery view + echo elgg_view("blog/gallery",$vars); + } else { + echo elgg_view("blog/listing",$vars); + } + } else { + if ($vars['entity'] instanceof ElggObject) { + $url = $vars['entity']->getURL(); + $owner = $vars['entity']->getOwnerEntity(); + $canedit = $vars['entity']->canEdit(); + } else { + $url = 'javascript:history.go(-1);'; + $owner = $vars['user']; + $canedit = false; + } + +?> + + + +
+
+ $vars['entity'])); + ?> +
+

title; ?>

+
+ +
+ $owner, 'size' => 'tiny')); + ?> +
+

+ + name; ?> + + time_created) + ); + + ?> + + + + access_id); + //files with these access level don't need an icon + $general_access = array('Public', 'Logged in users', 'Friends'); + //set the right class for access level display - need it to set on groups and shared access only + $is_group = get_entity($vars['entity']->container_guid); + if($is_group instanceof ElggGroup){ + //get the membership type open/closed + $membership = $is_group->membership; + if($membership == 2) + $access_level = "class='group_open'"; + else + $access_level = "class='group_closed'"; + }elseif($object_acl == 'Private'){ + $access_level = "class='private'"; + }else{ + if(!in_array($object_acl, $general_access)) + $access_level = "class='shared_collection'"; + else + $access_level = "class='generic_access'"; + } + echo "
" . $object_acl . ""; + ?> +

+ +
+
+ + show_excerpt){ + //echo "
"; + //echo elgg_view('output/longtext',array('value' => $vars['entity']->excerpt)); + //echo "
"; + } + echo elgg_view('output/longtext',array('value' => $vars['entity']->description)); + ?> +
+ +

+ $vars['entity'])); + ?> +

+ + + $vars['entity']->tags)); + if (!empty($tags)) { + echo '

' . $tags . '

'; + } + + $categories = elgg_view('categories/view', $vars); + if (!empty($categories)) { + echo '

' . $categories . '

'; + } + + ?> + +
+
+
+" . elgg_echo('blog:none') . ""; +} \ No newline at end of file -- cgit v1.2.3