ここの情報は古いです。ご理解頂いた上でお取り扱いください。

Changeset 9463


Ignore:
Timestamp:
Dec 3, 2008, 9:42:30 PM (11 years ago)
Author:
ShogoKawahara
Message:

#3119:アプリケーションソート機能の準備

Location:
OpenPNE3/plugins/opOpenSocialPlugin/trunk
Files:
4 added
4 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/plugins/opOpenSocialPlugin/trunk/apps/pc_frontend/modules/application/actions/actions.class.php

    r9430 r9463  
    5555    $criteria = new Criteria();
    5656    $criteria->add(MemberApplicationPeer::MEMBER_ID, $ownerId);
    57     $this->pager = new sfPropelPager('MemberApplication',20);
    58     $this->pager->setCriteria($criteria);
    59     $this->pager->setPage($request->getParameter('page', 1));
    60     $this->pager->init();
     57    $this->apps = MemberApplicationPeer::doSelect($criteria);
    6158
    6259    if (!$request->isMethod('post'))
    6360    {
    64       return $this->pager->getNbResults() ? sfView::SUCCESS : sfView::ERROR;
     61      return $this->apps ? sfView::SUCCESS : sfView::ERROR;
    6562    }
    6663
     
    6966    if (!$this->form->isValid())
    7067    {
    71       return $this->pager->getNbResults() ? sfView::SUCCESS : sfView::ERROR;
     68      return $this->apps ? sfView::SUCCESS : sfView::ERROR;
    7269    }
    7370    $contact = $this->form->getValues();
     
    7976    {
    8077      //TODO : add error action
    81       return $this->pager->getNbResults() ? sfView::SUCCESS : sfView::ERROR;
     78      return $this->apps ? sfView::SUCCESS : sfView::ERROR;
    8279    }
    8380    $criteria = new Criteria();
  • OpenPNE3/plugins/opOpenSocialPlugin/trunk/apps/pc_frontend/modules/application/templates/_renderProfileApplication.php

    r9455 r9463  
    22$c = new Criteria();
    33$c->add(MemberApplicationPeer::MEMBER_ID, $memberId);
     4$c->setLimit(3);
    45$member_apps = MemberApplicationPeer::doSelect($c);
     6
    57foreach ($member_apps as $member_app)
    68{
     
    1113      'member_app' => $member_app
    1214    ));
     15 
    1316}
  • OpenPNE3/plugins/opOpenSocialPlugin/trunk/apps/pc_frontend/modules/application/templates/listSuccess.php

    r9070 r9463  
    1 <?php use_helper('Pagination') ?>
     1<?php use_helper('Javascript') ?>
     2<?php use_helper('OpenSocial') ?>
    23<?php if (isset($form)) : ?>
    34<?php include_box('form','アプリケーション追加','',array(
     
    78)) ?>
    89<?php endif ?>
    9 <?php echo pager_navigation($pager, 'application/list?page=%d') ?>
    10 <ul>
    11 <?php foreach ($pager->getResults() as $app) : ?>
    12 <li><?php echo link_to($app->getApplication()->getTitle(), 'application/canvas?mid='.$app->getId()) ?></li>
     10<div id="order">
     11<?php foreach ($apps as $app) : ?>
     12<?php include_application_information_box(
     13  'item_'.$app->getApplication()->getId(),
     14  $app->getId(),
     15  $app->getApplication()->getTitle(),
     16  $app->getAPplication()->getDescription(),
     17  $app->getApplication()->getThumbnail(),
     18  $app->getApplication()->getAuthor(),
     19  $app->getApplication()->getAuthorEmail()
     20) ?>
    1321<?php endforeach ?>
    14 </ul>
    15 <?php echo pager_navigation($pager, 'application/list?page-%d') ?>
     22</div>
     23<?php echo sortable_element('order', array(
     24  'tag'    => 'div',
     25)) ?>
  • OpenPNE3/plugins/opOpenSocialPlugin/trunk/config/schema.yml

    r9426 r9463  
    3030    id: ~
    3131    member_id: { type: integer, foreignTable: member, foreignReference: id }
    32     application_id: ~
     32    application_id:
     33    sort_order: { type: integer }
Note: See TracChangeset for help on using the changeset viewer.