Permalink
Browse files

reverted features about like and comment, because these feature must …

…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...
1 parent e64e4c2 commit cbb07ba908c283436ca33f95d55b4a44deaee104 @kawahara kawahara committed Jul 17, 2011
Showing with 31 additions and 1,546 deletions.
  1. +9 −11 apps/mobile_frontend/modules/album/actions/actions.class.php
  2. +2 −2 apps/mobile_frontend/modules/album/templates/_list.php
  3. +1 −14 apps/mobile_frontend/modules/album/templates/showSuccess.php
  4. +0 −20 apps/mobile_frontend/modules/albumComment/actions/actions.class.php
  5. +0 −26 apps/mobile_frontend/modules/albumComment/actions/components.class.php
  6. +0 −15 apps/mobile_frontend/modules/albumComment/templates/_create.php
  7. +0 −7 apps/mobile_frontend/modules/albumComment/templates/_list.php
  8. +0 −38 apps/mobile_frontend/modules/albumComment/templates/_listComment.php
  9. +0 −11 apps/mobile_frontend/modules/albumComment/templates/deleteConfirmSuccess.php
  10. +6 −9 apps/mobile_frontend/modules/albumImage/actions/actions.class.php
  11. +1 −14 apps/mobile_frontend/modules/albumImage/templates/showSuccess.php
  12. +0 −20 apps/mobile_frontend/modules/albumImageComment/actions/actions.class.php
  13. +0 −27 apps/mobile_frontend/modules/albumImageComment/actions/components.class.php
  14. +0 −7 apps/mobile_frontend/modules/albumImageComment/templates/_list.php
  15. +0 −11 apps/mobile_frontend/modules/albumImageComment/templates/deleteConfirmSuccess.php
  16. +0 −20 apps/mobile_frontend/modules/albumImageLike/actions/actions.class.php
  17. +0 −20 apps/mobile_frontend/modules/albumImageLike/actions/components.class.php
  18. +0 −3 apps/mobile_frontend/modules/albumImageLike/templates/_list.php
  19. +0 −20 apps/mobile_frontend/modules/albumLike/actions/actions.class.php
  20. +0 −20 apps/mobile_frontend/modules/albumLike/actions/components.class.php
  21. +0 −16 apps/mobile_frontend/modules/albumLike/templates/_list.php
  22. +0 −3 apps/pc_frontend/config/app.yml
  23. +0 −3 apps/pc_frontend/modules/album/actions/actions.class.php
  24. +0 −17 apps/pc_frontend/modules/album/templates/showSuccess.php
  25. +0 −20 apps/pc_frontend/modules/albumComment/actions/actions.class.php
  26. +0 −26 apps/pc_frontend/modules/albumComment/actions/components.class.php
  27. +0 −3 apps/pc_frontend/modules/albumComment/config/security.yml
  28. 0 apps/pc_frontend/modules/albumComment/config/view.yml
  29. +0 −15 apps/pc_frontend/modules/albumComment/templates/_create.php
  30. +0 −21 apps/pc_frontend/modules/albumComment/templates/_deleteConfirm.php
  31. +0 −7 apps/pc_frontend/modules/albumComment/templates/_list.php
  32. +0 −42 apps/pc_frontend/modules/albumComment/templates/_listComment.php
  33. +0 −4 apps/pc_frontend/modules/albumComment/templates/deleteConfirmSuccess.php
  34. +2 −5 apps/pc_frontend/modules/albumImage/actions/actions.class.php
  35. +0 −17 apps/pc_frontend/modules/albumImage/templates/showSuccess.php
  36. +0 −20 apps/pc_frontend/modules/albumImageComment/actions/actions.class.php
  37. +0 −27 apps/pc_frontend/modules/albumImageComment/actions/components.class.php
  38. +0 −3 apps/pc_frontend/modules/albumImageComment/config/security.yml
  39. +0 −7 apps/pc_frontend/modules/albumImageComment/templates/_list.php
  40. +0 −4 apps/pc_frontend/modules/albumImageComment/templates/deleteConfirmSuccess.php
  41. +0 −20 apps/pc_frontend/modules/albumImageLike/actions/actions.class.php
  42. +0 −20 apps/pc_frontend/modules/albumImageLike/actions/components.class.php
  43. +0 −3 apps/pc_frontend/modules/albumImageLike/templates/_list.php
  44. +0 −20 apps/pc_frontend/modules/albumLike/actions/actions.class.php
  45. +0 −20 apps/pc_frontend/modules/albumLike/actions/components.class.php
  46. +0 −16 apps/pc_frontend/modules/albumLike/templates/_list.php
  47. +2 −72 config/doctrine/schema.yml
  48. +2 −26 i18n/messages.ja.xml
  49. +0 −67 lib/action/opAlbumPluginAlbumCommentActions.class.php
  50. +0 −39 lib/action/opAlbumPluginAlbumCommentComponents.class.php
  51. +0 −70 lib/action/opAlbumPluginAlbumImageCommentActions.class.php
  52. +0 −39 lib/action/opAlbumPluginAlbumImageCommentComponents.class.php
  53. +0 −54 lib/action/opAlbumPluginAlbumImageLikeActions.class.php
  54. +0 −24 lib/action/opAlbumPluginAlbumImageLikeComponents.class.php
  55. +0 −54 lib/action/opAlbumPluginAlbumLikeActions.class.php
  56. +0 −24 lib/action/opAlbumPluginAlbumLikeComponents.class.php
  57. +0 −13 lib/filter/doctrine/PluginAlbumCommentFormFilter.class.php
  58. +0 −12 lib/filter/doctrine/PluginAlbumFormFilter.class.php
  59. +0 −13 lib/filter/doctrine/PluginAlbumImageCommentFormFilter.class.php
  60. +0 −12 lib/filter/doctrine/PluginAlbumImageFormFilter.class.php
  61. +0 −26 lib/form/doctrine/PluginAlbumCommentForm.class.php
  62. +0 −18 lib/form/doctrine/PluginAlbumImageCommentForm.class.php
  63. +0 −13 lib/form/doctrine/PluginAlbumImageLikeForm.class.php
  64. +0 −13 lib/form/doctrine/PluginAlbumLikeForm.class.php
  65. +4 −22 lib/model/doctrine/PluginAlbum.class.php
  66. +0 −19 lib/model/doctrine/PluginAlbumComment.class.php
  67. +0 −19 lib/model/doctrine/PluginAlbumCommentTable.class.php
  68. +0 −18 lib/model/doctrine/PluginAlbumImage.class.php
  69. +0 −19 lib/model/doctrine/PluginAlbumImageComment.class.php
  70. +0 −19 lib/model/doctrine/PluginAlbumImageCommentTable.class.php
  71. +0 −19 lib/model/doctrine/PluginAlbumImageLike.class.php
  72. +0 −18 lib/model/doctrine/PluginAlbumImageLikeTable.class.php
  73. +0 −19 lib/model/doctrine/PluginAlbumLike.class.php
  74. +0 −18 lib/model/doctrine/PluginAlbumLikeTable.class.php
  75. +2 −71 lib/routing/opAlbumPluginFrontendRouteCollection.class.php
  76. +0 −22 web/css/album.css
@@ -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());
@@ -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());
@@ -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>
@@ -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; ?>
@@ -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()): ?>
@@ -70,4 +57,4 @@
<?php echo op_mail_to('mail_album_image_upload', array('id' => $album->id), __('Upload')) ?><br>
<?php endif; ?>
</small>
-</div>
+</div>
@@ -1,20 +0,0 @@
-<?php
-
-/**
- * This file is part of the OpenPNE package.
- * (c) OpenPNE Project (http://www.openpne.jp/)
- *
- * For the full copyright and license information, please view the LICENSE
- * file and the NOTICE file that were distributed with this source code.
- */
-
-/**
- * albumComment actions.
- *
- * @package OpenPNE
- * @subpackage albumComment
- * @author Nguyen Ngoc Tu
- */
-class albumCommentActions extends opAlbumPluginAlbumCommentActions
-{
-}
@@ -1,26 +0,0 @@
-<?php
-
-/**
- * This file is part of the OpenPNE package.
- * (c) OpenPNE Project (http://www.openpne.jp/)
- *
- * For the full copyright and license information, please view the LICENSE
- * file and the NOTICE file that were distributed with this source code.
- */
-
-/**
- * diaryComment components.
- *
- * @package OpenPNE
- * @subpackage album
- * @author Nguyen Ngoc Tu <tunn@tejimaya.com>
- */
-class albumCommentComponents extends opAlbumPluginAlbumCommentComponents
-{
- public function executeList(sfWebRequest $request)
- {
- $this->size = sfConfig::get('app_max_comments_on_album', 5);
-
- parent::executeList($request);
- }
-}
@@ -1,15 +0,0 @@
-<?php if ($sf_user->getMemberId()): ?>
-<?php
-$form->getWidget('body')->setAttribute('rows', 5);
-$form->getWidget('body')->setAttribute('cols', 25);
-
-$title = __('Post a comment');
-$options = array(
- 'form' => $form,
- 'url' => $url,
- 'button' => __('Save'),
- 'isMultipart' => true,
-);
-include_box($boxName, $title, '', $options);
-?>
-<?php endif; ?>
@@ -1,7 +0,0 @@
-<?php include_partial('albumComment/listComment',array(
-'pager' => $pager,
-'prevUrl' => url_for('@album_show?id='.$album->id.'&commentPage='.$pager->getPreviousPage()),
-'nextUrl' => url_for('@album_show?id='.$album->id.'&commentPage='.$pager->getNextPage()),
-'authorId' => $album->member_id,
-'deleteConfirmUrl' => 'album_comment_delete_confirm'
-))?>
@@ -1,38 +0,0 @@
-<?php if ($pager->getNbResults()): ?>
-
-<div class="comments">
-<?php foreach ($pager->getResults() as $comment): ?>
-<div class="comment" style="padding: 1px 0px 4px 0px; border-bottom: 1px solid #b3ceef;">
-
-<div class="body">
-<?php echo op_link_to_member($comment->getMemberId()) ?>&nbsp;
-<?php echo op_auto_link_text($comment->body) ?>
-
-<div class="info">
-<small style="color: rgb(85, 85, 85);"><?php echo op_format_activity_time(strtotime($comment->getCreatedAt())) ?>
-</small>
-</div>
-
-<?php if ($authorId === $sf_user->getMemberId() || $comment->member_id === $sf_user->getMemberId()): ?>
-<div class="operation">
-<small>
-<?php echo link_to(__('Delete'), $deleteConfirmUrl, $comment) ?>
-</small>
-</div>
-<?php endif; ?>
-</div>
-
-</div>
-<?php endforeach;?>
-</div>
-
-<?php if ($pager->haveToPaginate()): ?>
-<div class="pagerRelative" style="padding: 4px 0px 4px 0px; text-align: center">
-<small>
-<?php if (!$pager->isFirstPage()): ?><span style="margin-right: 4px;"><?php echo link_to(__('Previous'), $prevUrl) ?></span><?php endif; ?>
-<?php if (!$pager->isLastPage()): ?><?php echo link_to(__('Next'), $nextUrl) ?><?php endif; ?>
-</small>
-</div>
-<?php endif; ?>
-
-<?php endif; ?>
@@ -1,11 +0,0 @@
-<?php
-op_mobile_page_title(__('Delete Comment'));
-?>
-
-<?php echo __('Do you really delete this comment?') ?><br><br>
-
-<form action="<?php echo url_for('album_comment_delete', $albumComment) ?>" method="post">
-<?php echo $form[$form->getCSRFFieldName()] ?>
-<input class="input_submit" type="submit" value="<?php echo __('Delete') ?>" />
-<?php echo link_to(__('Cancel%1%'), 'album_show', $album) ?>
-</form>
@@ -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());
@@ -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();
@@ -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());
@@ -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()): ?>
@@ -63,4 +50,4 @@
<?php echo op_mail_to('mail_album_image_upload', array('id' => $album->id), __('Upload')) ?><br>
<?php endif; ?>
</small>
-</div>
+</div>
@@ -1,20 +0,0 @@
-<?php
-
-/**
- * This file is part of the OpenPNE package.
- * (c) OpenPNE Project (http://www.openpne.jp/)
- *
- * For the full copyright and license information, please view the LICENSE
- * file and the NOTICE file that were distributed with this source code.
- */
-
-/**
- * albumImageComment actions.
- *
- * @package OpenPNE
- * @subpackage albumImageComment
- * @author Nguyen Ngoc Tu (tunn@tejimaya.com)
- */
-class albumImageCommentActions extends opAlbumPluginAlbumImageCommentActions
-{
-}
@@ -1,27 +0,0 @@
-<?php
-
-/**
- * This file is part of the OpenPNE package.
- * (c) OpenPNE Project (http://www.openpne.jp/)
- *
- * For the full copyright and license information, please view the LICENSE
- * file and the NOTICE file that were distributed with this source code.
- */
-
-/**
- * albumImageComment components.
- *
- * @package OpenPNE
- * @subpackage albumImageComment
- * @author Nguyen Ngoc Tu <tunn@tejimaya.com>
- */
-
-class albumImageCommentComponents extends opAlbumPluginAlbumImageCommentComponents
-{
- public function executeList(sfWebRequest $request)
- {
- $this->size = sfConfig::get('app_max_comments_on_album_image', 5);
-
- parent::executeList($request);
- }
-}
@@ -1,7 +0,0 @@
-<?php include_partial('albumComment/listComment',array(
-'pager' => $pager,
-'prevUrl' => url_for('@album_image_show?id='.$albumImage->id.'&commentPage='.$pager->getPreviousPage()),
-'nextUrl' => url_for('@album_image_show?id='.$albumImage->id.'&commentPage='.$pager->getNextPage()),
-'authorId' => $albumImage->member_id,
-'deleteConfirmUrl' => 'album_image_comment_delete_confirm'
-))?>
@@ -1,11 +0,0 @@
-<?php
-op_mobile_page_title(__('Delete Comment'));
-?>
-
-<?php echo __('Do you really delete this comment?') ?><br><br>
-
-<form action="<?php echo url_for('album_image_comment_delete', $albumImageComment) ?>" method="post">
-<?php echo $form[$form->getCSRFFieldName()] ?>
-<input class="input_submit" type="submit" value="<?php echo __('Delete') ?>" />
-<?php echo link_to(__('Cancel%1%'), 'album_image_show', $albumImage) ?>
-</form>
@@ -1,20 +0,0 @@
-<?php
-
-/**
- * This file is part of the OpenPNE package.
- * (c) OpenPNE Project (http://www.openpne.jp/)
- *
- * For the full copyright and license information, please view the LICENSE
- * file and the NOTICE file that were distributed with this source code.
- */
-
-/**
- * albumImageLike actions.
- *
- * @package OpenPNE
- * @subpackage albumImageLike
- * @author Nguyen Ngoc Tu (tunn@tejimaya.com)
- */
-class albumImageLikeActions extends opAlbumPluginAlbumImageLikeActions
-{
-}
Oops, something went wrong.

0 comments on commit cbb07ba

Please sign in to comment.