isocial-svn Mailing List for isocial (Page 8)
Status: Pre-Alpha
Brought to you by:
aguidrevitch
You can subscribe to this list here.
2008 |
Jan
|
Feb
(11) |
Mar
(80) |
Apr
(22) |
May
(90) |
Jun
(28) |
Jul
(33) |
Aug
(12) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
---|
From: <di...@us...> - 2008-04-26 08:50:38
|
Revision: 129 http://isocial.svn.sourceforge.net/isocial/?rev=129&view=rev Author: dim0s77 Date: 2008-04-26 01:50:42 -0700 (Sat, 26 Apr 2008) Log Message: ----------- Changed html structure of 'group create' page from table to div. Minor fixes Modified Paths: -------------- app/views/groupapp/group/_info.tpl app/views/groupapp/group/create.tpl app/views/groupapp/group/edit_info.tpl app/views/groupapp/group/edit_members.tpl public/stylesheets/Application.css public/stylesheets/groupapp/Group.css timesheet/dim0s77.txt Modified: app/views/groupapp/group/_info.tpl =================================================================== --- app/views/groupapp/group/_info.tpl 2008-04-24 09:53:49 UTC (rev 128) +++ app/views/groupapp/group/_info.tpl 2008-04-26 08:50:42 UTC (rev 129) @@ -1,42 +1,75 @@ - <tr> - <td class="tlabel">_{Group Name}:<br><small>(_{required})</small></td> - <td><?= $form_helper->text_field('group', 'name', array('class' => 'textinput')) ?></td> - </tr> - <tr> - <td class="tlabel">_{Description}:<br><small>(_{required})</small></td> - <td><?= $form_helper->text_area('group', 'description', array('rows' => '5')) ?></td> - </tr> - <tr> - <td class="tlabel">_{Group Type}:<br><small>(_{required})</small></td> - <td> - <?= $form_options_helper->select('group', - 'type_id', - $GroupappGroupType->collect( - $GroupappGroupType->find('all', array('conditions' => array("parent_id = 0"))), - 'name', - 'id'), - array(), - array('prompt' => $controller->t('Select Category:')) - ) ?> - </td> - </tr> - <tr> - <td class="tlabel">_{Recent News}:</td> - <td><?= $form_helper->text_area('group', 'recent_news', array('rows' => '5')) ?></td> - </tr> - <tr> - <td class="tlabel">_{Office}:</td> - <td><?= $form_helper->text_field('group', 'office', array('class' => 'textinput')) ?></td> - </tr> - <tr> - <td class="tlabel">_{Email}:</td> - <td><?= $form_helper->text_field('group', 'email', array('class' => 'textinput')) ?></td> - </tr> - <tr> - <td class="tlabel">_{Street}:</td> - <td><?= $form_helper->text_field('group', 'street', array('class' => 'textinput')) ?></td> - </tr> - <tr> - <td class="tlabel">_{City/Town}:</td> - <td><?= $form_helper->text_field('group', 'city', array('class' => 'textinput') )?></td> - </tr> + <div class="formrow"> + <?= $controller->renderErrors() ?> + </div> + + <div class="formrow"> + <label class="required">_{Group Name}:<br><small>(_{required})</small></label> + <div class="formcol"> + <?= $form_helper->text_field('group', 'name', array('class' => 'textinput')) ?> + </div> + <div class="clearfix"></div> + </div> + + <div class="formrow"> + <label class="required">_{Description}:<br><small>(_{required})</small></label> + <div class="formcol"> + <?= $form_helper->text_area('group', 'description', array('rows' => '5')) ?> + </div> + <div class="clearfix"></div> + </div> + + <div class="formrow"> + <label class="required">_{Group Type}:<br><small>(_{required})</small></label> + <div class="formcol"> + <?= $form_options_helper->select('group', + 'type_id', + $GroupappGroupType->collect( + $GroupappGroupType->find('all', array('conditions' => array("parent_id = 0"))), + 'name', + 'id'), + array(), + array('prompt' => $controller->t('Select Category:')) + ) ?> + </div> + <div class="clearfix"></div> + </div> + + <div class="formrow"> + <label>_{Recent News}:</label> + <div class="formcol"> + <?= $form_helper->text_area('group', 'recent_news', array('rows' => '5')) ?> + </div> + <div class="clearfix"></div> + </div> + + <div class="formrow"> + <label>_{Office}:</label> + <div class="formcol"> + <?= $form_helper->text_field('group', 'office', array('class' => 'textinput')) ?> + </div> + <div class="clearfix"></div> + </div> + + <div class="formrow"> + <label>_{Email}:</label> + <div class="formcol"> + <?= $form_helper->text_field('group', 'email', array('class' => 'textinput')) ?> + </div> + <div class="clearfix"></div> + </div> + + <div class="formrow"> + <label>_{Street}:</label> + <div class="formcol"> + <?= $form_helper->text_field('group', 'street', array('class' => 'textinput')) ?> + </div> + <div class="clearfix"></div> + </div> + + <div class="formrow"> + <label>_{City/Town}:</label> + <div class="formcol"> + <?= $form_helper->text_field('group', 'city', array('class' => 'textinput') )?> + </div> + <div class="clearfix"></div> + </div> Modified: app/views/groupapp/group/create.tpl =================================================================== --- app/views/groupapp/group/create.tpl 2008-04-24 09:53:49 UTC (rev 128) +++ app/views/groupapp/group/create.tpl 2008-04-26 08:50:42 UTC (rev 129) @@ -9,28 +9,32 @@ <?= $controller->renderPartial("bar") ?> -<div class="form_editor"> - <?= $controller->renderErrors() ?> - <form action="/groupapp/group/create/{id}" method="post"> - <table class="editor"> - <tbody> - <?= $controller->renderPartial("info") ?> - <tr> - <td class="tlabel"> </td> - <td class="tsubmit"> - <input class="submitinput" type="submit" value="_{Create Group}"> - <input class="cancelinput" type="button" value="_{Cancel}"> - </td> - </tr> - <tr> - <td class="tlabel"> </td> - <td class="tnote"> - _{Note: groups that attack a specific person or group of people (e.g. racist, sexist, or other hate groups) will not be tolerated. Creating such a group will result in immediate termination of your PROJECT_NAME account.} - </td> - </tr> - </tbody> - </table> +<div class="editform"> + <form action="/groupapp/group/create" method="post"> + + <?= $controller->renderPartial("info") ?> + + <div class="formrow"> + <label> </label> + <div class="formcol"> + <input class="submitinput" type="submit" value="_{Create Group}"> + <input class="cancelinput" type="button" value="_{Cancel}"> + </div> + <div class="clearfix"></div> + </div> + + <div class="formrow"> + <label> </label> + <div class="formcol"> + <div class="tnote"> + _{Note: groups that attack a specific person or group of people (e.g. racist, sexist, or other hate groups) will not be tolerated. Creating such a group will result in immediate termination of your PROJECT_NAME account.} + </div> + </div> + <div class="clearfix"></div> + </div> + </form> </div> + <div class="clearfix"></div> Modified: app/views/groupapp/group/edit_info.tpl =================================================================== --- app/views/groupapp/group/edit_info.tpl 2008-04-24 09:53:49 UTC (rev 128) +++ app/views/groupapp/group/edit_info.tpl 2008-04-26 08:50:42 UTC (rev 129) @@ -7,21 +7,20 @@ <?= $controller->renderPartial("editbar") ?> -<div class="form_editor"> - <?= $controller->renderErrors() ?> - <form action="/groupapp/group/edit_info/{id}" method="post"> - <table class="editor"> - <tbody> - <?= $controller->renderPartial("info") ?> - <tr> - <td class="tlabel"> </td> - <td class="tsubmit"> - <input class="submitinput" type="submit" value="_{Save Changes}"> - <input class="cancelinput" type="button" value="_{Cancel}"> - </td> - </tr> - </tbody> - </table> +<div class="editform"> + <form action="/groupapp/group/edit_info/{group.id?}" method="post"> + + <?= $controller->renderPartial("info") ?> + + <div class="formrow"> + <label> </label> + <div class="formcol"> + <input class="submitinput" type="submit" value="_{Save Changes}"> + <input class="cancelinput" type="button" value="_{Cancel}"> + </div> + <div class="clearfix"></div> + </div> + </form> </div> <div class="clearfix"></div> Modified: app/views/groupapp/group/edit_members.tpl =================================================================== --- app/views/groupapp/group/edit_members.tpl 2008-04-24 09:53:49 UTC (rev 128) +++ app/views/groupapp/group/edit_members.tpl 2008-04-26 08:50:42 UTC (rev 129) @@ -31,10 +31,8 @@ </div> <div id="owners_list"> - <div class="list_header">_{Owners}: {owners_count}</div> - <? if (!$owners_count) { ?> - <div class="empty_list">_{Group has no owner}</div> - <? } else { ?> + <div class="list_header">_{Owners}: {?owners_count}{owners_count}{else}0{end}</div> + <? if (isset($owners_count) && $owners_count > 0) { ?> <div class="members_list"> <ul> {?members}{loop members} @@ -48,14 +46,14 @@ {end}{end} </ul> </div> + <? } else { ?> + <div class="empty_list">_{Group has no owner}</div> <? } ?> </div> <div id="admins_list"> - <div class="list_header">_{Admins}: {admins_count}</div> - <? if (!$admins_count) { ?> - <div class="empty_list">_{Group has no administrators}</div> - <? } else { ?> + <div class="list_header">_{Admins}: {?admins_count}{admins_count}{else}0{end}</div> + <? if (isset($admins_count) && $admins_count > 0) { ?> <div class="members_list"> <ul> {?members}{loop members} @@ -69,14 +67,14 @@ {end}{end} </ul> </div> + <? } else { ?> + <div class="empty_list">_{Group has no administrators}</div> <? } ?> </div> <div id="moderators_list"> - <div class="list_header">_{Moderators}: {moderators_count}</div> - <? if (!$moderators_count) { ?> - <div class="empty_list">_{Group has no moderators}</div> - <? } else { ?> + <div class="list_header">_{Moderators}: {?moderators_count}{moderators_count}{else}0{end}</div> + <? if (isset($moderators_count) && $moderators_count > 0) { ?> <div class="members_list"> <ul> {?members}{loop members} @@ -90,14 +88,14 @@ {end}{end} </ul> </div> + <? } else { ?> + <div class="empty_list">_{Group has no moderators}</div> <? } ?> </div> <div id="members_list"> - <div class="list_header">_{Members}: {members_count}</div> - <? if (!$members_count) { ?> - <div class="empty_list">_{Could not find any members. Invite some more people.}</div> - <? } else { ?> + <div class="list_header">_{Members}: {?members_count}{members_count}{else}0{end}</div> + <? if (isset($members_count) && $members_count > 0) { ?> <div class="members_list_container"> <div class="members_list"> <ul> @@ -113,6 +111,8 @@ </ul> </div> </div> + <? } else { ?> + <div class="empty_list">_{Could not find any members. Invite some more people.}</div> <? } ?> </div> Modified: public/stylesheets/Application.css =================================================================== --- public/stylesheets/Application.css 2008-04-24 09:53:49 UTC (rev 128) +++ public/stylesheets/Application.css 2008-04-26 08:50:42 UTC (rev 129) @@ -557,6 +557,16 @@ width: 400px; } +.formrow label.required { + line-height: 10px; +} + +.formrow label.required small { + color: #999999; + font-size: smaller; + line-height: 10px; +} + .formrow .formcol { float: left; width: 360px; @@ -575,6 +585,13 @@ background: url('/images/lock.png') no-repeat 0px; } +.formrow .formcol .tnote { + border-top: solid 1px #cccccc; + padding: 10px 0px 0px 0px; + width: 300px; + color: #777777; +} + .formrow .formblock { width: 235px; margin: 3px 0px 3px 10px; Modified: public/stylesheets/groupapp/Group.css =================================================================== --- public/stylesheets/groupapp/Group.css 2008-04-24 09:53:49 UTC (rev 128) +++ public/stylesheets/groupapp/Group.css 2008-04-26 08:50:42 UTC (rev 129) @@ -99,41 +99,6 @@ float: left; } -.form_editor { - background: #f7f7f7; - padding: 10px 10px 10px 10px; -} - -.editor { - margin: 5px auto 7px auto; -} - -.editor td { - padding: 0px 3px 0px 3px; - vertical-align: top; -} - -.editor td.tlabel { - padding: 0px 10px 0px 0px; - font-weight: bold; - color: #666666; -} - -.editor td.tlabel small { - color: #999999; - font-size: smaller; -} - -.editor td.tsubmit { - padding: 5px 10px 5px 20px; -} - -.editor td.tnote { - border-top: solid 1px #cccccc; - padding: 10px 0px 0px 0px; - width: 300px; -} - .formwrapper .invite_column { float: right; width: 230px; Modified: timesheet/dim0s77.txt =================================================================== --- timesheet/dim0s77.txt 2008-04-24 09:53:49 UTC (rev 128) +++ timesheet/dim0s77.txt 2008-04-26 08:50:42 UTC (rev 129) @@ -0,0 +1 @@ +2008-04-26,10:45,11:45,groupapp,RT:1,"Change html structure of 'group create' page from table to div. Minor fixes" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <agu...@us...> - 2008-04-24 09:53:45
|
Revision: 128 http://isocial.svn.sourceforge.net/isocial/?rev=128&view=rev Author: aguidrevitch Date: 2008-04-24 02:53:49 -0700 (Thu, 24 Apr 2008) Log Message: ----------- timesheets directory added with timesheet mockups Added Paths: ----------- timesheet/ timesheet/aguidrevitch.txt timesheet/dim0s77.txt timesheet/eerunov.txt Added: timesheet/aguidrevitch.txt =================================================================== Added: timesheet/dim0s77.txt =================================================================== Added: timesheet/eerunov.txt =================================================================== This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <di...@us...> - 2008-04-22 16:21:00
|
Revision: 127 http://isocial.svn.sourceforge.net/isocial/?rev=127&view=rev Author: dim0s77 Date: 2008-04-22 09:21:01 -0700 (Tue, 22 Apr 2008) Log Message: ----------- Added members removing. Refactoring Modified Paths: -------------- app/controllers/groupapp/group_controller.php app/locales/groupapp/group/ru.php app/views/groupapp/group/_editbar.tpl app/views/groupapp/group/edit_members.tpl public/stylesheets/groupapp/Group.css Added Paths: ----------- app/views/groupapp/group/_members_list.tpl Removed Paths: ------------- app/views/groupapp/group/edit_moderators.tpl Modified: app/controllers/groupapp/group_controller.php =================================================================== --- app/controllers/groupapp/group_controller.php 2008-04-21 18:03:39 UTC (rev 126) +++ app/controllers/groupapp/group_controller.php 2008-04-22 16:21:01 UTC (rev 127) @@ -67,16 +67,6 @@ $this->edit_group(); } - function edit_moderators () { - $this->step = 'edit_moderators'; - if (!empty($this->params['id']) && $this->GroupappGroup->find($this->params['id'])) { - $this->group = $this->GroupappGroup->find($this->params['id']); - $this->members = $this->GroupappMember->find('all', array('conditions' => array("group_id = ?", - $this->group->getId()), - 'include' => 'user')); - } - } - function edit_members () { $this->step = 'edit_members'; if (!empty($this->params['member'])){ @@ -86,13 +76,57 @@ } } else if (!empty($this->params['id']) && $this->GroupappGroup->find($this->params['id'])) { $this->group = $this->GroupappGroup->find($this->params['id']); - $this->members = $this->GroupappMember->find('all', array('conditions' => array("group_id = ?", - $this->group->getId()), - 'include' => 'user')); + $this->members = $this->_getGroupMembers($this->group); + $this->owners_count = 0; + $this->admins_count = 0; + $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++; + } } $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'])) + { + $this->group = $this->GroupappGroup->find($this->params['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++; } + } + $members_group_name = ''; + $empty_message = ''; + switch ($this->params['list_id']) { + case 'owners_list' : $members_group_name = 'Owners'; $empty_message = 'Group has no owner'; break; + case 'admins_list' : $members_group_name = 'Admins'; $empty_message = 'Group has no administrators'; break; + case 'moderators_list': $members_group_name = 'Moderators'; $empty_message = 'Group has no moderators'; break; + case 'members_list' : $members_group_name = 'Members'; $empty_message = 'Could not find any members. Invite some more people.'; break; + } + return $this->render(array('partial' => 'members_list', + 'locals' => array('members' => $members, + 'members_count' => $members_count, + 'members_group_name' => $members_group_name, + 'empty_message' => $empty_message, + 'role' => $this->params['role_id'], + 'list_id' => $this->params['list_id'] + ))); + } + } + + function _getGroupMembers () { + return $this->GroupappMember->find('all', array('conditions' => array("group_id = ?", + $this->group->getId()), + 'include' => 'user')); + } + function group_info () { if (!empty($this->params['id']) && $this->GroupappGroup->find($this->params['id'])) { $this->group = $this->GroupappGroup->find($this->params['id']); Modified: app/locales/groupapp/group/ru.php =================================================================== --- app/locales/groupapp/group/ru.php 2008-04-21 18:03:39 UTC (rev 126) +++ app/locales/groupapp/group/ru.php 2008-04-22 16:21:01 UTC (rev 127) @@ -19,9 +19,10 @@ $dictionary['Step'] = 'Шаг'; $dictionary['Group Info'] = 'Инфо о группе'; $dictionary['Customize'] = 'Дополнительно'; +$dictionary['Owners'] = 'Владельцы'; +$dictionary['Admins'] = 'Администраторы'; +$dictionary['Moderators'] = 'Модераторы'; $dictionary['Members'] = 'Участники'; -$dictionary['Moderators'] = 'Модераторы'; -$dictionary['Non-Moderators'] = 'Немодераторы'; $dictionary['Back to'] = 'Обратно в'; $dictionary['Group Name'] = 'Название группы'; @@ -72,18 +73,21 @@ $dictionary['Invite people to'] = 'Пригласить людей в'; $dictionary['Show'] = 'Показать'; -$dictionary['out of'] = 'из'; $dictionary['Invite Friends'] = 'Пригласить друзей'; $dictionary['Invite Friends on PROJECT_NAME'] = 'Пригласить друзей по PROJECT_NAME'; -$dictionary['make moderator'] = 'сделать модератором'; -$dictionary['remove moderator'] = 'удалить модератора'; +$dictionary['Group has no owner'] = 'У группы нет владельца'; +$dictionary['Group has no administrators'] = 'В группе нет администраторов'; +$dictionary['Group has no moderators'] = 'В группе нет модераторов'; +$dictionary['Could not find any members. Invite some more people.'] = + 'Не удалось найти ни одного участника. Пригласите больше людей.'; +$dictionary['change status'] = 'изменить статус'; +$dictionary['remove'] = 'удалить'; +$dictionary['Remove'] = 'Удалить'; -$dictionary['Choose from the list below to make members into moderators'] = - 'Выберите из списка ниже участников, которых хотите сделать модераторами'; -$dictionary['Could not find any members'] = - 'Не удалось найти ни одного участника'; -$dictionary['Invite some more people'] = - 'Пригласите больше людей'; +$dictionary['Remove member'] = 'Удалить пользователя'; +$dictionary['Are you sure you want to remove this member from group'] = + 'Вы уверены, что хотите удалить этого пользователя из группы'; +$dictionary['Changing status'] = 'Изменение статуса пользователя'; ?> Modified: app/views/groupapp/group/_editbar.tpl =================================================================== --- app/views/groupapp/group/_editbar.tpl 2008-04-21 18:03:39 UTC (rev 126) +++ app/views/groupapp/group/_editbar.tpl 2008-04-22 16:21:01 UTC (rev 127) @@ -3,7 +3,6 @@ <ul class="toggle_minitabs"> <li><a href="/groupapp/group/edit_info/{group.id?}" class="<?= $step == 'edit_info' ? 'selected' : '' ?>">_{Group Info}</a> </li><li><a href="/groupapp/group/edit_customize/{group.id?}" class="<?= $step == 'edit_customize' ? 'selected' : '' ?>">_{Customize}</a> - </li><li><a href="/groupapp/group/edit_moderators/{group.id?}" class="<?= $step == 'edit_moderators' ? 'selected' : '' ?>">_{Moderators}</a> </li><li><a href="/groupapp/group/edit_members/{group.id?}" class="<?= $step == 'edit_members' ? 'selected' : '' ?>">_{Members}</a></li> </ul> </div> Added: app/views/groupapp/group/_members_list.tpl =================================================================== --- app/views/groupapp/group/_members_list.tpl (rev 0) +++ app/views/groupapp/group/_members_list.tpl 2008-04-22 16:21:01 UTC (rev 127) @@ -0,0 +1,20 @@ +<div class="list_header"><?= $text_helper->translate($members_group_name, array()); ?>: {members_count}</div> +<? if (!$members_count) { ?> +<div class="empty_list"><?= $text_helper->translate($empty_message, array()); ?></div> +<? } else { ?> +<? if ($list_id == 'members_list') { ?><div class="members_list_container"><? } ?> + <div class="members_list"> + <ul> + {?members}{loop members} + <? if ($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> + <a href="#" onclick="remove_member(this, {group.id}, '{list_id}', {role}); return false;" name="{member.id}">_{remove}</a> + </li> + <? } ?> + {end}{end} + </ul> + </div> +<? if ($list_id == 'members_list') { ?></div><? } ?> +<? } ?> Modified: app/views/groupapp/group/edit_members.tpl =================================================================== --- app/views/groupapp/group/edit_members.tpl 2008-04-21 18:03:39 UTC (rev 126) +++ app/views/groupapp/group/edit_members.tpl 2008-04-22 16:21:01 UTC (rev 127) @@ -29,23 +29,121 @@ </label> </div> </div> - <div class="list_header"> - _{Members}: <? if (isset($members)) { echo count($members); } else { echo '0'; } ?> _{out of} <? if (isset($members)) { echo count($members); } else { echo '0'; } ?> + + <div id="owners_list"> + <div class="list_header">_{Owners}: {owners_count}</div> + <? if (!$owners_count) { ?> + <div class="empty_list">_{Group has no owner}</div> + <? } else { ?> + <div class="members_list"> + <ul> + {?members}{loop members} + <? if ($member->role_id == 1) { ?> + <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> + <a href="#" onclick="remove_member(this, {group.id}, 'owners_list', 1); return false;" name="{member.id}">_{remove}</a> + </li> + <? } ?> + {end}{end} + </ul> + </div> + <? } ?> </div> - <div class="members_list_container"> + + <div id="admins_list"> + <div class="list_header">_{Admins}: {admins_count}</div> + <? if (!$admins_count) { ?> + <div class="empty_list">_{Group has no administrators}</div> + <? } else { ?> <div class="members_list"> <ul> {?members}{loop members} + <? if ($member->role_id == 2) { ?> <li> <span class="member_name"><a href="/profile/show/{member.id}">{member.user.name}</a></span> - <a href="#" onclick="return false;">_{remove}</a> + <span class="change_status"><a href="#" onclick="change_member_status(this); return false;" name="{member.id}">_{change status}</a></span> + <a href="#" onclick="remove_member(this, {group.id}, 'admins_list', 2); return false;" name="{member.id}">_{remove}</a> </li> + <? } ?> {end}{end} </ul> </div> + <? } ?> </div> - + + <div id="moderators_list"> + <div class="list_header">_{Moderators}: {moderators_count}</div> + <? if (!$moderators_count) { ?> + <div class="empty_list">_{Group has no moderators}</div> + <? } else { ?> + <div class="members_list"> + <ul> + {?members}{loop members} + <? if ($member->role_id == 3) { ?> + <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> + <a href="#" onclick="remove_member(this, {group.id}, 'moderators_list', 3); return false;" name="{member.id}">_{remove}</a> + </li> + <? } ?> + {end}{end} + </ul> + </div> + <? } ?> + </div> + + <div id="members_list"> + <div class="list_header">_{Members}: {members_count}</div> + <? if (!$members_count) { ?> + <div class="empty_list">_{Could not find any members. Invite some more people.}</div> + <? } else { ?> + <div class="members_list_container"> + <div class="members_list"> + <ul> + {?members}{loop members} + <? if ($member->role_id == 4) { ?> + <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> + <a href="#" onclick="remove_member(this, {group.id}, 'members_list', 4); return false;" name="{member.id}">_{remove}</a> + </li> + <? } ?> + {end}{end} + </ul> + </div> + </div> + <? } ?> + </div> + <div class="clearfix"></div> </form> </div> + +<script> +function remove_member (element, group_id, list_id, role) { + new Dialog.Box('dlg', { + reference: element, + title: '_{Remove member}?', + body: '_{Are you sure you want to remove this member from group}?', + yes: '_{Remove}', + cancel: '_{Cancel}', + onYes : function () { + new Ajax.Updater(list_id, + '/groupapp/group/remove_member', + { method:'post', + asynchronous:true, + parameters: + 'group_id=' + group_id + + '&list_id=' + list_id + + '&member_id=' + element.name + + '&role_id=' + role + }); + } + }); + + return false; +} + +</script> Deleted: app/views/groupapp/group/edit_moderators.tpl =================================================================== --- app/views/groupapp/group/edit_moderators.tpl 2008-04-21 18:03:39 UTC (rev 126) +++ app/views/groupapp/group/edit_moderators.tpl 2008-04-22 16:21:01 UTC (rev 127) @@ -1,59 +0,0 @@ -<div class="title_bar"> - <div class="head"> - <div class="name groupapp">_{Invite people to} {group.name?}</div> - </div> -</div> -<div class="clearfix"></div> - -<?= $controller->renderPartial("editbar") ?> - -<div class="formwrapper"> - <form action="/groupapp/group/edit_moderators/{group.id?}" method="post"> - <div class="formrow"> - <?= $controller->renderErrors() ?> - </div> - - <div class="members_list"> - <div class="list_name">_{Moderators}</div> - <ul> - <? $moderators_count = 1; ?> - {?members}{loop members} - <? if ($member->role_id == 3) { ?> - <li> - <span class="member_name">{moderators_count}. <a href="/profile/show/{member.id}">{member.user.name}</a></span> - <a href="#" onclick="return false;">_{remove moderator}</a> - </li> - <? $moderators_count++; ?> - <? } ?> - {end}{end} - </ul> - </div> - <? if ($moderators_count == 1) { ?> - <div class="empty_list"> - _{Choose from the list below to make members into moderators}. - </div> - <? } ?> - - <div class="members_list"> - <div class="list_name">_{Non-Moderators}</div> - <ul> - <? $members_count = 0; ?> - {?members}{loop members} - <? if ($member->role_id != 3) { ?> - <li> - <span class="member_name"><a href="/profile/show/{member.id}">{member.user.name}</a></span> - <a href="#" onclick="return false;">_{make moderator}</a> - </li> - <? $members_count++; ?> - <? } ?> - {end}{end} - </ul> - </div> - <? if (!$members_count) { ?> - <div class="empty_list"> - _{Could not find any members}. <a href="/groupapp/group/edit_members/{group.id}">_{Invite some more people}</a>. - </div> - <? } ?> - - </form> -</div> Modified: public/stylesheets/groupapp/Group.css =================================================================== --- public/stylesheets/groupapp/Group.css 2008-04-21 18:03:39 UTC (rev 126) +++ public/stylesheets/groupapp/Group.css 2008-04-22 16:21:01 UTC (rev 127) @@ -191,6 +191,10 @@ float: left; } +.members_list .change_status { + padding-right: 15px; +} + .formwrapper .members { background: #ffffff; margin-right: 231px; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <di...@us...> - 2008-04-21 18:03:33
|
Revision: 126 http://isocial.svn.sourceforge.net/isocial/?rev=126&view=rev Author: dim0s77 Date: 2008-04-21 11:03:39 -0700 (Mon, 21 Apr 2008) Log Message: ----------- Added saving of changed group attributes Modified Paths: -------------- app/controllers/groupapp/group_controller.php app/views/groupapp/group/edit_customize.tpl app/views/groupapp/group/edit_info.tpl app/views/groupapp/group/edit_members.tpl Modified: app/controllers/groupapp/group_controller.php =================================================================== --- app/controllers/groupapp/group_controller.php 2008-04-19 13:19:36 UTC (rev 125) +++ app/controllers/groupapp/group_controller.php 2008-04-21 18:03:39 UTC (rev 126) @@ -43,18 +43,28 @@ $this->importErrors( $this->GroupappGroup->getErrors() ); } - function edit_info () { - $this->step = 'edit_info'; - if (!empty($this->params['id']) && $this->GroupappGroup->find($this->params['id'])) { + function edit_group () { + if (!empty($this->params['group']) && !empty($this->params['id'])){ + $group = $this->GroupappGroup->findFirst(array( 'id' => $this->params['id'] )); + $group->setAttributes($this->params['group']); + if ($this->Request->isPost() && $group->save()) { + $this->group = $group; + return; + } + } else if (!empty($this->params['id']) && $this->GroupappGroup->find($this->params['id'])) { $this->group = $this->GroupappGroup->find($this->params['id']); } + $this->importErrors( $this->GroupappGroup->getErrors() ); } + function edit_info () { + $this->step = 'edit_info'; + $this->edit_group(); + } + function edit_customize () { $this->step = 'edit_customize'; - if (!empty($this->params['id']) && $this->GroupappGroup->find($this->params['id'])) { - $this->group = $this->GroupappGroup->find($this->params['id']); - } + $this->edit_group(); } function edit_moderators () { Modified: app/views/groupapp/group/edit_customize.tpl =================================================================== --- app/views/groupapp/group/edit_customize.tpl 2008-04-19 13:19:36 UTC (rev 125) +++ app/views/groupapp/group/edit_customize.tpl 2008-04-21 18:03:39 UTC (rev 126) @@ -1,6 +1,6 @@ <div class="title_bar"> <div class="head"> - <div class="name groupapp">_{Edit} {group_name?}</div> + <div class="name groupapp">_{Edit} {group.name?}</div> </div> </div> <div class="clearfix"></div> Modified: app/views/groupapp/group/edit_info.tpl =================================================================== --- app/views/groupapp/group/edit_info.tpl 2008-04-19 13:19:36 UTC (rev 125) +++ app/views/groupapp/group/edit_info.tpl 2008-04-21 18:03:39 UTC (rev 126) @@ -1,6 +1,6 @@ <div class="title_bar"> <div class="head"> - <div class="name groupapp">_{Edit} {group_name?}</div> + <div class="name groupapp">_{Edit} {group.name?}</div> </div> </div> <div class="clearfix"></div> Modified: app/views/groupapp/group/edit_members.tpl =================================================================== --- app/views/groupapp/group/edit_members.tpl 2008-04-19 13:19:36 UTC (rev 125) +++ app/views/groupapp/group/edit_members.tpl 2008-04-21 18:03:39 UTC (rev 126) @@ -1,6 +1,6 @@ <div class="title_bar"> <div class="head"> - <div class="name groupapp">_{Invite people to} {group_name?}</div> + <div class="name groupapp">_{Invite people to} {group.name?}</div> </div> </div> <div class="clearfix"></div> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <di...@us...> - 2008-04-19 13:19:31
|
Revision: 125 http://isocial.svn.sourceforge.net/isocial/?rev=125&view=rev Author: dim0s77 Date: 2008-04-19 06:19:36 -0700 (Sat, 19 Apr 2008) Log Message: ----------- Added template 'edit moderators'. Refactoring Modified Paths: -------------- app/controllers/groupapp/group_controller.php app/locales/groupapp/group/ru.php app/views/groupapp/group/edit_members.tpl app/views/groupapp/group/edit_moderators.tpl public/stylesheets/groupapp/Group.css Modified: app/controllers/groupapp/group_controller.php =================================================================== --- app/controllers/groupapp/group_controller.php 2008-04-17 09:36:18 UTC (rev 124) +++ app/controllers/groupapp/group_controller.php 2008-04-19 13:19:36 UTC (rev 125) @@ -45,14 +45,26 @@ function edit_info () { $this->step = 'edit_info'; + if (!empty($this->params['id']) && $this->GroupappGroup->find($this->params['id'])) { + $this->group = $this->GroupappGroup->find($this->params['id']); + } } function edit_customize () { $this->step = 'edit_customize'; + if (!empty($this->params['id']) && $this->GroupappGroup->find($this->params['id'])) { + $this->group = $this->GroupappGroup->find($this->params['id']); + } } function edit_moderators () { $this->step = 'edit_moderators'; + if (!empty($this->params['id']) && $this->GroupappGroup->find($this->params['id'])) { + $this->group = $this->GroupappGroup->find($this->params['id']); + $this->members = $this->GroupappMember->find('all', array('conditions' => array("group_id = ?", + $this->group->getId()), + 'include' => 'user')); + } } function edit_members () { @@ -64,7 +76,8 @@ } } else if (!empty($this->params['id']) && $this->GroupappGroup->find($this->params['id'])) { $this->group = $this->GroupappGroup->find($this->params['id']); - $this->members = $this->GroupappMember->find('all', array('conditions' => array("group_id = ?", $this->group->getId()), + $this->members = $this->GroupappMember->find('all', array('conditions' => array("group_id = ?", + $this->group->getId()), 'include' => 'user')); } $this->importErrors( $this->GroupappGroup->getErrors() ); Modified: app/locales/groupapp/group/ru.php =================================================================== --- app/locales/groupapp/group/ru.php 2008-04-17 09:36:18 UTC (rev 124) +++ app/locales/groupapp/group/ru.php 2008-04-19 13:19:36 UTC (rev 125) @@ -21,6 +21,7 @@ $dictionary['Customize'] = 'Дополнительно'; $dictionary['Members'] = 'Участники'; $dictionary['Moderators'] = 'Модераторы'; +$dictionary['Non-Moderators'] = 'Немодераторы'; $dictionary['Back to'] = 'Обратно в'; $dictionary['Group Name'] = 'Название группы'; @@ -75,4 +76,14 @@ $dictionary['Invite Friends'] = 'Пригласить друзей'; $dictionary['Invite Friends on PROJECT_NAME'] = 'Пригласить друзей по PROJECT_NAME'; +$dictionary['make moderator'] = 'сделать модератором'; +$dictionary['remove moderator'] = 'удалить модератора'; + +$dictionary['Choose from the list below to make members into moderators'] = + 'Выберите из списка ниже участников, которых хотите сделать модераторами'; +$dictionary['Could not find any members'] = + 'Не удалось найти ни одного участника'; +$dictionary['Invite some more people'] = + 'Пригласите больше людей'; + ?> Modified: app/views/groupapp/group/edit_members.tpl =================================================================== --- app/views/groupapp/group/edit_members.tpl 2008-04-17 09:36:18 UTC (rev 124) +++ app/views/groupapp/group/edit_members.tpl 2008-04-19 13:19:36 UTC (rev 125) @@ -32,15 +32,18 @@ <div class="list_header"> _{Members}: <? if (isset($members)) { echo count($members); } else { echo '0'; } ?> _{out of} <? if (isset($members)) { echo count($members); } else { echo '0'; } ?> </div> - <div class="members_list"> - {?members}{loop members} - <div class="row"> - <div class="member_name"><a href="/profile/show/{member.id}">{member.user.name}</a></div> - <div class="action"><a href="#" onclick="return false;">_{remove}</a></div> + <div class="members_list_container"> + <div class="members_list"> + <ul> + {?members}{loop members} + <li> + <span class="member_name"><a href="/profile/show/{member.id}">{member.user.name}</a></span> + <a href="#" onclick="return false;">_{remove}</a> + </li> + {end}{end} + </ul> </div> - {end}{end} </div> - </div> <div class="clearfix"></div> Modified: app/views/groupapp/group/edit_moderators.tpl =================================================================== --- app/views/groupapp/group/edit_moderators.tpl 2008-04-17 09:36:18 UTC (rev 124) +++ app/views/groupapp/group/edit_moderators.tpl 2008-04-19 13:19:36 UTC (rev 125) @@ -1,8 +1,59 @@ <div class="title_bar"> <div class="head"> - <div class="name groupapp">_{Invite people to} {group_name?}</div> + <div class="name groupapp">_{Invite people to} {group.name?}</div> </div> </div> <div class="clearfix"></div> <?= $controller->renderPartial("editbar") ?> + +<div class="formwrapper"> + <form action="/groupapp/group/edit_moderators/{group.id?}" method="post"> + <div class="formrow"> + <?= $controller->renderErrors() ?> + </div> + + <div class="members_list"> + <div class="list_name">_{Moderators}</div> + <ul> + <? $moderators_count = 1; ?> + {?members}{loop members} + <? if ($member->role_id == 3) { ?> + <li> + <span class="member_name">{moderators_count}. <a href="/profile/show/{member.id}">{member.user.name}</a></span> + <a href="#" onclick="return false;">_{remove moderator}</a> + </li> + <? $moderators_count++; ?> + <? } ?> + {end}{end} + </ul> + </div> + <? if ($moderators_count == 1) { ?> + <div class="empty_list"> + _{Choose from the list below to make members into moderators}. + </div> + <? } ?> + + <div class="members_list"> + <div class="list_name">_{Non-Moderators}</div> + <ul> + <? $members_count = 0; ?> + {?members}{loop members} + <? if ($member->role_id != 3) { ?> + <li> + <span class="member_name"><a href="/profile/show/{member.id}">{member.user.name}</a></span> + <a href="#" onclick="return false;">_{make moderator}</a> + </li> + <? $members_count++; ?> + <? } ?> + {end}{end} + </ul> + </div> + <? if (!$members_count) { ?> + <div class="empty_list"> + _{Could not find any members}. <a href="/groupapp/group/edit_members/{group.id}">_{Invite some more people}</a>. + </div> + <? } ?> + + </form> +</div> Modified: public/stylesheets/groupapp/Group.css =================================================================== --- public/stylesheets/groupapp/Group.css 2008-04-17 09:36:18 UTC (rev 124) +++ public/stylesheets/groupapp/Group.css 2008-04-19 13:19:36 UTC (rev 125) @@ -160,35 +160,57 @@ text-align: center; } +.members_list { + margin-bottom:5px; +} + +.members_list .list_name { + border-bottom: 1px solid #dddddd; + color: #3b5998; + font-size: 14px; + font-weight: bold; + padding: 10px 0px 4px 10px; +} + +.members_list ul { + list-style: none; + padding-left: 0px; + margin: 0px; +} + +.members_list li { + display: block; + padding: 5px 10px 5px 10px; + border-bottom: 1px solid #e2e7ef; + background: #ffffff; + text-align: right; +} + +.members_list .member_name { + padding-left: 10px; + float: left; +} + .formwrapper .members { background: #ffffff; margin-right: 231px; } .members .list_header { - background: #ffffff; border-bottom: 1px solid #dddddd; padding: 8px 0px 5px 15px; font-weight: bold; } -.members .members_list { - background: #ffffff; +.members .members_list_container { height: 240px; overflow: auto; } -.members_list .row { - border-bottom: 1px solid #dddddd; - float: left; -} - -.members_list .row .member_name { - margin: 5px 0px 5px 15px; - float: left; -} - -.members_list .row .action { - float: right; - margin: 5px 12px 5px 0px; +.formwrapper .empty_list { + color: #777777; + background: #ffffff; + font-size: 12px; + text-align: center; + padding: 20px 0px 20px 0px; } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <di...@us...> - 2008-04-17 09:44:43
|
Revision: 124 http://isocial.svn.sourceforge.net/isocial/?rev=124&view=rev Author: dim0s77 Date: 2008-04-17 02:36:18 -0700 (Thu, 17 Apr 2008) Log Message: ----------- Use the same templates for common operations Modified Paths: -------------- app/controllers/groupapp/group_controller.php app/locales/groupapp/group/ru.php app/views/groupapp/group/_editbar.tpl app/views/groupapp/group/create.tpl app/views/groupapp/group/customize.tpl app/views/groupapp/group/edit_customize.tpl app/views/groupapp/group/edit_info.tpl app/views/groupapp/group/edit_members.tpl app/views/groupapp/group/edit_moderators.tpl public/stylesheets/groupapp/Group.css Added Paths: ----------- app/views/groupapp/group/_customize.tpl app/views/groupapp/group/_info.tpl app/views/groupapp/group/group_info.tpl Modified: app/controllers/groupapp/group_controller.php =================================================================== --- app/controllers/groupapp/group_controller.php 2008-04-17 09:01:04 UTC (rev 123) +++ app/controllers/groupapp/group_controller.php 2008-04-17 09:36:18 UTC (rev 124) @@ -70,6 +70,12 @@ $this->importErrors( $this->GroupappGroup->getErrors() ); } + function group_info () { + if (!empty($this->params['id']) && $this->GroupappGroup->find($this->params['id'])) { + $this->group = $this->GroupappGroup->find($this->params['id']); + } + } + function browse () { } Modified: app/locales/groupapp/group/ru.php =================================================================== --- app/locales/groupapp/group/ru.php 2008-04-17 09:01:04 UTC (rev 123) +++ app/locales/groupapp/group/ru.php 2008-04-17 09:36:18 UTC (rev 124) @@ -17,10 +17,11 @@ $dictionary['Search Groups'] = 'Поиск групп'; $dictionary['Step'] = 'Шаг'; -$dictionary['Group Info'] = 'Информация о группе'; +$dictionary['Group Info'] = 'Инфо о группе'; $dictionary['Customize'] = 'Дополнительно'; $dictionary['Members'] = 'Участники'; $dictionary['Moderators'] = 'Модераторы'; +$dictionary['Back to'] = 'Обратно в'; $dictionary['Group Name'] = 'Название группы'; $dictionary['Description'] = 'Описание'; Added: app/views/groupapp/group/_customize.tpl =================================================================== --- app/views/groupapp/group/_customize.tpl (rev 0) +++ app/views/groupapp/group/_customize.tpl 2008-04-17 09:36:18 UTC (rev 124) @@ -0,0 +1,145 @@ + <div class="formrow"> + <?= $controller->renderErrors() ?> + </div> + + <div class="picture"></div> + + <div class="formrow"> + <label>_{Website}:</label> + <div class="formcol"> + <?= $form_helper->text_field('group', 'website', array('class' => 'textinput')) ?> + </div> + <div class="clearfix"></div> + </div> + + <div class="formrow"> + <label>_{Options}:</label> + <div class="formcol"> + <label class="checkbox"><?= $form_helper->check_box('group', 'show_related_groups', array('class' => 'checkboxinput')) ?> _{Show related groups}.</label> + </div> + <div class="clearfix"></div> + </div> + + <div class="formrow"> + <label> </label> + <div class="formcol"> + <label class="checkbox"><?= $form_helper->check_box('group', 'show_discussion_board', array('class' => 'checkboxinput')) ?> _{Enable discussion board}.</label> + </div> + <div class="clearfix"></div> + </div> + + <div class="formrow"> + <label> </label> + <div class="formcol"> + <label class="checkbox"><?= $form_helper->check_box('group', 'show_wall', array('class' => 'checkboxinput')) ?> _{Enable the Wall}.</label> + </div> + <div class="clearfix"></div> + </div> + + <div class="formrow"> + <label> </label> + <div class="formcol"> + <label class="checkbox"><?= $form_helper->check_box('group', 'show_photos', array('class' => 'checkboxinput')) ?> _{Enable photos}.</label> + </div> + <div class="clearfix"></div> + </div> + <div class="formrow"> + <label> </label> + <div class="formcol"> + <div class="formblock border"> + <label class="radiobutton"><?= $form_helper->radio_button('group', 'photo_member', '0', array('checked' => 'checked')) ?> _{Allow all members to upload photos}.</label> + <label class="radiobutton"><?= $form_helper->radio_button('group', 'photo_member', '1') ?> _{Only allow admins to upload photos}.</label> + <div class="clearfix"></div> + </div> + </div> + <div class="clearfix"></div> + </div> + + <div class="formrow"> + <label> </label> + <div class="formcol"> + <label class="checkbox"><?= $form_helper->check_box('group', 'show_videos', array('class' => 'checkboxinput')) ?> _{Enable videos}.</label> + </div> + <div class="clearfix"></div> + </div> + <div class="formrow"> + <label> </label> + <div class="formcol"> + <div class="formblock border"> + <label class="radiobutton"><?= $form_helper->radio_button('group', 'video_member', '0', array('checked' => 'checked')) ?> _{Allow all members to upload videos}.</label> + <label class="radiobutton"><?= $form_helper->radio_button('group', 'video_member', '1') ?> _{Only allow admins to upload videos}.</label> + <div class="clearfix"></div> + </div> + </div> + <div class="clearfix"></div> + </div> + + <div class="formrow"> + <label>_{Access}:</label> + <div class="formcol"> + <label class="radiobutton"><?= $form_helper->radio_button('group', 'access', '0', array('checked' => 'checked')) ?> _{This group is open}.</label> + </div> + <div class="clearfix"></div> + </div> + <div class="formrow"> + <label> </label> + <div class="formcol"> + <div class="formblock gray"> + _{Anyone can join and invite others to join. Anyone can see the group information. Anyone can see the following: the discussion board, the wall, videos and photos.} + </div> + </div> + <div class="clearfix"></div> + </div> + + <div class="formrow"> + <label> </label> + <div class="formcol"> + <label class="radiobutton"><?= $form_helper->radio_button('group', 'access', '1') ?> _{This group is closed}.</label> + </div> + <div class="clearfix"></div> + </div> + <div class="formrow"> + <label> </label> + <div class="formcol"> + <div class="formblock gray"> + _{Administrative approval is required for new members to join. Anyone can see the group information. Only the members will be able to see the following: the discussion board, the wall, videos and photos.} + </div> + </div> + <div class="clearfix"></div> + </div> + + <div class="formrow"> + <label> </label> + <div class="formcol"> + <label class="radiobutton"><?= $form_helper->radio_button('group', 'access', '2') ?> _{This group is secret}.</label> + </div> + <div class="clearfix"></div> + </div> + <div class="formrow"> + <label> </label> + <div class="formcol"> + <div class="formblock gray"> + _{The group will not appear in search results or in the profiles of its members. Membership is by invitation only, and only members can see the group information. Only the members will be able to see the following: the discussion board, the wall, videos and photos.} + </div> + </div> + <div class="clearfix"></div> + </div> + + <div class="formrow"> + <label>_{Publicize}:</label> + <div class="formcol"> + <label class="checkbox"><?= $form_helper->check_box('group', 'show_in_search', array('class' => 'checkboxinput', 'checked' => 'checked')) ?> _{Show this group in search results}.</label> + </div> + <div class="clearfix"></div> + </div> + + <div class="formrow"> + <label> </label> + <div class="formcol"> + <input class="submitinput" type="submit" value="_{Save Changes}"> + <input class="cancelinput" type="button" value="_{Cancel}"> + </div> + <div class="clearfix"></div> + </div> + <div class="clearfix"></div> + Modified: app/views/groupapp/group/_editbar.tpl =================================================================== --- app/views/groupapp/group/_editbar.tpl 2008-04-17 09:01:04 UTC (rev 123) +++ app/views/groupapp/group/_editbar.tpl 2008-04-17 09:36:18 UTC (rev 124) @@ -1,11 +1,16 @@ <div class="minitabs"> <div class="left"> <ul class="toggle_minitabs"> - <li class="first"><a href="/groupapp/group/edit_info/{group.id?}" class="<?= $step == 'edit_info' ? 'selected' : '' ?>">_{Group Info}</a> + <li><a href="/groupapp/group/edit_info/{group.id?}" class="<?= $step == 'edit_info' ? 'selected' : '' ?>">_{Group Info}</a> </li><li><a href="/groupapp/group/edit_customize/{group.id?}" class="<?= $step == 'edit_customize' ? 'selected' : '' ?>">_{Customize}</a> </li><li><a href="/groupapp/group/edit_moderators/{group.id?}" class="<?= $step == 'edit_moderators' ? 'selected' : '' ?>">_{Moderators}</a> </li><li><a href="/groupapp/group/edit_members/{group.id?}" class="<?= $step == 'edit_members' ? 'selected' : '' ?>">_{Members}</a></li> </ul> </div> + <div class="right"> + <ul class="toggle_minitabs"> + <li><a href="/groupapp/group/group_info/{group.id?}">_{Back to} {group.name?}</a></li> + </ul> + </div> </div> <div class="clearfix"> </div> Added: app/views/groupapp/group/_info.tpl =================================================================== --- app/views/groupapp/group/_info.tpl (rev 0) +++ app/views/groupapp/group/_info.tpl 2008-04-17 09:36:18 UTC (rev 124) @@ -0,0 +1,42 @@ + <tr> + <td class="tlabel">_{Group Name}:<br><small>(_{required})</small></td> + <td><?= $form_helper->text_field('group', 'name', array('class' => 'textinput')) ?></td> + </tr> + <tr> + <td class="tlabel">_{Description}:<br><small>(_{required})</small></td> + <td><?= $form_helper->text_area('group', 'description', array('rows' => '5')) ?></td> + </tr> + <tr> + <td class="tlabel">_{Group Type}:<br><small>(_{required})</small></td> + <td> + <?= $form_options_helper->select('group', + 'type_id', + $GroupappGroupType->collect( + $GroupappGroupType->find('all', array('conditions' => array("parent_id = 0"))), + 'name', + 'id'), + array(), + array('prompt' => $controller->t('Select Category:')) + ) ?> + </td> + </tr> + <tr> + <td class="tlabel">_{Recent News}:</td> + <td><?= $form_helper->text_area('group', 'recent_news', array('rows' => '5')) ?></td> + </tr> + <tr> + <td class="tlabel">_{Office}:</td> + <td><?= $form_helper->text_field('group', 'office', array('class' => 'textinput')) ?></td> + </tr> + <tr> + <td class="tlabel">_{Email}:</td> + <td><?= $form_helper->text_field('group', 'email', array('class' => 'textinput')) ?></td> + </tr> + <tr> + <td class="tlabel">_{Street}:</td> + <td><?= $form_helper->text_field('group', 'street', array('class' => 'textinput')) ?></td> + </tr> + <tr> + <td class="tlabel">_{City/Town}:</td> + <td><?= $form_helper->text_field('group', 'city', array('class' => 'textinput') )?></td> + </tr> Modified: app/views/groupapp/group/create.tpl =================================================================== --- app/views/groupapp/group/create.tpl 2008-04-17 09:01:04 UTC (rev 123) +++ app/views/groupapp/group/create.tpl 2008-04-17 09:36:18 UTC (rev 124) @@ -14,49 +14,8 @@ <form action="/groupapp/group/create/{id}" method="post"> <table class="editor"> <tbody> + <?= $controller->renderPartial("info") ?> <tr> - <td class="tlabel">_{Group Name}:<br><small>(_{required})</small></td> - <td><?= $form_helper->text_field('group', 'name', array('class' => 'textinput')) ?></td> - </tr> - <tr> - <td class="tlabel">_{Description}:<br><small>(_{required})</small></td> - <td><?= $form_helper->text_area('group', 'description', array('rows' => '5')) ?></td> - </tr> - <tr> - <td class="tlabel">_{Group Type}:<br><small>(_{required})</small></td> - <td> - <?= $form_options_helper->select('group', - 'type_id', - $GroupappGroupType->collect( - $GroupappGroupType->find('all', array('conditions' => array("parent_id = 0"))), - 'name', - 'id'), - array(), - array('prompt' => $controller->t('Select Category:')) - ) ?> - </td> - </tr> - <tr> - <td class="tlabel">_{Recent News}:</td> - <td><?= $form_helper->text_area('group', 'recent_news', array('rows' => '5')) ?></td> - </tr> - <tr> - <td class="tlabel">_{Office}:</td> - <td><?= $form_helper->text_field('group', 'office', array('class' => 'textinput')) ?></td> - </tr> - <tr> - <td class="tlabel">_{Email}:</td> - <td><?= $form_helper->text_field('group', 'email', array('class' => 'textinput')) ?></td> - </tr> - <tr> - <td class="tlabel">_{Street}:</td> - <td><?= $form_helper->text_field('group', 'street', array('class' => 'textinput')) ?></td> - </tr> - <tr> - <td class="tlabel">_{City/Town}:</td> - <td><?= $form_helper->text_field('group', 'city', array('class' => 'textinput') )?></td> - </tr> - <tr> <td class="tlabel"> </td> <td class="tsubmit"> <input class="submitinput" type="submit" value="_{Create Group}"> Modified: app/views/groupapp/group/customize.tpl =================================================================== --- app/views/groupapp/group/customize.tpl 2008-04-17 09:01:04 UTC (rev 123) +++ app/views/groupapp/group/customize.tpl 2008-04-17 09:36:18 UTC (rev 124) @@ -2,7 +2,7 @@ <div class="title_bar"> <div class="head"> - <div class="name groupapp">_{Edit} {group_name?}</div> + <div class="name groupapp">_{Edit} {group.name?}</div> </div> </div> <div class="clearfix"></div> @@ -11,151 +11,7 @@ <div class="editform"> <form action="/groupapp/group/customize/{group.id?}" method="post"> - <div class="picture"></div> - - <div class="formrow"> - <?= $controller->renderErrors() ?> - </div> - - <div class="formrow"> - <label>_{Website}:</label> - <div class="formcol"> - <?= $form_helper->text_field('group', 'website', array('class' => 'textinput')) ?> - </div> - <div class="clearfix"></div> - </div> - - <div class="formrow"> - <label>_{Options}:</label> - <div class="formcol"> - <label class="checkbox"><?= $form_helper->check_box('group', 'show_related_groups', array('class' => 'checkboxinput')) ?> _{Show related groups}.</label> - </div> - <div class="clearfix"></div> - </div> - - <div class="formrow"> - <label> </label> - <div class="formcol"> - <label class="checkbox"><?= $form_helper->check_box('group', 'show_discussion_board', array('class' => 'checkboxinput')) ?> _{Enable discussion board}.</label> - </div> - <div class="clearfix"></div> - </div> - - <div class="formrow"> - <label> </label> - <div class="formcol"> - <label class="checkbox"><?= $form_helper->check_box('group', 'show_wall', array('class' => 'checkboxinput')) ?> _{Enable the Wall}.</label> - </div> - <div class="clearfix"></div> - </div> - - <div class="formrow"> - <label> </label> - <div class="formcol"> - <label class="checkbox"><?= $form_helper->check_box('group', 'show_photos', array('class' => 'checkboxinput')) ?> _{Enable photos}.</label> - </div> - <div class="clearfix"></div> - </div> - <div class="formrow"> - <label> </label> - <div class="formcol"> - <div class="formblock border"> - <label class="radiobutton"><?= $form_helper->radio_button('group', 'photo_member', '0', array('checked' => 'checked')) ?> _{Allow all members to upload photos}.</label> - <label class="radiobutton"><?= $form_helper->radio_button('group', 'photo_member', '1') ?> _{Only allow admins to upload photos}.</label> - <div class="clearfix"></div> - </div> - </div> - <div class="clearfix"></div> - </div> - - <div class="formrow"> - <label> </label> - <div class="formcol"> - <label class="checkbox"><?= $form_helper->check_box('group', 'show_videos', array('class' => 'checkboxinput')) ?> _{Enable videos}.</label> - </div> - <div class="clearfix"></div> - </div> - <div class="formrow"> - <label> </label> - <div class="formcol"> - <div class="formblock border"> - <label class="radiobutton"><?= $form_helper->radio_button('group', 'video_member', '0', array('checked' => 'checked')) ?> _{Allow all members to upload videos}.</label> - <label class="radiobutton"><?= $form_helper->radio_button('group', 'video_member', '1') ?> _{Only allow admins to upload videos}.</label> - <div class="clearfix"></div> - </div> - </div> - <div class="clearfix"></div> - </div> - - <div class="formrow"> - <label>_{Access}:</label> - <div class="formcol"> - <label class="radiobutton"><?= $form_helper->radio_button('group', 'access', '0', array('checked' => 'checked')) ?> _{This group is open}.</label> - </div> - <div class="clearfix"></div> - </div> - <div class="formrow"> - <label> </label> - <div class="formcol"> - <div class="formblock gray"> - _{Anyone can join and invite others to join. Anyone can see the group information. Anyone can see the following: the discussion board, the wall, videos and photos.} - </div> - </div> - <div class="clearfix"></div> - </div> - - <div class="formrow"> - <label> </label> - <div class="formcol"> - <label class="radiobutton"><?= $form_helper->radio_button('group', 'access', '1') ?> _{This group is closed}.</label> - </div> - <div class="clearfix"></div> - </div> - <div class="formrow"> - <label> </label> - <div class="formcol"> - <div class="formblock gray"> - _{Administrative approval is required for new members to join. Anyone can see the group information. Only the members will be able to see the following: the discussion board, the wall, videos and photos.} - </div> - </div> - <div class="clearfix"></div> - </div> - - <div class="formrow"> - <label> </label> - <div class="formcol"> - <label class="radiobutton"><?= $form_helper->radio_button('group', 'access', '2') ?> _{This group is secret}.</label> - </div> - <div class="clearfix"></div> - </div> - <div class="formrow"> - <label> </label> - <div class="formcol"> - <div class="formblock gray"> - _{The group will not appear in search results or in the profiles of its members. Membership is by invitation only, and only members can see the group information. Only the members will be able to see the following: the discussion board, the wall, videos and photos.} - </div> - </div> - <div class="clearfix"></div> - </div> - - <div class="formrow"> - <label>_{Publicize}:</label> - <div class="formcol"> - <label class="checkbox"><?= $form_helper->check_box('group', 'show_in_search', array('class' => 'checkboxinput', 'checked' => 'checked')) ?> _{Show this group in search results}.</label> - </div> - <div class="clearfix"></div> - </div> - - <div class="formrow"> - <label> </label> - <div class="formcol"> - <input class="submitinput" type="submit" value="_{Save Changes}"> - <input class="cancelinput" type="button" value="_{Cancel}"> - </div> - <div class="clearfix"></div> - </div> - <div class="clearfix"></div> - + <?= $controller->renderPartial("customize") ?> </form> </div> Modified: app/views/groupapp/group/edit_customize.tpl =================================================================== --- app/views/groupapp/group/edit_customize.tpl 2008-04-17 09:01:04 UTC (rev 123) +++ app/views/groupapp/group/edit_customize.tpl 2008-04-17 09:36:18 UTC (rev 124) @@ -1,5 +1,3 @@ -<?= $controller->renderPartial("menu") ?> - <div class="title_bar"> <div class="head"> <div class="name groupapp">_{Edit} {group_name?}</div> @@ -8,3 +6,9 @@ <div class="clearfix"></div> <?= $controller->renderPartial("editbar") ?> + +<div class="editform"> + <form action="/groupapp/group/edit_customize/{group.id?}" method="post"> + <?= $controller->renderPartial("customize") ?> + </form> +</div> Modified: app/views/groupapp/group/edit_info.tpl =================================================================== --- app/views/groupapp/group/edit_info.tpl 2008-04-17 09:01:04 UTC (rev 123) +++ app/views/groupapp/group/edit_info.tpl 2008-04-17 09:36:18 UTC (rev 124) @@ -1,5 +1,3 @@ -<?= $controller->renderPartial("menu") ?> - <div class="title_bar"> <div class="head"> <div class="name groupapp">_{Edit} {group_name?}</div> @@ -8,3 +6,22 @@ <div class="clearfix"></div> <?= $controller->renderPartial("editbar") ?> + +<div class="form_editor"> + <?= $controller->renderErrors() ?> + <form action="/groupapp/group/edit_info/{id}" method="post"> + <table class="editor"> + <tbody> + <?= $controller->renderPartial("info") ?> + <tr> + <td class="tlabel"> </td> + <td class="tsubmit"> + <input class="submitinput" type="submit" value="_{Save Changes}"> + <input class="cancelinput" type="button" value="_{Cancel}"> + </td> + </tr> + </tbody> + </table> + </form> +</div> +<div class="clearfix"></div> Modified: app/views/groupapp/group/edit_members.tpl =================================================================== --- app/views/groupapp/group/edit_members.tpl 2008-04-17 09:01:04 UTC (rev 123) +++ app/views/groupapp/group/edit_members.tpl 2008-04-17 09:36:18 UTC (rev 124) @@ -1,5 +1,3 @@ -<?= $controller->renderPartial("menu") ?> - <div class="title_bar"> <div class="head"> <div class="name groupapp">_{Invite people to} {group_name?}</div> Modified: app/views/groupapp/group/edit_moderators.tpl =================================================================== --- app/views/groupapp/group/edit_moderators.tpl 2008-04-17 09:01:04 UTC (rev 123) +++ app/views/groupapp/group/edit_moderators.tpl 2008-04-17 09:36:18 UTC (rev 124) @@ -1,5 +1,3 @@ -<?= $controller->renderPartial("menu") ?> - <div class="title_bar"> <div class="head"> <div class="name groupapp">_{Invite people to} {group_name?}</div> Added: app/views/groupapp/group/group_info.tpl =================================================================== --- app/views/groupapp/group/group_info.tpl (rev 0) +++ app/views/groupapp/group/group_info.tpl 2008-04-17 09:36:18 UTC (rev 124) @@ -0,0 +1 @@ +<?= $controller->renderPartial("menu") ?> \ No newline at end of file Modified: public/stylesheets/groupapp/Group.css =================================================================== --- public/stylesheets/groupapp/Group.css 2008-04-17 09:01:04 UTC (rev 123) +++ public/stylesheets/groupapp/Group.css 2008-04-17 09:36:18 UTC (rev 124) @@ -126,10 +126,10 @@ .editor td.tsubmit { padding: 5px 10px 5px 20px; - border-bottom: solid 1px #cccccc; } .editor td.tnote { + border-top: solid 1px #cccccc; padding: 10px 0px 0px 0px; width: 300px; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <di...@us...> - 2008-04-17 09:00:59
|
Revision: 123 http://isocial.svn.sourceforge.net/isocial/?rev=123&view=rev Author: dim0s77 Date: 2008-04-17 02:01:04 -0700 (Thu, 17 Apr 2008) Log Message: ----------- Added templates for group edition Modified Paths: -------------- app/controllers/groupapp/group_controller.php app/locales/groupapp/group/ru.php app/views/groupapp/group/_bar.tpl app/views/groupapp/group/edit_members.tpl public/stylesheets/Application.css public/stylesheets/reset.css Added Paths: ----------- app/views/groupapp/group/_editbar.tpl app/views/groupapp/group/edit_customize.tpl app/views/groupapp/group/edit_info.tpl app/views/groupapp/group/edit_moderators.tpl Modified: app/controllers/groupapp/group_controller.php =================================================================== --- app/controllers/groupapp/group_controller.php 2008-04-15 18:35:30 UTC (rev 122) +++ app/controllers/groupapp/group_controller.php 2008-04-17 09:01:04 UTC (rev 123) @@ -43,8 +43,20 @@ $this->importErrors( $this->GroupappGroup->getErrors() ); } + function edit_info () { + $this->step = 'edit_info'; + } + + function edit_customize () { + $this->step = 'edit_customize'; + } + + function edit_moderators () { + $this->step = 'edit_moderators'; + } + function edit_members () { - $this->step = 'group_members'; + $this->step = 'edit_members'; if (!empty($this->params['member'])){ $this->GroupappGroup->setAttributes($this->params['member']); if ($this->Request->isPost() && $this->GroupappGroup->save()){ Modified: app/locales/groupapp/group/ru.php =================================================================== --- app/locales/groupapp/group/ru.php 2008-04-15 18:35:30 UTC (rev 122) +++ app/locales/groupapp/group/ru.php 2008-04-17 09:01:04 UTC (rev 123) @@ -20,6 +20,7 @@ $dictionary['Group Info'] = 'Информация о группе'; $dictionary['Customize'] = 'Дополнительно'; $dictionary['Members'] = 'Участники'; +$dictionary['Moderators'] = 'Модераторы'; $dictionary['Group Name'] = 'Название группы'; $dictionary['Description'] = 'Описание'; Modified: app/views/groupapp/group/_bar.tpl =================================================================== --- app/views/groupapp/group/_bar.tpl 2008-04-15 18:35:30 UTC (rev 122) +++ app/views/groupapp/group/_bar.tpl 2008-04-17 09:01:04 UTC (rev 123) @@ -5,8 +5,7 @@ ?><li><a href="/groupapp/group/customize/{group.id?}" class="<? if ($step == 'group_customize') { echo 'selected'; } else if ($step == 'group_members') { echo ''; } else echo 'disabled' ?>">_{Step} 2: _{Customize}</a></li><? - ?><li><a href="/groupapp/group/edit_members/{group.id?}" class="<? if ($step == 'group_members') { echo 'selected'; } - else echo 'disabled' ?>">_{Step} 3: _{Members}</a></li> + ?><li><a href="/groupapp/group/edit_members/{group.id?}" class="disabled">_{Step} 3: _{Members}</a></li> </ul> </div> </div> Added: app/views/groupapp/group/_editbar.tpl =================================================================== --- app/views/groupapp/group/_editbar.tpl (rev 0) +++ app/views/groupapp/group/_editbar.tpl 2008-04-17 09:01:04 UTC (rev 123) @@ -0,0 +1,11 @@ +<div class="minitabs"> + <div class="left"> + <ul class="toggle_minitabs"> + <li class="first"><a href="/groupapp/group/edit_info/{group.id?}" class="<?= $step == 'edit_info' ? 'selected' : '' ?>">_{Group Info}</a> + </li><li><a href="/groupapp/group/edit_customize/{group.id?}" class="<?= $step == 'edit_customize' ? 'selected' : '' ?>">_{Customize}</a> + </li><li><a href="/groupapp/group/edit_moderators/{group.id?}" class="<?= $step == 'edit_moderators' ? 'selected' : '' ?>">_{Moderators}</a> + </li><li><a href="/groupapp/group/edit_members/{group.id?}" class="<?= $step == 'edit_members' ? 'selected' : '' ?>">_{Members}</a></li> + </ul> + </div> +</div> +<div class="clearfix"> </div> Added: app/views/groupapp/group/edit_customize.tpl =================================================================== --- app/views/groupapp/group/edit_customize.tpl (rev 0) +++ app/views/groupapp/group/edit_customize.tpl 2008-04-17 09:01:04 UTC (rev 123) @@ -0,0 +1,10 @@ +<?= $controller->renderPartial("menu") ?> + +<div class="title_bar"> + <div class="head"> + <div class="name groupapp">_{Edit} {group_name?}</div> + </div> +</div> +<div class="clearfix"></div> + +<?= $controller->renderPartial("editbar") ?> Added: app/views/groupapp/group/edit_info.tpl =================================================================== --- app/views/groupapp/group/edit_info.tpl (rev 0) +++ app/views/groupapp/group/edit_info.tpl 2008-04-17 09:01:04 UTC (rev 123) @@ -0,0 +1,10 @@ +<?= $controller->renderPartial("menu") ?> + +<div class="title_bar"> + <div class="head"> + <div class="name groupapp">_{Edit} {group_name?}</div> + </div> +</div> +<div class="clearfix"></div> + +<?= $controller->renderPartial("editbar") ?> Modified: app/views/groupapp/group/edit_members.tpl =================================================================== --- app/views/groupapp/group/edit_members.tpl 2008-04-15 18:35:30 UTC (rev 122) +++ app/views/groupapp/group/edit_members.tpl 2008-04-17 09:01:04 UTC (rev 123) @@ -7,7 +7,7 @@ </div> <div class="clearfix"></div> -<?= $controller->renderPartial("bar") ?> +<?= $controller->renderPartial("editbar") ?> <div class="formwrapper"> <form action="/groupapp/group/edit_members/{group.id?}" method="post"> Added: app/views/groupapp/group/edit_moderators.tpl =================================================================== --- app/views/groupapp/group/edit_moderators.tpl (rev 0) +++ app/views/groupapp/group/edit_moderators.tpl 2008-04-17 09:01:04 UTC (rev 123) @@ -0,0 +1,10 @@ +<?= $controller->renderPartial("menu") ?> + +<div class="title_bar"> + <div class="head"> + <div class="name groupapp">_{Invite people to} {group_name?}</div> + </div> +</div> +<div class="clearfix"></div> + +<?= $controller->renderPartial("editbar") ?> Modified: public/stylesheets/Application.css =================================================================== --- public/stylesheets/Application.css 2008-04-15 18:35:30 UTC (rev 122) +++ public/stylesheets/Application.css 2008-04-17 09:01:04 UTC (rev 123) @@ -408,7 +408,6 @@ border-left: 0px; color: #333; font-weight: bold; - margin-rigth: 10px; padding :4px 8px 6px 9px; background: #f1f1f1; } @@ -626,7 +625,7 @@ .minitabs .left { float: left; - padding-left: 10px; + padding-left: 8px; margin-bottom: -1px; } @@ -660,6 +659,11 @@ outline: 0px; } +.toggle_minitabs li a:hover { + background: #c5cee1; + text-decoration: none; +} + .toggle_minitabs li a.selected { background: #3b5998; color: #ffffff; Modified: public/stylesheets/reset.css =================================================================== --- public/stylesheets/reset.css 2008-04-15 18:35:30 UTC (rev 122) +++ public/stylesheets/reset.css 2008-04-17 09:01:04 UTC (rev 123) @@ -30,7 +30,7 @@ blockquote:before, blockquote:after, q:before, q:after { content: ''; - content: none; + /* content: none; */ } /* remember to define focus styles! */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <agu...@us...> - 2008-04-15 19:14:39
|
Revision: 122 http://isocial.svn.sourceforge.net/isocial/?rev=122&view=rev Author: aguidrevitch Date: 2008-04-15 11:35:30 -0700 (Tue, 15 Apr 2008) Log Message: ----------- Prototype's Event.observe does PUSH event handler, not replaces Modified Paths: -------------- app/views/layouts/application.tpl app/views/shared/loggedin/pageheader.tpl Modified: app/views/layouts/application.tpl =================================================================== --- app/views/layouts/application.tpl 2008-04-14 16:59:39 UTC (rev 121) +++ app/views/layouts/application.tpl 2008-04-15 18:35:30 UTC (rev 122) @@ -11,20 +11,6 @@ <script src="/javascripts/scriptaculous.js?load=effects,controls,autocomplete" type="text/javascript"></script> <script src="/javascripts/autocomplete.js" type="text/javascript"></script> <script src="/javascripts/dialog.js" type="text/javascript"></script> -<script type="text/javascript"> - function push_onload_handler (func) { - if (!window._onload) window._onload = []; - window._onload.push(func); - } - - window.onload = function (event) { - if (window._onload) { - for (var i = 0; i < window._onload.length; i++) { - window._onload[i](event); - } - } - } -</script> </head> <body id="application"> <div id="main"> Modified: app/views/shared/loggedin/pageheader.tpl =================================================================== --- app/views/shared/loggedin/pageheader.tpl 2008-04-14 16:59:39 UTC (rev 121) +++ app/views/shared/loggedin/pageheader.tpl 2008-04-15 18:35:30 UTC (rev 122) @@ -8,11 +8,9 @@ </ul> <script> - push_onload_handler( - function (event) { - new Ajax.PeriodicalUpdater('messages_count', '/message/inbox_count', { - method: 'get', frequency: 3, decay: 0 - }); - } - ); + Event.observe(window,'load',function() { + new Ajax.PeriodicalUpdater('messages_count', '/message/inbox_count', { + method: 'get', frequency: 3, decay: 0 + }); + }); </script> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <di...@us...> - 2008-04-14 16:59:35
|
Revision: 121 http://isocial.svn.sourceforge.net/isocial/?rev=121&view=rev Author: dim0s77 Date: 2008-04-14 09:59:39 -0700 (Mon, 14 Apr 2008) Log Message: ----------- now group is created and custom edited in three steps. refactoring Modified Paths: -------------- app/controllers/groupapp/group_controller.php app/controllers/profile_controller.php app/installers/groupapp/group_installer.php app/installers/groupapp/russian_installer.php app/models/groupapp_group.php app/views/groupapp/group/_bar.tpl app/views/groupapp/group/create.tpl app/views/groupapp/group/customize.tpl app/views/groupapp/group/members.tpl app/views/profile/show.tpl public/stylesheets/Application.css public/stylesheets/groupapp/Group.css Added Paths: ----------- app/models/groupapp_member.php app/models/groupapp_member_role.php app/views/groupapp/group/edit_members.tpl Removed Paths: ------------- app/controllers/group_controller.php Deleted: app/controllers/group_controller.php =================================================================== --- app/controllers/group_controller.php 2008-04-13 13:26:14 UTC (rev 120) +++ app/controllers/group_controller.php 2008-04-14 16:59:39 UTC (rev 121) @@ -1,13 +0,0 @@ -<?php - -class GroupController extends ApplicationController -{ - function index () { - $this->redirectTo(array('action' => 'show')); - } - - function show () { - } -} - -?> Modified: app/controllers/groupapp/group_controller.php =================================================================== --- app/controllers/groupapp/group_controller.php 2008-04-13 13:26:14 UTC (rev 120) +++ app/controllers/groupapp/group_controller.php 2008-04-14 16:59:39 UTC (rev 121) @@ -2,7 +2,7 @@ class Groupapp_GroupController extends ApplicationController { - var $models = array('GroupappGroup', 'GroupappGroupType'); + var $models = array('GroupappGroup', 'GroupappGroupType', 'GroupappMember', 'GroupappMemberRole'); function index () { $this->group_types = $this->GroupappGroupType->find('all', array('conditions' => array("parent_id = 0"))); @@ -13,8 +13,14 @@ if (!empty($this->params['group'])){ $this->GroupappGroup->setAttributes($this->params['group']); if ($this->Request->isPost() && $this->GroupappGroup->save()){ - $this->step = 'group_customize'; - $this->redirectToAction('customize'); + $owner = $this->GroupappMemberRole->find(1); + $group_member = $this->GroupappGroup->group_member->build(); + $group_member->user->assign($this->current_user); + $group_member->role->assign($owner); + if ($group_member->save()) { + $this->step = 'group_customize'; + $this->redirectTo(array('action' => 'customize', 'id' => $this->GroupappGroup->getId())); + } } else { $this->importErrors( $this->GroupappGroup->getErrors() ); } @@ -23,26 +29,33 @@ function customize () { $this->step = 'group_customize'; - if (!empty($this->params['group'])){ - $this->GroupappGroup->setAttributes($this->params['group']); - if ($this->Request->isPost() && $this->GroupappGroup->save()){ + if (!empty($this->params['group']) && !empty($this->params['id'])){ + $group = $this->GroupappGroup->findFirst(array( 'id' => $this->params['id'] )); + $group->setAttributes($this->params['group']); + if ($this->Request->isPost() && $group->save()) { $this->step = 'group_members'; - $this->redirectToAction('members'); - } else { - $this->importErrors( $this->GroupappGroup->getErrors() ); + $this->redirectTo(array('action' => 'edit_members', 'id' => $group->getId())); + return; } + } else if (!empty($this->params['id']) && $this->GroupappGroup->find($this->params['id'])) { + $this->group = $this->GroupappGroup->find($this->params['id']); } + $this->importErrors( $this->GroupappGroup->getErrors() ); } - function members () { + function edit_members () { $this->step = 'group_members'; if (!empty($this->params['member'])){ $this->GroupappGroup->setAttributes($this->params['member']); if ($this->Request->isPost() && $this->GroupappGroup->save()){ - } else { - $this->importErrors( $this->GroupappGroup->getErrors() ); + return; } + } else if (!empty($this->params['id']) && $this->GroupappGroup->find($this->params['id'])) { + $this->group = $this->GroupappGroup->find($this->params['id']); + $this->members = $this->GroupappMember->find('all', array('conditions' => array("group_id = ?", $this->group->getId()), + 'include' => 'user')); } + $this->importErrors( $this->GroupappGroup->getErrors() ); } function browse () { Modified: app/controllers/profile_controller.php =================================================================== --- app/controllers/profile_controller.php 2008-04-13 13:26:14 UTC (rev 120) +++ app/controllers/profile_controller.php 2008-04-14 16:59:39 UTC (rev 121) @@ -10,7 +10,9 @@ function show () { $id = !empty($this->params['id']) ? $this->params['id'] : $this->current_user->getId(); - $this->user = $this->User->find($id); + if ($id) { + $this->user = $this->User->find($id); + } } function basic () { Modified: app/installers/groupapp/group_installer.php =================================================================== --- app/installers/groupapp/group_installer.php 2008-04-13 13:26:14 UTC (rev 120) +++ app/installers/groupapp/group_installer.php 2008-04-14 16:59:39 UTC (rev 121) @@ -36,12 +36,14 @@ `street` char(100) NOT NULL DEFAULT '', `city` char(100) NOT NULL DEFAULT '', `website` char(100) NOT NULL DEFAULT '', - `show_related_group` tinyint(1) NOT NULL DEFAULT '1', + `show_related_groups` tinyint(1) NOT NULL DEFAULT '1', `show_discussion_board` tinyint(1) NOT NULL DEFAULT '1', `show_wall` tinyint(1) NOT NULL DEFAULT '1', `show_photos` tinyint(1) NOT NULL DEFAULT '1', + `photo_member` tinyint(1) NOT NULL DEFAULT '0', `show_videos` tinyint(1) NOT NULL DEFAULT '1', - `access` tinyint(1) NOT NULL DEFAULT '1', + `video_member` tinyint(1) NOT NULL DEFAULT '0', + `access` int(1) UNSIGNED NOT NULL DEFAULT '0', `show_in_search` tinyint(1) NOT NULL DEFAULT '1', FOREIGN KEY (type_id) REFERENCES groupapp_group_types(id), @@ -49,32 +51,31 @@ ) ENGINE=InnoDB"); $this->execute( - "CREATE TABLE `groupapp_group_user_roles` ( - `id` tinyint(1) NOT NULL PRIMARY KEY AUTO_INCREMENT, + "CREATE TABLE `groupapp_member_roles` ( + `id` int(1) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, `en_name` char(15) NOT NULL DEFAULT '' ) ENGINE=InnoDB"); - $this->execute("INSERT INTO `groupapp_group_user_roles` (id, en_name) VALUES (1, 'Administrator')"); - $this->execute("INSERT INTO `groupapp_group_user_roles` (id, en_name) VALUES (2, 'Moderator')"); - $this->execute("INSERT INTO `groupapp_group_user_roles` (id, en_name) VALUES (3, 'Member')"); + $this->execute("INSERT INTO `groupapp_member_roles` (id, en_name) VALUES (1, 'Owner')"); + $this->execute("INSERT INTO `groupapp_member_roles` (id, en_name) VALUES (2, 'Administrator')"); + $this->execute("INSERT INTO `groupapp_member_roles` (id, en_name) VALUES (3, 'Moderator')"); + $this->execute("INSERT INTO `groupapp_member_roles` (id, en_name) VALUES (4, 'Member')"); $this->execute( - "CREATE TABLE `groupapp_group_users` ( - `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` tinyint(1) NOT NULL DEFAULT '3', - `is_owner` tinyint(1) NOT NULL DEFAULT '0', + "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_group_user_roles(id) + FOREIGN KEY (role_id) REFERENCES groupapp_member_roles(id) ) ENGINE=InnoDB"); - } function down_1() { - $this->dropTable('groupapp_group_users'); - $this->dropTable('groupapp_group_user_roles'); + $this->dropTable('groupapp_members'); + $this->dropTable('groupapp_member_roles'); $this->dropTable('groupapp_groups'); $this->dropTable('groupapp_group_types'); } Modified: app/installers/groupapp/russian_installer.php =================================================================== --- app/installers/groupapp/russian_installer.php 2008-04-13 13:26:14 UTC (rev 120) +++ app/installers/groupapp/russian_installer.php 2008-04-14 16:59:39 UTC (rev 121) @@ -18,10 +18,11 @@ $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Отдых и Спорт' WHERE id = 10"); $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Студенческие группы' WHERE id = 11"); - $this->execute("ALTER TABLE groupapp_group_user_roles ADD COLUMN {$locale}_name char(100) NOT NULL AFTER en_name"); - $this->execute("UPDATE groupapp_group_user_roles set {$locale}_name ='Администратор' WHERE id = 1"); - $this->execute("UPDATE groupapp_group_user_roles set {$locale}_name ='Модератор' WHERE id = 2"); - $this->execute("UPDATE groupapp_group_user_roles set {$locale}_name ='Участник' WHERE id = 3"); + $this->execute("ALTER TABLE groupapp_member_roles ADD COLUMN {$locale}_name char(100) NOT NULL AFTER en_name"); + $this->execute("UPDATE groupapp_member_roles set {$locale}_name ='Владелец' WHERE id = 1"); + $this->execute("UPDATE groupapp_member_roles set {$locale}_name ='Администратор' WHERE id = 2"); + $this->execute("UPDATE groupapp_member_roles set {$locale}_name ='Модератор' WHERE id = 3"); + $this->execute("UPDATE groupapp_member_roles set {$locale}_name ='Участник' WHERE id = 4"); } function down_1() Modified: app/models/groupapp_group.php =================================================================== --- app/models/groupapp_group.php 2008-04-13 13:26:14 UTC (rev 120) +++ app/models/groupapp_group.php 2008-04-14 16:59:39 UTC (rev 121) @@ -2,6 +2,10 @@ class GroupappGroup extends ActiveRecord { + var $has_one = array('group_member' => array('class_name' => 'GroupappMember', + 'foreign_key' => 'group_id'), + ); + function validateOnCreate () { $this->validatesPresenceOf('name', 'Name is missing|please enter the name'); Added: app/models/groupapp_member.php =================================================================== --- app/models/groupapp_member.php (rev 0) +++ app/models/groupapp_member.php 2008-04-14 16:59:39 UTC (rev 121) @@ -0,0 +1,10 @@ +<?php + +class GroupappMember extends ActiveRecord +{ + var $belongs_to = array('user' => array('class_name' => 'User', 'primary_key_name' => 'user_id'), + 'role' => array('class_name' => 'GroupMemberRole', 'primary_key_name' => 'role_id') + ); +} + +?> Added: app/models/groupapp_member_role.php =================================================================== --- app/models/groupapp_member_role.php (rev 0) +++ app/models/groupapp_member_role.php 2008-04-14 16:59:39 UTC (rev 121) @@ -0,0 +1,7 @@ +<?php + +class GroupappMemberRole extends ActiveRecord +{ +} + +?> Modified: app/views/groupapp/group/_bar.tpl =================================================================== --- app/views/groupapp/group/_bar.tpl 2008-04-13 13:26:14 UTC (rev 120) +++ app/views/groupapp/group/_bar.tpl 2008-04-14 16:59:39 UTC (rev 121) @@ -2,10 +2,10 @@ <div class="left"> <ul class="toggle_minitabs"> <li class="first"><a href="/groupapp/group/create" class="<?= $step == 'group_info' ? 'selected' : '' ?>">_{Step} 1: _{Group Info}</a></li><? - ?><li><a href="/groupapp/group/customize/{group_id?}" class="<? if ($step == 'group_customize') { echo 'selected'; } + ?><li><a href="/groupapp/group/customize/{group.id?}" class="<? if ($step == 'group_customize') { echo 'selected'; } else if ($step == 'group_members') { echo ''; } else echo 'disabled' ?>">_{Step} 2: _{Customize}</a></li><? - ?><li><a href="/groupapp/group/members/{group_id?}" class="<? if ($step == 'group_members') { echo 'selected'; } + ?><li><a href="/groupapp/group/edit_members/{group.id?}" class="<? if ($step == 'group_members') { echo 'selected'; } else echo 'disabled' ?>">_{Step} 3: _{Members}</a></li> </ul> </div> Modified: app/views/groupapp/group/create.tpl =================================================================== --- app/views/groupapp/group/create.tpl 2008-04-13 13:26:14 UTC (rev 120) +++ app/views/groupapp/group/create.tpl 2008-04-14 16:59:39 UTC (rev 121) @@ -11,7 +11,7 @@ <div class="form_editor"> <?= $controller->renderErrors() ?> - <form action="/groupapp/group/create" method="post"> + <form action="/groupapp/group/create/{id}" method="post"> <table class="editor"> <tbody> <tr> Modified: app/views/groupapp/group/customize.tpl =================================================================== --- app/views/groupapp/group/customize.tpl 2008-04-13 13:26:14 UTC (rev 120) +++ app/views/groupapp/group/customize.tpl 2008-04-14 16:59:39 UTC (rev 121) @@ -10,7 +10,7 @@ <?= $controller->renderPartial("bar") ?> <div class="editform"> - <form action="/groupapp/group/customize/{group_id?}" method="post"> + <form action="/groupapp/group/customize/{group.id?}" method="post"> <div class="picture"></div> <div class="formrow"> @@ -28,7 +28,7 @@ <div class="formrow"> <label>_{Options}:</label> <div class="formcol"> - <label class="checkbox"><?= $form_helper->check_box('group', 'show_related_groups', array('class' => 'checkboxinput', 'checked' => 'checked')) ?> _{Show related groups}.</label> + <label class="checkbox"><?= $form_helper->check_box('group', 'show_related_groups', array('class' => 'checkboxinput')) ?> _{Show related groups}.</label> </div> <div class="clearfix"></div> </div> @@ -36,7 +36,7 @@ <div class="formrow"> <label> </label> <div class="formcol"> - <label class="checkbox"><?= $form_helper->check_box('group', 'enable_discussion_board', array('class' => 'checkboxinput', 'checked' => 'checked')) ?> _{Enable discussion board}.</label> + <label class="checkbox"><?= $form_helper->check_box('group', 'show_discussion_board', array('class' => 'checkboxinput')) ?> _{Enable discussion board}.</label> </div> <div class="clearfix"></div> </div> @@ -44,7 +44,7 @@ <div class="formrow"> <label> </label> <div class="formcol"> - <label class="checkbox"><?= $form_helper->check_box('group', 'enable_the_wall', array('class' => 'checkboxinput', 'checked' => 'checked')) ?> _{Enable the Wall}.</label> + <label class="checkbox"><?= $form_helper->check_box('group', 'show_wall', array('class' => 'checkboxinput')) ?> _{Enable the Wall}.</label> </div> <div class="clearfix"></div> </div> @@ -52,7 +52,7 @@ <div class="formrow"> <label> </label> <div class="formcol"> - <label class="checkbox"><?= $form_helper->check_box('group', 'enable_photos', array('class' => 'checkboxinput', 'checked' => 'checked')) ?> _{Enable photos}.</label> + <label class="checkbox"><?= $form_helper->check_box('group', 'show_photos', array('class' => 'checkboxinput')) ?> _{Enable photos}.</label> </div> <div class="clearfix"></div> </div> @@ -60,8 +60,8 @@ <label> </label> <div class="formcol"> <div class="formblock border"> - <label class="radiobutton"><?= $form_helper->radio_button('group', 'photo_member', 'members', array('checked' => 'checked')) ?> _{Allow all members to upload photos}.</label> - <label class="radiobutton"><?= $form_helper->radio_button('group', 'photo_member', 'admins') ?> _{Only allow admins to upload photos}.</label> + <label class="radiobutton"><?= $form_helper->radio_button('group', 'photo_member', '0', array('checked' => 'checked')) ?> _{Allow all members to upload photos}.</label> + <label class="radiobutton"><?= $form_helper->radio_button('group', 'photo_member', '1') ?> _{Only allow admins to upload photos}.</label> <div class="clearfix"></div> </div> </div> @@ -71,7 +71,7 @@ <div class="formrow"> <label> </label> <div class="formcol"> - <label class="checkbox"><?= $form_helper->check_box('group', 'enable_videos', array('class' => 'checkboxinput', 'checked' => 'checked')) ?> _{Enable videos}.</label> + <label class="checkbox"><?= $form_helper->check_box('group', 'show_videos', array('class' => 'checkboxinput')) ?> _{Enable videos}.</label> </div> <div class="clearfix"></div> </div> @@ -79,8 +79,8 @@ <label> </label> <div class="formcol"> <div class="formblock border"> - <label class="radiobutton"><?= $form_helper->radio_button('group', 'video_member', 'members', array('checked' => 'checked')) ?> _{Allow all members to upload videos}.</label> - <label class="radiobutton"><?= $form_helper->radio_button('group', 'video_member', 'admins') ?> _{Only allow admins to upload videos}.</label> + <label class="radiobutton"><?= $form_helper->radio_button('group', 'video_member', '0', array('checked' => 'checked')) ?> _{Allow all members to upload videos}.</label> + <label class="radiobutton"><?= $form_helper->radio_button('group', 'video_member', '1') ?> _{Only allow admins to upload videos}.</label> <div class="clearfix"></div> </div> </div> @@ -90,7 +90,7 @@ <div class="formrow"> <label>_{Access}:</label> <div class="formcol"> - <label class="radiobutton"><?= $form_helper->radio_button('group', 'access', 'open', array('checked' => 'checked')) ?> _{This group is open}.</label> + <label class="radiobutton"><?= $form_helper->radio_button('group', 'access', '0', array('checked' => 'checked')) ?> _{This group is open}.</label> </div> <div class="clearfix"></div> </div> @@ -107,7 +107,7 @@ <div class="formrow"> <label> </label> <div class="formcol"> - <label class="radiobutton"><?= $form_helper->radio_button('group', 'access', 'closed') ?> _{This group is closed}.</label> + <label class="radiobutton"><?= $form_helper->radio_button('group', 'access', '1') ?> _{This group is closed}.</label> </div> <div class="clearfix"></div> </div> @@ -124,7 +124,7 @@ <div class="formrow"> <label> </label> <div class="formcol"> - <label class="radiobutton"><?= $form_helper->radio_button('group', 'access', 'secret') ?> _{This group is secret}.</label> + <label class="radiobutton"><?= $form_helper->radio_button('group', 'access', '2') ?> _{This group is secret}.</label> </div> <div class="clearfix"></div> </div> @@ -141,7 +141,7 @@ <div class="formrow"> <label>_{Publicize}:</label> <div class="formcol"> - <label class="checkbox"><?= $form_helper->check_box('group', 'is_show_in_search', array('class' => 'checkboxinput', 'checked' => 'checked')) ?> _{Show this group in search results}.</label> + <label class="checkbox"><?= $form_helper->check_box('group', 'show_in_search', array('class' => 'checkboxinput', 'checked' => 'checked')) ?> _{Show this group in search results}.</label> </div> <div class="clearfix"></div> </div> @@ -149,7 +149,7 @@ <div class="formrow"> <label> </label> <div class="formcol"> - <input class="submitinput" type="submit" value="_{Create Group}"> + <input class="submitinput" type="submit" value="_{Save Changes}"> <input class="cancelinput" type="button" value="_{Cancel}"> </div> <div class="clearfix"></div> Added: app/views/groupapp/group/edit_members.tpl =================================================================== --- app/views/groupapp/group/edit_members.tpl (rev 0) +++ app/views/groupapp/group/edit_members.tpl 2008-04-14 16:59:39 UTC (rev 121) @@ -0,0 +1,50 @@ +<?= $controller->renderPartial("menu") ?> + +<div class="title_bar"> + <div class="head"> + <div class="name groupapp">_{Invite people to} {group_name?}</div> + </div> +</div> +<div class="clearfix"></div> + +<?= $controller->renderPartial("bar") ?> + +<div class="formwrapper"> +<form action="/groupapp/group/edit_members/{group.id?}" method="post"> + <div class="invite_column"> + <div class="header_text">_{Invite Friends on PROJECT_NAME}:</div> + <div class="friends_list"></div> + <div class="submit"> + <input class="submitinput" type="submit" value="_{Invite Friends}"> + </div> + </div> + + <div class="members"> + <div class="submenushort"> + <div class="menu_block selector"> + <label for="action_select">_{Show}: + <select onchange="doselect(this)" id="action_select" name="action_select"> + <option selected="selected" value="members">_{Members}</option> + <option value="not_replied">_{Not Yet Replied}</option> + <option value="blocked">_{Blocked}</option> + </select> + </label> + </div> + </div> + <div class="list_header"> + _{Members}: <? if (isset($members)) { echo count($members); } else { echo '0'; } ?> _{out of} <? if (isset($members)) { echo count($members); } else { echo '0'; } ?> + </div> + <div class="members_list"> + {?members}{loop members} + <div class="row"> + <div class="member_name"><a href="/profile/show/{member.id}">{member.user.name}</a></div> + <div class="action"><a href="#" onclick="return false;">_{remove}</a></div> + </div> + {end}{end} + </div> + </div> + + <div class="clearfix"></div> + +</form> +</div> Modified: app/views/groupapp/group/members.tpl =================================================================== --- app/views/groupapp/group/members.tpl 2008-04-13 13:26:14 UTC (rev 120) +++ app/views/groupapp/group/members.tpl 2008-04-14 16:59:39 UTC (rev 121) @@ -1,46 +0,0 @@ -<?= $controller->renderPartial("menu") ?> - -<div class="title_bar"> - <div class="head"> - <div class="name groupapp">_{Invite people to} {group_name?}</div> - </div> -</div> -<div class="clearfix"></div> - -<?= $controller->renderPartial("bar") ?> - -<div class="formwrapper"> -<form action="/groupapp/group/edit_members/{group_id?}" method="post"> - <div class="invite_column"> - <div class="header_text">_{Invite Friends on PROJECT_NAME}:</div> - <div class="friends_list"></div> - <div class="submit"> - <input class="submitinput" type="submit" value="_{Invite Friends}"> - </div> - </div> - - <div class="members"> - <div class="submenushort"> - <div class="menu_block selector"> - <label for="action_select">_{Show}: - <select onchange="doselect(this)" id="action_select" name="action_select"> - <option selected="selected" value="members">_{Members}</option> - <option value="not_replied">_{Not Yet Replied}</option> - <option value="blocked">_{Blocked}</option> - </select> - </label> - </div> - </div> - <div class="list_header"> - _{Members}: 0 _{out of} 0 - </div> - <div class="members_list"> - </div> - </div> - - - <div class="clearfix"></div> - -</form> -</div> - Modified: app/views/profile/show.tpl =================================================================== --- app/views/profile/show.tpl 2008-04-13 13:26:14 UTC (rev 120) +++ app/views/profile/show.tpl 2008-04-14 16:59:39 UTC (rev 121) @@ -1 +1 @@ -<?= $user->email ?> \ No newline at end of file +{user.email?} \ No newline at end of file Modified: public/stylesheets/Application.css =================================================================== --- public/stylesheets/Application.css 2008-04-13 13:26:14 UTC (rev 120) +++ public/stylesheets/Application.css 2008-04-14 16:59:39 UTC (rev 121) @@ -555,7 +555,7 @@ color: #000000; text-align: left; padding: 3px 0px 3px 0px; - width: 300px; + width: 400px; } .formrow .formcol { Modified: public/stylesheets/groupapp/Group.css =================================================================== --- public/stylesheets/groupapp/Group.css 2008-04-13 13:26:14 UTC (rev 120) +++ public/stylesheets/groupapp/Group.css 2008-04-14 16:59:39 UTC (rev 121) @@ -175,4 +175,20 @@ .members .members_list { background: #ffffff; height: 240px; + overflow: auto; +} + +.members_list .row { + border-bottom: 1px solid #dddddd; + float: left; +} + +.members_list .row .member_name { + margin: 5px 0px 5px 15px; + float: left; +} + +.members_list .row .action { + float: right; + margin: 5px 12px 5px 0px; } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <di...@us...> - 2008-04-13 13:26:09
|
Revision: 120 http://isocial.svn.sourceforge.net/isocial/?rev=120&view=rev Author: dim0s77 Date: 2008-04-13 06:26:14 -0700 (Sun, 13 Apr 2008) Log Message: ----------- installers is updated Modified Paths: -------------- app/installers/groupapp/group_installer.php app/installers/groupapp/russian_installer.php app/installers/user_installer.php Modified: app/installers/groupapp/group_installer.php =================================================================== --- app/installers/groupapp/group_installer.php 2008-04-13 12:18:29 UTC (rev 119) +++ app/installers/groupapp/group_installer.php 2008-04-13 13:26:14 UTC (rev 120) @@ -26,23 +26,55 @@ $this->execute( "CREATE TABLE `groupapp_groups` ( - `id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT, - `type_id` int(11) NOT NULL DEFAULT '0', - `name` char(100) NOT NULL DEFAULT '', - `description` char(255) NOT NULL DEFAULT '', - `recent_news` char(255) NOT NULL DEFAULT '', - `office` char(100) NOT NULL DEFAULT '', - `email` char(100) NOT NULL DEFAULT '', - `street` char(100) NOT NULL DEFAULT '', - `city` char(100) NOT NULL DEFAULT '', + `id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT, + `type_id` int(11) NOT NULL DEFAULT '0', + `name` char(100) NOT NULL DEFAULT '', + `description` char(255) NOT NULL DEFAULT '', + `recent_news` char(255) NOT NULL DEFAULT '', + `office` char(100) NOT NULL DEFAULT '', + `email` char(100) NOT NULL DEFAULT '', + `street` char(100) NOT NULL DEFAULT '', + `city` char(100) NOT NULL DEFAULT '', + `website` char(100) NOT NULL DEFAULT '', + `show_related_group` tinyint(1) NOT NULL DEFAULT '1', + `show_discussion_board` tinyint(1) NOT NULL DEFAULT '1', + `show_wall` tinyint(1) NOT NULL DEFAULT '1', + `show_photos` tinyint(1) NOT NULL DEFAULT '1', + `show_videos` tinyint(1) NOT NULL DEFAULT '1', + `access` tinyint(1) NOT NULL DEFAULT '1', + `show_in_search` tinyint(1) NOT NULL DEFAULT '1', + FOREIGN KEY (type_id) REFERENCES groupapp_group_types(id), INDEX type_idx (type_id) ) ENGINE=InnoDB"); + $this->execute( + "CREATE TABLE `groupapp_group_user_roles` ( + `id` tinyint(1) NOT NULL PRIMARY KEY AUTO_INCREMENT, + `en_name` char(15) NOT NULL DEFAULT '' + ) ENGINE=InnoDB"); + + $this->execute("INSERT INTO `groupapp_group_user_roles` (id, en_name) VALUES (1, 'Administrator')"); + $this->execute("INSERT INTO `groupapp_group_user_roles` (id, en_name) VALUES (2, 'Moderator')"); + $this->execute("INSERT INTO `groupapp_group_user_roles` (id, en_name) VALUES (3, 'Member')"); + + $this->execute( + "CREATE TABLE `groupapp_group_users` ( + `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` tinyint(1) NOT NULL DEFAULT '3', + `is_owner` tinyint(1) NOT NULL DEFAULT '0', + FOREIGN KEY (group_id) REFERENCES groupapp_groups(id), + FOREIGN KEY (role_id) REFERENCES groupapp_group_user_roles(id) + ) ENGINE=InnoDB"); + } function down_1() { + $this->dropTable('groupapp_group_users'); + $this->dropTable('groupapp_group_user_roles'); $this->dropTable('groupapp_groups'); $this->dropTable('groupapp_group_types'); } Modified: app/installers/groupapp/russian_installer.php =================================================================== --- app/installers/groupapp/russian_installer.php 2008-04-13 12:18:29 UTC (rev 119) +++ app/installers/groupapp/russian_installer.php 2008-04-13 13:26:14 UTC (rev 120) @@ -18,6 +18,10 @@ $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Отдых и Спорт' WHERE id = 10"); $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Студенческие группы' WHERE id = 11"); + $this->execute("ALTER TABLE groupapp_group_user_roles ADD COLUMN {$locale}_name char(100) NOT NULL AFTER en_name"); + $this->execute("UPDATE groupapp_group_user_roles set {$locale}_name ='Администратор' WHERE id = 1"); + $this->execute("UPDATE groupapp_group_user_roles set {$locale}_name ='Модератор' WHERE id = 2"); + $this->execute("UPDATE groupapp_group_user_roles set {$locale}_name ='Участник' WHERE id = 3"); } function down_1() Modified: app/installers/user_installer.php =================================================================== --- app/installers/user_installer.php 2008-04-13 12:18:29 UTC (rev 119) +++ app/installers/user_installer.php 2008-04-13 13:26:14 UTC (rev 120) @@ -81,7 +81,7 @@ `name` char(100) NOT NULL DEFAULT '', `votes` int(11) NOT NULL DEFAULT 0, FOREIGN KEY (country_id) REFERENCES countries(id), - FOREIGN KEY (country_id) REFERENCES countries(id), + FOREIGN KEY (region_id) REFERENCES regions(id), INDEX name_idx (name) ) ENGINE=InnoDB"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <agu...@us...> - 2008-04-13 12:18:24
|
Revision: 119 http://isocial.svn.sourceforge.net/isocial/?rev=119&view=rev Author: aguidrevitch Date: 2008-04-13 05:18:29 -0700 (Sun, 13 Apr 2008) Log Message: ----------- patch synced with latest akelos Modified Paths: -------------- akelos.diff Modified: akelos.diff =================================================================== --- akelos.diff 2008-04-11 16:21:23 UTC (rev 118) +++ akelos.diff 2008-04-13 12:18:29 UTC (rev 119) @@ -1,6 +1,6 @@ Index: lib/Ak.php =================================================================== ---- lib/Ak.php (revision 537) +--- lib/Ak.php (revision 558) +++ lib/Ak.php (working copy) @@ -183,6 +183,11 @@ return @$string[$try_whith_lang]; @@ -25,9 +25,9 @@ } Index: lib/AkActionController.php =================================================================== ---- lib/AkActionController.php (revision 537) +--- lib/AkActionController.php (revision 558) +++ lib/AkActionController.php (working copy) -@@ -756,7 +756,14 @@ +@@ -750,7 +750,14 @@ */ function t($string, $array = null) { @@ -43,7 +43,7 @@ } -@@ -1943,6 +1950,9 @@ +@@ -1946,6 +1953,9 @@ { if(method_exists(&$this, $action)){ call_user_func_array(array(&$this, $action), @(array)$this->passed_args); @@ -55,7 +55,7 @@ Index: lib/AkActionView/helpers/text_helper.php =================================================================== ---- lib/AkActionView/helpers/text_helper.php (revision 537) +--- lib/AkActionView/helpers/text_helper.php (revision 558) +++ lib/AkActionView/helpers/text_helper.php (working copy) @@ -518,8 +518,18 @@ */ @@ -80,9 +80,9 @@ /** Index: lib/AkActiveRecord.php =================================================================== ---- lib/AkActiveRecord.php (revision 537) +--- lib/AkActiveRecord.php (revision 558) +++ lib/AkActiveRecord.php (working copy) -@@ -5008,6 +5008,7 @@ +@@ -5012,6 +5012,7 @@ $sql .= empty($options['joins']) ? '' : " {$options['joins']} "; @@ -90,7 +90,7 @@ empty($options['conditions']) ? null : $this->addConditions($sql, $options['conditions']); if (!empty($options['group'])){ -@@ -5018,6 +5019,11 @@ +@@ -5022,6 +5023,11 @@ $sql .= empty($options['order']) ? '' : " ORDER BY {$options['order']} "; $this->_db->addLimitAndOffset($sql, $options); $sql .= $use_workaround ? ')' : ''; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <di...@us...> - 2008-04-11 16:21:29
|
Revision: 118 http://isocial.svn.sourceforge.net/isocial/?rev=118&view=rev Author: dim0s77 Date: 2008-04-11 09:21:23 -0700 (Fri, 11 Apr 2008) Log Message: ----------- Added scroll offset for dialog Modified Paths: -------------- public/javascripts/dialog.js Modified: public/javascripts/dialog.js =================================================================== --- public/javascripts/dialog.js 2008-04-05 18:07:33 UTC (rev 117) +++ public/javascripts/dialog.js 2008-04-11 16:21:23 UTC (rev 118) @@ -32,6 +32,7 @@ var offset = this.reference.viewportOffset(); var dimensions = this.reference.getDimensions(); var vdimensions = document.viewport.getDimensions(); + var vscrolloffset = document.viewport.getScrollOffsets(); if (this.options['hfloat'] == 'right') { this.dialog.style.right = vdimensions.width - offset.left - dimensions.width + "px"; @@ -40,7 +41,7 @@ } if (this.options['vfloat'] == 'bottom') { - this.dialog.style.top = offset.top + dimensions.height + "px"; + this.dialog.style.top = offset.top + dimensions.height + vscrolloffset.top + "px"; } else { this.dialog.style.bottom = offset.top + "px"; } @@ -105,4 +106,4 @@ }); - \ No newline at end of file + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <agu...@us...> - 2008-04-05 18:07:28
|
Revision: 117 http://isocial.svn.sourceforge.net/isocial/?rev=117&view=rev Author: aguidrevitch Date: 2008-04-05 11:07:33 -0700 (Sat, 05 Apr 2008) Log Message: ----------- latest akelos patches Modified Paths: -------------- akelos.diff Modified: akelos.diff =================================================================== --- akelos.diff 2008-03-28 16:54:26 UTC (rev 116) +++ akelos.diff 2008-04-05 18:07:33 UTC (rev 117) @@ -1,6 +1,6 @@ Index: lib/Ak.php =================================================================== ---- lib/Ak.php (revision 513) +--- lib/Ak.php (revision 537) +++ lib/Ak.php (working copy) @@ -183,6 +183,11 @@ return @$string[$try_whith_lang]; @@ -25,7 +25,7 @@ } Index: lib/AkActionController.php =================================================================== ---- lib/AkActionController.php (revision 513) +--- lib/AkActionController.php (revision 537) +++ lib/AkActionController.php (working copy) @@ -756,7 +756,14 @@ */ @@ -55,7 +55,7 @@ Index: lib/AkActionView/helpers/text_helper.php =================================================================== ---- lib/AkActionView/helpers/text_helper.php (revision 513) +--- lib/AkActionView/helpers/text_helper.php (revision 537) +++ lib/AkActionView/helpers/text_helper.php (working copy) @@ -518,8 +518,18 @@ */ @@ -80,37 +80,17 @@ /** Index: lib/AkActiveRecord.php =================================================================== ---- lib/AkActiveRecord.php (revision 513) +--- lib/AkActiveRecord.php (revision 537) +++ lib/AkActiveRecord.php (working copy) -@@ -5003,8 +5003,27 @@ +@@ -5008,6 +5008,7 @@ $sql .= empty($options['joins']) ? '' : " {$options['joins']} "; -+ //$this->santizeSql(conditions); -+ if(!empty($options['conditions']) && is_array($options['conditions'])){ -+ if (isset($options['conditions'][0]) && strstr($options['conditions'][0], '?') && count($options['conditions']) > 1){ -+ //array('conditions' => array("name=?",$name)) -+ $pattern = array_shift($options['conditions']); -+ $options['bind'] = array_values($options['conditions']); -+ $options['conditions'] = $pattern; -+ }elseif (isset($options['conditions'][0])){ -+ //array('conditions' => array("user_name = :user_name", ':user_name' => 'hilario') -+ $pattern = array_shift($options['conditions']); -+ $options['conditions'] = str_replace(array_keys($options['conditions']), array_values($this->getSanitizedConditionsArray($options['conditions'])),$pattern); -+ }else{ -+ //array('conditions' => array('user_name'=>'Hilario')) -+ $options['conditions'] = join(' AND ',(array)$this->getAttributesQuoted($options['conditions'])); -+ } -+ } -+ -+ ++ $this->_sanitizeConditionsVariables($options); empty($options['conditions']) ? null : $this->addConditions($sql, $options['conditions']); -+ if (!empty($options['group'])){ - $sql .= " GROUP BY {$options['group_field']} "; - $sql .= empty($options['having']) ? '' : " HAVING {$options['having']} "; -@@ -5013,6 +5032,11 @@ +@@ -5018,6 +5019,11 @@ $sql .= empty($options['order']) ? '' : " ORDER BY {$options['order']} "; $this->_db->addLimitAndOffset($sql, $options); $sql .= $use_workaround ? ')' : ''; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <di...@us...> - 2008-03-28 16:54:20
|
Revision: 116 http://isocial.svn.sourceforge.net/isocial/?rev=116&view=rev Author: dim0s77 Date: 2008-03-28 09:54:26 -0700 (Fri, 28 Mar 2008) Log Message: ----------- Added tabs customize and members to the groups Modified Paths: -------------- app/controllers/groupapp/group_controller.php app/locales/groupapp/group/ru.php app/views/groupapp/group/_bar.tpl app/views/groupapp/group/create.tpl public/stylesheets/Application.css public/stylesheets/groupapp/Group.css Added Paths: ----------- app/views/groupapp/group/customize.tpl app/views/groupapp/group/members.tpl Removed Paths: ------------- app/views/groupapp/group/_group_customize.tpl app/views/groupapp/group/_group_info.tpl Modified: app/controllers/groupapp/group_controller.php =================================================================== --- app/controllers/groupapp/group_controller.php 2008-03-27 08:23:02 UTC (rev 115) +++ app/controllers/groupapp/group_controller.php 2008-03-28 16:54:26 UTC (rev 116) @@ -14,12 +14,37 @@ $this->GroupappGroup->setAttributes($this->params['group']); if ($this->Request->isPost() && $this->GroupappGroup->save()){ $this->step = 'group_customize'; + $this->redirectToAction('customize'); } else { $this->importErrors( $this->GroupappGroup->getErrors() ); } } } + function customize () { + $this->step = 'group_customize'; + if (!empty($this->params['group'])){ + $this->GroupappGroup->setAttributes($this->params['group']); + if ($this->Request->isPost() && $this->GroupappGroup->save()){ + $this->step = 'group_members'; + $this->redirectToAction('members'); + } else { + $this->importErrors( $this->GroupappGroup->getErrors() ); + } + } + } + + function members () { + $this->step = 'group_members'; + if (!empty($this->params['member'])){ + $this->GroupappGroup->setAttributes($this->params['member']); + if ($this->Request->isPost() && $this->GroupappGroup->save()){ + } else { + $this->importErrors( $this->GroupappGroup->getErrors() ); + } + } + } + function browse () { } Modified: app/locales/groupapp/group/ru.php =================================================================== --- app/locales/groupapp/group/ru.php 2008-03-27 08:23:02 UTC (rev 115) +++ app/locales/groupapp/group/ru.php 2008-03-28 16:54:26 UTC (rev 116) @@ -25,7 +25,6 @@ $dictionary['Description'] = 'Описание'; $dictionary['Group Type'] = 'Тип группы'; $dictionary['Select Category:'] = 'Выберите категорию:'; -$dictionary['Select'] = 'Выберите'; $dictionary['Recent News'] = 'Последние новости'; $dictionary['Office'] = 'Офис'; $dictionary['Street'] = 'Улица'; @@ -43,4 +42,35 @@ $dictionary['Group type is missing'] = 'Тип группы отсутствует'; $dictionary['please enter the group category'] = 'выберите, пожалуйста, категорию группы'; +$dictionary['Edit'] = 'Редактирование'; +$dictionary['Website'] = 'Адрес сайта'; +$dictionary['Options'] = 'Настройки'; +$dictionary['Show related groups'] = 'Показывать похожие группы'; +$dictionary['Enable discussion board'] = 'Включить форум'; +$dictionary['Enable the Wall'] = 'Включить доску объявлений'; +$dictionary['Enable photos'] = 'Включить фотографии'; +$dictionary['Allow all members to upload photos'] = 'Разрешить всем участникам загружать фото'; +$dictionary['Only allow admins to upload photos'] = 'Только администраторы могут загружать фото'; +$dictionary['Enable videos'] = 'Включить видео'; +$dictionary['Allow all members to upload videos'] = 'Разрешить всем участникам загружать видео'; +$dictionary['Only allow admins to upload videos'] = 'Только администраторы могут загружать видео'; +$dictionary['Access'] = 'Доступ'; +$dictionary['This group is open'] = 'Это открытая группа'; +$dictionary['This group is closed'] = 'Это закрытая группа'; +$dictionary['This group is secret'] = 'Это засекреченная группа'; +$dictionary['Anyone can join and invite others to join. Anyone can see the group information. Anyone can see the following: the discussion board, the wall, videos and photos.'] = + 'Каждый может присоединиться и пригласить других. Информацию о группе может увидеть каждый. Любой может увидеть форум, доску объявлений, видео и фото.'; +$dictionary['Administrative approval is required for new members to join. Anyone can see the group information. Only the members will be able to see the following: the discussion board, the wall, videos and photos.'] = + 'Для присоединения нового участника требуется разрешение администраторов. Информацию о группе может увидеть только участник группы. Только участники группы смогут увидеть форум, доску объявлений, видео и фото.'; +$dictionary['The group will not appear in search results or in the profiles of its members. Membership is by invitation only, and only members can see the group information. Only the members will be able to see the following: the discussion board, the wall, videos and photos.'] = + 'Эта группа не будет отображаться в результатах поиска или в профилях своих участников. Членство в группе возможно только по приглашению, и только участники группы могут видеть информацию о группе. Только участники смогут увидеть форум, доску объявлений, видео и фото.'; +$dictionary['Publicize'] = 'Опубликовать'; +$dictionary['Show this group in search results'] = 'Показывать эту группу в результатах поиска'; + +$dictionary['Invite people to'] = 'Пригласить людей в'; +$dictionary['Show'] = 'Показать'; +$dictionary['out of'] = 'из'; +$dictionary['Invite Friends'] = 'Пригласить друзей'; +$dictionary['Invite Friends on PROJECT_NAME'] = 'Пригласить друзей по PROJECT_NAME'; + ?> Modified: app/views/groupapp/group/_bar.tpl =================================================================== --- app/views/groupapp/group/_bar.tpl 2008-03-27 08:23:02 UTC (rev 115) +++ app/views/groupapp/group/_bar.tpl 2008-03-28 16:54:26 UTC (rev 116) @@ -2,8 +2,11 @@ <div class="left"> <ul class="toggle_minitabs"> <li class="first"><a href="/groupapp/group/create" class="<?= $step == 'group_info' ? 'selected' : '' ?>">_{Step} 1: _{Group Info}</a></li><? - ?><li><a class="disabled">_{Step} 2: _{Customize}</a></li><? - ?><li><a class="disabled">_{Step} 3: _{Members}</a></li> + ?><li><a href="/groupapp/group/customize/{group_id?}" class="<? if ($step == 'group_customize') { echo 'selected'; } + else if ($step == 'group_members') { echo ''; } + else echo 'disabled' ?>">_{Step} 2: _{Customize}</a></li><? + ?><li><a href="/groupapp/group/members/{group_id?}" class="<? if ($step == 'group_members') { echo 'selected'; } + else echo 'disabled' ?>">_{Step} 3: _{Members}</a></li> </ul> </div> </div> Deleted: app/views/groupapp/group/_group_customize.tpl =================================================================== --- app/views/groupapp/group/_group_customize.tpl 2008-03-27 08:23:02 UTC (rev 115) +++ app/views/groupapp/group/_group_customize.tpl 2008-03-28 16:54:26 UTC (rev 116) @@ -1 +0,0 @@ -customize \ No newline at end of file Deleted: app/views/groupapp/group/_group_info.tpl =================================================================== --- app/views/groupapp/group/_group_info.tpl 2008-03-27 08:23:02 UTC (rev 115) +++ app/views/groupapp/group/_group_info.tpl 2008-03-28 16:54:26 UTC (rev 116) @@ -1,55 +0,0 @@ -<tr> - <td class="tlabel">_{Group Name}:<br><small>(_{required})</small></td> - <td><?= $form_helper->text_field('group', 'name', array('class' => 'textinput')) ?></td> -</tr> -<tr> - <td class="tlabel">_{Description}:<br><small>(_{required})</small></td> - <td><?= $form_helper->text_area('group', 'description', array('rows' => '5')) ?></td> -</tr> -<tr> - <td class="tlabel">_{Group Type}:<br><small>(_{required})</small></td> - <td> - <?= $form_options_helper->select('group', - 'type_id', - $GroupappGroupType->collect( - $GroupappGroupType->find('all', array('conditions' => array("parent_id = 0"))), - 'name', - 'id'), - array(), - array('prompt' => $controller->t('Select')) - ) ?> - </td> -</tr> -<tr> - <td class="tlabel">_{Recent News}:</td> - <td><?= $form_helper->text_area('group', 'recent_news', array('rows' => '5')) ?></td> -</tr> -<tr> - <td class="tlabel">_{Office}:</td> - <td><?= $form_helper->text_field('group', 'office', array('class' => 'textinput')) ?></td> -</tr> -<tr> - <td class="tlabel">_{Email}:</td> - <td><?= $form_helper->text_field('group', 'email', array('class' => 'textinput')) ?></td> -</tr> -<tr> - <td class="tlabel">_{Street}:</td> - <td><?= $form_helper->text_field('group', 'street', array('class' => 'textinput')) ?></td> -</tr> -<tr> - <td class="tlabel">_{City/Town}:</td> - <td><?= $form_helper->text_field('group', 'city', array('class' => 'textinput') )?></td> -</tr> -<tr> - <td class="tlabel"> </td> - <td class="tsubmit"> - <input class="submitinput" type="submit" value="_{Create Group}"> - <input class="cancelinput" type="button" value="_{Cancel}"> - </td> -</tr> -<tr> - <td class="tlabel"> </td> - <td class="tnote"> - _{Note: groups that attack a specific person or group of people (e.g. racist, sexist, or other hate groups) will not be tolerated. Creating such a group will result in immediate termination of your PROJECT_NAME account.} - </td> -</tr> Modified: app/views/groupapp/group/create.tpl =================================================================== --- app/views/groupapp/group/create.tpl 2008-03-27 08:23:02 UTC (rev 115) +++ app/views/groupapp/group/create.tpl 2008-03-28 16:54:26 UTC (rev 116) @@ -14,7 +14,61 @@ <form action="/groupapp/group/create" method="post"> <table class="editor"> <tbody> - <?= $controller->renderPartial($step) ?> + <tr> + <td class="tlabel">_{Group Name}:<br><small>(_{required})</small></td> + <td><?= $form_helper->text_field('group', 'name', array('class' => 'textinput')) ?></td> + </tr> + <tr> + <td class="tlabel">_{Description}:<br><small>(_{required})</small></td> + <td><?= $form_helper->text_area('group', 'description', array('rows' => '5')) ?></td> + </tr> + <tr> + <td class="tlabel">_{Group Type}:<br><small>(_{required})</small></td> + <td> + <?= $form_options_helper->select('group', + 'type_id', + $GroupappGroupType->collect( + $GroupappGroupType->find('all', array('conditions' => array("parent_id = 0"))), + 'name', + 'id'), + array(), + array('prompt' => $controller->t('Select Category:')) + ) ?> + </td> + </tr> + <tr> + <td class="tlabel">_{Recent News}:</td> + <td><?= $form_helper->text_area('group', 'recent_news', array('rows' => '5')) ?></td> + </tr> + <tr> + <td class="tlabel">_{Office}:</td> + <td><?= $form_helper->text_field('group', 'office', array('class' => 'textinput')) ?></td> + </tr> + <tr> + <td class="tlabel">_{Email}:</td> + <td><?= $form_helper->text_field('group', 'email', array('class' => 'textinput')) ?></td> + </tr> + <tr> + <td class="tlabel">_{Street}:</td> + <td><?= $form_helper->text_field('group', 'street', array('class' => 'textinput')) ?></td> + </tr> + <tr> + <td class="tlabel">_{City/Town}:</td> + <td><?= $form_helper->text_field('group', 'city', array('class' => 'textinput') )?></td> + </tr> + <tr> + <td class="tlabel"> </td> + <td class="tsubmit"> + <input class="submitinput" type="submit" value="_{Create Group}"> + <input class="cancelinput" type="button" value="_{Cancel}"> + </td> + </tr> + <tr> + <td class="tlabel"> </td> + <td class="tnote"> + _{Note: groups that attack a specific person or group of people (e.g. racist, sexist, or other hate groups) will not be tolerated. Creating such a group will result in immediate termination of your PROJECT_NAME account.} + </td> + </tr> </tbody> </table> </form> Added: app/views/groupapp/group/customize.tpl =================================================================== --- app/views/groupapp/group/customize.tpl (rev 0) +++ app/views/groupapp/group/customize.tpl 2008-03-28 16:54:26 UTC (rev 116) @@ -0,0 +1,161 @@ +<?= $controller->renderPartial("menu") ?> + +<div class="title_bar"> + <div class="head"> + <div class="name groupapp">_{Edit} {group_name?}</div> + </div> +</div> +<div class="clearfix"></div> + +<?= $controller->renderPartial("bar") ?> + +<div class="editform"> + <form action="/groupapp/group/customize/{group_id?}" method="post"> + <div class="picture"></div> + + <div class="formrow"> + <?= $controller->renderErrors() ?> + </div> + + <div class="formrow"> + <label>_{Website}:</label> + <div class="formcol"> + <?= $form_helper->text_field('group', 'website', array('class' => 'textinput')) ?> + </div> + <div class="clearfix"></div> + </div> + + <div class="formrow"> + <label>_{Options}:</label> + <div class="formcol"> + <label class="checkbox"><?= $form_helper->check_box('group', 'show_related_groups', array('class' => 'checkboxinput', 'checked' => 'checked')) ?> _{Show related groups}.</label> + </div> + <div class="clearfix"></div> + </div> + + <div class="formrow"> + <label> </label> + <div class="formcol"> + <label class="checkbox"><?= $form_helper->check_box('group', 'enable_discussion_board', array('class' => 'checkboxinput', 'checked' => 'checked')) ?> _{Enable discussion board}.</label> + </div> + <div class="clearfix"></div> + </div> + + <div class="formrow"> + <label> </label> + <div class="formcol"> + <label class="checkbox"><?= $form_helper->check_box('group', 'enable_the_wall', array('class' => 'checkboxinput', 'checked' => 'checked')) ?> _{Enable the Wall}.</label> + </div> + <div class="clearfix"></div> + </div> + + <div class="formrow"> + <label> </label> + <div class="formcol"> + <label class="checkbox"><?= $form_helper->check_box('group', 'enable_photos', array('class' => 'checkboxinput', 'checked' => 'checked')) ?> _{Enable photos}.</label> + </div> + <div class="clearfix"></div> + </div> + <div class="formrow"> + <label> </label> + <div class="formcol"> + <div class="formblock border"> + <label class="radiobutton"><?= $form_helper->radio_button('group', 'photo_member', 'members', array('checked' => 'checked')) ?> _{Allow all members to upload photos}.</label> + <label class="radiobutton"><?= $form_helper->radio_button('group', 'photo_member', 'admins') ?> _{Only allow admins to upload photos}.</label> + <div class="clearfix"></div> + </div> + </div> + <div class="clearfix"></div> + </div> + + <div class="formrow"> + <label> </label> + <div class="formcol"> + <label class="checkbox"><?= $form_helper->check_box('group', 'enable_videos', array('class' => 'checkboxinput', 'checked' => 'checked')) ?> _{Enable videos}.</label> + </div> + <div class="clearfix"></div> + </div> + <div class="formrow"> + <label> </label> + <div class="formcol"> + <div class="formblock border"> + <label class="radiobutton"><?= $form_helper->radio_button('group', 'video_member', 'members', array('checked' => 'checked')) ?> _{Allow all members to upload videos}.</label> + <label class="radiobutton"><?= $form_helper->radio_button('group', 'video_member', 'admins') ?> _{Only allow admins to upload videos}.</label> + <div class="clearfix"></div> + </div> + </div> + <div class="clearfix"></div> + </div> + + <div class="formrow"> + <label>_{Access}:</label> + <div class="formcol"> + <label class="radiobutton"><?= $form_helper->radio_button('group', 'access', 'open', array('checked' => 'checked')) ?> _{This group is open}.</label> + </div> + <div class="clearfix"></div> + </div> + <div class="formrow"> + <label> </label> + <div class="formcol"> + <div class="formblock gray"> + _{Anyone can join and invite others to join. Anyone can see the group information. Anyone can see the following: the discussion board, the wall, videos and photos.} + </div> + </div> + <div class="clearfix"></div> + </div> + + <div class="formrow"> + <label> </label> + <div class="formcol"> + <label class="radiobutton"><?= $form_helper->radio_button('group', 'access', 'closed') ?> _{This group is closed}.</label> + </div> + <div class="clearfix"></div> + </div> + <div class="formrow"> + <label> </label> + <div class="formcol"> + <div class="formblock gray"> + _{Administrative approval is required for new members to join. Anyone can see the group information. Only the members will be able to see the following: the discussion board, the wall, videos and photos.} + </div> + </div> + <div class="clearfix"></div> + </div> + + <div class="formrow"> + <label> </label> + <div class="formcol"> + <label class="radiobutton"><?= $form_helper->radio_button('group', 'access', 'secret') ?> _{This group is secret}.</label> + </div> + <div class="clearfix"></div> + </div> + <div class="formrow"> + <label> </label> + <div class="formcol"> + <div class="formblock gray"> + _{The group will not appear in search results or in the profiles of its members. Membership is by invitation only, and only members can see the group information. Only the members will be able to see the following: the discussion board, the wall, videos and photos.} + </div> + </div> + <div class="clearfix"></div> + </div> + + <div class="formrow"> + <label>_{Publicize}:</label> + <div class="formcol"> + <label class="checkbox"><?= $form_helper->check_box('group', 'is_show_in_search', array('class' => 'checkboxinput', 'checked' => 'checked')) ?> _{Show this group in search results}.</label> + </div> + <div class="clearfix"></div> + </div> + + <div class="formrow"> + <label> </label> + <div class="formcol"> + <input class="submitinput" type="submit" value="_{Create Group}"> + <input class="cancelinput" type="button" value="_{Cancel}"> + </div> + <div class="clearfix"></div> + </div> + <div class="clearfix"></div> + + </form> +</div> + Added: app/views/groupapp/group/members.tpl =================================================================== --- app/views/groupapp/group/members.tpl (rev 0) +++ app/views/groupapp/group/members.tpl 2008-03-28 16:54:26 UTC (rev 116) @@ -0,0 +1,46 @@ +<?= $controller->renderPartial("menu") ?> + +<div class="title_bar"> + <div class="head"> + <div class="name groupapp">_{Invite people to} {group_name?}</div> + </div> +</div> +<div class="clearfix"></div> + +<?= $controller->renderPartial("bar") ?> + +<div class="formwrapper"> +<form action="/groupapp/group/edit_members/{group_id?}" method="post"> + <div class="invite_column"> + <div class="header_text">_{Invite Friends on PROJECT_NAME}:</div> + <div class="friends_list"></div> + <div class="submit"> + <input class="submitinput" type="submit" value="_{Invite Friends}"> + </div> + </div> + + <div class="members"> + <div class="submenushort"> + <div class="menu_block selector"> + <label for="action_select">_{Show}: + <select onchange="doselect(this)" id="action_select" name="action_select"> + <option selected="selected" value="members">_{Members}</option> + <option value="not_replied">_{Not Yet Replied}</option> + <option value="blocked">_{Blocked}</option> + </select> + </label> + </div> + </div> + <div class="list_header"> + _{Members}: 0 _{out of} 0 + </div> + <div class="members_list"> + </div> + </div> + + + <div class="clearfix"></div> + +</form> +</div> + Modified: public/stylesheets/Application.css =================================================================== --- public/stylesheets/Application.css 2008-03-27 08:23:02 UTC (rev 115) +++ public/stylesheets/Application.css 2008-03-28 16:54:26 UTC (rev 116) @@ -461,12 +461,18 @@ #content .submenu { background: #f7f7f7; - border-bottom: 1px solid #ccc; + border-bottom: 1px solid #cccccc; padding: 8px 20px 8px 20px; float: left; width: 605px; } +#content .submenushort { + background: #f7f7f7; + border-bottom: 1px solid #cccccc; + padding: 5px 0px 5px 15px; +} + .submenu .menu_block { float: left; } @@ -506,9 +512,14 @@ } #content .editform { - margin: 20px auto 20px auto; + padding: 20px 0px 20px 0px; + background: #f7f7f7; } +#content .formwrapper { + background: #f7f7f7; +} + .editform .formrow { clear: both; vertical-align: top; @@ -521,7 +532,7 @@ width: 150px; float: left; text-align: right; - padding: 3px 10px 3px; + padding: 3px 10px 3px 0px; } .formrow label.shortlabel { @@ -533,15 +544,24 @@ .formrow label.checkbox { font-weight: normal; - color: #000; + color: #000000; text-align: left; - padding: 3px 0px 3px; + padding: 3px 0px 3px 0px; + width: 400px; } +.formrow label.radiobutton { + font-weight: normal; + color: #000000; + text-align: left; + padding: 3px 0px 3px 0px; + width: 300px; +} + .formrow .formcol { float: left; width: 360px; - padding: 3px 0px 3px 0px; + padding: 0px 0px 5px 0px; margin: 0px; } @@ -556,6 +576,21 @@ background: url('/images/lock.png') no-repeat 0px; } +.formrow .formblock { + width: 235px; + margin: 3px 0px 3px 10px; +} + +.formrow .formblock.border { + border-top: 1px solid #aaaaaa; + border-bottom: 1px solid #aaaaaa; +} + +.formrow .formblock.gray { + color: #777777; + margin: 0px 0px 0px 25px; +} + .formrow textarea { width: 200px; height: 100px; @@ -618,8 +653,7 @@ display: block; color: #3b5998; padding: 5px 4px 5px 4px; - margin: 0px 4px 0px 4px; - background: #ffffff; + margin: 0px 4px 1px 4px; } .toggle_minitabs li a:focus { @@ -631,34 +665,17 @@ color: #ffffff; } +.toggle_minitabs li a.selected:hover { + text-decoration: none; +} + .toggle_minitabs li a.disabled { background: #ffffff; color: #999999; cursor: default; - border-bottom: 1px solid #3b5998; } .toggle_minitabs li a.disabled:hover { - text-decoration:none; -} - -.toggle_minitabs li.last a.selected { - margin-left: -1px; - border-left: 1px solid #5973a9; - border-right: 1px solid #36538f; -} - -.toggle_minitabs li.first a.selected { - margin: 0px; - border-left: 1px solid #36538f; - border-right: 1px solid #5973a9; -} - -.toggle_minitabs li.first.last a.selected { - border: 1px solid #36538f; -} - -.toggle_minitabs li a.selected:hover { text-decoration: none; } Modified: public/stylesheets/groupapp/Group.css =================================================================== --- public/stylesheets/groupapp/Group.css 2008-03-27 08:23:02 UTC (rev 115) +++ public/stylesheets/groupapp/Group.css 2008-03-28 16:54:26 UTC (rev 116) @@ -133,3 +133,46 @@ padding: 10px 0px 0px 0px; width: 300px; } + +.formwrapper .invite_column { + float: right; + width: 230px; + height: 300px; + border-left: 1px solid #cccccc; +} + +.invite_column .header_text { + font-weight: bold; + font-size: 12px; + text-align: center; + padding: 10px 0px 3px 0px; + color: #777777; +} + +.invite_column .friends_list { + margin: 0px 10px 5px 10px; + background: #ffffff; + border: 1px solid #cccccc; + height: 230px; +} + +.invite_column .submit { + text-align: center; +} + +.formwrapper .members { + background: #ffffff; + margin-right: 231px; +} + +.members .list_header { + background: #ffffff; + border-bottom: 1px solid #dddddd; + padding: 8px 0px 5px 15px; + font-weight: bold; +} + +.members .members_list { + background: #ffffff; + height: 240px; +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <agu...@us...> - 2008-03-27 08:23:30
|
Revision: 115 http://isocial.svn.sourceforge.net/isocial/?rev=115&view=rev Author: aguidrevitch Date: 2008-03-27 01:23:02 -0700 (Thu, 27 Mar 2008) Log Message: ----------- groupapp installer is in groupapp folder Modified Paths: -------------- app/installers/user_installer.php Modified: app/installers/user_installer.php =================================================================== --- app/installers/user_installer.php 2008-03-27 07:37:01 UTC (rev 114) +++ app/installers/user_installer.php 2008-03-27 08:23:02 UTC (rev 115) @@ -238,40 +238,10 @@ INDEX user_idx (user_id) ) ENGINE=InnoDB"); - $this->execute( - "CREATE TABLE `groupapp_group_types` ( - `id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT, - `parent_id` int(11) NOT NULL DEFAULT '0', - `en_name` char(100) NOT NULL DEFAULT '' - ) ENGINE=InnoDB"); - - $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (1, 0, 'Business')"); - $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (2, 0, 'Common Interest')"); - $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (3, 0, 'Entertainment & Arts')"); - $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (4, 0, 'Geography')"); - $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (5, 0, 'Internet & Technology')"); - $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (6, 0, 'Just for Fun')"); - $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (7, 0, 'Music')"); - $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (8, 0, 'Organizations')"); - $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (9, 0, 'Sports & Recreation')"); - $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (10, 0, 'Student Group')"); - - $this->execute( - "CREATE TABLE `groupapp_groups` ( - `id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT, - `group_id` int(11) NOT NULL DEFAULT '0', - `en_name` char(100) NOT NULL DEFAULT '', - `en_desc` char(255) NOT NULL DEFAULT '', - FOREIGN KEY (group_id) REFERENCES group_types(id), - INDEX group_idx (group_id) - ) ENGINE=InnoDB"); - } function down_1() { - $this->dropTable('groupapp_group_types'); - $this->dropTable('groupapp_groups'); $this->dropTable('contact_profiles'); $this->dropTable('im_profiles'); $this->dropTable('ims'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <agu...@us...> - 2008-03-27 07:36:57
|
Revision: 114 http://isocial.svn.sourceforge.net/isocial/?rev=114&view=rev Author: aguidrevitch Date: 2008-03-27 00:37:01 -0700 (Thu, 27 Mar 2008) Log Message: ----------- new city javascript dialog added Modified Paths: -------------- app/application_controller.php app/controllers/profile_controller.php app/helpers/city_helper.php app/installers/user_installer.php app/models/city.php app/shared_model.php app/views/message/inbox.tpl app/views/message/outbox.tpl app/views/message/show.tpl app/views/profile/basic.tpl public/javascripts/dialog.js public/stylesheets/Application.css public/stylesheets/dialog.css Added Paths: ----------- app/controllers/city_controller.php app/locales/city/ app/locales/city/en.php app/locales/city/ru.php app/models/region.php app/views/city/ app/views/city/_regions.tpl app/views/city/add.tpl app/views/shared/new_city_dialog.tpl Modified: app/application_controller.php =================================================================== --- app/application_controller.php 2008-03-26 18:20:31 UTC (rev 113) +++ app/application_controller.php 2008-03-27 07:37:01 UTC (rev 114) @@ -20,7 +20,7 @@ var $_errors = array(); - var $app_models = array('User', 'Message'); + var $app_models = array('User', 'Message', 'Country', 'Region', 'City'); var $app_helpers = array('AutoComplete', 'City'); var $current_user; @@ -32,6 +32,12 @@ $controller->Response->body = str_replace('PROJECT_NAME', PROJECT_NAME, $controller->Response->body); } + /* disabling object auto-loading */ + function instantiateModelClass($model_class_name, $finder_options = array()) { + $finder_options = empty($finder_options) ? false : $finder_options; + return parent::instantiateModelClass($model_class_name, $finder_options); + } + function beforeAction ( $method = '' ) { $this->_validateLoginStatus(); } @@ -70,7 +76,7 @@ foreach ($errors as $field => $messages) { $this->clearErrors($field); foreach ($messages as $message) { - list($message, $comment) = explode("|", $message); + @list($message, $comment) = explode("|", $message); $this->addError($field, $message, $comment); } } @@ -184,52 +190,6 @@ return "=?utf-8?B?" . base64_encode($value) . "?="; } - function _get_conditions_for_city( $to_ascii = true) { - $query = $this->params['city']; - $aquery = utf8_to_ascii($query); - if ($to_ascii && $aquery != $query) { - $conditions = array( - 'name LIKE ? OR name LIKE ?', $query . '%', $aquery . '%' - ); - } else { - $conditions = array( - 'name LIKE ?', $query . '%' - ); - } - return $conditions; - } - - function auto_complete_for_city () { - if (empty($this->params['city'])) { - $this->renderNothing(); - } else { - $entries = $this->City->find('all', - array( - 'conditions' => $this->_get_conditions_for_city(), - 'include' => 'country', - 'limit' => 10, - 'order' => 'name' - ) - ); - - $this->renderText(empty($entries) ? ' ' : $this->city_helper->auto_complete_result($entries, $this->params['city'])); - } - } - - function get_id_for_city () { - if (empty($this->params['city'])) { - $this->renderNothing(); - } else { - $entry = $this->City->findFirst( - array( - 'conditions' => $this->_get_conditions_for_city(false), - ) - ); - - $this->renderText(empty($entry) ? ' ' : $entry->toJson()); - } - } - function unread_messages_count () { return $this->current_user ? $this->Message->unread_messages_count($this->current_user->getId()) : 0; } Added: app/controllers/city_controller.php =================================================================== --- app/controllers/city_controller.php (rev 0) +++ app/controllers/city_controller.php 2008-03-27 07:37:01 UTC (rev 114) @@ -0,0 +1,72 @@ +<?php + +class CityController extends ApplicationController +{ + var $layout = 'empty'; + + function add () { + if ($this->Request->isPost() && !empty($this->params['city'])) { + $this->City->setAttributes($this->params['city']); + if ($this->City->voteOrCreate($this->current_user)) { + $this->renderText( $this->City->toJSON() ); + return; + } + } + $this->importErrors( $this->City->getErrors() ); + } + + function get_regions () { + if (!empty($this->params['city']['country_id'])) { + $this->regions = $this->Region->findBy('country_id', $this->params['city']['country_id']); + } + empty($this->regions) ? $this->renderNothing() : $this->renderPartial('regions'); + } + + function _get_conditions_for_city( $to_ascii = true) { + $query = $this->params['city']; + $aquery = utf8_to_ascii($query); + if ($to_ascii && $aquery != $query) { + $conditions = array( + 'name LIKE ? OR name LIKE ?', $query . '%', $aquery . '%' + ); + } else { + $conditions = array( + 'name LIKE ?', $query . '%' + ); + } + return $conditions; + } + + function auto_complete_for_city () { + if (empty($this->params['city'])) { + $this->renderNothing(); + } else { + $entries = $this->City->find('all', + array( + 'conditions' => $this->_get_conditions_for_city(), + 'include' => 'country', + 'limit' => 10, + 'order' => 'name' + ) + ); + + $this->renderText(empty($entries) ? ' ' : $this->city_helper->auto_complete_result($entries, $this->params['city'])); + } + } + + function get_id_for_city () { + if (empty($this->params['city'])) { + $this->renderNothing(); + } else { + $entry = $this->City->findFirst( + array( + 'conditions' => $this->_get_conditions_for_city(false), + ) + ); + + $this->renderText(empty($entry) ? ' ' : $entry->toJson()); + } + } +} + +?> \ No newline at end of file Modified: app/controllers/profile_controller.php =================================================================== --- app/controllers/profile_controller.php 2008-03-26 18:20:31 UTC (rev 113) +++ app/controllers/profile_controller.php 2008-03-27 07:37:01 UTC (rev 114) @@ -17,17 +17,17 @@ $this->basic_profile = $this->current_user->basic_profile->load(); if ($this->Request->isPost() && !empty($this->params['basic_profile'])) { - $this->basic_profile->setAttributes($this->params['basic_profile']); - if (!empty($this->params['basic_profile']['religious_view_id'])) { - $religious_view = $this->ReligiousView->voteOrCreate($this->params['basic_profile']['religious_view_id'], - $this->current_user); - $this->basic_profile->religious_view->assign($religious_view); - } + $this->basic_profile->setAttributes($this->params['basic_profile']); + if (!empty($this->params['basic_profile']['religious_view_id'])) { + $this->ReligiousView->setAttributes(array('name' => $this->params['basic_profile']['religious_view_id'])); + $this->ReligiousView->voteOrCreate($this->current_user); + $this->basic_profile->religious_view->assign($this->ReligiousView); + } if ($this->basic_profile->save()) { - $this->redirectTo(array('action' => 'basic')); + $this->redirectTo(array('action' => 'basic')); + } } - } } function auto_complete_for_basic_profile_religious_view_id () { Modified: app/helpers/city_helper.php =================================================================== --- app/helpers/city_helper.php 2008-03-26 18:20:31 UTC (rev 113) +++ app/helpers/city_helper.php 2008-03-27 07:37:01 UTC (rev 114) @@ -42,7 +42,7 @@ ), $tag_options); $completion_options = array_merge(array( 'skip_style' => true, - 'url' => array('action' => 'auto_complete_for_city'), + 'url' => array('controller' => 'city', 'action' => 'auto_complete_for_city'), 'frequency' => 0.4, 'indicator' => "'auto_{$object}_{$method}'", 'afterUpdateElement' => "function (text, li) { \$('{$object}_{$method}').value = li.id; \$('{$object}_{$method}_prev').value = text.value; }" Modified: app/installers/user_installer.php =================================================================== --- app/installers/user_installer.php 2008-03-26 18:20:31 UTC (rev 113) +++ app/installers/user_installer.php 2008-03-27 07:37:01 UTC (rev 114) @@ -96,6 +96,20 @@ ) ENGINE=InnoDB"); $this->execute( + "CREATE TRIGGER c_insert AFTER INSERT ON city_votes + FOR EACH ROW BEGIN + UPDATE `cities` SET votes = votes + 1 WHERE id = NEW.city_id; + END; + "); + + $this->execute( + "CREATE TRIGGER c_delete AFTER DELETE ON city_votes + FOR EACH ROW BEGIN + UPDATE `cities` SET votes = votes - 1 WHERE id = NEW.city_id; + END; + "); + + $this->execute( "CREATE TABLE `sexes` ( `id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT, `en_name` char(6) @@ -231,19 +245,19 @@ `en_name` char(100) NOT NULL DEFAULT '' ) ENGINE=InnoDB"); - $this->execute("INSERT INTO `group_types` (id, parent_id, en_name) VALUES (1, 0, 'Business')"); - $this->execute("INSERT INTO `group_types` (id, parent_id, en_name) VALUES (2, 0, 'Common Interest')"); - $this->execute("INSERT INTO `group_types` (id, parent_id, en_name) VALUES (3, 0, 'Entertainment & Arts')"); - $this->execute("INSERT INTO `group_types` (id, parent_id, en_name) VALUES (4, 0, 'Geography')"); - $this->execute("INSERT INTO `group_types` (id, parent_id, en_name) VALUES (5, 0, 'Internet & Technology')"); - $this->execute("INSERT INTO `group_types` (id, parent_id, en_name) VALUES (6, 0, 'Just for Fun')"); - $this->execute("INSERT INTO `group_types` (id, parent_id, en_name) VALUES (7, 0, 'Music')"); - $this->execute("INSERT INTO `group_types` (id, parent_id, en_name) VALUES (8, 0, 'Organizations')"); - $this->execute("INSERT INTO `group_types` (id, parent_id, en_name) VALUES (9, 0, 'Sports & Recreation')"); - $this->execute("INSERT INTO `group_types` (id, parent_id, en_name) VALUES (10, 0, 'Student Group')"); + $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (1, 0, 'Business')"); + $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (2, 0, 'Common Interest')"); + $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (3, 0, 'Entertainment & Arts')"); + $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (4, 0, 'Geography')"); + $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (5, 0, 'Internet & Technology')"); + $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (6, 0, 'Just for Fun')"); + $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (7, 0, 'Music')"); + $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (8, 0, 'Organizations')"); + $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (9, 0, 'Sports & Recreation')"); + $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (10, 0, 'Student Group')"); $this->execute( - "CREATE TABLE `groupapp_groups` + "CREATE TABLE `groupapp_groups` ( `id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT, `group_id` int(11) NOT NULL DEFAULT '0', `en_name` char(100) NOT NULL DEFAULT '', Added: app/locales/city/en.php =================================================================== --- app/locales/city/en.php (rev 0) +++ app/locales/city/en.php 2008-03-27 07:37:01 UTC (rev 114) @@ -0,0 +1,7 @@ +<?php + +// File created on: 2008-02-16 20:34:04 + +$dictionary = array(); + +?> Added: app/locales/city/ru.php =================================================================== --- app/locales/city/ru.php (rev 0) +++ app/locales/city/ru.php 2008-03-27 07:37:01 UTC (rev 114) @@ -0,0 +1,17 @@ +<?php + +// File created on: 2008-02-16 20:34:04 + +$dictionary = array(); + +$dictionary['City Name'] = 'Название'; +$dictionary['Country'] = 'Страна'; +$dictionary['Region'] = 'Область'; +$dictionary['country can\'t be blank'] = 'поле не может быть пустым'; +$dictionary['region can\'t be blank'] = 'поле не может быть пустым'; +$dictionary['country does not exist'] = 'такой страны не существует'; +$dictionary['region does not exist'] = 'такого региона не существует'; +$dictionary['Country: hack attempt detected'] = 'Страна: обнаружена попытка взлома'; +$dictionary['Region: hack attempt detected'] = 'Region: обнаружена попытка взлома'; + +?> Modified: app/models/city.php =================================================================== --- app/models/city.php 2008-03-26 18:20:31 UTC (rev 113) +++ app/models/city.php 2008-03-27 07:37:01 UTC (rev 114) @@ -2,8 +2,29 @@ class City extends VotableActiveRecord { - var $belongs_to = array('Country'); - var $votes_model = 'CityViewVote'; + var $belongs_to = array('Country', 'Region'); + var $votes_model = 'CityVote'; + + function findConditions () { + return array('conditions' => array("country_id = ? AND region_id = ? AND name LIKE ?", $this->country_id, $this->region_id, $this->name)); + } + + function validateOnCreate () { + $this->validatesPresenceOf('country_id', "Country|country can't be blank"); + $this->validatesPresenceOf('region_id', "Region|region can't be blank"); + if (!$this->getErrors()) { + $this->validatesNumericalityOf('country_id', "Country: hack attempt detected|country does not exist"); + $this->validatesNumericalityOf('region_id', "Region: hack attempt detected|region does not exist"); + if (!$this->getErrors()) { + $Region = new Region(); + $region = $Region->find( $this->region_id ); + if (empty($region) || $region->country_id != $this->country_id) { + $this->addError('region_id', "Region: hack attempt detected|region does not exist"); + } + } + } + } + } class CityVote extends ActiveRecord Added: app/models/region.php =================================================================== --- app/models/region.php (rev 0) +++ app/models/region.php 2008-03-27 07:37:01 UTC (rev 114) @@ -0,0 +1,7 @@ +<?php + +class Region extends ActiveRecord +{ +} + +?> Modified: app/shared_model.php =================================================================== --- app/shared_model.php 2008-03-26 18:20:31 UTC (rev 113) +++ app/shared_model.php 2008-03-27 07:37:01 UTC (rev 114) @@ -14,6 +14,16 @@ */ class ActiveRecord extends AkActiveRecord { + function collect(&$source_array, $key_index, $value_index) + { + $resulting_array = array(); + if(!empty($source_array) && is_array($source_array)) { + foreach ($source_array as $source_item){ + $resulting_array[$source_item->get($key_index, false)] = $source_item->get($value_index, false); + } + } + return $resulting_array; + } function _make_in_statement_from_array ($column_name, $values) { $options = array(); @@ -31,60 +41,72 @@ var $min_votes_to_appear = 2; var $strtolower = true; var $ucfirst = true; + + function findConditions () { + return array('conditions' => array("name LIKE ?", $this->name)); + } - function &voteOrCreate ($value, $user) { - + function voteOrCreate ($user) { if ($this->votes_model) { @include_once(AkInflector::toModelFilename($this->votes_model)); - } + } - $this->votes_object = new $this->votes_model(); + $this->votes_object = new $this->votes_model(); - $record = $this->findFirst(array('conditions' => array("name LIKE ?", $value))); - if (empty($record)) { + if ($this->isValid()) { - if ($this->strtolower) { - $value = utf8_strtolower($value); - } + $object = $this->find('first', $this->findConditions() ); + if (empty($object)) { + + if ($this->strtolower) { + $this->name = utf8_strtolower($this->name); + } - if ($this->ucfirst) { - $value = utf8_ucfirst($value); - } - - $this->name = $value; - $this->save(); - $record =& $this; - } + if ($this->ucfirst) { + $this->name = utf8_ucfirst($this->name); + } - if ($record->votes < $this->min_votes_to_appear) { + if(!$this->isValid()){ + $this->transactionFail(); + return false; + } + $this->save(); + } else { + $this->setAttributes($object->getAttributes(), true); + } - $vote = $this->votes_object->findFirst( - array('conditions' => - array('user_id = ? and ' . $this->votes_object->primary_key_name . ' = ?', $user->getId(), $record->getId()) - ) - ); + if ($this->votes < $this->min_votes_to_appear) { + + $vote = $this->votes_object->findFirst( + array('conditions' => + array('user_id = ? and ' . $this->votes_object->primary_key_name . ' = ?', $user->getId(), $this->getId()) + ) + ); - if (empty($vote)) { - $this->votes_object->setAttributes(array( - 'user_id' => $user->getId(), - $this->votes_object->primary_key_name => $record->getId() - )); + if (empty($vote)) { + $this->votes_object->setAttributes(array( + 'user_id' => $user->getId(), + $this->votes_object->primary_key_name => $this->getId() + )); - if ($this->votes_object->save()) { - $record->reload(); - } - } - } - return $record; + if ($this->votes_object->save()) { + $this->reload(); + } + } + } + return $this; + } else { + return false; + } } - + function &findVoted ($value) { - $records = $this->find('all', - array('conditions' => - array('name LIKE ? AND votes >= ' . $this->min_votes_to_appear, '%'. $value . '%') - ) - ); - return $records; + $objects = $this->find('all', + array('conditions' => + array('name LIKE ? AND votes >= ' . $this->min_votes_to_appear, '%'. $value . '%') + ) + ); + return $objects; } } Added: app/views/city/_regions.tpl =================================================================== --- app/views/city/_regions.tpl (rev 0) +++ app/views/city/_regions.tpl 2008-03-27 07:37:01 UTC (rev 114) @@ -0,0 +1,2 @@ +<label class="shortlabel">_{Region}</label> +<?= $form_options_helper->select('city', 'region_id', $Region->collect($regions, 'name', 'id')) ?> Added: app/views/city/add.tpl =================================================================== --- app/views/city/add.tpl (rev 0) +++ app/views/city/add.tpl 2008-03-27 07:37:01 UTC (rev 114) @@ -0,0 +1 @@ +<?= $controller->renderErrors() ?> Modified: app/views/message/inbox.tpl =================================================================== --- app/views/message/inbox.tpl 2008-03-26 18:20:31 UTC (rev 113) +++ app/views/message/inbox.tpl 2008-03-27 07:37:01 UTC (rev 114) @@ -90,12 +90,12 @@ } function delete_threads (element) { - new Dialog.Box({ + new Dialog.Box('dlg', { reference: element, - title: '_{Delete Threads}', - body: '_{Are you sure you want to delete selected threads}?', - yes: '_{Delete}', - cancel: '_{Cancel}', + title: '_{Delete Threads}', + body: '_{Are you sure you want to delete selected threads}?', + yes: '_{Delete}', + cancel: '_{Cancel}', onYes : function () { new Ajax.Updater('messages', '/message/delete_inbox_thread', @@ -113,12 +113,12 @@ } function delete_single_thread (element) { - new Dialog.Box({ + new Dialog.Box('dlg', { reference: element, - title: '_{Delete Thread}', - body: '_{Are you sure you want to delete this thread}?', - yes: '_{Delete}', - cancel: '_{Cancel}', + title: '_{Delete Thread}', + body: '_{Are you sure you want to delete this thread}?', + yes: '_{Delete}', + cancel: '_{Cancel}', onYes : function () { new Ajax.Updater('messages', '/message/delete_inbox_thread', Modified: app/views/message/outbox.tpl =================================================================== --- app/views/message/outbox.tpl 2008-03-26 18:20:31 UTC (rev 113) +++ app/views/message/outbox.tpl 2008-03-27 07:37:01 UTC (rev 114) @@ -57,12 +57,12 @@ }; function delete_threads (element) { - new Dialog.Box({ + new Dialog.Box('dlg', { reference: Element.extend(element), - title: '_{Delete Threads}', - body: '_{Are you sure you want to delete selected threads}?', - yes: '_{Delete}', - cancel: '_{Cancel}', + title: '_{Delete Threads}', + body: '_{Are you sure you want to delete selected threads}?', + yes: '_{Delete}', + cancel: '_{Cancel}', hfloat: 'left', onYes : function () { new Ajax.Updater('messages', @@ -80,11 +80,11 @@ } function delete_single_thread (element) { - new Dialog.Box({ + new Dialog.Box('dlg', { reference: Element.extend(element), - title: '_{Delete Thread}', - body: '_{Are you sure you want to delete this thread}?', - yes: '_{Delete}', + title: '_{Delete Thread}', + body: '_{Are you sure you want to delete this thread}?', + yes: '_{Delete}', cancel: '_{Cancel}', onYes : function () { new Ajax.Updater('messages', Modified: app/views/message/show.tpl =================================================================== --- app/views/message/show.tpl 2008-03-26 18:20:31 UTC (rev 113) +++ app/views/message/show.tpl 2008-03-27 07:37:01 UTC (rev 114) @@ -28,12 +28,12 @@ <script> function delete_single_thread (element) { - new Dialog.Box({ + new Dialog.Box('dlg', { reference: element, - title: '_{Delete Thread}', - body: '_{Are you sure you want to delete this thread}?', - yes: '_{Delete}', - cancel: '_{Cancel}', + title: '_{Delete Thread}', + body: '_{Are you sure you want to delete this thread}?', + yes: '_{Delete}', + cancel: '_{Cancel}', onYes : function () { new Ajax.Updater('messages', '/message/delete_inbox_thread', Modified: app/views/profile/basic.tpl =================================================================== --- app/views/profile/basic.tpl 2008-03-26 18:20:31 UTC (rev 113) +++ app/views/profile/basic.tpl 2008-03-27 07:37:01 UTC (rev 114) @@ -16,6 +16,7 @@ <div class="formrow"> <label>_{Hometown}:</label> <?= $city_helper->city_field('basic_profile', 'city_id', array('class' => 'textinput autocomplete')); ?> + <input class="submitinput" style="margin: 0px;" type="button" value="_{Not Listed}?" onclick="new_city_dialog(this, 'basic_profile_city_id', 'auto_basic_profile_city_id')"> </div> <div class="formrow"> <label>_{Political views}:</label> @@ -33,3 +34,5 @@ </div> </div> </form> + +<?= $controller->renderShared('new_city_dialog') ?> \ No newline at end of file Added: app/views/shared/new_city_dialog.tpl =================================================================== --- app/views/shared/new_city_dialog.tpl (rev 0) +++ app/views/shared/new_city_dialog.tpl 2008-03-27 07:37:01 UTC (rev 114) @@ -0,0 +1,87 @@ +<script type="text/javascript"> + + function reset_new_city_form () { + // resetting the form + $('ncdlg_errors').update(); + $('ncdlg_regions_list').update(); + $('city_country_id').selectedIndex = 0; + } + + function new_city_dialog(element, hidden, input) { + + new Dialog.Box('ncdlg', { + reference: element, + hide: false, + clone: false, + yes: '_{Save}', + cancel: '_{Cancel}', + onYes: function (event, element) { + new Ajax.Request('/city/add', { + postBody: $('city_addition_form').serialize(), + onSuccess: function (response) { + if (response.responseText.isJSON()) { + var data = response.responseText.evalJSON(true); + if (data.id) { + $(hidden).value = data.id; + $(input).value = data.name; + reset_new_city_form(); + Effect.Fade(element, {duration: 0.3}); + //element.hide(); + } + } else { + $('ncdlg_errors').update(response.responseText); + } + } + }); + }, + onCancel: function (event, element) { + reset_new_city_form(); + // hiding the dialog + //element.hide(); + Effect.Fade(element, {duration: 0.3}); + } + }); + $('city_name').value = $F(input); + return false; + } + + function country_changed(element) { + if ($F(element)) { + new Ajax.Updater('ncdlg_regions_list', '/city/get_regions', { + method: 'post', + postBody: $('city_addition_form').serialize() + }); + } + } +</script> +<div id="ncdlg" class="action_dialog" style="display: none"> + <div id="dlgheader">_{Add New City}</div> + <div id="dlgbody"> +<form id="city_addition_form"> + <div class="editform"> + <div id="ncdlg_errors"></div> + <div class="formrow"> + <label class="shortlabel">_{City Name}</label><?= $form_helper->text_field('city', 'name', array('class' => 'textinput')) ?> + </div> + <div class="formrow"> + <label class="shortlabel">_{Country}</label> + <?= $form_options_helper->select('city', 'country_id', + $Country->collect($Country->find(), 'name', 'id'), + array(), + array('onchange' => "country_changed(this);", + 'prompt' => $controller->t('Select Country:'))) ?> + </div> + <div id="ncdlg_regions_list" class="formrow"> + </div> + </div> +</form> + </div> + <div id="dlgfooter"> + <div id="dlgbuttons" class="buttons"> + <input id="dlgyes" class="submitinput" type="button" value="_{Yes}"> + <input id="dlgno" class="submitinput" type="button" value="_{No}"> + <input id="dlgcancel" class="cancelinput" type="button" value="_{Cancel}"> + </div> + </div> + <div class="clearfix"></div> +</div> Modified: public/javascripts/dialog.js =================================================================== --- public/javascripts/dialog.js 2008-03-26 18:20:31 UTC (rev 113) +++ public/javascripts/dialog.js 2008-03-27 07:37:01 UTC (rev 114) @@ -1,11 +1,13 @@ var Dialog = {}; Dialog.Box = Class.create(); Object.extend(Dialog.Box.prototype, { - initialize: function(options) { + initialize: function(element, options) { this.options = Object.extend({ hfloat: 'right', - vfloat: 'bottom' + vfloat: 'bottom', + hide: true, + clone: true }, options || {}); if (! this.options['reference']) { @@ -18,13 +20,13 @@ alert('Reference element is not specified'); return; } - - this.dialog = Element.extend($('dlg').cloneNode(true)); + + this.dialog = this.options.clone ? Element.extend($(element).cloneNode(true)) : $(element); document.body.appendChild(this.dialog); Object.extend(this.dialog.style, { position: 'absolute', - zIndex: 9999 + zIndex: 9999 }); var offset = this.reference.viewportOffset(); @@ -49,8 +51,8 @@ this.noButton = this._getDescendant('dlgno'); this.cancelButton = this._getDescendant('dlgcancel'); - this.title.innerHTML = this.options.title; - this.body.innerHTML = this.options.body; + if (this.options.title) this.title.innerHTML = this.options.title; + if (this.options.body) this.body.innerHTML = this.options.body; switch (this.options.yes) { case 0, false, undefined: this.yesButton.hide(); break; @@ -73,7 +75,7 @@ this.cancelButton.observe('click', this.onCancel.bind(this)); }; - this.dialog.show(); + Effect.Appear(this.dialog, { duration: 0.3 }); }, @@ -83,21 +85,21 @@ }, onYes: function (event) { - this.dialog.hide(); + if (this.options.hide) Effect.Fade(this.dialog, { duration: 0.3 }); if (this.options.onYes) { - this.options.onYes(event) + this.options.onYes(event, this.dialog); } }, onNo: function (event) { - this.dialog.hide(); + if (this.options.hide) Effect.Fade(this.dialog, { duration: 0.3 }); if (this.options.onNo) { - this.options.onNo(event) + this.options.onNo(event, this.dialog); } }, onCancel: function (event) { - this.dialog.hide(); + if (this.options.hide) Effect.Fade(this.dialog, { duration: 0.3 }); if (this.options.onCancel) { - this.options.onCancel(event) + this.options.onCancel(event, this.dialog); } } Modified: public/stylesheets/Application.css =================================================================== --- public/stylesheets/Application.css 2008-03-26 18:20:31 UTC (rev 113) +++ public/stylesheets/Application.css 2008-03-27 07:37:01 UTC (rev 114) @@ -524,6 +524,13 @@ padding: 3px 10px 3px; } +.formrow label.shortlabel { + width: 80px; + float: left; + text-align: right; + padding: 3px 10px 3px; +} + .formrow label.checkbox { font-weight: normal; color: #000; Modified: public/stylesheets/dialog.css =================================================================== --- public/stylesheets/dialog.css 2008-03-26 18:20:31 UTC (rev 113) +++ public/stylesheets/dialog.css 2008-03-27 07:37:01 UTC (rev 114) @@ -1,4 +1,4 @@ -#dlg { +.action_dialog { border: 6px solid #999999; width: 465px; overflow: auto; @@ -7,7 +7,7 @@ z-index: 100; } -#dlgheader { +.action_dialog #dlgheader { background-color: #6d84b4; border: 1px solid #3b5998; color: #ffffff; @@ -16,21 +16,21 @@ padding: 6px 0px 6px 10px; } -#dlgbody { +.action_dialog #dlgbody { background-color: #ffffff; color: #000000; font-size: 11px; padding: 15px; } -#dlgfooter { +.action_dialog #dlgfooter { background-color: #f2f2f2; border: 1px solid #a6a6a6; float: left; width: 463px; } -#dlgfooter .buttons { +.action_dialog #dlgfooter .buttons { margin: 0px 6px 0px 0px; float: right; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <agu...@us...> - 2008-03-26 18:20:26
|
Revision: 113 http://isocial.svn.sourceforge.net/isocial/?rev=113&view=rev Author: aguidrevitch Date: 2008-03-26 11:20:31 -0700 (Wed, 26 Mar 2008) Log Message: ----------- module support improved Modified Paths: -------------- akelos.diff Modified: akelos.diff =================================================================== --- akelos.diff 2008-03-26 17:55:46 UTC (rev 112) +++ akelos.diff 2008-03-26 18:20:31 UTC (rev 113) @@ -1,6 +1,6 @@ Index: lib/Ak.php =================================================================== ---- lib/Ak.php (revision 509) +--- lib/Ak.php (revision 513) +++ lib/Ak.php (working copy) @@ -183,6 +183,11 @@ return @$string[$try_whith_lang]; @@ -25,20 +25,25 @@ } Index: lib/AkActionController.php =================================================================== ---- lib/AkActionController.php (revision 509) +--- lib/AkActionController.php (revision 513) +++ lib/AkActionController.php (working copy) -@@ -190,10 +190,6 @@ - } - - $this->performActionWithFilters($this->_action_name); -- -- if (!$this->_hasPerformed()){ -- $this->_enableLayoutOnRender ? $this->renderWithLayout() : $this->renderWithoutLayout(); -- } +@@ -756,7 +756,14 @@ + */ + function t($string, $array = null) + { +- return Ak::t($string, $array, AkInflector::underscore($this->getControllerName())); ++ $controller_namespace = ''; ++ if ($this->getModuleName()) { ++ // a hack before akelos supplies something similar ++ $controller_namespace = AkInflector::underscore($this->getModuleName()) . DS; ++ } ++ $controller_namespace .= AkInflector::underscore($this->getControllerName()); ++ ++ return Ak::t($string, $array, $controller_namespace); + } - if(!empty($this->validate_output)){ - $this->_validateGeneratedXhtml(); -@@ -1926,6 +1922,9 @@ + +@@ -1943,6 +1950,9 @@ { if(method_exists(&$this, $action)){ call_user_func_array(array(&$this, $action), @(array)$this->passed_args); @@ -50,7 +55,7 @@ Index: lib/AkActionView/helpers/text_helper.php =================================================================== ---- lib/AkActionView/helpers/text_helper.php (revision 509) +--- lib/AkActionView/helpers/text_helper.php (revision 513) +++ lib/AkActionView/helpers/text_helper.php (working copy) @@ -518,8 +518,18 @@ */ @@ -75,7 +80,7 @@ /** Index: lib/AkActiveRecord.php =================================================================== ---- lib/AkActiveRecord.php (revision 509) +--- lib/AkActiveRecord.php (revision 513) +++ lib/AkActiveRecord.php (working copy) @@ -5003,8 +5003,27 @@ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <di...@us...> - 2008-03-26 17:55:44
|
Revision: 112 http://isocial.svn.sourceforge.net/isocial/?rev=112&view=rev Author: dim0s77 Date: 2008-03-26 10:55:46 -0700 (Wed, 26 Mar 2008) Log Message: ----------- form for group creation added Modified Paths: -------------- app/controllers/groupapp/group_controller.php app/controllers/user_controller.php app/installers/groupapp/group_installer.php app/locales/groupapp/group/ru.php app/models/groupapp_group.php app/views/groupapp/group/_menu.tpl app/views/groupapp/group/create.tpl app/views/layouts/application.tpl app/views/message/send.tpl public/stylesheets/Application.css public/stylesheets/groupapp/Group.css Added Paths: ----------- app/views/groupapp/group/_bar.tpl app/views/groupapp/group/_group_customize.tpl app/views/groupapp/group/_group_info.tpl Modified: app/controllers/groupapp/group_controller.php =================================================================== --- app/controllers/groupapp/group_controller.php 2008-03-21 19:59:00 UTC (rev 111) +++ app/controllers/groupapp/group_controller.php 2008-03-26 17:55:46 UTC (rev 112) @@ -9,6 +9,15 @@ } function create () { + $this->step = 'group_info'; + if (!empty($this->params['group'])){ + $this->GroupappGroup->setAttributes($this->params['group']); + if ($this->Request->isPost() && $this->GroupappGroup->save()){ + $this->step = 'group_customize'; + } else { + $this->importErrors( $this->GroupappGroup->getErrors() ); + } + } } function browse () { Modified: app/controllers/user_controller.php =================================================================== --- app/controllers/user_controller.php 2008-03-21 19:59:00 UTC (rev 111) +++ app/controllers/user_controller.php 2008-03-26 17:55:46 UTC (rev 112) @@ -32,10 +32,10 @@ if (!$this->_loginUser($this->params['email'], $this->params['password'], @$this->params['remember_me'])) { $this->addError( '_common', - 'Incorrect e-mail/password combination', + 'Incorrect email/password combination', 'Passwords are case sensitive. Please check your CAPS lock key' ); - } + } } function _loginUser ($email, $password, $remember_me = false) @@ -43,12 +43,12 @@ $user = $this->User->login($email, $password); if ($user && $user->active) { $this->_login($user->id); - if ($remember_me) { - setcookie(session_name(), session_id(), time() + 60 * 60 * 24 * 365 * 3, '/'); - } + if ($remember_me) { + setcookie(session_name(), session_id(), time() + 60 * 60 * 24 * 365 * 3, '/'); + } $this->redirectToAction( 'home' ); } - return false; + return false; } function logout () { Modified: app/installers/groupapp/group_installer.php =================================================================== --- app/installers/groupapp/group_installer.php 2008-03-21 19:59:00 UTC (rev 111) +++ app/installers/groupapp/group_installer.php 2008-03-26 17:55:46 UTC (rev 112) @@ -27,11 +27,16 @@ $this->execute( "CREATE TABLE `groupapp_groups` ( `id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT, - `group_id` int(11) NOT NULL DEFAULT '0', - `en_name` char(100) NOT NULL DEFAULT '', - `en_desc` char(255) NOT NULL DEFAULT '', - FOREIGN KEY (group_id) REFERENCES groupapp_group_types(id), - INDEX group_idx (group_id) + `type_id` int(11) NOT NULL DEFAULT '0', + `name` char(100) NOT NULL DEFAULT '', + `description` char(255) NOT NULL DEFAULT '', + `recent_news` char(255) NOT NULL DEFAULT '', + `office` char(100) NOT NULL DEFAULT '', + `email` char(100) NOT NULL DEFAULT '', + `street` char(100) NOT NULL DEFAULT '', + `city` char(100) NOT NULL DEFAULT '', + FOREIGN KEY (type_id) REFERENCES groupapp_group_types(id), + INDEX type_idx (type_id) ) ENGINE=InnoDB"); } Modified: app/locales/groupapp/group/ru.php =================================================================== --- app/locales/groupapp/group/ru.php 2008-03-21 19:59:00 UTC (rev 111) +++ app/locales/groupapp/group/ru.php 2008-03-26 17:55:46 UTC (rev 112) @@ -15,6 +15,32 @@ $dictionary['Start a New Group'] = 'Начать новую группу'; $dictionary['Find a Group'] = 'Найти группу'; $dictionary['Search Groups'] = 'Поиск групп'; -$dictionary['Can\'t find the Group you\'re looking for? Start your own...'] = 'Не можете найти группу, которая вам нужна? Начните свою собственную...'; +$dictionary['Step'] = 'Шаг'; +$dictionary['Group Info'] = 'Информация о группе'; +$dictionary['Customize'] = 'Дополнительно'; +$dictionary['Members'] = 'Участники'; + +$dictionary['Group Name'] = 'Название группы'; +$dictionary['Description'] = 'Описание'; +$dictionary['Group Type'] = 'Тип группы'; +$dictionary['Select Category:'] = 'Выберите категорию:'; +$dictionary['Select'] = 'Выберите'; +$dictionary['Recent News'] = 'Последние новости'; +$dictionary['Office'] = 'Офис'; +$dictionary['Street'] = 'Улица'; +$dictionary['City/Town'] = 'Город'; +$dictionary['required'] = 'требуется'; +$dictionary['Can\'t find the Group you\'re looking for? Start your own...'] = + 'Не можете найти группу, которая вам нужна? Начните свою собственную...'; +$dictionary['Note: groups that attack a specific person or group of people (e.g. racist, sexist, or other hate groups) will not be tolerated. Creating such a group will result in immediate termination of your PROJECT_NAME account.'] = + 'Примечание: группы, которые могут совершить нападение на конкретного человека или группу людей (например, расистские, сексистские или другие группы ненависти), не будут допускаться. Создание такой группы приведет к немедленному удалению Вашего аккаунта из PROJECT_NAME.'; + +$dictionary['Name is missing'] = 'Название отсутствует'; +$dictionary['please enter the name'] = 'введите, пожалуйста, название группы'; +$dictionary['Description is missing'] = 'Описание отсутствует'; +$dictionary['please enter the description'] = 'введите, пожалуйста, описание группы'; +$dictionary['Group type is missing'] = 'Тип группы отсутствует'; +$dictionary['please enter the group category'] = 'выберите, пожалуйста, категорию группы'; + ?> Modified: app/models/groupapp_group.php =================================================================== --- app/models/groupapp_group.php 2008-03-21 19:59:00 UTC (rev 111) +++ app/models/groupapp_group.php 2008-03-26 17:55:46 UTC (rev 112) @@ -2,6 +2,13 @@ class GroupappGroup extends ActiveRecord { + function validateOnCreate () + { + $this->validatesPresenceOf('name', 'Name is missing|please enter the name'); + $this->validatesPresenceOf('description', 'Description is missing|please enter the description'); + $this->validatesPresenceOf('type_id', 'Group type is missing|please select the group category'); +# $this->validatesFormatOf('email', AK_EMAIL_REGULAR_EXPRESSION, 'Incorrect email|please enter the correct email'); + } } ?> Added: app/views/groupapp/group/_bar.tpl =================================================================== --- app/views/groupapp/group/_bar.tpl (rev 0) +++ app/views/groupapp/group/_bar.tpl 2008-03-26 17:55:46 UTC (rev 112) @@ -0,0 +1,10 @@ +<div class="minitabs"> + <div class="left"> + <ul class="toggle_minitabs"> + <li class="first"><a href="/groupapp/group/create" class="<?= $step == 'group_info' ? 'selected' : '' ?>">_{Step} 1: _{Group Info}</a></li><? + ?><li><a class="disabled">_{Step} 2: _{Customize}</a></li><? + ?><li><a class="disabled">_{Step} 3: _{Members}</a></li> + </ul> + </div> +</div> +<div class="clearfix"> </div> Added: app/views/groupapp/group/_group_customize.tpl =================================================================== --- app/views/groupapp/group/_group_customize.tpl (rev 0) +++ app/views/groupapp/group/_group_customize.tpl 2008-03-26 17:55:46 UTC (rev 112) @@ -0,0 +1 @@ +customize \ No newline at end of file Added: app/views/groupapp/group/_group_info.tpl =================================================================== --- app/views/groupapp/group/_group_info.tpl (rev 0) +++ app/views/groupapp/group/_group_info.tpl 2008-03-26 17:55:46 UTC (rev 112) @@ -0,0 +1,55 @@ +<tr> + <td class="tlabel">_{Group Name}:<br><small>(_{required})</small></td> + <td><?= $form_helper->text_field('group', 'name', array('class' => 'textinput')) ?></td> +</tr> +<tr> + <td class="tlabel">_{Description}:<br><small>(_{required})</small></td> + <td><?= $form_helper->text_area('group', 'description', array('rows' => '5')) ?></td> +</tr> +<tr> + <td class="tlabel">_{Group Type}:<br><small>(_{required})</small></td> + <td> + <?= $form_options_helper->select('group', + 'type_id', + $GroupappGroupType->collect( + $GroupappGroupType->find('all', array('conditions' => array("parent_id = 0"))), + 'name', + 'id'), + array(), + array('prompt' => $controller->t('Select')) + ) ?> + </td> +</tr> +<tr> + <td class="tlabel">_{Recent News}:</td> + <td><?= $form_helper->text_area('group', 'recent_news', array('rows' => '5')) ?></td> +</tr> +<tr> + <td class="tlabel">_{Office}:</td> + <td><?= $form_helper->text_field('group', 'office', array('class' => 'textinput')) ?></td> +</tr> +<tr> + <td class="tlabel">_{Email}:</td> + <td><?= $form_helper->text_field('group', 'email', array('class' => 'textinput')) ?></td> +</tr> +<tr> + <td class="tlabel">_{Street}:</td> + <td><?= $form_helper->text_field('group', 'street', array('class' => 'textinput')) ?></td> +</tr> +<tr> + <td class="tlabel">_{City/Town}:</td> + <td><?= $form_helper->text_field('group', 'city', array('class' => 'textinput') )?></td> +</tr> +<tr> + <td class="tlabel"> </td> + <td class="tsubmit"> + <input class="submitinput" type="submit" value="_{Create Group}"> + <input class="cancelinput" type="button" value="_{Cancel}"> + </td> +</tr> +<tr> + <td class="tlabel"> </td> + <td class="tnote"> + _{Note: groups that attack a specific person or group of people (e.g. racist, sexist, or other hate groups) will not be tolerated. Creating such a group will result in immediate termination of your PROJECT_NAME account.} + </td> +</tr> Modified: app/views/groupapp/group/_menu.tpl =================================================================== --- app/views/groupapp/group/_menu.tpl 2008-03-21 19:59:00 UTC (rev 111) +++ app/views/groupapp/group/_menu.tpl 2008-03-26 17:55:46 UTC (rev 112) @@ -3,7 +3,8 @@ <ul class="toggle_tabs"> <li class="first"><a href="/groupapp" class="<?= $controller->getActionName() == 'index' ? 'selected' : '' ?>">_{My Groups}</a></li><? ?><li><a href="/groupapp/group/browse" class="last <?= $controller->getActionName() == 'browse' ? 'selected' : '' ?>">_{Browse Groups}</a></li><? - ?><li><a href="/groupapp/group/popular" class="last <?= $controller->getActionName() == 'popular' ? 'selected' : '' ?>">_{Popular Groups}</a></li> + ?><li><a href="/groupapp/group/popular" class="<?= $controller->getActionName() == 'popular' ? 'selected' : '' ?>">_{Popular Groups}</a></li><? + ?><li><a href="/groupapp/group/create" class="last <?= $controller->getActionName() == 'create' ? 'selected' : '' ?>">_{Create Group}</a></li> </ul> </div> <div class="right"> Modified: app/views/groupapp/group/create.tpl =================================================================== --- app/views/groupapp/group/create.tpl 2008-03-21 19:59:00 UTC (rev 111) +++ app/views/groupapp/group/create.tpl 2008-03-26 17:55:46 UTC (rev 112) @@ -1 +1,23 @@ -create \ No newline at end of file +<?= $controller->renderPartial("menu") ?> + +<div class="title_bar"> + <div class="head"> + <div class="name groupapp">_{Create Group}</div> + </div> +</div> +<div class="clearfix"></div> + +<?= $controller->renderPartial("bar") ?> + +<div class="form_editor"> + <?= $controller->renderErrors() ?> + <form action="/groupapp/group/create" method="post"> + <table class="editor"> + <tbody> + <?= $controller->renderPartial($step) ?> + </tbody> + </table> + </form> +</div> +<div class="clearfix"></div> + Modified: app/views/layouts/application.tpl =================================================================== --- app/views/layouts/application.tpl 2008-03-21 19:59:00 UTC (rev 111) +++ app/views/layouts/application.tpl 2008-03-26 17:55:46 UTC (rev 112) @@ -29,36 +29,36 @@ <body id="application"> <div id="main"> <div id="sidebar"> - <a class="logo" href="/"></a> - <div id="sidebar_content"> - <?= $controller->renderSidebar() ?> - </div> + <a class="logo" href="/"></a> + <div id="sidebar_content"> + <?= $controller->renderSidebar() ?> + </div> </div> <div id="widebar"> - <div id="pageheader"> - <?= $controller->renderPageHeader() ?> - </div> - <div id="pagecontent"> - <div id="contentshadow"> - <div id="content"> - <?= $content_for_layout ?> - </div> - </div> - </div> - <div id="pagefooter"> - <div class="copyright"> - <a href="http://isocial.sourceforge.net/">_{PROJECT_NAME} © 2008</a>; + <div id="pageheader"> + <?= $controller->renderPageHeader() ?> + </div> + <div id="pagecontent"> + <div id="contentshadow"> + <div id="content"> + <?= $content_for_layout ?> </div> - <div class="linksarea"> - <ul> - <li><a href="/">_{About PROJECT_NAME}</a></li> - <li><a href="/">_{Terms}</a></li> - <li><a href="/">_{Help}</a></li> - </ul> - </div> - </div> + </div> + </div> + <div id="pagefooter"> + <div class="copyright"> + <a href="http://isocial.sourceforge.net/">_{PROJECT_NAME} © 2008</a>; + </div> + <div class="linksarea"> + <ul> + <li><a href="/">_{About PROJECT_NAME}</a></li> + <li><a href="/">_{Terms}</a></li> + <li><a href="/">_{Help}</a></li> + </ul> + </div> + </div> </div> </div> -<?= $controller->renderShared('dialog') ?> + <?= $controller->renderShared('dialog') ?> </body> </html> Modified: app/views/message/send.tpl =================================================================== --- app/views/message/send.tpl 2008-03-21 19:59:00 UTC (rev 111) +++ app/views/message/send.tpl 2008-03-26 17:55:46 UTC (rev 112) @@ -2,7 +2,7 @@ <?= $controller->renderErrors() ?> -<form action="/message/send" method="post"> +<form action="/message/send" method="get"> <div class="editform"> <div class="formrow"> <label>_{To}:</label> Modified: public/stylesheets/Application.css =================================================================== --- public/stylesheets/Application.css 2008-03-21 19:59:00 UTC (rev 111) +++ public/stylesheets/Application.css 2008-03-26 17:55:46 UTC (rev 112) @@ -323,7 +323,7 @@ border: 1px solid #bdc7d8; font-family: verdana, arial, sans-serif; font-size: 11px; - width: 200px; + width: 300px; margin: 0px 0px 5px 0px; padding: 3px; font-size: 11px; @@ -335,7 +335,6 @@ border: 1px solid #bdc7d8; font-family: verdana, arial, sans-serif; font-size: 11px; - width: 200px; margin: 0px 0px 5px 0px; padding: 3px; font-size: 11px; @@ -414,11 +413,6 @@ background: #f1f1f1; } -.toggle_tabs li a small { - font-size: 11px; - font-weight:normal; -} - .toggle_tabs li a:focus { outline: 0px; } @@ -433,7 +427,7 @@ border: 1px solid #3b5998; border-left: 1px solid #5973a9; border-right: 1px solid #5973a9; - color:#fff; + color: #ffffff; } .toggle_tabs li.last a.selected { @@ -457,7 +451,7 @@ } .toggle_tabs li a.disabled { - color: #999; + color: #999999; cursor: default; } @@ -513,7 +507,6 @@ #content .editform { margin: 20px auto 20px auto; - width: 600px; } .editform .formrow { @@ -580,3 +573,85 @@ background: #f7f7f7; width: 622px; } + +#content .minitabs { + display:block; + padding: 5px 0px 0px 0px; + border-bottom: 1px solid #3b5998; + float: left; + width: 647px; +} + +.minitabs .left { + float: left; + padding-left: 10px; + margin-bottom: -1px; +} + +.minitabs .right { + float: right; + padding-right: 10px; + margin-bottom: -1px; +} + +.toggle_minitabs { + display: block; + list-style: none; + padding: 4px 8px 6px 9px; + text-align: center; +} + +.toggle_minitabs li { + display: block; + float: left; + margin: 0px; +} + +.toggle_minitabs li a { + display: block; + color: #3b5998; + padding: 5px 4px 5px 4px; + margin: 0px 4px 0px 4px; + background: #ffffff; +} + +.toggle_minitabs li a:focus { + outline: 0px; +} + +.toggle_minitabs li a.selected { + background: #3b5998; + color: #ffffff; +} + +.toggle_minitabs li a.disabled { + background: #ffffff; + color: #999999; + cursor: default; + border-bottom: 1px solid #3b5998; +} + +.toggle_minitabs li a.disabled:hover { + text-decoration:none; +} + +.toggle_minitabs li.last a.selected { + margin-left: -1px; + border-left: 1px solid #5973a9; + border-right: 1px solid #36538f; +} + +.toggle_minitabs li.first a.selected { + margin: 0px; + border-left: 1px solid #36538f; + border-right: 1px solid #5973a9; +} + +.toggle_minitabs li.first.last a.selected { + border: 1px solid #36538f; +} + +.toggle_minitabs li a.selected:hover { + text-decoration: none; +} + Modified: public/stylesheets/groupapp/Group.css =================================================================== --- public/stylesheets/groupapp/Group.css 2008-03-21 19:59:00 UTC (rev 111) +++ public/stylesheets/groupapp/Group.css 2008-03-26 17:55:46 UTC (rev 112) @@ -31,7 +31,7 @@ padding: 10px 0px 0px 80px; } -.title_bar .info .header .name { +.name { font-weight: bold; font-size: 14px; padding: 7px 0px 7px 22px; @@ -40,6 +40,11 @@ .title_bar .info .subheader { } +.title_bar .head { + padding: 10px 0px 10px 30px; + border-bottom: solid 1px #cccccc; +} + .nogroups { font-size: 12px; text-align: center; @@ -92,4 +97,39 @@ .query_button { margin: 4px 0px 0px 5px; float: left; -} \ No newline at end of file +} + +.form_editor { + background: #f7f7f7; + padding: 10px 10px 10px 10px; +} + +.editor { + margin: 5px auto 7px auto; +} + +.editor td { + padding: 0px 3px 0px 3px; + vertical-align: top; +} + +.editor td.tlabel { + padding: 0px 10px 0px 0px; + font-weight: bold; + color: #666666; +} + +.editor td.tlabel small { + color: #999999; + font-size: smaller; +} + +.editor td.tsubmit { + padding: 5px 10px 5px 20px; + border-bottom: solid 1px #cccccc; +} + +.editor td.tnote { + padding: 10px 0px 0px 0px; + width: 300px; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <agu...@us...> - 2008-03-21 19:58:54
|
Revision: 111 http://isocial.svn.sourceforge.net/isocial/?rev=111&view=rev Author: aguidrevitch Date: 2008-03-21 12:59:00 -0700 (Fri, 21 Mar 2008) Log Message: ----------- city autocompletion improved Modified Paths: -------------- app/application_controller.php app/helpers/city_helper.php app/models/city.php app/views/profile/basic.tpl public/javascripts/autocomplete.js Modified: app/application_controller.php =================================================================== --- app/application_controller.php 2008-03-20 20:03:08 UTC (rev 110) +++ app/application_controller.php 2008-03-21 19:59:00 UTC (rev 111) @@ -183,39 +183,53 @@ function _to_base64_utf8 ($value) { return "=?utf-8?B?" . base64_encode($value) . "?="; } + + function _get_conditions_for_city( $to_ascii = true) { + $query = $this->params['city']; + $aquery = utf8_to_ascii($query); + if ($to_ascii && $aquery != $query) { + $conditions = array( + 'name LIKE ? OR name LIKE ?', $query . '%', $aquery . '%' + ); + } else { + $conditions = array( + 'name LIKE ?', $query . '%' + ); + } + return $conditions; + } function auto_complete_for_city () { if (empty($this->params['city'])) { $this->renderNothing(); } else { - $query = $this->params['city']; - $aquery = utf8_to_ascii($query); - if ($aquery != $query) { - $conditions = array( - 'name LIKE ? OR name LIKE ?', $query . '%', $aquery . '%' - ); - } else { - $conditions = array( - 'name LIKE ?', $query . '%' - ); - } - $entries = $this->City->find('all', array( - 'conditions' => $conditions, + 'conditions' => $this->_get_conditions_for_city(), 'include' => 'country', 'limit' => 10, 'order' => 'name' ) ); - if (!empty($entries)) { - $this->renderText( $this->city_helper->auto_complete_result($entries, $query, $this->params['city']) ); - } else { - $this->renderNothing(); - } + + $this->renderText(empty($entries) ? ' ' : $this->city_helper->auto_complete_result($entries, $this->params['city'])); } } + function get_id_for_city () { + if (empty($this->params['city'])) { + $this->renderNothing(); + } else { + $entry = $this->City->findFirst( + array( + 'conditions' => $this->_get_conditions_for_city(false), + ) + ); + + $this->renderText(empty($entry) ? ' ' : $entry->toJson()); + } + } + function unread_messages_count () { return $this->current_user ? $this->Message->unread_messages_count($this->current_user->getId()) : 0; } Modified: app/helpers/city_helper.php =================================================================== --- app/helpers/city_helper.php 2008-03-20 20:03:08 UTC (rev 110) +++ app/helpers/city_helper.php 2008-03-21 19:59:00 UTC (rev 111) @@ -25,36 +25,36 @@ function city_field($object, $method, $tag_options = array(), $completion_options = array()) { $this->object =& $this->_controller->{$object}; - $this->value = ''; - if ($this->object && $city_id = $this->object->get($method)) { - $city = $this->_controller->City->find($city_id); - if (!empty($city)) { - $this->value = $city->name; + $this->value = ''; + if ($this->object && $city_id = $this->object->get($method)) { + $city = $this->_controller->City->find($city_id); + if (!empty($city)) { + $this->value = $city->name; + } } - } - $tag_options = array_merge(array( - 'value' => $this->value, - 'name' => "city", - 'id' => "auto_{$object}_{$method}", - 'onblur' => "city_updated(this, '{$object}_{$method}_prev', '{$object}_{$method}')", - 'autocomplete' => 'on', + $tag_options = array_merge(array( + 'value' => $this->value, + 'name' => "city", + 'id' => "auto_{$object}_{$method}", + 'onblur' => "city_updated(this, '{$object}_{$method}_prev', '{$object}_{$method}')", + 'autocomplete' => 'on', ), $tag_options); - $completion_options = array_merge(array( - 'skip_style' => true, - 'url' => array('action' => 'auto_complete_for_city'), - 'frequency' => 0.4, - 'indicator' => "'auto_{$object}_{$method}'", - 'afterUpdateElement' => "function (text, li) { \$('{$object}_{$method}').value = li.id; \$('{$object}_{$method}_prev').value = text.value; }" + $completion_options = array_merge(array( + 'skip_style' => true, + 'url' => array('action' => 'auto_complete_for_city'), + 'frequency' => 0.4, + 'indicator' => "'auto_{$object}_{$method}'", + 'afterUpdateElement' => "function (text, li) { \$('{$object}_{$method}').value = li.id; \$('{$object}_{$method}_prev').value = text.value; }" ), $completion_options); $hidden = $this->_controller->form_helper->hidden_field($object, $method); $hidden_prev = $this->_controller->form_helper->hidden_field(null, null, array('id' => "{$object}_{$method}_prev", 'name' => "{$object}_{$method}_prev", 'value' => $this->value)); $text_field = $this->_controller->form_helper->text_field(null, null, $tag_options); - $div = TagHelper::content_tag('div', '', array('id' => "auto_{$object}_{$method}_auto_complete", 'class' => 'auto_complete')); + $div = TagHelper::content_tag('div', '', array('id' => "auto_{$object}_{$method}_auto_complete", 'class' => 'auto_complete')); $javascript = $this->auto_complete_field("auto_{$object}_{$method}", $completion_options); - return $hidden . $hidden_prev . $text_field . $div . $javascript; + return $hidden . $hidden_prev . $text_field . $div . $javascript; } } Modified: app/models/city.php =================================================================== --- app/models/city.php 2008-03-20 20:03:08 UTC (rev 110) +++ app/models/city.php 2008-03-21 19:59:00 UTC (rev 111) @@ -3,7 +3,7 @@ class City extends VotableActiveRecord { var $belongs_to = array('Country'); - var $votes_model = 'ReligiousViewVote'; + var $votes_model = 'CityViewVote'; } class CityVote extends ActiveRecord Modified: app/views/profile/basic.tpl =================================================================== --- app/views/profile/basic.tpl 2008-03-20 20:03:08 UTC (rev 110) +++ app/views/profile/basic.tpl 2008-03-21 19:59:00 UTC (rev 111) @@ -29,7 +29,7 @@ <label></label> <input class="submitinput" type="submit" value="_{Save Changes}"> <input class="cancelinput" type="button" value="_{Cancel}"> - <a href="javascript: alert($F('basic_city') + ':' + $F('basic_city_prev'))">asdfsadf</a> + <a href="javascript: alert($F('basic_profile_city_id'))">(debug)</a> </div> </div> </form> Modified: public/javascripts/autocomplete.js =================================================================== --- public/javascripts/autocomplete.js 2008-03-20 20:03:08 UTC (rev 110) +++ public/javascripts/autocomplete.js 2008-03-21 19:59:00 UTC (rev 111) @@ -14,14 +14,31 @@ }); -function city_updated (input, prev, hidden) { +function city_updated (input, prev, hidden, form) { if ($F(input) && (!$F(hidden) || $F(input) != $F(prev))) { - $(input).value = ''; - $(hidden).value = ''; + $(hidden).value = ''; $(prev).value = ''; - new Effect.Highlight(input, { keepBackgroundImage: true, startcolor: '#ff0000', afterFinish: function (obj) { obj.element.setStyle('') } }); + + // now we should re-check + // whether the city is in the database and put it's id to the hidden + new Ajax.Request('/profile/get_id_for_city', { + postBody: 'city=' + $F(input), + onSuccess: function(response) { + if (response.responseText.isJSON()) { + var data = response.responseText.evalJSON(true); + if (data.id) { + $(hidden).value = data.id; + $(input).value = data.name; + $(prev).value = data.name; + } + } else { + $(form).show(); + } + } + }); + } else if (!$F(input)) { - $(hidden).value = ''; + $(hidden).value = ''; $(prev).value = ''; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <agu...@us...> - 2008-03-20 20:03:09
|
Revision: 110 http://isocial.svn.sourceforge.net/isocial/?rev=110&view=rev Author: aguidrevitch Date: 2008-03-20 13:03:08 -0700 (Thu, 20 Mar 2008) Log Message: ----------- cross-browser layout updates Modified Paths: -------------- public/stylesheets/Application.css public/stylesheets/groupapp/Group.css Modified: public/stylesheets/Application.css =================================================================== --- public/stylesheets/Application.css 2008-03-20 19:40:18 UTC (rev 109) +++ public/stylesheets/Application.css 2008-03-20 20:03:08 UTC (rev 110) @@ -179,10 +179,14 @@ } #pagecontent #contentshadow { + /* enabling hasLayout for ie */ + width: 647px; border: 1px solid #dddddd; } #pagecontent #content { + /* enabling hasLayout for ie */ + width: 647px; clear: both; padding: 0; } @@ -372,7 +376,7 @@ padding: 20px 0px 0px 0px; border-bottom: 1px solid #898989; float: left; - width: 645px; + width: 647px; } .tabs .left { Modified: public/stylesheets/groupapp/Group.css =================================================================== --- public/stylesheets/groupapp/Group.css 2008-03-20 19:40:18 UTC (rev 109) +++ public/stylesheets/groupapp/Group.css 2008-03-20 20:03:08 UTC (rev 110) @@ -1,16 +1,13 @@ .title_bar { - padding: 0px 12px 5px 20px; background-color: #ffffff; - float: left; } .title_bar .avatar { - float: left; - margin: 10px 10px 0px 0px; + margin: 10px 10px 0px 20px; overflow: hidden; - z-index: 1; height: 50px; width: 50px; + z-index: 1; position: relative; } @@ -19,23 +16,22 @@ } .title_bar .info { - float: left; - padding: 10px 0px 0px 0px; - width: 550px; + position: relative; + top: -50px; + left: 0px; + margin: 0px 0px -50px 0px; + padding: 0px 0px 0px 80px; } .title_bar .info .header { - float: left; background: #f7f7f7; z-index: 0; border-bottom: solid 1px #cccccc; margin: -10px 0px 7px -80px; padding: 10px 0px 0px 80px; - width: 565px; } .title_bar .info .header .name { - float: left; font-weight: bold; font-size: 14px; padding: 7px 0px 7px 22px; @@ -55,7 +51,6 @@ } .actions { - float: left; } .actions #group_start { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <agu...@us...> - 2008-03-20 19:40:13
|
Revision: 109 http://isocial.svn.sourceforge.net/isocial/?rev=109&view=rev Author: aguidrevitch Date: 2008-03-20 12:40:18 -0700 (Thu, 20 Mar 2008) Log Message: ----------- redundant stuff removed Removed Paths: ------------- app/views/group/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <di...@us...> - 2008-03-20 18:02:42
|
Revision: 108 http://isocial.svn.sourceforge.net/isocial/?rev=108&view=rev Author: dim0s77 Date: 2008-03-20 11:02:48 -0700 (Thu, 20 Mar 2008) Log Message: ----------- added group templates Added Paths: ----------- app/views/groupapp/group/ app/views/groupapp/group/_menu.tpl app/views/groupapp/group/browse.tpl app/views/groupapp/group/create.tpl app/views/groupapp/group/help.tpl app/views/groupapp/group/index.tpl app/views/groupapp/group/popular.tpl Added: app/views/groupapp/group/_menu.tpl =================================================================== --- app/views/groupapp/group/_menu.tpl (rev 0) +++ app/views/groupapp/group/_menu.tpl 2008-03-20 18:02:48 UTC (rev 108) @@ -0,0 +1,15 @@ +<div class="tabs"> + <div class="left"> + <ul class="toggle_tabs"> + <li class="first"><a href="/groupapp" class="<?= $controller->getActionName() == 'index' ? 'selected' : '' ?>">_{My Groups}</a></li><? + ?><li><a href="/groupapp/group/browse" class="last <?= $controller->getActionName() == 'browse' ? 'selected' : '' ?>">_{Browse Groups}</a></li><? + ?><li><a href="/groupapp/group/popular" class="last <?= $controller->getActionName() == 'popular' ? 'selected' : '' ?>">_{Popular Groups}</a></li> + </ul> + </div> + <div class="right"> + <ul class="toggle_tabs"> + <li class="first last"><a href="/groupapp/group/help" class="<?= $controller->getActionName() == 'help' ? 'selected' : '' ?>">_{Help}</a></li> + </ul> + </div> +</div> +<div class="clearfix"> </div> Added: app/views/groupapp/group/browse.tpl =================================================================== --- app/views/groupapp/group/browse.tpl (rev 0) +++ app/views/groupapp/group/browse.tpl 2008-03-20 18:02:48 UTC (rev 108) @@ -0,0 +1 @@ +Browse Groups \ No newline at end of file Added: app/views/groupapp/group/create.tpl =================================================================== --- app/views/groupapp/group/create.tpl (rev 0) +++ app/views/groupapp/group/create.tpl 2008-03-20 18:02:48 UTC (rev 108) @@ -0,0 +1 @@ +create \ No newline at end of file Added: app/views/groupapp/group/help.tpl =================================================================== --- app/views/groupapp/group/help.tpl (rev 0) +++ app/views/groupapp/group/help.tpl 2008-03-20 18:02:48 UTC (rev 108) @@ -0,0 +1 @@ +Group Help \ No newline at end of file Added: app/views/groupapp/group/index.tpl =================================================================== --- app/views/groupapp/group/index.tpl (rev 0) +++ app/views/groupapp/group/index.tpl 2008-03-20 18:02:48 UTC (rev 108) @@ -0,0 +1,58 @@ +<?= $controller->renderPartial("menu") ?> + +<?= $controller->renderErrors() ?> + +<div class="title_bar"> + <div class="avatar"> + <a href="/profile/show/"><img src="/images/nophoto_men_sm.gif" alt="" class=""></a> + </div> + <div class="info"> + <div class="header"> + <div class="name groupapp">_{My Groups}</div> + </div> + <div class="clearfix"></div> + <div class="subheader"><a href="/groupapp/group/create">_{Create a New Group}</a></div> + </div> +</div> +<div class="clearfix"></div> + +<div class="nogroups"> + _{You have not joined any groups}. +</div> +<div class="clearfix"></div> + +<div class="actions"> + <div id="group_start"> + <h4>_{Start a New Group}</h4> + <p>_{Can't find the Group you're looking for? Start your own...}</p> + <input class="submitinput" type="button" value="_{Create Group}" onclick="document.location='/groupapp/group/create';" id="create" name="create"> + </div> + <div id="group_find"> + <h4>_{Find a Group}</h4> + <table id="group_type" align="center"> + <tbody> + <? $counter = 0; ?> + {loop group_types} + <? if ($group_type_loop_counter % 3 == 1) { ?><tr><td><a href=""><?= $group_type->get('name') ?></a></td> + <? } ?> + <? if ($group_type_loop_counter % 3 == 2) { ?><td><a href=""><?= $group_type->get('name') ?></a></td> + <? } ?> + <? if ($group_type_loop_counter % 3 == 0) { ?><td><a href=""><?= $group_type->get('name') ?></a></td></tr> + <? } ?> + <? $counter++; ?> + {end} + <? if ($cols = $counter % 3) { + $i = 0; + while (++$i < $cols) { echo '<td> </td>'; } + echo '</tr>'; + } + ?> + </tbody> + </table> + <form action="/groupapp/group/search" method="post"> + <span class="query_field"><?= $form_helper->text_field('group', 'type', array('class' => 'textinput'))?></span> + <span class="query_button"><input class="submitinput" type="submit" value="_{Search Groups}"></span> + </form> + </div> +</div> +<div class="clearfix"></div> Added: app/views/groupapp/group/popular.tpl =================================================================== --- app/views/groupapp/group/popular.tpl (rev 0) +++ app/views/groupapp/group/popular.tpl 2008-03-20 18:02:48 UTC (rev 108) @@ -0,0 +1 @@ +Popular Groups \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <di...@us...> - 2008-03-20 17:56:55
|
Revision: 107 http://isocial.svn.sourceforge.net/isocial/?rev=107&view=rev Author: dim0s77 Date: 2008-03-20 10:57:00 -0700 (Thu, 20 Mar 2008) Log Message: ----------- added application groupapp with view 'my groups' Modified Paths: -------------- app/installers/russian_installer.php app/installers/user_installer.php app/views/layouts/application.tpl app/views/shared/loggedin/sidebar.tpl config/routes.php Added Paths: ----------- app/controllers/groupapp/ app/controllers/groupapp/group_controller.php app/installers/groupapp/ app/installers/groupapp/group_installer.php app/installers/groupapp/russian_installer.php app/locales/groupapp/ app/locales/groupapp/group/ app/locales/groupapp/group/en.php app/locales/groupapp/group/ru.php app/models/groupapp_group.php app/models/groupapp_group_type.php app/views/groupapp/ public/stylesheets/groupapp/ public/stylesheets/groupapp/Group.css Added: app/controllers/groupapp/group_controller.php =================================================================== --- app/controllers/groupapp/group_controller.php (rev 0) +++ app/controllers/groupapp/group_controller.php 2008-03-20 17:57:00 UTC (rev 107) @@ -0,0 +1,25 @@ +<?php + +class Groupapp_GroupController extends ApplicationController +{ + var $models = array('GroupappGroup', 'GroupappGroupType'); + + function index () { + $this->group_types = $this->GroupappGroupType->find('all', array('conditions' => array("parent_id = 0"))); + } + + function create () { + } + + function browse () { + } + + function popular () { + } + + function help () { + } + +} + +?> Added: app/installers/groupapp/group_installer.php =================================================================== --- app/installers/groupapp/group_installer.php (rev 0) +++ app/installers/groupapp/group_installer.php 2008-03-20 17:57:00 UTC (rev 107) @@ -0,0 +1,46 @@ +<?php +class GroupInstaller extends AkInstaller +{ + var $module = 'groupapp'; + + function up_1() + { + $this->execute( + "CREATE TABLE `groupapp_group_types` ( + `id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT, + `parent_id` int(11) NOT NULL DEFAULT '0', + `en_name` char(100) NOT NULL DEFAULT '' + ) ENGINE=InnoDB"); + + $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (1, 0, 'Business')"); + $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (2, 0, 'Common Interest')"); + $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (3, 0, 'Entertainment & Arts')"); + $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (4, 0, 'Geography')"); + $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (5, 0, 'Internet & Technology')"); + $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (6, 0, 'Just for Fun')"); + $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (7, 0, 'Music')"); + $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (8, 0, 'Organizations')"); + $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (9, 0, 'Sponsored')"); + $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (10, 0, 'Sports & Recreation')"); + $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (11, 0, 'Student Group')"); + + $this->execute( + "CREATE TABLE `groupapp_groups` ( + `id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT, + `group_id` int(11) NOT NULL DEFAULT '0', + `en_name` char(100) NOT NULL DEFAULT '', + `en_desc` char(255) NOT NULL DEFAULT '', + FOREIGN KEY (group_id) REFERENCES groupapp_group_types(id), + INDEX group_idx (group_id) + ) ENGINE=InnoDB"); + + } + + function down_1() + { + $this->dropTable('groupapp_groups'); + $this->dropTable('groupapp_group_types'); + } +} + +?> Added: app/installers/groupapp/russian_installer.php =================================================================== --- app/installers/groupapp/russian_installer.php (rev 0) +++ app/installers/groupapp/russian_installer.php 2008-03-20 17:57:00 UTC (rev 107) @@ -0,0 +1,28 @@ +<?php +class RussianInstaller extends AkInstaller +{ + + function up_1() + { + $locale = 'ru'; + $this->execute("ALTER TABLE groupapp_group_types ADD COLUMN {$locale}_name char(100) NOT NULL AFTER en_name"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Бизнес' WHERE id = 1"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Клубы по интересам' WHERE id = 2"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Искусство' WHERE id = 3"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='География' WHERE id = 4"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Интернет' WHERE id = 5"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Развлечения' WHERE id = 6"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Музыка' WHERE id = 7"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Организации' WHERE id = 8"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Спонсорство' WHERE id = 9"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Отдых и Спорт' WHERE id = 10"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Студенческие группы' WHERE id = 11"); + + } + + function down_1() + { + } +} + +?> Modified: app/installers/russian_installer.php =================================================================== --- app/installers/russian_installer.php 2008-03-20 17:14:10 UTC (rev 106) +++ app/installers/russian_installer.php 2008-03-20 17:57:00 UTC (rev 107) @@ -18,18 +18,6 @@ $this->execute("UPDATE political_views set {$locale}_name ='Безразличные' WHERE id = 6"); $this->execute("UPDATE political_views set {$locale}_name ='Философские' WHERE id = 7"); - $this->execute("ALTER TABLE group_types ADD COLUMN {$locale}_name char(22) NOT NULL AFTER en_name"); - $this->execute("UPDATE group_types set {$locale}_name ='Бизнес' WHERE id = 1"); - $this->execute("UPDATE group_types set {$locale}_name ='Клубы по интересам' WHERE id = 2"); - $this->execute("UPDATE group_types set {$locale}_name ='Искусство' WHERE id = 3"); - $this->execute("UPDATE group_types set {$locale}_name ='География' WHERE id = 4"); - $this->execute("UPDATE group_types set {$locale}_name ='Интернет' WHERE id = 5"); - $this->execute("UPDATE group_types set {$locale}_name ='Развлечения' WHERE id = 6"); - $this->execute("UPDATE group_types set {$locale}_name ='Музыка' WHERE id = 7"); - $this->execute("UPDATE group_types set {$locale}_name ='Организации' WHERE id = 8"); - $this->execute("UPDATE group_types set {$locale}_name ='Отдых и Спорт' WHERE id = 9"); - $this->execute("UPDATE group_types set {$locale}_name ='Студенческие группы' WHERE id = 10"); - } function down_1() Modified: app/installers/user_installer.php =================================================================== --- app/installers/user_installer.php 2008-03-20 17:14:10 UTC (rev 106) +++ app/installers/user_installer.php 2008-03-20 17:57:00 UTC (rev 107) @@ -225,7 +225,7 @@ ) ENGINE=InnoDB"); $this->execute( - "CREATE TABLE `group_types` ( + "CREATE TABLE `groupapp_group_types` ( `id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT, `parent_id` int(11) NOT NULL DEFAULT '0', `en_name` char(100) NOT NULL DEFAULT '' @@ -243,7 +243,7 @@ $this->execute("INSERT INTO `group_types` (id, parent_id, en_name) VALUES (10, 0, 'Student Group')"); $this->execute( - "CREATE TABLE `groups` ( + "CREATE TABLE `groupapp_groups` `id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT, `group_id` int(11) NOT NULL DEFAULT '0', `en_name` char(100) NOT NULL DEFAULT '', @@ -256,8 +256,8 @@ function down_1() { - $this->dropTable('group_types'); - $this->dropTable('groups'); + $this->dropTable('groupapp_group_types'); + $this->dropTable('groupapp_groups'); $this->dropTable('contact_profiles'); $this->dropTable('im_profiles'); $this->dropTable('ims'); Added: app/locales/groupapp/group/en.php =================================================================== --- app/locales/groupapp/group/en.php (rev 0) +++ app/locales/groupapp/group/en.php 2008-03-20 17:57:00 UTC (rev 107) @@ -0,0 +1,7 @@ +<?php + +// File created on: 2008-03-20 10:58:51 + +$dictionary = array(); + +?> Added: app/locales/groupapp/group/ru.php =================================================================== --- app/locales/groupapp/group/ru.php (rev 0) +++ app/locales/groupapp/group/ru.php 2008-03-20 17:57:00 UTC (rev 107) @@ -0,0 +1,20 @@ +<?php + +// File created on: 2008-03-20 10:58:51 + +$dictionary = array(); +$dictionary['Groups'] = 'Группы'; +$dictionary['My Groups'] = 'Мои группы'; +$dictionary['Browse Groups'] = 'Поиск групп'; +$dictionary['Popular Groups'] = 'Популярные группы'; +$dictionary['Try'] = 'Попробуйте'; +$dictionary['You have not joined any groups'] = 'Вы не присоединены ни к каким группам'; +$dictionary['browsing groups'] = 'поискать группы'; +$dictionary['Create a New Group'] = 'Создать новую группу'; +$dictionary['Create Group'] = 'Создать группу'; +$dictionary['Start a New Group'] = 'Начать новую группу'; +$dictionary['Find a Group'] = 'Найти группу'; +$dictionary['Search Groups'] = 'Поиск групп'; +$dictionary['Can\'t find the Group you\'re looking for? Start your own...'] = 'Не можете найти группу, которая вам нужна? Начните свою собственную...'; + +?> Added: app/models/groupapp_group.php =================================================================== --- app/models/groupapp_group.php (rev 0) +++ app/models/groupapp_group.php 2008-03-20 17:57:00 UTC (rev 107) @@ -0,0 +1,7 @@ +<?php + +class GroupappGroup extends ActiveRecord +{ +} + +?> Added: app/models/groupapp_group_type.php =================================================================== --- app/models/groupapp_group_type.php (rev 0) +++ app/models/groupapp_group_type.php 2008-03-20 17:57:00 UTC (rev 107) @@ -0,0 +1,7 @@ +<?php + +class GroupappGroupType extends ActiveRecord +{ +} + +?> Modified: app/views/layouts/application.tpl =================================================================== --- app/views/layouts/application.tpl 2008-03-20 17:14:10 UTC (rev 106) +++ app/views/layouts/application.tpl 2008-03-20 17:57:00 UTC (rev 107) @@ -6,7 +6,7 @@ <link href="/stylesheets/autocomplete.css" rel="stylesheet" type="text/css"> <link href="/stylesheets/dialog.css" rel="stylesheet" type="text/css"> <link href="/stylesheets/Application.css" rel="stylesheet" type="text/css"> -<link href="/stylesheets/<?= $controller->getControllerName() ?>.css" rel="stylesheet" type="text/css"> +<link href="/stylesheets/<?= $controller->getModuleName() ? $controller->getModuleName() . '/' . $controller->getControllerName() : $controller->getControllerName() ?>.css" rel="stylesheet" type="text/css"> <script src="/javascripts/prototype.js" type="text/javascript"></script> <script src="/javascripts/scriptaculous.js?load=effects,controls,autocomplete" type="text/javascript"></script> <script src="/javascripts/autocomplete.js" type="text/javascript"></script> Modified: app/views/shared/loggedin/sidebar.tpl =================================================================== --- app/views/shared/loggedin/sidebar.tpl 2008-03-20 17:14:10 UTC (rev 106) +++ app/views/shared/loggedin/sidebar.tpl 2008-03-20 17:57:00 UTC (rev 107) @@ -13,6 +13,6 @@ </div> <div id="applications"> <a href="/photo" class="photoapp">_{PhotoApp}</a> - <a href="/group" class="groupapp">_{GroupApp}</a> + <a href="/groupapp" class="groupapp">_{GroupApp}</a> <a href="/event" class="eventapp">_{EventApp}</a> </div> \ No newline at end of file Modified: config/routes.php =================================================================== --- config/routes.php 2008-03-20 17:14:10 UTC (rev 106) +++ config/routes.php 2008-03-20 17:57:00 UTC (rev 107) @@ -1,8 +1,9 @@ -<?php - +<?php + // You can find more about routes on /lib/AkRouters.php and /test/test_AkRouter.php $Map->connect('/', array('controller' => 'default', 'action' => 'index')); +$Map->connect('/groupapp/:controller/:action/:id', array('controller' => 'group', 'action' => 'index', 'module' => 'groupapp')); $Map->connect('/:controller/:action/:id', array('controller' => 'default', 'action' => 'index')); $Map->connect('/:controller/:action/:from/:id', array('controller' => 'message', 'action' => 'show')); Added: public/stylesheets/groupapp/Group.css =================================================================== --- public/stylesheets/groupapp/Group.css (rev 0) +++ public/stylesheets/groupapp/Group.css 2008-03-20 17:57:00 UTC (rev 107) @@ -0,0 +1,100 @@ +.title_bar { + padding: 0px 12px 5px 20px; + background-color: #ffffff; + float: left; +} + +.title_bar .avatar { + float: left; + margin: 10px 10px 0px 0px; + overflow: hidden; + z-index: 1; + height: 50px; + width: 50px; + position: relative; +} + +.title_bar .avatar img{ + display: block; +} + +.title_bar .info { + float: left; + padding: 10px 0px 0px 0px; + width: 550px; +} + +.title_bar .info .header { + float: left; + background: #f7f7f7; + z-index: 0; + border-bottom: solid 1px #cccccc; + margin: -10px 0px 7px -80px; + padding: 10px 0px 0px 80px; + width: 565px; +} + +.title_bar .info .header .name { + float: left; + font-weight: bold; + font-size: 14px; + padding: 7px 0px 7px 22px; +} + +.title_bar .info .subheader { +} + +.nogroups { + font-size: 12px; + text-align: center; + margin: 10px 20px 10px 20px; + padding: 50px 10px 50px 10px; + color: gray; + background: #f7f7f7; + border: solid 1px #dddddd; +} + +.actions { + float: left; +} + +.actions #group_start { + float: left; + width: 200px; + padding: 10px 20px 10px 20px; + text-align: left; +} + +#group_start p { + padding: 11px 0px 11px 0px; + font-size: 11px; +} + +.actions #group_find { + float: left; + width: 360px; + padding: 10px 0px 10px 20px; + text-align: center; +} + +#group_start h4, #group_find h4 { + font-size: 11px; +} + +#group_type { + margin: 10px 0px 10px 0px; +} + +#group_type td { + padding: 4px 16px 4px 0px; + text-align: left; +} + +.query_field { + float: left; +} + +.query_button { + margin: 4px 0px 0px 5px; + float: left; +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <agu...@us...> - 2008-03-20 17:14:05
|
Revision: 106 http://isocial.svn.sourceforge.net/isocial/?rev=106&view=rev Author: aguidrevitch Date: 2008-03-20 10:14:10 -0700 (Thu, 20 Mar 2008) Log Message: ----------- working module support for text helper Modified Paths: -------------- akelos.diff Modified: akelos.diff =================================================================== --- akelos.diff 2008-03-20 17:09:27 UTC (rev 105) +++ akelos.diff 2008-03-20 17:14:10 UTC (rev 106) @@ -52,7 +52,7 @@ =================================================================== --- lib/AkActionView/helpers/text_helper.php (revision 509) +++ lib/AkActionView/helpers/text_helper.php (working copy) -@@ -518,8 +518,17 @@ +@@ -518,8 +518,18 @@ */ function translate($string, $args = null, $locale_namespace = null) { @@ -64,7 +64,8 @@ + } else { + $controller_namespace = ''; + if ($this->_controller->getModuleName()) { -+ $controller_namespace = AkInflector::underscore($this->_controller->getControllerName()) . DS; ++ // a hack before akelos supplies something similar ++ $controller_namespace = AkInflector::underscore($this->_controller->getModuleName()) . DS; + } + $controller_namespace .= AkInflector::underscore($this->_controller->getControllerName()); + return Ak::t($string, $args, $controller_namespace); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <agu...@us...> - 2008-03-20 17:09:21
|
Revision: 105 http://isocial.svn.sourceforge.net/isocial/?rev=105&view=rev Author: aguidrevitch Date: 2008-03-20 10:09:27 -0700 (Thu, 20 Mar 2008) Log Message: ----------- module support for text helper added (fixed) Modified Paths: -------------- akelos.diff Modified: akelos.diff =================================================================== --- akelos.diff 2008-03-20 17:07:51 UTC (rev 104) +++ akelos.diff 2008-03-20 17:09:27 UTC (rev 105) @@ -1,7 +1,7 @@ -Index: Ak.php +Index: lib/Ak.php =================================================================== ---- Ak.php (revision 509) -+++ Ak.php (working copy) +--- lib/Ak.php (revision 509) ++++ lib/Ak.php (working copy) @@ -183,6 +183,11 @@ return @$string[$try_whith_lang]; } @@ -23,10 +23,10 @@ }else { $string = isset($framework_dictionary[$string]) ? $framework_dictionary[$string] : $string; } -Index: AkActionController.php +Index: lib/AkActionController.php =================================================================== ---- AkActionController.php (revision 509) -+++ AkActionController.php (working copy) +--- lib/AkActionController.php (revision 509) ++++ lib/AkActionController.php (working copy) @@ -190,10 +190,6 @@ } @@ -48,10 +48,10 @@ } } -Index: AkActionView/helpers/text_helper.php +Index: lib/AkActionView/helpers/text_helper.php =================================================================== ---- AkActionView/helpers/text_helper.php (revision 509) -+++ AkActionView/helpers/text_helper.php (working copy) +--- lib/AkActionView/helpers/text_helper.php (revision 509) ++++ lib/AkActionView/helpers/text_helper.php (working copy) @@ -518,8 +518,17 @@ */ function translate($string, $args = null, $locale_namespace = null) @@ -72,10 +72,10 @@ } /** -Index: AkActiveRecord.php +Index: lib/AkActiveRecord.php =================================================================== ---- AkActiveRecord.php (revision 509) -+++ AkActiveRecord.php (working copy) +--- lib/AkActiveRecord.php (revision 509) ++++ lib/AkActiveRecord.php (working copy) @@ -5003,8 +5003,27 @@ $sql .= empty($options['joins']) ? '' : " {$options['joins']} "; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |