[Isocial-svn] SF.net SVN: isocial: [251] app
Status: Pre-Alpha
Brought to you by:
aguidrevitch
From: <di...@us...> - 2008-06-25 18:33:23
|
Revision: 251 http://isocial.svn.sourceforge.net/isocial/?rev=251&view=rev Author: dim0s77 Date: 2008-06-25 11:33:10 -0700 (Wed, 25 Jun 2008) Log Message: ----------- added rus translate of subgroup names Modified Paths: -------------- app/controllers/groupapp/group_controller.php app/installers/groupapp/russian_installer.php app/views/groupapp/group/browse.tpl Modified: app/controllers/groupapp/group_controller.php =================================================================== --- app/controllers/groupapp/group_controller.php 2008-06-25 16:35:09 UTC (rev 250) +++ app/controllers/groupapp/group_controller.php 2008-06-25 18:33:10 UTC (rev 251) @@ -251,26 +251,21 @@ function browse () { $all_groups = $this->GroupappGroup->find('all'); - $this->all_groups_count = count($all_groups); - if (!empty($this->params['g'])) { - $all_group_types = $this->GroupappGroupType->find('all'); + if (!($this->all_groups_count = count($all_groups))) { return; } + $all_group_types = $this->GroupappGroupType->find('all'); + if ($all_group_types) { foreach($all_group_types as $group_type) { + $gt = array("id" => $group_type->id, "parent_id" => $group_type->parent_id, "name" => $group_type->get('name')); if ($group_type->parent_id == 0) { - $gt = array("id" => $group_type->id, "name" => $group_type->get('name')); $this->group_types[] = $gt; - } else if (is_numeric($this->params['g']) && $group_type->parent_id == $this->params['g']) { - $this->subgroup_types[] = $group_type; - } - } - } else { - $all_group_types = $this->GroupappGroupType->find('all'); - $this->group_types = array(); - foreach($all_group_types as $group_type) { - if ($group_type->parent_id == 0) { - $gt = array("name" => $group_type->get('name'), "id" => $group_type->id); - $this->group_types[] = $gt; + } else if (!empty($this->params['g'])) { + if (is_numeric($this->params['g']) && $group_type->parent_id == $this->params['g']) { + $this->subgroup_types[] = $gt; + if (isset($this->params['sg']) && is_numeric($this->params['sg'])) { + $this->subgroup = $this->params['sg']; + } + } } else if ($group_type->parent_id == 1) { - $gt = array("id" => $group_type->id, "name" => $group_type->get('name')); $this->subgroup_types[] = $gt; } } Modified: app/installers/groupapp/russian_installer.php =================================================================== --- app/installers/groupapp/russian_installer.php 2008-06-25 16:35:09 UTC (rev 250) +++ app/installers/groupapp/russian_installer.php 2008-06-25 18:33:10 UTC (rev 251) @@ -18,6 +18,166 @@ $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("UPDATE groupapp_group_types set {$locale}_name ='Предприятия' WHERE id = 101"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Группы потребителей' WHERE id = 102"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Служба и работа' WHERE id = 103"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Общее' WHERE id = 104"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Домашний бизнес' WHERE id = 105"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Инвестиции' WHERE id = 106"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Маркетинг и реклама' WHERE id = 107"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Связи с общественностью' WHERE id = 108"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Недвижимость' WHERE id = 109"); + + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Активный отдых' WHERE id = 201"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Возраст' WHERE id = 202"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Красота' WHERE id = 203"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Доверие и благотворительность' WHERE id = 204"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Актуальные события' WHERE id = 205"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Знакомства и взаимоотношения' WHERE id = 206"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Семья' WHERE id = 207"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Продовольствие и напитки' WHERE id = 208"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Друзья' WHERE id = 209"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Садоводство' WHERE id = 210"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Здоровье и благополучие' WHERE id = 211"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='История' WHERE id = 212"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Хобби и ремесла' WHERE id = 213"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Языки' WHERE id = 214"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Домашние животные и звери' WHERE id = 215"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Философия' WHERE id = 216"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Политика' WHERE id = 217"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Религия и духовность' WHERE id = 218"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Наука' WHERE id = 219"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Самопомощь' WHERE id = 220"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Сексуальность' WHERE id = 221"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Путешествия' WHERE id = 222"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Вино' WHERE id = 223"); + + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Книги и литература' WHERE id = 301"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Знаменитости' WHERE id = 302"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Комиксы и анимация' WHERE id = 303"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Танцы' WHERE id = 304"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Мода' WHERE id = 305"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Изобразительное искусство' WHERE id = 306"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Общее' WHERE id = 307"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Юмор' WHERE id = 308"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Кино' WHERE id = 309"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Ночная жизнь' WHERE id = 310"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Online-медия' WHERE id = 311"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Performing Arts' WHERE id = 312"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Радио' WHERE id = 313"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Телевидение' WHERE id = 314"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Театр' WHERE id = 315"); + + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Города' WHERE id = 401"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Страны' WHERE id = 402"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Общее' WHERE id = 403"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Соседи' WHERE id = 404"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Места' WHERE id = 405"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Области' WHERE id = 406"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Дороги и транспорт' WHERE id = 407"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Государства' WHERE id = 408"); + + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Компьютеры и комплектующие' WHERE id = 501"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Киберкультура' WHERE id = 502"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Гаджеты' WHERE id = 503"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Игры' WHERE id = 504"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Общее' WHERE id = 505"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Языки программирования' WHERE id = 506"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Мобильные устройства' WHERE id = 507"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Мультимедиа' WHERE id = 508"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Новости' WHERE id = 509"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Программное обеспечение' WHERE id = 510"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Сайты' WHERE id = 511"); + + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Классика PROJECT_NAME' WHERE id = 601"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Фан-клубы' WHERE id = 602"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Шутки' WHERE id = 603"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Иностранные утверждения' WHERE id = 604"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Слишком много информации' WHERE id = 605"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Сплошной бред' WHERE id = 606"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Флуд' WHERE id = 607"); + + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Блюз' WHERE id = 701"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Классика' WHERE id = 702"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Кантри' WHERE id = 703"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Танцевальная' WHERE id = 704"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Электронная' WHERE id = 705"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Фольклор' WHERE id = 706"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Общее' WHERE id = 707"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Инди' WHERE id = 708"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Инструментальная' WHERE id = 709"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Интернациональная' WHERE id = 710"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Джаз' WHERE id = 711"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Латино' WHERE id = 712"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Живая музыка' WHERE id = 713"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Металл' WHERE id = 714"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='R&B и Soul' WHERE id = 715"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Рэп и Хип-Хоп' WHERE id = 716"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Рэгги' WHERE id = 717"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Религиозная' WHERE id = 718"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Рок' WHERE id = 719"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Звукозапись' WHERE id = 720"); + + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Академические организации' WHERE id = 801"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Правозащитные организации' WHERE id = 802"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Клубы и общества' WHERE id = 803"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Общественные организации' WHERE id = 804"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Общее' WHERE id = 805"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Некомерческие организации' WHERE id = 806"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Благотворительные организации' WHERE id = 807"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Политические организации' WHERE id = 808"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Профессиональные организации' WHERE id = 809"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Религиозные организации' WHERE id = 810"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Волонтерские организации' WHERE id = 811"); + + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Рекламное' WHERE id = 901"); + + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Автомобили и Рэйсинг' WHERE id = 1001"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Группы поддержки' WHERE id = 1002"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Коллежский спорт' WHERE id = 1003"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Танцы' WHERE id = 1004"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Экстремальный спорт' WHERE id = 1005"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Фэнтези спорт' WHERE id = 1006"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Фитнесс и физкультура' WHERE id = 1007"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Изартные игры' WHERE id = 1008"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Игры' WHERE id = 1009"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Общий спорт' WHERE id = 1010"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Университетский спорт' WHERE id = 1011"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Интернациональный спорт' WHERE id = 1012"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Спорт в помещении' WHERE id = 1013"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Боевые искусства' WHERE id = 1014"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Олимпийский спорт' WHERE id = 1015"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Спорт на отрытом воздухе' WHERE id = 1016"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Профессиональный спорт' WHERE id = 1017"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Развлекательный спорт' WHERE id = 1018"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Спортивные лиги' WHERE id = 1019"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Водный спорт' WHERE id = 1020"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Тяжелая атлетика и бодибилдинг' WHERE id = 1021"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Зимний спорт' WHERE id = 1022"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Йога' WHERE id = 1023"); + + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Заграничные/иностранные группы' WHERE id = 1101"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Академические группы' WHERE id = 1102"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Консультационные группы' WHERE id = 1103"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Выпускные группы' WHERE id = 1104"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Классы и факультеты' WHERE id = 1105"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Клубы и общества' WHERE id = 1106"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Сообщества' WHERE id = 1107"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Творческие группы' WHERE id = 1108"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Общежития и резиденции' WHERE id = 1109"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Этнические/культурные группы' WHERE id = 1110"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Содружества и соратничества' WHERE id = 1111"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Общее' WHERE id = 1112"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Журналистские группы' WHERE id = 1113"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Музыкальные группы' WHERE id = 1114"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Политические группы' WHERE id = 1115"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Полупрофессиональные группы' WHERE id = 1116"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Религиозные группы' WHERE id = 1117"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Группы по оказанию услуг' WHERE id = 1118"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Социальные группы' WHERE id = 1119"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Студенческое управление' WHERE id = 1120"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Студенческие группы' WHERE id = 1121"); + $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"); Modified: app/views/groupapp/group/browse.tpl =================================================================== --- app/views/groupapp/group/browse.tpl 2008-06-25 16:35:09 UTC (rev 250) +++ app/views/groupapp/group/browse.tpl 2008-06-25 18:33:10 UTC (rev 251) @@ -2,14 +2,24 @@ {?all_groups_count} <div class="info">_{You are in groups}: <? if (isset($user_groups)) echo count($user_groups); else echo 0; ?></div> + <div class="two_column"> <div class="right_small"> <div class="right_content"> <ul class="actions_list"> {loop group_types} - <li><a href="#">{group_type-name}</a></li> + <li><a href="/groupapp/group/browse?g={group_type-id?}">{group_type-name}</a></li> {end} </ul> + <ul> + {loop subgroup_types} + <? if (isset($subgroup) && $subgroup == $subgroup_type["id"]) { ?> + <li><b>{subgroup_type-name?}</b></li> + <? } else { ?> + <li><a href="/groupapp/group/browse?g={subgroup_type-parent_id?}&sg={subgroup_type-id?}">{subgroup_type-name?}</a></li> + <? } ?> + {end} + </ul> </div> </div> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |