[Isocial-svn] SF.net SVN: isocial: [254] public/stylesheets/groupapp
Status: Pre-Alpha
Brought to you by:
aguidrevitch
From: <di...@us...> - 2008-06-26 17:36:42
|
Revision: 254 http://isocial.svn.sourceforge.net/isocial/?rev=254&view=rev Author: dim0s77 Date: 2008-06-26 10:36:48 -0700 (Thu, 26 Jun 2008) Log Message: ----------- Upgraded group's browse Modified Paths: -------------- app/controllers/groupapp/group_controller.php app/installers/groupapp/russian_installer.php app/locales/groupapp/group/ru.php app/views/groupapp/board/index.tpl app/views/groupapp/group/browse.tpl app/views/groupapp/group/index.tpl public/stylesheets/common/Layout.css public/stylesheets/groupapp/Group.css Modified: app/controllers/groupapp/group_controller.php =================================================================== --- app/controllers/groupapp/group_controller.php 2008-06-26 10:43:07 UTC (rev 253) +++ app/controllers/groupapp/group_controller.php 2008-06-26 17:36:48 UTC (rev 254) @@ -254,24 +254,32 @@ if (!($this->all_groups_count = count($all_groups))) { return; } $all_group_types = $this->GroupappGroupType->find('all'); if ($all_group_types) { - $this->group_id = 2; - $this->subgroup_id = 0; + $this->group_type_id = 2; + $this->subgroup_type_id = 0; 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) { + if ($group_type->parent_id == 0) { // groups $this->group_types[] = $gt; - } else if (!empty($this->params['g'])) { + } else if (!empty($this->params['g'])) { // group selected if (is_numeric($this->params['g']) && $group_type->parent_id == $this->params['g']) { - $this->group_id = $this->params['g']; + $this->group_type_id = $this->params['g']; $this->subgroup_types[] = $gt; - if (isset($this->params['sg']) && is_numeric($this->params['sg'])) { - $this->subgroup_id = $this->params['sg']; + if (isset($this->params['sg']) && is_numeric($this->params['sg'])) { // subgroup selected + $this->subgroup_type_id = $this->params['sg']; } } - } else if ($group_type->parent_id == 2) { + } else if ($group_type->parent_id == 2) { // no group selected $this->subgroup_types[] = $gt; } } + $type_id = $this->subgroup_type_id > 0 ? $this->subgroup_type_id : $this->group_type_id; + + $_filter_pagination = array('items_per_page' => 10, 'count_conditions' => "type_id =" . $type_id ); + $this->group_pages = $this->pagination_helper->getPaginator($this->GroupappGroup, $_filter_pagination);// paginator + + $_filter = array('conditions' => "type_id =" . $type_id); + $options = array_merge($_filter, $this->pagination_helper->getFindOptions($this->GroupappGroup)); + $this->groups = $this->GroupappGroup->find('all', $options); } } Modified: app/installers/groupapp/russian_installer.php =================================================================== --- app/installers/groupapp/russian_installer.php 2008-06-26 10:43:07 UTC (rev 253) +++ app/installers/groupapp/russian_installer.php 2008-06-26 17:36:48 UTC (rev 254) @@ -130,7 +130,7 @@ $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 = 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"); Modified: app/locales/groupapp/group/ru.php =================================================================== --- app/locales/groupapp/group/ru.php 2008-06-26 10:43:07 UTC (rev 253) +++ app/locales/groupapp/group/ru.php 2008-06-26 17:36:48 UTC (rev 254) @@ -144,4 +144,10 @@ $dictionary['Create first group'] = 'Создать первую группу'; $dictionary['All'] = 'Все'; +$dictionary['Search groups'] = 'Поиск групп'; +$dictionary['Search by name'] = 'Поиск по имени'; +$dictionary['Filter groups by'] = 'Фильтровать группы по'; +$dictionary['subtype'] = 'подтипу'; +$dictionary['type'] = 'типу'; + ?> Modified: app/views/groupapp/board/index.tpl =================================================================== --- app/views/groupapp/board/index.tpl 2008-06-26 10:43:07 UTC (rev 253) +++ app/views/groupapp/board/index.tpl 2008-06-26 17:36:48 UTC (rev 254) @@ -1,3 +1,17 @@ +<script> +function on_search_topic_click(element) { + if (element.value == '_{Search all topics}') { + element.value = ''; + } +} + +function on_search_topic_blur(element) { + if (element.value == '') { + element.value = '_{Search all topics}'; + } +} +</script> + <?= $controller->renderPartial("head") ?> <div class="submenu"> @@ -63,17 +77,3 @@ </div> {end} <div class="clearfix"></div> - -<script> -function on_search_topic_click(element) { - if (element.value == '_{Search all topics}') { - element.value = ''; - } -} - -function on_search_topic_blur(element) { - if (element.value == '') { - element.value = '_{Search all topics}'; - } -} -</script> Modified: app/views/groupapp/group/browse.tpl =================================================================== --- app/views/groupapp/group/browse.tpl 2008-06-26 10:43:07 UTC (rev 253) +++ app/views/groupapp/group/browse.tpl 2008-06-26 17:36:48 UTC (rev 254) @@ -1,76 +1,97 @@ +<script> +function on_search_group_click(element) { + if (element.value == '_{Search by name}') { + element.value = ''; + } +} + +function on_search_group_blur(element) { + if (element.value == '') { + element.value = '_{Search by name}'; + } +} +</script> + <?= $controller->renderPartial("menu") ?> {?all_groups_count} -<div class="info">_{You are in groups}: <? if (isset($user_groups)) echo count($user_groups); else echo 0; ?></div> - <div class="groups_list"> -<div class="container"> + <div class="head">_{Groups paginator description}: </div> -<div class="two_column"> - <div class="right_small"> - <div class="right_content"> - <div class="filter_text">_{Filter groups by}:</div> - <div class="filter_name">_{Type}</div> - <?= $form_options_helper->select('browse_groups', 'g', $PoliticalView->collect($PoliticalView->find(), 'name', 'id'), array(), array('prompt' => $controller->t('Select Political Views:')) )?> - <ul class="actions_list"> - {loop group_types} - <li><a href="/groupapp/group/browse?g={group_type-id?}">{group_type-name}</a></li> - {end} - </ul> - <div class="filter_name">_{Subtype}</div> - <ul class="subgroups_list"> - <? if ($subgroup_id == 0) { ?> - <li><strong>_{All}</strong></li> - <? } else { ?> - <li><a href="/groupapp/group/browse?g={group_id?}">_{All}</a></li> - <? } ?> - {loop subgroup_types} - <? if ($subgroup_id == $subgroup_type["id"]) { ?> - <li><strong>{subgroup_type-name?}</strong></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 class="two_column"> + <div class="right_small"> + <div class="right_content"> + + <div class="title_text">_{Search groups}:</div> + <form> + <input class="mediumtextinput search" id="searchfield" name="" type="text" value="_{Search by name}" onclick="on_search_group_click(this)" onblur="on_search_group_blur(this)" /> + </form> + + <div class="or_text">_{or}</div> + + <div class="title_text">_{Filter groups by}:</div> + <div class="filter_name">_{type}</div> + <select id="group_type_id" onchange="javascript: window.location.href='?g=' + this.options[this.selectedIndex].value"> + {loop group_types} + <option <? if($group_type['id'] == $group_type_id): ?>selected="selected" <? endif ?>value="{group_type-id?}">{group_type-name?}</option> + {end} + </select> + + <div class="filter_name">_{subtype}</div> + <ul class="subgroups_list"> + <? if ($subgroup_type_id == 0): ?> + <li><strong>_{All}</strong></li> + <? else: ?> + <li><a href="/groupapp/group/browse?g={group_type_id?}">_{All}</a></li> + <? endif ?> + {loop subgroup_types} + <? if ($subgroup_type_id == $subgroup_type["id"]): ?> + <li><strong>{subgroup_type-name?}</strong></li> + <? else: ?> + <li><a href="/groupapp/group/browse?g={subgroup_type-parent_id?}&sg={subgroup_type-id?}">{subgroup_type-name?}</a></li> + <? endif ?> + {end} + </ul> + </div> </div> - </div> - <div class="left_big"> - {loop user_groups} - <div class="row"> + <div class="left_big"> + <div class="left_content"> + {loop groups} + <div class="group_row"> + <div class="actions"> <ul class="actions_list"> - <li><a href="/groupapp/group/edit_info/{user_group.id?}">_{Edit Group}</a></li> - <li><a href="#">_{Leave Group}</a></li> + <li><a href="#">_{Join Group}</a></li> </ul> </div> <div class="avatar"> - <a href="/groupapp/group/show_group/{user_group.id?}"><img src="/images/nophoto_men_sm.gif" alt="" class=""></a> + <a href="/groupapp/group/show_group/{group.id?}"><img src="/images/nophoto_men_sm.gif" alt="" class=""></a> </div> <div class="info"> - <div class="name"><a href="/groupapp/group/show_group/{user_group.id?}">{user_group.name}</a></div> - <div class="other param">_{Members count}:</div> - <div class="other value">{user_group.members_count}</div> - <div class="clearfix"></div> - <div class="other param">_{Type}:</div> - <div class="other value"><? $id = $user_group->type_id; echo $gt[$id]; ?></div> - <div class="clearfix"></div> + <div class="name"><a href="/groupapp/group/show_group/{group.id?}">{group.name}</a></div> + <div class="other"><span class="param">_{Members count}:</span> {group.members_count}</div> + <div class="other"><span class="param">_{Type}:</span> </div> </div> - <div class="clearfix"></div> </div> + {end} + + </div> + </div> + </div> + <div class="clearfix"></div> + <div class="foot"> </div> </div> -</div> -</div> +{else} -{else} <div class="nogroups"> _{Groups are not found}. <a href="/groupapp/group/create">_{Create first group}!</a> </div> Modified: app/views/groupapp/group/index.tpl =================================================================== --- app/views/groupapp/group/index.tpl 2008-06-26 10:43:07 UTC (rev 253) +++ app/views/groupapp/group/index.tpl 2008-06-26 17:36:48 UTC (rev 254) @@ -33,38 +33,35 @@ <div class="clearfix"></div> <div class="groups_list"> - <div class="info">_{You are in groups}: <?= count($user_groups); ?></div> + <div class="head">_{You are in groups}: <?= count($user_groups); ?></div> <div class="container"> - {loop user_groups} - <div class="row"> + {loop user_groups} + <div class="group_row"> <div class="actions"> <ul class="actions_list"> <li><a href="/groupapp/group/edit_info/{user_group.id?}">_{Edit Group}</a></li> <li><a href="#">_{Leave Group}</a></li> - </ul> + </ul> </div> - + <div class="avatar"> <a href="/groupapp/group/show_group/{user_group.id?}"><img src="/images/nophoto_men_sm.gif" alt="" class=""></a> </div> <div class="info"> <div class="name"><a href="/groupapp/group/show_group/{user_group.id?}">{user_group.name}</a></div> - <div class="other param">_{Members count}:</div> - <div class="other value">{user_group.members_count}</div> - <div class="clearfix"></div> - <div class="other param">_{Type}:</div> - <div class="other value"><? $id = $user_group->type_id; echo $gt[$id]; ?></div> - <div class="clearfix"></div> + <div class="other"><span class="param">_{Members count}:</span> {user_group.members_count}</div> + <div class="other"><span class="param">_{Type}:</span> <? $id = $user_group->type_id; echo $gt[$id]; ?></div> </div> <div class="clearfix"></div> </div> - {end} + {end} </div> - + <div class="clearfix"></div> + <div class="foot"> </div> </div> {else} <div class="nogroups"> Modified: public/stylesheets/common/Layout.css =================================================================== --- public/stylesheets/common/Layout.css 2008-06-26 10:43:07 UTC (rev 253) +++ public/stylesheets/common/Layout.css 2008-06-26 17:36:48 UTC (rev 254) @@ -20,7 +20,7 @@ } .left_content { - padding: 10px 5px 10px 20px; + padding: 10px 5px 10px 10px; } .right_content { Modified: public/stylesheets/groupapp/Group.css =================================================================== --- public/stylesheets/groupapp/Group.css 2008-06-26 10:43:07 UTC (rev 253) +++ public/stylesheets/groupapp/Group.css 2008-06-26 17:36:48 UTC (rev 254) @@ -138,45 +138,57 @@ } .groups_list { - float: left; width: 100%; + background: #f7f7f7; } -.groups_list .info { +.groups_list .head { padding: 10px 10px 5px 20px; + border-bottom: solid 1px #dddddd; + background: #ffffff; } -.groups_list .container { +.groups_list .foot { background: #f7f7f7; - padding: 5px; - border-top: solid 1px #dddddd; border-bottom: solid 1px #dddddd; } -.groups_list .container .row { +.groups_list .container { + padding: 5px 10px 5px 10px; +} + +.group_row { + float: left; + width: 100%; background: #ffffff; border: 1px solid #cccccc; - display: block; - margin: 3px; - padding: 10px 20px 10px 20px; + margin: 5px 0px 5px 0px; } -.groups_list .container .row .avatar { - float: left; +.group_row .avatar { + position: absolute; width: 100px; + padding: 10px 5px 10px 5px; + text-align: center; } -.groups_list .container .row .info { - float: left; - width: 300px; - padding: 0px 5px 0px 5px; +.group_row .info { + padding: 10px 5px 10px 5px; + margin-left: 110px; + position: relative; } -.groups_list .container .row .info .name { +.group_row .info .name { padding: 0px; margin-bottom: 10px; } +.group_row .actions { + float: right; + width: 125px; + padding: 10px 5px 10px 0px; +} + .subgroups_list { list-style: none; margin: 0px 0px 10px 0px; @@ -188,20 +200,14 @@ } .other { - float: left; - margin-bottom: 3px; + margin: 5px 0px 5px 0px; } -.other.param { +.other .param { color: #999999; - margin-right: 5px; + margin: 0px 5px 0px 0px; } -.groups_list .container .row .actions { - float: right; - width: 125px; -} - .subtext { padding: 2px 5px 0px 0px; font-size: 9px; @@ -212,3 +218,22 @@ color: #000000; float: left; } + +.title_text { + color: #333333; + font-weight: bold; + font-size: 12px; + padding: 5px 0px 0px 0px; +} + +.or_text { + color: #777777; + padding: 5px 0px 5px 0px; +} + +.filter_name { + color: #777777; + font-weight: bold; + font-size: 12px; + padding: 10px 0px 3px 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. |