[Isocial-svn] SF.net SVN: isocial: [245] public/stylesheets/groupapp
Status: Pre-Alpha
Brought to you by:
aguidrevitch
From: <di...@us...> - 2008-06-24 14:27:12
|
Revision: 245 http://isocial.svn.sourceforge.net/isocial/?rev=245&view=rev Author: dim0s77 Date: 2008-06-24 07:27:06 -0700 (Tue, 24 Jun 2008) Log Message: ----------- cosmetic changes. fixed minor bugZ Modified Paths: -------------- app/controllers/groupapp/group_controller.php app/locales/groupapp/board/ru.php app/locales/groupapp/group/ru.php app/views/groupapp/board/_head.tpl app/views/groupapp/board/index.tpl app/views/groupapp/group/_editbar.tpl app/views/groupapp/group/edit_members.tpl app/views/groupapp/group/index.tpl app/views/groupapp/group/show_group.tpl public/stylesheets/common/Application.css public/stylesheets/groupapp/Board.css Modified: app/controllers/groupapp/group_controller.php =================================================================== --- app/controllers/groupapp/group_controller.php 2008-06-20 15:13:32 UTC (rev 244) +++ app/controllers/groupapp/group_controller.php 2008-06-24 14:27:06 UTC (rev 245) @@ -14,18 +14,18 @@ $this->is_guest = true; if (!empty($this->params['id']) && $this->GroupappGroup->find($this->params['id'])) { - $this->group = $this->GroupappGroup->findFirst(array( 'id = ?' => $this->params['id'] )); - // $this->group = $this->GroupappGroup->find($this->params['id']); - $members = $this->_getGroupMembers($this->group); - $current_user_id = $this->current_user->getId(); - foreach ($members as $member) { - if ($member->groupapp_member_role_id < 3 && $current_user_id == $member->getId()) { - $this->is_admin = true; + if ($this->group = $this->GroupappGroup->findFirst(array( 'id = ?' => $this->params['id'] ))) { + $members = $this->_getGroupMembers($this->group); + $current_user_id = $this->current_user->getId(); + foreach ($members as $member) { + if ($member->groupapp_member_role_id < 3 && $current_user_id == $member->getId()) { + $this->is_admin = true; + } + if ($current_user_id == $member->getId()) { + $this->is_member = true; + $this->is_guest = false; + } } - if ($current_user_id == $member->getId()) { - $this->is_member = true; - $this->is_guest = false; - } } } } @@ -62,26 +62,34 @@ } function customize () { - $this->step = 'group_customize'; - if (!empty($this->params['group']) && $this->group){ - $this->group->setAttributes($this->params['group']); - if ($this->Request->isPost() && $this->group->save()) { - $this->step = 'group_members'; - $this->redirectTo(array('action' => 'edit_members', 'id' => $this->group->getId())); - return; + if (isset($this->group)) { + $this->step = 'group_customize'; + if (!empty($this->params['group'])){ + $this->group->setAttributes($this->params['group']); + if ($this->Request->isPost() && $this->group->save()) { + $this->step = 'group_members'; + $this->redirectTo(array('action' => 'edit_members', 'id' => $this->group->getId())); + return; + } } + $this->importErrors( $this->GroupappGroup->getErrors() ); + } else { + $this->redirectTo(array('action' => 'index')); } - $this->importErrors( $this->GroupappGroup->getErrors() ); } function edit_group () { - if (!empty($this->params['group']) && $this->group){ - $this->group->setAttributes($this->params['group']); - if ($this->Request->isPost() && $this->group->save()) { - return; + if (isset($this->group)) { + if (!empty($this->params['group'])){ + $this->group->setAttributes($this->params['group']); + if ($this->Request->isPost() && $this->group->save()) { + return; + } } + $this->importErrors( $this->GroupappGroup->getErrors() ); + } else { + $this->redirectTo(array('action' => 'index')); } - $this->importErrors( $this->GroupappGroup->getErrors() ); } function edit_info () { @@ -162,7 +170,7 @@ } function show_group () { - if ($this->group) { + if (isset($this->group)) { $this->members = $this->_getGroupMembers($this->group); $this->members_count = count($this->members); $this->admins = array(); @@ -196,12 +204,12 @@ if (!isset($topics[$message->topic_id])) { $topics[$message->topic_id]['first'] = $message; } - isset($topics[$message->topic_id]['posts']) ? + isset($topics[$message->topic_id]['posts']) ? $topics[$message->topic_id]['posts']++ : $topics[$message->topic_id]['posts'] = 1; if (!isset($persons[$message->topic_id][$message->user_id])) { $persons[$message->topic_id][$message->user_id] = 1; - isset($topics[$message->topic_id]['persons']) ? + isset($topics[$message->topic_id]['persons']) ? $topics[$message->topic_id]['persons']++ : $topics[$message->topic_id]['persons'] = 1; } @@ -211,6 +219,8 @@ } $this->topics = $topics; $this->topics_count = count($this->topics); + } else { + $this->redirectTo(array('action' => 'index')); } } Modified: app/locales/groupapp/board/ru.php =================================================================== --- app/locales/groupapp/board/ru.php 2008-06-20 15:13:32 UTC (rev 244) +++ app/locales/groupapp/board/ru.php 2008-06-24 14:27:06 UTC (rev 245) @@ -3,6 +3,7 @@ // File created on: 2008-03-20 10:58:51 $dictionary = array(); +$dictionary['Group'] = 'Группа'; $dictionary['Discussions'] = 'Обсуждения'; $dictionary['Back to group'] = 'Обратно в группу'; $dictionary['Discussion Board'] = 'Список обсуждений'; Modified: app/locales/groupapp/group/ru.php =================================================================== --- app/locales/groupapp/group/ru.php 2008-06-20 15:13:32 UTC (rev 244) +++ app/locales/groupapp/group/ru.php 2008-06-24 14:27:06 UTC (rev 245) @@ -4,6 +4,7 @@ $dictionary = array(); $dictionary['Groups'] = 'Группы'; +$dictionary['Group'] = 'Группа'; $dictionary['My Groups'] = 'Мои группы'; $dictionary['Browse Groups'] = 'Поиск групп'; $dictionary['Popular Groups'] = 'Популярные группы'; @@ -21,6 +22,11 @@ $dictionary['persons'] = 'участников'; $dictionary['Start New Topic'] = 'Начать новую тему'; $dictionary['Topics count'] = 'Обсуждаемых тем'; +$dictionary['All groups'] = 'Все Ваши группы'; +$dictionary['Recently Updated'] = 'Обновленные последними'; +$dictionary['By Group Member Size'] = 'По количеству пользователей'; +$dictionary['Groups You Admin'] = 'Администрируемые Вами'; +$dictionary['You are in groups'] = 'Число групп, в которых Вы состоите'; $dictionary['Step'] = 'Шаг'; $dictionary['Group Info'] = 'Инфо о группе'; @@ -88,7 +94,7 @@ $dictionary['Publicize'] = 'Опубликовать'; $dictionary['Show this group in search results'] = 'Показывать эту группу в результатах поиска'; -$dictionary['Invite people to'] = 'Пригласить людей в'; +$dictionary['Invite people to group'] = 'Пригласить людей в группу'; $dictionary['Show'] = 'Показать'; $dictionary['Invite Friends'] = 'Пригласить друзей'; $dictionary['Invite Friends on PROJECT_NAME'] = 'Пригласить друзей по PROJECT_NAME'; @@ -96,7 +102,7 @@ $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['Could not find any members. Invite some more people.'] = 'Не удалось найти ни одного участника. Пригласите больше людей.'; $dictionary['change status'] = 'изменить статус'; $dictionary['remove'] = 'удалить'; Modified: app/views/groupapp/board/_head.tpl =================================================================== --- app/views/groupapp/board/_head.tpl 2008-06-20 15:13:32 UTC (rev 244) +++ app/views/groupapp/board/_head.tpl 2008-06-24 14:27:06 UTC (rev 245) @@ -4,10 +4,10 @@ </div> <div class="info"> <div class="header"> - <div class="name groupapp">{group_name?}: _{Discussions}</div> + <div class="name groupapp">_{Group} '{group_name?}': _{Discussions}</div> </div> <div class="clearfix"></div> - <div class="subheader"><a href="/groupapp/group/show_group/{group.id?}">_{Back to group} {group_name?}</a></div> + <div class="subheader"><a href="/groupapp/group/show_group/{group.id?}">_{Back to group} '{group_name?}'</a></div> </div> </div> <div class="clearfix"></div> Modified: app/views/groupapp/board/index.tpl =================================================================== --- app/views/groupapp/board/index.tpl 2008-06-20 15:13:32 UTC (rev 244) +++ app/views/groupapp/board/index.tpl 2008-06-24 14:27:06 UTC (rev 245) @@ -36,7 +36,7 @@ <div class="container"> {loop topics} - <div class="row<? if ($topic_loop_counter == 1) echo ' first'; ?>"> + <div class="row<? if ($topic_loop_counter != 1) echo ' notfirst'; ?>"> <div class="topic_info"> <div class="subject"><a href="/groupapp/board/show_topic/{topic-first.topic_id?}">{topic-first.subject?}</a></div> Modified: app/views/groupapp/group/_editbar.tpl =================================================================== --- app/views/groupapp/group/_editbar.tpl 2008-06-20 15:13:32 UTC (rev 244) +++ app/views/groupapp/group/_editbar.tpl 2008-06-24 14:27:06 UTC (rev 245) @@ -8,7 +8,7 @@ </div> <div class="right"> <ul class="toggle_minitabs"> - <li><a href="/groupapp/group/show_group/{group.id?}">_{Back to} {group.name?}</a></li> + <li><a href="/groupapp/group/show_group/{group.id?}">_{Back to} '{group.name?}'</a></li> </ul> </div> </div> Modified: app/views/groupapp/group/edit_members.tpl =================================================================== --- app/views/groupapp/group/edit_members.tpl 2008-06-20 15:13:32 UTC (rev 244) +++ app/views/groupapp/group/edit_members.tpl 2008-06-24 14:27:06 UTC (rev 245) @@ -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} '{group.name?}'</div> </div> </div> <div class="clearfix"></div> @@ -42,7 +42,7 @@ <span class="change_status"> <a href="#" onclick="change_member_status(this, {group.id}, 'moderators_list', 1); 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> + <a href="#" onclick="remove_member(this, {group.id?}, 'owners_list', 1); return false;" name="{member.id?}">_{remove}</a> </li> <? } ?> {end}{end} @@ -131,23 +131,24 @@ <script> function remove_member (element, groupapp_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: - 'groupapp_group_id=' + groupapp_group_id + - '&list_id=' + list_id + - '&member_id=' + element.name + - '&groupapp_member_role_id=' + role - }); + new Dialog.Box(element, { + classname: 'delete_dialog', + title: '_{Remove member}?', + body: '_{Are you sure you want to remove this member from group}?', + yes: '_{Remove}', + cancel: '_{Cancel}', + hfloat: 'right', + onYes : function () { + new Ajax.Updater(list_id, + '/groupapp/group/remove_member', + { method:'post', + asynchronous:true, + parameters: + 'groupapp_group_id=' + groupapp_group_id + + '&list_id=' + list_id + + '&member_id=' + element.name + + '&groupapp_member_role_id=' + role + }); } }); Modified: app/views/groupapp/group/index.tpl =================================================================== --- app/views/groupapp/group/index.tpl 2008-06-20 15:13:32 UTC (rev 244) +++ app/views/groupapp/group/index.tpl 2008-06-24 14:27:06 UTC (rev 245) @@ -85,11 +85,11 @@ <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 == 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 == 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> + <? if ($group_type_loop_counter % 3 == 0) { ?><td><a href=""><?= $group_type->get('name') ?></a></td></tr> <? } ?> <? $counter++; ?> {end} @@ -101,7 +101,7 @@ ?> </tbody> </table> - <form action="/groupapp/group/search" method="post"> + <form action="/groupapp/group/browse" 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> Modified: app/views/groupapp/group/show_group.tpl =================================================================== --- app/views/groupapp/group/show_group.tpl 2008-06-20 15:13:32 UTC (rev 244) +++ app/views/groupapp/group/show_group.tpl 2008-06-24 14:27:06 UTC (rev 245) @@ -1,6 +1,6 @@ <div class="title_bar"> <div class="head"> - <div class="name groupapp">_{Group} {group.name?}</div> + <div class="name groupapp">_{Group} '{group.name?}'</div> </div> </div> <div class="clearfix"></div> @@ -35,13 +35,13 @@ <div class="box_title">_{Group Type}</div> </div> <div class="body"> - <? if ($group->access == 0) { ?> + <? if (isset($group)) { if ($group->access == 0) { ?> _{This is an open group. Anyone can join and invite others to join.} <? } else if ($group->access == 1) { ?> _{This is a closed group. Members must be invited or approved by an admin.} <? } else if ($group->access == 2) { ?> _{This is a secret group. It will not show up in your profile, and only admins can invite members.} - <? } ?> + <? } } ?> </div> <div class="clearfix"></div> </div> @@ -76,7 +76,7 @@ <div class="other value">{group_type?}</div> <div class="clearfix"></div> <div class="other param">_{Description}:</div> - <div class="other value">{group.description}</div> + <div class="other value">{group.description?}</div> <div class="clearfix"></div> </div> </div> Modified: public/stylesheets/common/Application.css =================================================================== --- public/stylesheets/common/Application.css 2008-06-20 15:13:32 UTC (rev 244) +++ public/stylesheets/common/Application.css 2008-06-24 14:27:06 UTC (rev 245) @@ -235,9 +235,9 @@ .clearfix { clear: both; - height: 0px; - width: 0px; - line-height: 0px; + height: 0px; + width: 0px; + line-height: 0px; overflow: hidden; } Modified: public/stylesheets/groupapp/Board.css =================================================================== --- public/stylesheets/groupapp/Board.css 2008-06-20 15:13:32 UTC (rev 244) +++ public/stylesheets/groupapp/Board.css 2008-06-24 14:27:06 UTC (rev 245) @@ -41,8 +41,8 @@ padding: 10px 20px 10px 20px; } -.messages_list .container .row.first { - border-bottom: 0px; +.messages_list .container .row.notfirst { + border-top: 0px; } .messages_list .container .row .topic_info { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |