[Isocial-svn] SF.net SVN: isocial: [275] public/stylesheets/groupapp
Status: Pre-Alpha
Brought to you by:
aguidrevitch
From: <di...@us...> - 2008-07-08 17:25:44
|
Revision: 275 http://isocial.svn.sourceforge.net/isocial/?rev=275&view=rev Author: dim0s77 Date: 2008-07-08 10:25:53 -0700 (Tue, 08 Jul 2008) Log Message: ----------- added more logic to page groupapp->group->edit_customize and picture_upload Modified Paths: -------------- app/controllers/groupapp/group_controller.php app/locales/groupapp/group/ru.php app/views/groupapp/group/_customize.tpl app/views/groupapp/group/_editbar.tpl app/views/groupapp/group/_picture_upload.tpl public/stylesheets/common/MiniTab.css public/stylesheets/groupapp/Group.css Modified: app/controllers/groupapp/group_controller.php =================================================================== --- app/controllers/groupapp/group_controller.php 2008-07-08 15:05:14 UTC (rev 274) +++ app/controllers/groupapp/group_controller.php 2008-07-08 17:25:53 UTC (rev 275) @@ -19,11 +19,8 @@ if (!empty($this->params['id']) && $this->GroupappGroup->find($this->params['id'])) { $group = $this->GroupappGroup->find( $this->params['id'] ); if (isset($group) && $group) { - $this->group_picture = GROUPAPP_DEFAULT_PICTURE_URL; - if ($group->stored_file_id) { - $group->picture->load(); - $this->group_picture = $group->picture->url(); - } + $this->group_picture = $group->stored_file_id ? + $group->picture->load()->url() : GROUPAPP_DEFAULT_PICTURE_URL; $this->group = $group; $members = $this->_getGroupMembers($this->group->getId()); $current_user_id = $this->current_user->getId(); @@ -106,14 +103,19 @@ $this->group->category_id = floor($this->group->type_id / 100); if (!empty($this->params['group'])){ if (isset($this->params['group']['stored_file_id']) && + !empty($this->params['group']['stored_file_id']) && $this->params['group']['stored_file_id'] != $this->group->stored_file_id ) { $stored_file = $this->StoredFile->findFirst(array( 'id' => $this->params['group']['stored_file_id'] )); $this->group->picture->assign($stored_file); + } else { + $this->group->stored_file_id = NULL; + $this->group->picture->build(); } $this->group->setAttributes($this->params['group']); if ($this->Request->isPost() && $this->group->save()) { - $this->group_picture = $this->group->picture->url(); + $this->group_picture = $this->group->stored_file_id ? + $this->group->picture->load()->url() : GROUPAPP_DEFAULT_PICTURE_URL; return; } } Modified: app/locales/groupapp/group/ru.php =================================================================== --- app/locales/groupapp/group/ru.php 2008-07-08 15:05:14 UTC (rev 274) +++ app/locales/groupapp/group/ru.php 2008-07-08 17:25:53 UTC (rev 275) @@ -93,6 +93,15 @@ 'Это засекреченная группа. Эта группа не будет отображаться в результатах поиска или в профилях своих участников.'; $dictionary['Publicize'] = 'Опубликовать'; $dictionary['Show this group in search results'] = 'Показывать эту группу в результатах поиска'; +$dictionary['Current picture'] = 'Текущее изображение'; +$dictionary['Upload Picture'] = 'Загрузить изображение'; +$dictionary['You can upload a JPG, GIF or PNG file'] = 'Вы можете загрузить изображение в формате JPG, GIF или PNG'; +$dictionary['I certify that I have the right to distribute this picture and that it does not violate the'] = 'Подтверждаю то, что я обладаю правами на распространение этого изображения и оно не нарушает'; +$dictionary['Terms of Use'] = 'Условия пользования'; +$dictionary['Remove Picture'] = 'Удалить изображение'; +$dictionary['You can remove this picture, but be sure to upload another or we will display a question mark in its place'] = 'Вы можете удалить текущее изображение, но не забудьте загрузить другое или на этом месте появится картинка, используемая по-умолчанию для групп'; +$dictionary['Note'] = 'Примечание'; +$dictionary['to preserve the new images do not forget to save the parameters group'] = 'для сохранения нового изображения не забудьте сохранить параметры группы'; $dictionary['Invite people to group'] = 'Пригласить людей в группу'; $dictionary['Show'] = 'Показать'; Modified: app/views/groupapp/group/_customize.tpl =================================================================== --- app/views/groupapp/group/_customize.tpl 2008-07-08 15:05:14 UTC (rev 274) +++ app/views/groupapp/group/_customize.tpl 2008-07-08 17:25:53 UTC (rev 275) @@ -22,13 +22,13 @@ <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_wall', array('class' => 'checkboxinput')) ?>_{Enable the Wall}.</label> --> + <!-- </div> --> + <!-- <div class="clearfix"></div> --> + <!-- </div> --> <!-- <div class="formrow"> --> <!-- <label> </label> --> Modified: app/views/groupapp/group/_editbar.tpl =================================================================== --- app/views/groupapp/group/_editbar.tpl 2008-07-08 15:05:14 UTC (rev 274) +++ app/views/groupapp/group/_editbar.tpl 2008-07-08 17:25:53 UTC (rev 275) @@ -1,8 +1,8 @@ <div class="minitabs"> <div class="left"> <ul class="toggle_minitabs"> - <li><a href="/groupapp/group/edit_info/{group.id?}" class="<?= !empty($step) && $step == 'edit_info' ? 'selected' : '' ?>">_{Group Info}</a> - </li><li><a href="/groupapp/group/edit_customize/{group.id?}" class="<?= !empty($step) && $step == 'edit_customize' ? 'selected' : '' ?>">_{Customize}</a> + <li><a href="/groupapp/group/edit_info/{group.id?}" class="<?= !empty($step) && $step == 'edit_info' ? 'selected' : '' ?> right_space">_{Group Info}</a> + </li><li><a href="/groupapp/group/edit_customize/{group.id?}" class="<?= !empty($step) && $step == 'edit_customize' ? 'selected' : '' ?> right_space">_{Customize}</a> </li><li><a href="/groupapp/group/edit_members/{group.id?}" class="<?= !empty($step) && $step == 'edit_members' ? 'selected' : '' ?>">_{Members}</a></li> </ul> </div> Modified: app/views/groupapp/group/_picture_upload.tpl =================================================================== --- app/views/groupapp/group/_picture_upload.tpl 2008-07-08 15:05:14 UTC (rev 274) +++ app/views/groupapp/group/_picture_upload.tpl 2008-07-08 17:25:53 UTC (rev 275) @@ -9,6 +9,7 @@ if (uploaded.length) { $('current_picture').innerHTML = '<img src="/preview/200x200/' + uploaded[0].url + '">'; $('group_stored_file_id').value = uploaded[0].id; + $('picture_note').show(); } } @@ -21,6 +22,14 @@ $('upload_submit_btn').writeAttribute('class', 'cancelinput'); } } + + function removePicture() { + <? $default_picture = GROUPAPP_DEFAULT_PICTURE_URL; ?> + $('current_picture').innerHTML = '<img src="/preview/200x200/{default_picture}">'; + $('group_stored_file_id').value = ''; + $('picture_note').show(); + } + </script> <form enctype="multipart/form-data" method="post" id="picture_upload_form" action="/upload" onsubmit="return AIM.submit(this, {'onStart' : startCallback, 'onComplete' : completeCallback})"> @@ -37,6 +46,10 @@ </div> </div> + <div class="note" id="picture_note" style="display: none"> + <strong>_{Note}</strong>: _{to preserve the new images do not forget to save the parameters group}! + </div> + </div> </div> @@ -44,6 +57,7 @@ <div class="left_content"> <div class="upload_picture"> + <div class="upload_title"> _{Upload Picture} </div> @@ -64,6 +78,23 @@ <div class="upload_submit"> <input class="cancelinput" type="submit" value="_{Upload Picture}" disabled="disabled" id="upload_submit_btn" name="upload_submit_btn" /> </div> + + {?group.stored_file_id} + <div class="spacer"> </div> + + <div class="upload_title"> + _{Remove Picture} + </div> + + <div class="upload_text"> + _{You can remove this picture, but be sure to upload another or we will display a question mark in its place}. + </div> + + <div class="upload_submit"> + <input class="submitinput" type="button" value="_{Remove Picture}" id="remove_submit_btn" name="remove_submit_btn" onclick="removePicture()" /> + </div> + {end} + </div> </div> Modified: public/stylesheets/common/MiniTab.css =================================================================== --- public/stylesheets/common/MiniTab.css 2008-07-08 15:05:14 UTC (rev 274) +++ public/stylesheets/common/MiniTab.css 2008-07-08 17:25:53 UTC (rev 275) @@ -43,6 +43,10 @@ border-right: 1px solid #cccccc; } +.toggle_minitabs li.empty.right_space { + margin-right: 3px; +} + .toggle_minitabs li a { display: block; color: #3b5998; @@ -54,6 +58,10 @@ border-right: 1px solid #cccccc; } +.toggle_minitabs li a.right_space { + margin-right: 3px; +} + .toggle_minitabs li a:focus { outline: 0px; } Modified: public/stylesheets/groupapp/Group.css =================================================================== --- public/stylesheets/groupapp/Group.css 2008-07-08 15:05:14 UTC (rev 274) +++ public/stylesheets/groupapp/Group.css 2008-07-08 17:25:53 UTC (rev 275) @@ -264,7 +264,7 @@ color: #333333; font-weight: bold; font-size: 13px; - border-bottom: solid 1px #d8dfea; + border-bottom: solid 1px #6d84b4; padding: 0px 0px 5px 0px; } @@ -272,7 +272,17 @@ padding: 10px 0px 10px 0px; } +.note { + font-size: 11px; + color: #ff5f5f; + margin: 0px 5px 10px 10px; +} + .filter_name.certify { padding: 10px 0px 10px 0px; } +.spacer { + dislay: block; + height: 20px; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |