Skip to content

Commit

Permalink
reverted features about like and comment, because these feature must …
Browse files Browse the repository at this point in the history
…implement at *unstable* version.

I want to release *stable* version first.
Unfotunately, opAlbumPlugin 0.9.4.1 is using for OpenPNE bundle plugin, so I think that we should not expand
the table structure now.
  • Loading branch information
kawahara committed Jul 18, 2011
1 parent e64e4c2 commit cbb07ba
Show file tree
Hide file tree
Showing 76 changed files with 31 additions and 1,546 deletions.
20 changes: 9 additions & 11 deletions apps/mobile_frontend/modules/album/actions/actions.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,34 +21,32 @@ public function executeListMember(sfWebRequest $request)
{
$this->pager = Doctrine::getTable('Album')->getMemberAlbumPager($this->member->getId(), $request->getParameter('page'), 5, $this->getUser()->getMemberId());
}

public function executeListFriend(sfWebRequest $request)
{
$this->pager = Doctrine::getTable('Album')->getFriendAlbumPager($this->getUser()->getMemberId(), $request->getParameter('page'), 5);
}

public function executeList(sfWebRequest $request)
{
$this->pager = Doctrine::getTable('Album')->getAlbumPager($request->getParameter('page'), 5);
}

public function executeShow(sfWebRequest $request)
{
$this->forward404Unless($this->isAlbumViewable());

$this->pager = Doctrine::getTable('AlbumImage')->getAlbumImagePager($this->album, $request->getParameter('page', 1), 6);

$this->form = new AlbumCommentForm();
$this->commentPage = $request->getParameter('commentPage', 1);

}

public function executeEdit(sfWebRequest $request)
{
$this->forward404Unless($this->isAlbumAuthor());

$this->form = new AlbumForm($this->album);
}

public function executeUpdate(sfWebRequest $request)
{
$this->forward404Unless($this->isAlbumAuthor());
Expand All @@ -62,17 +60,17 @@ public function executeUpdate(sfWebRequest $request)

$this->redirect('@album_show?id='.$this->album->id);
}

$this->setTemplate('edit');
}

public function executeDeleteConfirm(sfWebRequest $request)
{
$this->forward404Unless($this->isAlbumAuthor());

$this->form = new sfForm();
}

public function executeDelete(sfWebRequest $request)
{
$this->forward404Unless($this->isAlbumAuthor());
Expand Down
4 changes: 2 additions & 2 deletions apps/mobile_frontend/modules/album/templates/_list.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<center><?php op_include_pager_total($pager); ?></center>
</div>
<?php foreach ($pager->getResults() as $album): ?>
<?php echo link_to($album->Member->name, 'obj_member_profile', $album->Member) ?>
<?php echo link_to($album->Member->name, '@member_profile?id='.$album->Member->id) ?>
<span style="padding-left: 1px">
<?php echo $album->body; ?>
</span>
Expand All @@ -12,4 +12,4 @@
</div>
<small style="color: rgb(85, 85, 85);"><?php echo op_format_activity_time(strtotime($album->getCreatedAt())) ?></small>
<hr color="#b3ceef">
<?php endforeach; ?>
<?php endforeach; ?>
15 changes: 1 addition & 14 deletions apps/mobile_frontend/modules/album/templates/showSuccess.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,6 @@

<div style="padding: 1px 0px 4px 0px; border-top: 1px solid #0d6ddf;">
<?php echo $album->body ?>
<br>
<?php if ($albumLike = $album->isLiked($sf_user->getMemberId())): ?>
<?php echo link_to(__('Unlike'), 'album_like_delete', $albumLike) ?>
<?php else: ?>
<?php echo link_to(__('Like'), 'album_like_create', $album) ?>
<?php endif; ?>
<br>
<?php include_component('albumLike','list',array('album' => $album)) ?>
</div>

<div style="padding: 1px 0px 4px 0px; border-top: 1px solid #0d6ddf;">
<?php include_component('albumComment', 'list', array('album' => $album, 'commentPage' => $commentPage)) ?>
<?php include_partial('albumComment/create', array('form' => $form, 'url' => url_for('@album_comment_create?id='.$album->id), 'boxName' => 'formAlbumComment')) ?>
</div>

<?php if ($member->id == $sf_user->getMemberId()): ?>
Expand All @@ -70,4 +57,4 @@
<?php echo op_mail_to('mail_album_image_upload', array('id' => $album->id), __('Upload')) ?><br>
<?php endif; ?>
</small>
</div>
</div>

This file was deleted.

This file was deleted.

15 changes: 0 additions & 15 deletions apps/mobile_frontend/modules/albumComment/templates/_create.php

This file was deleted.

7 changes: 0 additions & 7 deletions apps/mobile_frontend/modules/albumComment/templates/_list.php

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,8 @@ class albumImageActions extends opAlbumPluginActions
public function executeShow(sfWebRequest $request)
{
$this->forward404Unless($this->isAlbumViewable());

$this->form = new AlbumImageCommentForm();
$this->commentPage = $request->getParameter('commentPage', 1);
}

public function executeEdit(sfWebRequest $request)
{
$this->forward404Unless($this->isAlbumAuthor());
Expand All @@ -33,15 +30,15 @@ public function executeEdit(sfWebRequest $request)
$this->form->setAlbumChoices();
$this->form->setWidget('description', new sfWidgetFormInput(array(), array('size' => 30)));
}

public function executeUpdate(sfWebRequest $request)
{
$this->forward404Unless($this->isAlbumAuthor());

$this->form = new AlbumImageForm($this->albumImage);
$this->form->setAlbumChoices();
$this->form->bind($request->getParameter($this->form->getName()));

if ($this->form->isValid())
{
$this->form->save();
Expand All @@ -51,14 +48,14 @@ public function executeUpdate(sfWebRequest $request)

$this->setTemplate('edit');
}

public function executeDeleteConfirm(sfWebRequest $request)
{
$this->forward404Unless($this->isAlbumAuthor());

$this->form = new sfForm();
}

public function executeDelete(sfWebRequest $request)
{
$this->forward404Unless($this->isAlbumAuthor());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,7 @@
<div style="padding: 1px 0px 4px 0px; border-top: 1px solid #b3ceef;">
<?php if ('' !== $albumImage->description): ?>
<?php echo $albumImage->description ?>
<br>
<?php endif; ?>
<?php if ($albumImageLike = $albumImage->isLiked($sf_user->getMemberId())): ?>
<?php echo link_to(__('Unlike'), 'album_image_like_delete', $albumImageLike) ?>
<?php else: ?>
<?php echo link_to(__('Like'), 'album_image_like_create', $albumImage) ?>
<?php endif; ?>
<br>
<?php include_component('albumImageLike','list',array('albumImage' => $albumImage)) ?>
</div>

<div style="padding: 1px 0px 4px 0px; border-top: 1px solid #0d6ddf;">
<?php include_component('albumImageComment','list',array('albumImage' => $albumImage, 'commentPage' => $commentPage)) ?>
<?php include_partial('albumComment/create', array('form' => $form, 'url' => url_for('@album_image_comment_create?id='.$albumImage->id), 'boxName' => 'formAlbumImageComment')) ?>
</div>

<?php if ($member->id == $sf_user->getMemberId()): ?>
Expand All @@ -63,4 +50,4 @@
<?php echo op_mail_to('mail_album_image_upload', array('id' => $album->id), __('Upload')) ?><br>
<?php endif; ?>
</small>
</div>
</div>

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit cbb07ba

Please sign in to comment.