diff options
author | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-22 09:09:24 +0000 |
---|---|---|
committer | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-22 09:09:24 +0000 |
commit | d42771b8a74e665d33d29e7ce3b1612890a596f2 (patch) | |
tree | c592cc077c2d391d120a344ee17553e249676484 /mod/groups | |
parent | f8797c313b9500e5d6af512786412601d7d641f0 (diff) | |
download | elgg-d42771b8a74e665d33d29e7ce3b1612890a596f2.tar.gz elgg-d42771b8a74e665d33d29e7ce3b1612890a596f2.tar.bz2 |
Touch ups of groups plugin
git-svn-id: http://code.elgg.org/elgg/trunk@8426 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/groups')
13 files changed, 50 insertions, 49 deletions
diff --git a/mod/groups/lib/groups.php b/mod/groups/lib/groups.php index 8faba3179..a6f262c09 100644 --- a/mod/groups/lib/groups.php +++ b/mod/groups/lib/groups.php @@ -302,7 +302,7 @@ function groups_handle_invite_page($guid) { $title = elgg_echo('groups:invite'); if ($group && $group->canEdit()) { - $content = elgg_view('forms/groups/invite', array('entity' => $group)); + $content = elgg_view_form('groups/invite', array('id' => 'invite_to_group', 'class' => 'mtm', array('entity' => $group))); } else { $content .= elgg_echo('groups:noaccess'); } diff --git a/mod/groups/views/default/forms/groups/delete.php b/mod/groups/views/default/forms/groups/delete.php index 4c380718a..85379a342 100644 --- a/mod/groups/views/default/forms/groups/delete.php +++ b/mod/groups/views/default/forms/groups/delete.php @@ -11,7 +11,7 @@ echo elgg_view('input/hidden', array( )); echo elgg_view('input/submit', array( - 'class' => "elgg-button-cancel", + 'class' => "elgg-button elgg-button-delete", 'value' => elgg_echo('groups:delete'), - 'onclick' => "javascript:return confirm('$warning')", + 'onclick' => "return confirm('$warning');", )); diff --git a/mod/groups/views/default/forms/groups/invite.php b/mod/groups/views/default/forms/groups/invite.php index 73eadb024..d3bcfe580 100644 --- a/mod/groups/views/default/forms/groups/invite.php +++ b/mod/groups/views/default/forms/groups/invite.php @@ -1,29 +1,20 @@ <?php - /** - * Elgg groups plugin - * - * @package ElggGroups - */ +/** + * Elgg groups plugin + * + * @package ElggGroups + */ - $group = $vars['entity']; - $owner = get_entity($vars['entity']->owner_guid); - $forward_url = $group->getURL(); - $friends = elgg_get_logged_in_user_entity()->getFriends('', 0); +$group = $vars['entity']; +$owner = get_entity($vars['entity']->owner_guid); +$forward_url = $group->getURL(); +$friends = elgg_get_logged_in_user_entity()->getFriends('', 0); if ($friends) { -?> -<form action="<?php echo elgg_get_site_url(); ?>action/groups/invite" method="post" id="invite_to_group" class="margin-top"> - -<?php - echo elgg_view('input/securitytoken'); - - echo elgg_view('core/friends/picker',array('entities' => $friends, 'name' => 'user_guid', 'highlight' => 'all')); -?> - <input type="hidden" name="forward_url" value="<?php echo $forward_url; ?>" /> - <input type="hidden" name="group_guid" value="<?php echo $group->guid; ?>" /> - <input type="submit" value="<?php echo elgg_echo('invite'); ?>" /> -</form> -<?php + echo elgg_view('core/friends/picker', array('entities' => $friends, 'name' => 'user_guid', 'highlight' => 'all')); + echo elgg_view('input/hidden', array('name' => 'forward_url', 'value' => $forward_url)); + echo elgg_view('input/hidden', array('name' => 'group_guid', 'value' => $group->guid)); + echo elgg_view('input/submit', array('value' => elgg_echo('invite'))); } else { echo elgg_echo('groups:nofriendsatall'); }
\ No newline at end of file diff --git a/mod/groups/views/default/forms/groups/search.php b/mod/groups/views/default/forms/groups/search.php index 8912b245c..058a1c11c 100644 --- a/mod/groups/views/default/forms/groups/search.php +++ b/mod/groups/views/default/forms/groups/search.php @@ -4,7 +4,7 @@ $tag_string = elgg_echo('groups:search:tags'); $params = array( 'name' => 'tag', - 'class' => 'search-input', + 'class' => 'elgg-input-search', 'value' => $tag_string, 'onclick' => "if (this.value=='$tag_string') { this.value='' }", ); diff --git a/mod/groups/views/default/groups/css.php b/mod/groups/views/default/groups/css.php index 93e15337f..5276e2bfa 100644 --- a/mod/groups/views/default/groups/css.php +++ b/mod/groups/views/default/groups/css.php @@ -46,10 +46,10 @@ padding-bottom:40px; border-bottom:1px solid #CCCCCC; } -.entity-listing.topic .topic_post p { +.elgg-image-block.topic .topic_post p { margin:10px 0 5px 0; } -.entity-listing.topic:hover { +.elgg-image-block.topic:hover { background-color: white; } @@ -160,8 +160,8 @@ padding:0; } -/* override default entity-listing-info width */ -.group_tool_widget .entity-listing-info { +/* override default elgg-body width */ +.group_tool_widget .elgg-body { width:315px; } .group_widget_link { diff --git a/mod/groups/views/default/groups/group_sort_menu.php b/mod/groups/views/default/groups/group_sort_menu.php index 78a9e72cd..6ba56628e 100644 --- a/mod/groups/views/default/groups/group_sort_menu.php +++ b/mod/groups/views/default/groups/group_sort_menu.php @@ -6,12 +6,12 @@ $group_count = (int)elgg_get_entities(array('types' => 'group', 'count' => true)); $selected = elgg_extract('selected', $vars); - - //url - $url = elgg_get_site_url() . "pg/groups/all/"; + + //url + $url = elgg_get_site_url() . "pg/groups/all/"; ?> -<div class="elgg-tabs margin-top"> +<div class="elgg-tabs mtm"> <div class="group_count"><?php echo $group_count . " " . elgg_echo("groups:count"); ?></div> <ul> <li <?php if($selected == "newest") echo "class='selected'"; ?>><a href="<?php echo $url; ?>?filter=newest"><?php echo elgg_echo('groups:newest'); ?></a></li> diff --git a/mod/groups/views/default/groups/invitationrequests.php b/mod/groups/views/default/groups/invitationrequests.php index b6dcdfc22..77dabaac2 100644 --- a/mod/groups/views/default/groups/invitationrequests.php +++ b/mod/groups/views/default/groups/invitationrequests.php @@ -6,9 +6,9 @@ if (!empty($vars['invitations']) && is_array($vars['invitations'])) { if ($group instanceof ElggGroup) { ?> - <div class="entity-listing group_invitations clearfix"> + <div class="elgg-image-block group_invitations clearfix"> <?php - echo "<div class='entity-listing-icon'>"; + echo "<div class='elgg-image'>"; echo elgg_view("profile/icon", array( 'entity' => $group, 'size' => 'tiny', @@ -17,8 +17,8 @@ if (!empty($vars['invitations']) && is_array($vars['invitations'])) { $url = elgg_add_action_tokens_to_url(elgg_get_site_url()."action/groups/join?user_guid={$user->guid}&group_guid={$group->guid}"); ?> - <div class="entity-listing-info"> - <a href="<?php echo $url; ?>" class="elgg-button-submit"><?php echo elgg_echo('accept'); ?></a> + <div class="elgg-body"> + <a href="<?php echo $url; ?>" class="elgg-button elgg-button-submit"><?php echo elgg_echo('accept'); ?></a> <?php echo str_replace('<a', '<a class="elgg-button-action elgg-state-disabled" ', elgg_view('output/confirmlink',array( 'href' => "action/groups/killinvitation?user_guid={$user->getGUID()}&group_guid={$group->getGUID()}", @@ -35,6 +35,6 @@ if (!empty($vars['invitations']) && is_array($vars['invitations'])) { } } else { - echo "<p class='default_string margin-top'>" . elgg_echo('groups:invitations:none') . "</p>"; + echo "<p class='default_string mtm'>" . elgg_echo('groups:invitations:none') . "</p>"; } ?>
\ No newline at end of file diff --git a/mod/groups/views/default/groups/membershiprequests.php b/mod/groups/views/default/groups/membershiprequests.php index 43058e89f..8d4fe5c88 100644 --- a/mod/groups/views/default/groups/membershiprequests.php +++ b/mod/groups/views/default/groups/membershiprequests.php @@ -6,9 +6,9 @@ if ($request instanceof ElggUser) { ?> - <div class="entity-listing group_invitations clearfix"> + <div class="elgg-image-block group_invitations clearfix"> <?php - echo "<div class='entity-listing-icon'>"; + echo "<div class='elgg-image'>"; echo elgg_view("profile/icon", array( 'entity' => $request, 'size' => 'small', @@ -18,7 +18,7 @@ $url = elgg_add_action_tokens_to_url(elgg_get_site_url()."action/groups/addtogroup?user_guid={$request->guid}&group_guid={$vars['entity']->guid}"); ?> - <div class="entity-listing-info"> + <div class="elgg-body"> <a href="<?php echo $url; ?>" class="elgg-button-submit"><?php echo elgg_echo('accept'); ?></a> <?php echo str_replace('<a', '<a class="elgg-button-action elgg-state-disabled" ', elgg_view('output/confirmlink',array( diff --git a/mod/groups/views/default/groups/profile/activity_module.php b/mod/groups/views/default/groups/profile/activity_module.php index 58bf25095..60a8e025c 100644 --- a/mod/groups/views/default/groups/profile/activity_module.php +++ b/mod/groups/views/default/groups/profile/activity_module.php @@ -40,7 +40,14 @@ echo elgg_view_module('info', '', $content, array('header' => $header)); return true; ?> -<span class="group_widget_link"><a href="<?php echo elgg_get_site_url() . "pg/groups/activity/" . elgg_get_page_owner_guid(); ?>"><?php echo elgg_echo('link:view:all')?></a></span> +<span class="group_widget_link"> +<?php + echo elgg_view('output/url', array( + 'href' => "pg/groups/activity/" . elgg_get_page_owner_guid(), + 'text' => elgg_echo('link:view:all'), + )); +?> +</span> <h3><?php echo elgg_echo("activity"); ?></h3> <?php $owner = elgg_get_page_owner_entity(); @@ -54,6 +61,7 @@ return true; $offset = (int) $offset; $group_guid = (int) $group_guid; + //@todo Holy cow, this really needs to be a function! $sql = "SELECT {$CONFIG->dbprefix}river.id, {$CONFIG->dbprefix}river.type, {$CONFIG->dbprefix}river.subtype, {$CONFIG->dbprefix}river.action_type, {$CONFIG->dbprefix}river.access_id, {$CONFIG->dbprefix}river.view, {$CONFIG->dbprefix}river.subject_guid, {$CONFIG->dbprefix}river.object_guid, {$CONFIG->dbprefix}river.posted FROM {$CONFIG->dbprefix}river INNER JOIN {$CONFIG->dbprefix}entities AS entities1 ON {$CONFIG->dbprefix}river.object_guid = entities1.guid INNER JOIN {$CONFIG->dbprefix}entities AS entities2 ON entities1.container_guid = entities2.guid WHERE entities2.guid = $group_guid OR {$CONFIG->dbprefix}river.object_guid = $group_guid ORDER BY posted DESC limit {$offset},{$limit}"; $items = get_data($sql); diff --git a/mod/groups/views/default/groups/profile/buttons.php b/mod/groups/views/default/groups/profile/buttons.php index 31df7a5b5..0aef3920b 100644 --- a/mod/groups/views/default/groups/profile/buttons.php +++ b/mod/groups/views/default/groups/profile/buttons.php @@ -3,6 +3,8 @@ * Content header action buttons * * @uses $vars['entity'] + * + * @todo This should be done by registering menu items with the page actions menu */ if (!elgg_is_logged_in()) { @@ -47,7 +49,7 @@ if ($actions) { echo elgg_view('output/url', array( 'text' => $action, 'href' => $url, - 'class' => 'elgg-button-action', + 'class' => 'elgg-button elgg-button-action', )); } } diff --git a/mod/groups/views/default/groups/profile/profile_block.php b/mod/groups/views/default/groups/profile/profile_block.php index a0d41ba14..aec8fc6cd 100644 --- a/mod/groups/views/default/groups/profile/profile_block.php +++ b/mod/groups/views/default/groups/profile/profile_block.php @@ -18,8 +18,8 @@ $owner = $group->getOwnerEntity(); $profile_fields = elgg_get_config('group'); ?> -<div class="group_profile clearfix"> - <div class="group_profile_column icon"> +<div class="group_profile clearfix elgg-image-block"> + <div class="group_profile_column elgg-image"> <div class="group_profile_icon"> <?php echo elgg_view_entity_icon($group, 'large', array('href' => '')); ?> </div> @@ -41,7 +41,7 @@ $profile_fields = elgg_get_config('group'); </div> </div> - <div class="group_profile_column info"> + <div class="group_profile_column elgg-body"> <?php if (is_array($profile_fields) && count($profile_fields) > 0) { diff --git a/mod/groups/views/default/groups/profile/widgets.php b/mod/groups/views/default/groups/profile/widgets.php index 76fa08647..08cbf1dae 100644 --- a/mod/groups/views/default/groups/profile/widgets.php +++ b/mod/groups/views/default/groups/profile/widgets.php @@ -16,7 +16,7 @@ echo "</div>"; <?php //@todo JS 1.8: no ?> <script type="text/javascript"> -$(document).ready(function () { // subclass every other group tool widget +$(function () { // subclass every other group tool widget $('#group_tools_latest').find('.group_tool_widget:odd').addClass('odd'); }); </script> diff --git a/mod/groups/views/default/groups/sidebar/members.php b/mod/groups/views/default/groups/sidebar/members.php index 711b99f34..669d2c6bd 100644 --- a/mod/groups/views/default/groups/sidebar/members.php +++ b/mod/groups/views/default/groups/sidebar/members.php @@ -13,7 +13,7 @@ $all_link = elgg_view('output/url', array( $body = '<div class="clearfix">'; $members = $vars['entity']->getMembers(10); foreach ($members as $mem) { - $body .= "<div class='member_icon'><a href=\"" . $mem->getURL() . "\">" . elgg_view("profile/icon", array('entity' => $mem, 'size' => 'tiny', 'override' => 'true')) . "</a></div>"; + $body .= "<div class='member_icon'><a href=\"{$mem->getURL()}\">" . elgg_view_entity_icon($mem, 'tiny', array('override' => 'true')) . "</a></div>"; } $body .= '</div>'; $body .= "<div class='center mts'>$all_link</div>"; |