[Isocial-svn] SF.net SVN: isocial: [224] public/stylesheets/groupapp
Status: Pre-Alpha
Brought to you by:
aguidrevitch
From: <di...@us...> - 2008-05-25 13:33:14
|
Revision: 224 http://isocial.svn.sourceforge.net/isocial/?rev=224&view=rev Author: dim0s77 Date: 2008-05-25 06:33:19 -0700 (Sun, 25 May 2008) Log Message: ----------- show user groups on home groupapp page Modified Paths: -------------- app/controllers/groupapp/board_controller.php app/controllers/groupapp/group_controller.php app/controllers/user_controller.php app/installers/groupapp/group_installer.php app/models/groupapp_group.php app/models/groupapp_member.php app/models/groupapp_message.php app/models/user.php app/views/groupapp/board/_menu.tpl app/views/groupapp/board/reply_to_post.tpl app/views/groupapp/board/reply_to_topic.tpl app/views/groupapp/board/start_topic.tpl app/views/groupapp/group/_members_list.tpl app/views/groupapp/group/edit_members.tpl app/views/groupapp/group/index.tpl public/stylesheets/common/Submenu.css public/stylesheets/groupapp/Board.css public/stylesheets/groupapp/Group.css Modified: app/controllers/groupapp/board_controller.php =================================================================== --- app/controllers/groupapp/board_controller.php 2008-05-25 13:15:10 UTC (rev 223) +++ app/controllers/groupapp/board_controller.php 2008-05-25 13:33:19 UTC (rev 224) @@ -8,7 +8,7 @@ if (!empty($this->params['id'])) { $messages = $this->GroupappMessage->find('all', array( - 'conditions' => array("group_id = ?", $this->params['id']), + 'conditions' => array("groupapp_group_id = ?", $this->params['id']), 'include' => 'user' ) ); @@ -33,7 +33,7 @@ $topics[$message->topic_id]['last'] = $message; } } - $this->group_id = $group->getId(); + $this->groupapp_group_id = $group->getId(); $this->group_name = $group->name; $this->topics = $topics; } @@ -48,13 +48,13 @@ ) ); if ($messages) { - $member = $this->GroupappMember->findFirst(array( 'group_id' => $messages[0]->group_id, + $member = $this->GroupappMember->findFirst(array( 'groupapp_group_id' => $messages[0]->groupapp_group_id, 'user_id' => $this->current_user->getId() )); - $group = $this->GroupappGroup->find( $messages[0]->group_id ); + $group = $this->GroupappGroup->find( $messages[0]->groupapp_group_id ); if (($group && $group->access == 1) || $member) { $this->messages = $messages; - $this->group_id = $group->getId(); + $this->groupapp_group_id = $group->getId(); $this->group_name = $group->name; $this->topic_id = $messages[0]->topic_id; } else { @@ -68,10 +68,10 @@ function start_topic () { if (!empty($this->params['topic']) && - !empty($this->params['topic']['group_id']) && + !empty($this->params['topic']['groupapp_group_id']) && !empty($this->params['topic']['body'])) { - if ( $this->group = $this->GroupappGroup->find( $this->params['topic']['group_id'] ) ) { - $member = $this->GroupappMember->findFirst(array( 'group_id' => $this->group->getId(), + if ( $this->group = $this->GroupappGroup->find( $this->params['topic']['groupapp_group_id'] ) ) { + $member = $this->GroupappMember->findFirst(array( 'groupapp_group_id' => $this->group->getId(), 'user_id' => $this->current_user->getId() )); if ($member) { @@ -95,7 +95,7 @@ } else if (!empty($this->params['id'])) { if ( $group = $this->GroupappGroup->find( $this->params['id'] ) ) { $this->topic = $group->message->build(); - $this->group_id = $group->getId(); + $this->groupapp_group_id = $group->getId(); $this->group_name = $group->name; $this->topic_id = $this->topic->getId(); } @@ -107,11 +107,11 @@ function reply_to_topic () { if (!empty($this->params['topic']) && - !empty($this->params['topic']['group_id']) && + !empty($this->params['topic']['groupapp_group_id']) && !empty($this->params['topic']['topic_id']) && !empty($this->params['topic']['body'])) { - if ( $this->group = $this->GroupappGroup->find( $this->params['topic']['group_id'] ) ) { - $member = $this->GroupappMember->findFirst(array( 'group_id' => $this->group->getId(), + if ( $this->group = $this->GroupappGroup->find( $this->params['topic']['groupapp_group_id'] ) ) { + $member = $this->GroupappMember->findFirst(array( 'groupapp_group_id' => $this->group->getId(), 'user_id' => $this->current_user->getId() )); if ($member) { @@ -130,13 +130,13 @@ ) ); if ($messages) { - $member = $this->GroupappMember->findFirst(array( 'group_id' => $messages[0]->group_id, + $member = $this->GroupappMember->findFirst(array( 'groupapp_group_id' => $messages[0]->groupapp_group_id, 'user_id' => $this->current_user->getId() )); - $group = $this->GroupappGroup->find( $messages[0]->group_id ); + $group = $this->GroupappGroup->find( $messages[0]->groupapp_group_id ); if (($group && $group->access == 1) || $member) { $this->messages = $messages; - $this->group_id = $group->getId(); + $this->groupapp_group_id = $group->getId(); $this->group_name = $group->name; $this->topic_id = $messages[0]->topic_id; } else { @@ -150,8 +150,8 @@ function reply_to_post () { if (!empty($this->params['topic'])) { - if ( $this->group = $this->GroupappGroup->find( $this->params['topic']['group_id'] ) ) { - $member = $this->GroupappMember->findFirst(array( 'group_id' => $this->group->getId(), + if ( $this->group = $this->GroupappGroup->find( $this->params['topic']['groupapp_group_id'] ) ) { + $member = $this->GroupappMember->findFirst(array( 'groupapp_group_id' => $this->group->getId(), 'user_id' => $this->current_user->getId() )); if ($member) { @@ -172,13 +172,13 @@ ) ); if ($message) { - $member = $this->GroupappMember->findFirst(array( 'group_id' => $message->group_id, + $member = $this->GroupappMember->findFirst(array( 'groupapp_group_id' => $message->groupapp_group_id, 'user_id' => $this->current_user->getId() )); - $group = $this->GroupappGroup->find( $message->group_id ); + $group = $this->GroupappGroup->find( $message->groupapp_group_id ); if (($group && $group->access == 1) || $member) { $this->message_to_reply = $message; - $this->group_id = $group->getId(); + $this->groupapp_group_id = $group->getId(); $this->group_name = $group->name; $this->topic_id = $message->topic_id; } else { Modified: app/controllers/groupapp/group_controller.php =================================================================== --- app/controllers/groupapp/group_controller.php 2008-05-25 13:15:10 UTC (rev 223) +++ app/controllers/groupapp/group_controller.php 2008-05-25 13:33:19 UTC (rev 224) @@ -4,10 +4,18 @@ { var $models = array('GroupappGroup', 'GroupappGroupType', 'GroupappMember', 'GroupappMemberRole', - 'GroupappMessage'); + 'GroupappMessage', 'User'); function index () { $this->group_types = $this->GroupappGroupType->find('all', array('conditions' => array("parent_id = 0"))); + $this->user_groups = $this->current_user->groupapp_group->load(); + $gt = array(); + for ($i = 0; $i < count($this->group_types); $i++) { + $id = $this->group_types[$i]->id; + $name = $this->group_types[$i]->get('name'); + $gt[$id] = $name; + } + $this->gt = $gt; } function create () { @@ -84,25 +92,25 @@ $this->moderators_count = 0; $this->members_count = 0; foreach ($this->members as $member) { - if ($member->role_id == 1) $this->owners_count++; - elseif ($member->role_id == 2) $this->admins_count++; - elseif ($member->role_id == 3) $this->moderators_count++; - elseif ($member->role_id == 4) $this->members_count++; + if ($member->groupapp_member_role_id == 1) $this->owners_count++; + elseif ($member->groupapp_member_role_id == 2) $this->admins_count++; + elseif ($member->groupapp_member_role_id == 3) $this->moderators_count++; + elseif ($member->groupapp_member_role_id == 4) $this->members_count++; } } $this->importErrors( $this->GroupappGroup->getErrors() ); } function remove_member () { - if (!empty($this->params['group_id']) && !empty($this->params['member_id']) && - !empty($this->params['role_id']) && !empty($this->params['list_id'])) + if (!empty($this->params['groupapp_group_id']) && !empty($this->params['member_id']) && + !empty($this->params['groupapp_member_role_id']) && !empty($this->params['list_id'])) { - $this->group = $this->GroupappGroup->find($this->params['group_id']); + $this->group = $this->GroupappGroup->find($this->params['groupapp_group_id']); $this->GroupappMember->destroyAll("id = " . $this->params['member_id']); $members = $this->_getGroupMembers(); $members_count = 0; foreach ($members as $member) { - if ($member->role_id == $this->params['role_id']) { $members_count++; } + if ($member->groupapp_member_role_id == $this->params['groupapp_member_role_id']) { $members_count++; } } $members_group_name = ''; $empty_message = ''; @@ -117,22 +125,22 @@ 'members_count' => $members_count, 'members_group_name' => $members_group_name, 'empty_message' => $empty_message, - 'role' => $this->params['role_id'], + 'role' => $this->params['groupapp_member_role_id'], 'list_id' => $this->params['list_id'] ))); } } function change_member_status () { - if (!empty($this->params['group_id']) && !empty($this->params['member_id']) && - !empty($this->params['role_id']) && !empty($this->params['list_id'])) + if (!empty($this->params['groupapp_group_id']) && !empty($this->params['member_id']) && + !empty($this->params['groupapp_member_role_id']) && !empty($this->params['list_id'])) { - $this->group = $this->GroupappGroup->find($this->params['group_id']); + $this->group = $this->GroupappGroup->find($this->params['groupapp_group_id']); } } function _getGroupMembers () { - return $this->GroupappMember->find('all', array('conditions' => array("group_id = ?", + return $this->GroupappMember->find('all', array('conditions' => array("groupapp_group_id = ?", $this->group->getId()), 'include' => 'user')); } Modified: app/controllers/user_controller.php =================================================================== --- app/controllers/user_controller.php 2008-05-25 13:15:10 UTC (rev 223) +++ app/controllers/user_controller.php 2008-05-25 13:33:19 UTC (rev 224) @@ -2,9 +2,8 @@ class UserController extends ApplicationController { + var $models = array('User', 'Confirmation', 'GroupappGroup'); - var $models = array('User', 'Confirmation'); - function beforeAction ( $method = '' ) { $user = $this->_getUserFromSession(); Modified: app/installers/groupapp/group_installer.php =================================================================== --- app/installers/groupapp/group_installer.php 2008-05-25 13:15:10 UTC (rev 223) +++ app/installers/groupapp/group_installer.php 2008-05-25 13:33:19 UTC (rev 224) @@ -30,6 +30,7 @@ `type_id` int(11) NOT NULL DEFAULT '0', `name` char(100) NOT NULL DEFAULT '', `description` char(255) NOT NULL DEFAULT '', + `members_count` int(11) NOT NULL DEFAULT 0, `recent_news` char(255) NOT NULL DEFAULT '', `office` char(100) NOT NULL DEFAULT '', `email` char(100) NOT NULL DEFAULT '', @@ -63,26 +64,40 @@ $this->execute( "CREATE TABLE `groupapp_members` ( - `id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT, - `group_id` int(11) NOT NULL DEFAULT '0', - `user_id` int(11) NOT NULL DEFAULT '0', - `role_id` int(1) UNSIGNED NOT NULL DEFAULT '4', - FOREIGN KEY (group_id) REFERENCES groupapp_groups(id), - FOREIGN KEY (role_id) REFERENCES groupapp_member_roles(id) + `id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT, + `groupapp_group_id` int(11) NOT NULL DEFAULT '0', + `user_id` int(11) NOT NULL DEFAULT '0', + `groupapp_member_role_id` int(1) UNSIGNED NOT NULL DEFAULT '4', + FOREIGN KEY (groupapp_group_id) REFERENCES groupapp_groups(id), + FOREIGN KEY (groupapp_member_role_id) REFERENCES groupapp_member_roles(id) ) ENGINE=InnoDB"); $this->execute( + "CREATE TRIGGER gapp_group_insert AFTER INSERT ON groupapp_members + FOR EACH ROW BEGIN + UPDATE `groupapp_groups` SET members_count = members_count + 1 WHERE id = NEW.groupapp_group_id; + END; + "); + + $this->execute( + "CREATE TRIGGER gapp_group_delete AFTER DELETE ON groupapp_members + FOR EACH ROW BEGIN + UPDATE `groupapp_groups` SET members_count = members_count - 1 WHERE id = OLD.groupapp_group_id; + END; + "); + + $this->execute( "CREATE TABLE `groupapp_messages` ( `id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT, - `group_id` int(11) NOT NULL DEFAULT '0', + `groupapp_group_id` int(11) NOT NULL DEFAULT '0', `topic_id` int(11) NOT NULL DEFAULT '0', `reply_message_id` int(11) NOT NULL DEFAULT '0', `user_id` int(11) NOT NULL DEFAULT '0', `subject` char(255) NOT NULL DEFAULT '', `body` text NOT NULL DEFAULT '', `created_at` datetime NOT NULL, - FOREIGN KEY (group_id) REFERENCES groupapp_groups(id), - INDEX group_idx (group_id), + FOREIGN KEY (groupapp_group_id) REFERENCES groupapp_groups(id), + INDEX groupapp_group_idx (groupapp_group_id), INDEX topic_idx (topic_id) ) ENGINE=InnoDB"); @@ -90,12 +105,26 @@ function down_1() { + $this->transactionComplete(); $this->dropTable('groupapp_messages'); $this->dropTable('groupapp_members'); $this->dropTable('groupapp_member_roles'); $this->dropTable('groupapp_groups'); $this->dropTable('groupapp_group_types'); } + + function dropTable($table_name, $options = array()) + { + if($this->tableExists($table_name)){ + $result = $this->db->execute('DROP TABLE '.$table_name); + if ($result) { + unset($this->available_tables[array_search($table_name, $this->available_tables)]); + if(!empty($options['sequence'])){ + $this->dropSequence($table_name); + } + } + } + } } ?> Modified: app/models/groupapp_group.php =================================================================== --- app/models/groupapp_group.php 2008-05-25 13:15:10 UTC (rev 223) +++ app/models/groupapp_group.php 2008-05-25 13:33:19 UTC (rev 224) @@ -3,11 +3,18 @@ class GroupappGroup extends ActiveRecord { var $has_one = array('group_member' => array('class_name' => 'GroupappMember', - 'foreign_key' => 'group_id'), + 'foreign_key' => 'groupapp_group_id') ); var $has_many = array( 'messages' => array('class_name' => 'GroupappMessage', - 'foreign_key' => 'group_id') ); + 'foreign_key' => 'groupapp_group_id') ); + var $belongs_to = array('group_type' => array('class_name' => 'GroupappGroupType', + 'primary_key_name' => 'type_id') + ); + + +# var $has_and_belongs_to_many = array('users' => array('join_table' => 'groupapp_members')); + function validateOnCreate () { $this->validatesPresenceOf('name', 'Name is missing|please enter the name'); Modified: app/models/groupapp_member.php =================================================================== --- app/models/groupapp_member.php 2008-05-25 13:15:10 UTC (rev 223) +++ app/models/groupapp_member.php 2008-05-25 13:33:19 UTC (rev 224) @@ -5,11 +5,13 @@ var $belongs_to = array('user' => array('class_name' => 'User', 'primary_key_name' => 'user_id'), 'role' => array('class_name' => 'GroupMemberRole', - 'primary_key_name' => 'role_id') + 'primary_key_name' => 'groupapp_member_role_id'), + 'group' => array('class_name' => 'GroupappGroup', + 'primary_key_name' => 'groupapp_group_id') ); var $has_many = array( 'messages' => array('class_name' => 'GroupappMessage', - 'foreign_key' => 'user_id') ); - + 'foreign_key' => 'user_id') + ); } ?> Modified: app/models/groupapp_message.php =================================================================== --- app/models/groupapp_message.php 2008-05-25 13:15:10 UTC (rev 223) +++ app/models/groupapp_message.php 2008-05-25 13:33:19 UTC (rev 224) @@ -5,7 +5,7 @@ var $belongs_to = array('user' => array('class_name' => 'User', 'foreign_key' => 'user_id'), 'group' => array('class_name' => 'GroupappGroup', - 'foreign_key' => 'group_id') + 'foreign_key' => 'groupapp_group_id') ); /* function validateOnCreate () */ Modified: app/models/user.php =================================================================== --- app/models/user.php 2008-05-25 13:15:10 UTC (rev 223) +++ app/models/user.php 2008-05-25 13:33:19 UTC (rev 224) @@ -12,7 +12,11 @@ 'conditions' => 'is_recipient_del = 0'), 'im_profiles' => array('class_name' => 'ImProfile', 'foreign_key' => 'user_id'), + /* 'groupapp_groups' => array('class_name' => 'GroupappMember', */ + /* 'foreign_key' => 'user_id'), */ ); + + var $has_and_belongs_to_many = array('groupapp_groups' => array('join_table' => 'groupapp_members')); var $has_one = array('BasicProfile', 'ContactProfile', 'RelationshipProfile', 'PersonalProfile'); Modified: app/views/groupapp/board/_menu.tpl =================================================================== --- app/views/groupapp/board/_menu.tpl 2008-05-25 13:15:10 UTC (rev 223) +++ app/views/groupapp/board/_menu.tpl 2008-05-25 13:33:19 UTC (rev 224) @@ -1,7 +1,7 @@ <div class="tabs"> <div class="left"> <ul class="toggle_tabs"> - <li class="first"><a href="/groupapp/board/{group_id?}" class="<?= $controller->getActionName() == 'index' ? 'selected' : '' ?>">_{Discussion Board}</a></li><? + <li class="first"><a href="/groupapp/board/{groupapp_group_id?}" class="<?= $controller->getActionName() == 'index' ? 'selected' : '' ?>">_{Discussion Board}</a></li><? if ($controller->getActionName() == 'show_topic' || $controller->getActionName() == 'reply_to_topic' || $controller->getActionName() == 'reply_to_post' @@ -16,7 +16,7 @@ <div class="right"> <ul class="toggle_tabs"> <? if ($controller->getActionName() != 'reply_to_topic' && $controller->getActionName() != 'reply_to_post') { ?> - <li class="first last"><a href="/groupapp/board/start_topic/{group_id?}" class="<?= $controller->getActionName() == 'start_topic' ? 'selected' : '' ?>">_{Start New Topic}</a></li> + <li class="first last"><a href="/groupapp/board/start_topic/{groupapp_group_id?}" class="<?= $controller->getActionName() == 'start_topic' ? 'selected' : '' ?>">_{Start New Topic}</a></li> <? } ?> </ul> </div> Modified: app/views/groupapp/board/reply_to_post.tpl =================================================================== --- app/views/groupapp/board/reply_to_post.tpl 2008-05-25 13:15:10 UTC (rev 223) +++ app/views/groupapp/board/reply_to_post.tpl 2008-05-25 13:33:19 UTC (rev 224) @@ -46,7 +46,7 @@ </div> <div class="formrow"> <label> - <?= $form_helper->hidden_field('topic', 'group_id', array('value' => $message_to_reply->group_id))?> + <?= $form_helper->hidden_field('topic', 'groupapp_group_id', array('value' => $message_to_reply->groupapp_group_id))?> <?= $form_helper->hidden_field('topic', 'topic_id', array('value' => $message_to_reply->topic_id))?> <?= $form_helper->hidden_field('topic', 'subject', array('value' => $message_to_reply->subject))?> <?= $form_helper->hidden_field('topic', 'reply_message_id', array('value' => $message_to_reply->getId()))?> Modified: app/views/groupapp/board/reply_to_topic.tpl =================================================================== --- app/views/groupapp/board/reply_to_topic.tpl 2008-05-25 13:15:10 UTC (rev 223) +++ app/views/groupapp/board/reply_to_topic.tpl 2008-05-25 13:33:19 UTC (rev 224) @@ -20,7 +20,7 @@ </div> <div class="formrow"> <label> - <?= $form_helper->hidden_field('topic', 'group_id', array('value' => $messages[0]->group_id))?> + <?= $form_helper->hidden_field('topic', 'groupapp_group_id', array('value' => $messages[0]->groupapp_group_id))?> <?= $form_helper->hidden_field('topic', 'topic_id', array('value' => $messages[0]->topic_id))?> <?= $form_helper->hidden_field('topic', 'subject', array('value' => $messages[0]->subject))?> </label> Modified: app/views/groupapp/board/start_topic.tpl =================================================================== --- app/views/groupapp/board/start_topic.tpl 2008-05-25 13:15:10 UTC (rev 223) +++ app/views/groupapp/board/start_topic.tpl 2008-05-25 13:33:19 UTC (rev 224) @@ -3,7 +3,7 @@ <?= $controller->renderErrors() ?> <div class="board_from_background"> -<form action="/groupapp/board/start_topic/{group_id?}" method="post"> +<form action="/groupapp/board/start_topic/{groupapp_group_id?}" method="post"> <div class="editform"> <div class="formrow"> <label>_{Topic}:</label> @@ -15,7 +15,7 @@ </div> <div class="formrow"> <label> - <?= $form_helper->hidden_field('topic', 'group_id', array('value' => $group_id))?> + <?= $form_helper->hidden_field('topic', 'groupapp_group_id', array('value' => $groupapp_group_id))?> </label> <input class="submitinput" type="submit" value="_{Create new Topic}"> <input class="cancelinput" type="button" value="_{Cancel}"> Modified: app/views/groupapp/group/_members_list.tpl =================================================================== --- app/views/groupapp/group/_members_list.tpl 2008-05-25 13:15:10 UTC (rev 223) +++ app/views/groupapp/group/_members_list.tpl 2008-05-25 13:33:19 UTC (rev 224) @@ -6,7 +6,7 @@ <div class="members_list"> <ul> {?members}{loop members} - <? if ($member->role_id == $role) { ?> + <? if ($member->groupapp_member_role_id == $role) { ?> <li> <span class="member_name"><a href="/profile/show/{member.id}">{member.user.name}</a></span> <span class="change_status"><a href="#" onclick="change_member_status(this); return false;" name="{member.id}">_{change status}</a></span> Modified: app/views/groupapp/group/edit_members.tpl =================================================================== --- app/views/groupapp/group/edit_members.tpl 2008-05-25 13:15:10 UTC (rev 223) +++ app/views/groupapp/group/edit_members.tpl 2008-05-25 13:33:19 UTC (rev 224) @@ -36,7 +36,7 @@ <div class="members_list"> <ul> {?members}{loop members} - <? if ($member->role_id == 1) { ?> + <? if ($member->groupapp_member_role_id == 1) { ?> <li> <span class="member_name"><a href="/profile/show/{member.id}">{member.user.name}</a></span> <span class="change_status"> @@ -59,7 +59,7 @@ <div class="members_list"> <ul> {?members}{loop members} - <? if ($member->role_id == 2) { ?> + <? if ($member->groupapp_member_role_id == 2) { ?> <li> <span class="member_name"><a href="/profile/show/{member.id}">{member.user.name}</a></span> <span class="change_status"> @@ -82,7 +82,7 @@ <div class="members_list"> <ul> {?members}{loop members} - <? if ($member->role_id == 3) { ?> + <? if ($member->groupapp_member_role_id == 3) { ?> <li> <span class="member_name"><a href="/profile/show/{member.id}">{member.user.name}</a></span> <span class="change_status"> @@ -106,7 +106,7 @@ <div class="members_list"> <ul> {?members}{loop members} - <? if ($member->role_id == 4) { ?> + <? if ($member->groupapp_member_role_id == 4) { ?> <li> <span class="member_name"><a href="/profile/show/{member.id}">{member.user.name}</a></span> <span class="change_status"> @@ -130,7 +130,7 @@ </div> <script> -function remove_member (element, group_id, list_id, role) { +function remove_member (element, groupapp_group_id, list_id, role) { new Dialog.Box('dlg', { reference: element, title: '_{Remove member}?', @@ -143,10 +143,10 @@ { method:'post', asynchronous:true, parameters: - 'group_id=' + group_id + + 'groupapp_group_id=' + groupapp_group_id + '&list_id=' + list_id + '&member_id=' + element.name + - '&role_id=' + role + '&groupapp_member_role_id=' + role }); } }); @@ -154,7 +154,7 @@ return false; } -function change_member_status (element, group_id, list_id, role) { +function change_member_status (element, groupapp_group_id, list_id, role) { var body_content = '<?= $form_helper->radio_button('member', 'status', '1', array('checked' => 'checked')) ?>_{Owner}' + '<?= $form_helper->radio_button('member', 'status', '2') ?>_{Administrator}' + '<?= $form_helper->radio_button('member', 'status', '3') ?>_{Moderator}' + @@ -171,10 +171,10 @@ { method:'post', asynchronous:true, parameters: - 'group_id=' + group_id + + 'groupapp_group_id=' + groupapp_group_id + '&list_id=' + list_id + '&member_id=' + element.name + - '&role_id=' + role + '&groupapp_member_role_id=' + role }); } }); Modified: app/views/groupapp/group/index.tpl =================================================================== --- app/views/groupapp/group/index.tpl 2008-05-25 13:15:10 UTC (rev 223) +++ app/views/groupapp/group/index.tpl 2008-05-25 13:33:19 UTC (rev 224) @@ -13,12 +13,64 @@ <div class="clearfix"></div> <div class="subheader"><a href="/groupapp/group/create">_{Create a New Group}</a></div> </div> +<div class="clearfix"></div> </div> + +{?user_groups} +<div class="submenu_separator"> </div> +<div class="submenu"> + <div class="menu_block selector"> + <label for="action_select">_{Show}: + <select onchange="doselect(this)" id="action_select" name="action_select"> + <option selected="selected" value="none">_{All groups}</option> + <option value="read">_{Recently Updated}</option> + <option value="unread">_{By Group Member Size}</option> + <option value="all">_{Groups You Admin}</option> + </select> + </label> + </div> +</div> <div class="clearfix"></div> +<div class="groups_list"> + <div class="info">_{You are in groups}: <?= count($user_groups); ?></div> + + <div class="container"> + {loop user_groups} + <div class="row"> + + <div class="actions"> + <ul class="actions_list"> + <li><a href="/groupapp/group/edit_info/{user_group.id?}">_{Edit Group}</a></li> + <li><a href="#">_{Leave Group}</a></li> + </ul> + </div> + + <div class="avatar"> + <a href="/groupapp/group/show_group/{user_group.id?}"><img src="/images/nophoto_men_sm.gif" alt="" class=""></a> + </div> + + <div class="info"> + <div class="name"><a href="/groupapp/group/show_group/{user_group.id?}">{user_group.name}</a></div> + <div class="other param">_{Members count}:</div> + <div class="other value">{user_group.members_count}</div> + <div class="clearfix"></div> + <div class="other param">_{Type}:</div> + <div class="other value"><? $id = $user_group->type_id; echo $gt[$id]; ?></div> + <div class="clearfix"></div> + </div> + + <div class="clearfix"></div> + </div> + {end} + </div> + +</div> +{else} <div class="nogroups"> _{You have not joined any groups}. </div> +{end} <div class="clearfix"></div> <div class="actions"> Modified: public/stylesheets/common/Submenu.css =================================================================== --- public/stylesheets/common/Submenu.css 2008-05-25 13:15:10 UTC (rev 223) +++ public/stylesheets/common/Submenu.css 2008-05-25 13:33:19 UTC (rev 224) @@ -55,3 +55,9 @@ cursor: default; text-decoration: none; } + +.submenu_separator { + display: block; + margin-top: 5px; + border-bottom: 1px solid #cccccc; +} \ No newline at end of file Modified: public/stylesheets/groupapp/Board.css =================================================================== --- public/stylesheets/groupapp/Board.css 2008-05-25 13:15:10 UTC (rev 223) +++ public/stylesheets/groupapp/Board.css 2008-05-25 13:33:19 UTC (rev 224) @@ -109,3 +109,10 @@ .message .head .sender .other_user { font-weight: bold; } + +.group_list { + float: left; + background: #ffffff; + width: 100%; + margin: 10px; +} Modified: public/stylesheets/groupapp/Group.css =================================================================== --- public/stylesheets/groupapp/Group.css 2008-05-25 13:15:10 UTC (rev 223) +++ public/stylesheets/groupapp/Group.css 2008-05-25 13:33:19 UTC (rev 224) @@ -136,3 +136,59 @@ text-align: center; padding: 20px 0px 20px 0px; } + +.groups_list { + float: left; + background: #ffffff; + width: 100%; +} + +.groups_list .info { + padding: 10px 10px 5px 20px; +} + +.groups_list .container { + background: #f7f7f7; + padding: 5px; + border-top: solid 1px #dddddd; + border-bottom: solid 1px #dddddd; +} + +.groups_list .container .row { + background: #ffffff; + border: 1px solid #cccccc; + display: block; + margin: 3px; + padding: 10px 20px 10px 20px; +} + +.groups_list .container .row .avatar { + float: left; + width: 100px; +} + +.groups_list .container .row .info { + float: left; + width: 300px; + padding: 0px 5px 0px 5px; +} + +.groups_list .container .row .info .name { + padding: 0px; + margin-bottom: 10px; +} + +.groups_list .container .row .info .other { + float: left; + margin-bottom: 3px; +} + +.groups_list .container .row .info .other.param { + color: #999999; + margin-right: 5px; +} + +.groups_list .container .row .actions { + float: right; + width: 125px; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |