[Isocial-svn] SF.net SVN: isocial: [112] public/stylesheets/groupapp
Status: Pre-Alpha
Brought to you by:
aguidrevitch
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. |