[Isocial-svn] SF.net SVN: isocial: [126] app
Status: Pre-Alpha
Brought to you by:
aguidrevitch
From: <di...@us...> - 2008-04-21 18:03:33
|
Revision: 126 http://isocial.svn.sourceforge.net/isocial/?rev=126&view=rev Author: dim0s77 Date: 2008-04-21 11:03:39 -0700 (Mon, 21 Apr 2008) Log Message: ----------- Added saving of changed group attributes Modified Paths: -------------- app/controllers/groupapp/group_controller.php app/views/groupapp/group/edit_customize.tpl app/views/groupapp/group/edit_info.tpl app/views/groupapp/group/edit_members.tpl Modified: app/controllers/groupapp/group_controller.php =================================================================== --- app/controllers/groupapp/group_controller.php 2008-04-19 13:19:36 UTC (rev 125) +++ app/controllers/groupapp/group_controller.php 2008-04-21 18:03:39 UTC (rev 126) @@ -43,18 +43,28 @@ $this->importErrors( $this->GroupappGroup->getErrors() ); } - function edit_info () { - $this->step = 'edit_info'; - if (!empty($this->params['id']) && $this->GroupappGroup->find($this->params['id'])) { + function edit_group () { + if (!empty($this->params['group']) && !empty($this->params['id'])){ + $group = $this->GroupappGroup->findFirst(array( 'id' => $this->params['id'] )); + $group->setAttributes($this->params['group']); + if ($this->Request->isPost() && $group->save()) { + $this->group = $group; + return; + } + } else if (!empty($this->params['id']) && $this->GroupappGroup->find($this->params['id'])) { $this->group = $this->GroupappGroup->find($this->params['id']); } + $this->importErrors( $this->GroupappGroup->getErrors() ); } + function edit_info () { + $this->step = 'edit_info'; + $this->edit_group(); + } + function edit_customize () { $this->step = 'edit_customize'; - if (!empty($this->params['id']) && $this->GroupappGroup->find($this->params['id'])) { - $this->group = $this->GroupappGroup->find($this->params['id']); - } + $this->edit_group(); } function edit_moderators () { Modified: app/views/groupapp/group/edit_customize.tpl =================================================================== --- app/views/groupapp/group/edit_customize.tpl 2008-04-19 13:19:36 UTC (rev 125) +++ app/views/groupapp/group/edit_customize.tpl 2008-04-21 18:03:39 UTC (rev 126) @@ -1,6 +1,6 @@ <div class="title_bar"> <div class="head"> - <div class="name groupapp">_{Edit} {group_name?}</div> + <div class="name groupapp">_{Edit} {group.name?}</div> </div> </div> <div class="clearfix"></div> Modified: app/views/groupapp/group/edit_info.tpl =================================================================== --- app/views/groupapp/group/edit_info.tpl 2008-04-19 13:19:36 UTC (rev 125) +++ app/views/groupapp/group/edit_info.tpl 2008-04-21 18:03:39 UTC (rev 126) @@ -1,6 +1,6 @@ <div class="title_bar"> <div class="head"> - <div class="name groupapp">_{Edit} {group_name?}</div> + <div class="name groupapp">_{Edit} {group.name?}</div> </div> </div> <div class="clearfix"></div> Modified: app/views/groupapp/group/edit_members.tpl =================================================================== --- app/views/groupapp/group/edit_members.tpl 2008-04-19 13:19:36 UTC (rev 125) +++ app/views/groupapp/group/edit_members.tpl 2008-04-21 18:03:39 UTC (rev 126) @@ -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.name?}</div> </div> </div> <div class="clearfix"></div> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |