]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Touch ups of groups plugin
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 22 Feb 2011 09:09:24 +0000 (09:09 +0000)
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 22 Feb 2011 09:09:24 +0000 (09:09 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@8426 36083f99-b078-4883-b0ff-0f9b5a30f544

13 files changed:
mod/groups/lib/groups.php
mod/groups/views/default/forms/groups/delete.php
mod/groups/views/default/forms/groups/invite.php
mod/groups/views/default/forms/groups/search.php
mod/groups/views/default/groups/css.php
mod/groups/views/default/groups/group_sort_menu.php
mod/groups/views/default/groups/invitationrequests.php
mod/groups/views/default/groups/membershiprequests.php
mod/groups/views/default/groups/profile/activity_module.php
mod/groups/views/default/groups/profile/buttons.php
mod/groups/views/default/groups/profile/profile_block.php
mod/groups/views/default/groups/profile/widgets.php
mod/groups/views/default/groups/sidebar/members.php

index 8faba3179b44828a5504db7deaa8ca155722eeb3..a6f262c091ee42599a2bde273c5b6ec4f3b28122 100644 (file)
@@ -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');
        }
index 4c380718a1aa27c1d1227dbba91e7825b36a4c57..85379a3420e12c71d999b379ade1ff438b53fa45 100644 (file)
@@ -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');",
 ));
index 73eadb0249189b6a1642aaee5fb689016ebc8aa2..d3bcfe580b9d4d2f50cc154a3f65345c1fbe804b 100644 (file)
@@ -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
index 8912b245cb6bebf378fb86669a21f7b39722e410..058a1c11c2a3460cb22e7f3ac004d5b64a5337ba 100644 (file)
@@ -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='' }",
 );
index 93e15337fa53dd0ca53566061ed16d5529e54e82..5276e2bfabd4164e33f1dd4f653c2a75a671263b 100644 (file)
        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;
 }
 
        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 {
index 78a9e72cd2224a7df0fb0e230bd751a997a6477e..6ba56628e499521b68f72db2d4c5e801cfeecbf3 100644 (file)
@@ -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>
index b6dcdfc22dd4a52c1ec532f43eba891a2d9ddcca..77dabaac2da688954e440b3c998e4f4d83d59644 100644 (file)
@@ -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
index 43058e89fbbb1b2afb73c4a2815bbdf0081ea245..8d4fe5c88c386af82ab000c7d59b6b011edd43ff 100644 (file)
@@ -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(
index 58bf25095500856ac038eab030c80f5809317a1d..60a8e025c917434ae6d1237aeeb5c68c1560f1ca 100644 (file)
@@ -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);
index 31df7a5b51b2ed5bc0f89b05cedb8dbb96bfc0f6..0aef3920b15252f7dc3770d66da479ff7182fe9a 100644 (file)
@@ -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',
                ));
        }
 }
index a0d41ba1486451fc9ac87aa6cd42ae6c90c1a3cf..aec8fc6cdaf6bf17681e7ac148f8e2774931ec8c 100644 (file)
@@ -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) {
 
index 76fa086478a94e04fd5aee5133bad94ac402a858..08cbf1dae9f64b5658258c8f89a58522f0a54808 100644 (file)
@@ -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>       
index 711b99f34af93c56a5f6aad475f46f1f3f2b2757..669d2c6bd837faf80efb234e5c016762c09cf500 100644 (file)
@@ -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>";