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

Changeset 11637


Ignore:
Timestamp:
May 15, 2009, 10:06:11 PM (10 years ago)
Author:
nagasawa
Message:

#3879:added the members search page to the mobile(3.0.x)

Location:
OpenPNE3/branches/STABLE/3.0.x
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/branches/STABLE/3.0.x/apps/mobile_frontend/i18n/messages.ja.xml

    r11636 r11637  
    419419        <target>コミュニティ検索トップ</target>
    420420      </trans-unit>
     421      <trans-unit id="">
     422        <source>Nickname</source>
     423        <target>ニックネーム</target>
     424      </trans-unit>
     425      <trans-unit id="">
     426        <source>Search Members</source>
     427        <target>メンバー検索</target>
     428      </trans-unit>
     429      <trans-unit id="">
     430        <source>Your search queries did not match any members.</source>
     431        <target>該当するメンバーはいませんでした。</target>
     432      </trans-unit>
    421433    </body>
    422434  </file>
  • OpenPNE3/branches/STABLE/3.0.x/apps/mobile_frontend/modules/member/actions/actions.class.php

    r11293 r11637  
    162162    return sfView::SUCCESS;
    163163  }
     164
     165 /**
     166  * Executes search action
     167  *
     168  * @param sfRequest $request A request object
     169  */
     170  public function executeSearch($request)
     171  {
     172    $params = $request->getParameter('member', array());
     173    if ($request->hasParameter('search_query'))
     174    {
     175      $params['name']['text'] = $request->getParameter('search_query');
     176    }
     177
     178    $this->filters = new opMemberProfileSearchForm();
     179    $this->filters->bind($params);
     180
     181    $this->pager = new sfPropelPager('Member', 20);
     182    $c = $this->filters->getCriteria();
     183    $c->addAscendingOrderByColumn(MemberPeer::ID);
     184    $this->pager->setCriteria($c);
     185    $this->pager->setPage($request->getParameter('page', 1));
     186    $this->pager->init();
     187
     188    return sfView::SUCCESS;
     189  }
    164190}
  • OpenPNE3/branches/STABLE/3.0.x/apps/mobile_frontend/modules/member/templates/homeSuccess.php

    r11636 r11637  
    5252<?php
    5353$list = array(
     54  link_to(__('Search Members'), 'member/search'),
    5455  link_to(__('Search Communities'), 'community/search'),
    5556);
  • OpenPNE3/branches/STABLE/3.0.x/lib/form/searchForm/opMemberProfileSearchForm.class.php

    r10078 r11637  
    4646    $ids = MemberProfilePeer::searchMemberIds($this->getValue('profile'), $ids);
    4747
    48     $c->add(MemberPeer::ID, $ids, Criteria::IN);
     48    if ($this->getValue('member') || $this->getValue('profile'))
     49    {
     50      $c->add(MemberPeer::ID, $ids, Criteria::IN);
     51    }
    4952
    5053    return $c;
  • OpenPNE3/branches/STABLE/3.0.x/lib/model/MemberProfilePeer.php

    r11001 r11637  
    8888  public static function searchMemberIds($profile = array(), $ids = array())
    8989  {
     90    if (!is_array($profile)) return $ids;
    9091    foreach ($profile as $key => $value)
    9192    {
Note: See TracChangeset for help on using the changeset viewer.