From 5f6dc365a8445a48156b45912827eac39fd64fc5 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 16 Mar 2014 21:01:42 -0300 Subject: Squashed 'mod/subgroups/' content from commit 835015b git-subtree-dir: mod/subgroups git-subtree-split: 835015b66b9de6dc6de91ab39f95e1f09b2dbf84 --- views/default/group/default.php | 39 +++++++++++++++++++ views/default/group/elements/summary.php | 67 ++++++++++++++++++++++++++++++++ 2 files changed, 106 insertions(+) create mode 100644 views/default/group/default.php create mode 100644 views/default/group/elements/summary.php (limited to 'views/default/group') diff --git a/views/default/group/default.php b/views/default/group/default.php new file mode 100644 index 000000000..9c0356550 --- /dev/null +++ b/views/default/group/default.php @@ -0,0 +1,39 @@ + $group, + 'handler' => 'groups', + 'sort_by' => 'priority', + 'class' => 'elgg-menu-hz', +)); + +if (elgg_in_context('owner_block') || elgg_in_context('widgets')) { + $metadata = ''; +} + +if (elgg_get_context() == 'gallery') { + echo $icon; +} elseif ($vars['full_view']) { + echo elgg_view("groups/profile/profile_block", $vars); +} else { + // brief view + + $params = array( + 'entity' => $group, + 'metadata' => $metadata, + 'subtitle' => $group->briefdescription, + ); + $params = $params + $vars; + $list_body = elgg_view('group/elements/summary', $params); + + echo elgg_view_image_block($icon, $list_body, $vars); +} diff --git a/views/default/group/elements/summary.php b/views/default/group/elements/summary.php new file mode 100644 index 000000000..a95d1e296 --- /dev/null +++ b/views/default/group/elements/summary.php @@ -0,0 +1,67 @@ +title)) { + $text = $entity->title; + } else { + $text = $entity->name; + } + $params = array( + 'text' => $text, + 'href' => $entity->getURL(), + 'is_trusted' => true, + ); + $title_link = elgg_view('output/url', $params); +} + +$metadata = elgg_extract('metadata', $vars, ''); +$subtitle = elgg_extract('subtitle', $vars, ''); +$content = elgg_extract('content', $vars, ''); + +$container = get_entity($entity->container_guid); + +$tags = elgg_extract('tags', $vars, ''); +if ($tags !== false) { + $tags = elgg_view('output/tags', array('tags' => $entity->tags)); +} + +if ($metadata) { + echo $metadata; +} +if ($title_link) { + echo "

$title_link

"; +} +if(elgg_instanceof($container, 'group')) { + $container_link = elgg_view('output/url', array( + 'text' => $container->name, + 'href' => $container->getURL(), + 'is_trusted' => true, + )); + $container_link = elgg_echo('subgroups:owner:single', array($container_link)); + echo "
$container_link
"; +} +echo "
$subtitle
"; + +$subgroups = elgg_view('subgroups/subgroups_icons', array('entity' => $entity)); +echo "
$subgroups
"; + +echo $tags; + +echo elgg_view('object/summary/extend', $vars); + +if ($content) { + echo "
$content
"; +} -- cgit v1.2.3