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

Changeset 11012


Ignore:
Timestamp:
Mar 12, 2009, 8:57:58 PM (10 years ago)
Author:
ShogoKawahara
Message:

#3726:fixed community/homeSuccess template and fixed some link misses on the mobile_frontend

Location:
OpenPNE3/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/trunk/apps/mobile_frontend/modules/community/actions/actions.class.php

    r10003 r11012  
    1818class communityActions extends sfOpenPNECommunityAction
    1919{
     20  /**
     21   * Executes joinlist action
     22   *
     23   * @param sfWebRequest $request a request object
     24   */
     25  public function executeJoinlist(sfWebRequest $request)
     26  {
     27    $this->size = 10;
     28
     29    parent::executeJoinlist($request);
     30  }
     31
     32  /**
     33   * Executes memberList action
     34   *
     35   * @param sfWebRequest $request a request object
     36   */
     37  public function executeMemberList(sfWebRequest $request)
     38  {
     39    $this->size = 10;
     40
     41    parent::executeMemberList($request);
     42  }
    2043}
  • OpenPNE3/trunk/apps/mobile_frontend/modules/community/templates/homeSuccess.php

    r10324 r11012  
    4242<?php
    4343$list = array();
    44 foreach ($community->getCommunityMembers() as $communityMember) {
    45   $member = $communityMember->getMember();
     44$c = new Criteria();
     45$c->addAscendingOrderByColumn(Propel::getDB()->random(time()));
     46foreach ($community->getMembers(5, $c) as $member) {
    4647  $list[] = link_to($member->getName(), 'member/profile?id='.$member->getId());
    4748}
  • OpenPNE3/trunk/apps/mobile_frontend/modules/community/templates/joinlistSuccess.php

    r10304 r11012  
    1616?>
    1717
    18 <?php echo pager_navigation($pager, 'community/joinlist?page=%d&member_id=' . $sf_params->get('member_id'), false); ?>
     18<?php echo pager_navigation($pager, 'community/joinlist?page=%d&id='.$member->getId(), false); ?>
  • OpenPNE3/trunk/apps/mobile_frontend/modules/community/templates/memberListSuccess.php

    r10624 r11012  
    1616?>
    1717
    18 <?php echo pager_navigation($pager, 'friend/list?page=%d&id=' . $sf_params->get('id'), false); ?>
     18<?php echo pager_navigation($pager, 'community/memberList?page=%d&id='.$id, false); ?>
  • OpenPNE3/trunk/apps/mobile_frontend/modules/friend/actions/actions.class.php

    r10003 r11012  
    1818class friendActions extends sfOpenPNEFriendAction
    1919{
     20  /**
     21   * Executes list action
     22   *
     23   * @param sfWebRequest $request a request object
     24   */
     25  public function executeList(sfWebRequest $request)
     26  {
     27    $this->size = 10;
     28
     29    parent::executeList($request);
     30  }
    2031}
  • OpenPNE3/trunk/apps/mobile_frontend/modules/friend/templates/listSuccess.php

    r10304 r11012  
    1616?>
    1717
    18 <?php echo pager_navigation($pager, 'friend/list?page=%d&id=' . $sf_params->get('id'), false); ?>
     18<?php echo pager_navigation($pager, 'friend/list?page=%d&id='.$id , false); ?>
    1919
    2020<?php echo link_to(__('Manage friend'), 'friend/manage') ?>
  • OpenPNE3/trunk/apps/mobile_frontend/modules/member/templates/profileSuccess.php

    r11001 r11012  
    7474  'border' => true,
    7575  'moreInfo' => array(
    76     link_to(__('More'), 'community/joinlist?member_id='.$member->getId())
     76    link_to(__('More'), 'community/joinlist?id='.$member->getId())
    7777  ),
    7878);
  • OpenPNE3/trunk/lib/action/sfOpenPNECommunityAction.class.php

    r10980 r11012  
    9393    $this->forward404Unless($this->member);
    9494
    95     $this->pager = CommunityPeer::getJoinCommunityListPager($memberId, $request->getParameter('page', 1));
     95    if (!$this->size)
     96    {
     97      $this->size = 20;
     98    }
     99
     100    $this->pager = CommunityPeer::getJoinCommunityListPager($memberId, $request->getParameter('page', 1), $this->size);
    96101
    97102    if (!$this->pager->getNbResults())
     
    113118  {
    114119    $this->community = CommunityPeer::retrieveByPk($this->id);
    115     $this->pager = CommunityPeer::getCommunityMemberListPager($this->id, $request->getParameter('page', 1));
     120    $this->forward404Unless($this->community);
     121
     122    if (!$this->size)
     123    {
     124      $this->size = 20;
     125    }
     126    $this->pager = CommunityPeer::getCommunityMemberListPager($this->id, $request->getParameter('page', 1), $this->size);
    116127
    117128    if (!$this->pager->getNbResults()) {
Note: See TracChangeset for help on using the changeset viewer.