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

Changeset 10123


Ignore:
Timestamp:
Jan 14, 2009, 5:49:15 PM (11 years ago)
Author:
ebihara
Message:

#3401:added ability to configure the navi menus for the mobile_frontend application

Location:
OpenPNE3/trunk
Files:
2 added
8 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/trunk/apps/mobile_frontend/modules/community/templates/homeSuccess.php

    r10023 r10123  
    3030<?php endif; ?>
    3131<?php endif; ?>
     32<?php include_component('default', 'navi', array('type' => 'mobile_community')) ?>
    3233<hr color="#0d6ddf" size="3">
    3334</td></tr>
  • OpenPNE3/trunk/apps/mobile_frontend/modules/member/templates/homeSuccess.php

    r10027 r10123  
    2323<?php include_customizes('invite', 'before') ?>
    2424<?php echo link_to(__('友人を誘う'), 'member/invite') ?><br>
     25<?php include_component('default', 'navi', array('type' => 'mobile_home_side')) ?>
    2526<?php include_customizes('invite', 'after') ?>
    2627</td>
     
    3435<?php echo link_to(sprintf('マイフレンド(%s)', $sf_user->getMember()->countFriends()), 'friend/list'); ?><br>
    3536<?php echo link_to(sprintf('参加コミュニティ(%s)', $sf_user->getMember()->countCommunityMembers()), 'community/joinlist'); ?><br>
     37<?php include_component('default', 'navi', array('type' => 'mobile_home')) ?>
    3638<hr color="#0d6ddf" size="3">
    3739</td></tr>
  • OpenPNE3/trunk/apps/mobile_frontend/modules/member/templates/profileSuccess.php

    r10023 r10123  
    2828</td></tr>
    2929
    30 </table>
     30<tr><td colspan="2">
    3131
    3232<?php if (!$relation->isFriend() && !$relation->isSelf()) : ?>
    3333<?php echo link_to('フレンドに加える', 'friend/link?id='.$member->getId()) ?><br>
    3434<?php endif; ?>
     35
     36<?php include_component('default', 'navi', array('type' => 'mobile_community')) ?>
     37<hr color="#0d6ddf" size="3">
     38</td></tr>
     39</table>
     40
     41<br>
    3542
    3643<?php
  • OpenPNE3/trunk/apps/mobile_frontend/templates/layout.php

    r10037 r10123  
    2424
    2525<a name="#bottom"></a>
     26
     27<?php include_component('default', 'navi', array('type' => 'mobile_global')) ?>
     28
    2629<?php if(!include_slot('op_mobile_footer')): ?>
    2730<table width="100%">
  • OpenPNE3/trunk/apps/pc_backend/modules/design/templates/_submenu.php

    r9582 r10123  
    33<li><?php echo link_to(__('お知らせ設定'), 'sns/informationConfig') ?></li>
    44<li><?php echo link_to(__('ナビ設定'), 'navi/index') ?></li>
     5<li><?php echo link_to(__('携帯版ナビ設定'), 'navi/index?app=mobile') ?></li>
  • OpenPNE3/trunk/apps/pc_backend/modules/navi/actions/actions.class.php

    r10003 r10123  
    1515 * @subpackage navi
    1616 * @author     Kousuke Ebihara <ebihara@tejimaya.com>
    17  * @version    SVN: $Id: actions.class.php 9301 2008-05-27 01:08:46Z dwhittle $
    1817 */
    1918class naviActions extends sfActions
     
    2625  public function executeIndex($request)
    2726  {
     27    $this->app = $request->getParameter('app', 'pc');
     28    $isMobile = (bool)('mobile' === $this->app);
     29
    2830    $this->list = array();
    2931
    30     $types = NaviPeer::retrieveTypes();
     32    $types = NaviPeer::retrieveTypes($isMobile);
    3133
    32     foreach ($types as $type) {
     34    foreach ($types as $type)
     35    {
    3336      $navis = NaviPeer::retrieveByType($type);
    34       foreach ($navis as $navi) {
     37      foreach ($navis as $navi)
     38      {
    3539        $this->list[$type][] = new NaviForm($navi);
    3640      }
     
    4751  {
    4852    $navi = $request->getParameter('navi');
     53    $app = $request->getParameter('app', 'pc');
    4954
    5055    $model = NaviPeer::retrieveByPk($navi['id']);
    5156    $this->form = new NaviForm($model);
    52     if ($request->isMethod('post')) {
     57    if ($request->isMethod('post'))
     58    {
    5359       $this->form->bind($navi);
    54        if ($this->form->isValid()) {
     60       if ($this->form->isValid())
     61       {
    5562         $this->form->save();
    5663       }
    5764    }
    5865
    59     $this->redirect('navi/index');
     66    $this->redirect('navi/index?app='.$app);
    6067  }
    6168
     
    6774  public function executeDelete($request)
    6875  {
    69     if ($request->isMethod('post')) {
     76    $app = $request->getParameter('app', 'pc');
     77
     78    if ($request->isMethod('post'))
     79    {
    7080      $model = NaviPeer::retrieveByPk($request->getParameter('id'));
    7181      $this->forward404Unless($model);
     
    7383    }
    7484
    75     $this->redirect('navi/index');
     85    $this->redirect('navi/index?app='.$app);
    7686  }
    7787
  • OpenPNE3/trunk/apps/pc_backend/modules/navi/templates/indexSuccess.php

    r9937 r10123  
    1919<tbody id="type_<?php echo str_replace(' ', '_', $type) ?>_<?php echo $form->getObject()->getId() ?>"<?php if (!$form->isNew()) : ?> class="sortable"<?php endif; ?>>
    2020<tr>
    21 <td><form action="<?php echo url_for('navi/edit') ?>" method="post">
     21<td><form action="<?php echo url_for('navi/edit?app='.$app) ?>" method="post">
    2222<?php echo $form->renderHiddenFields() ?>
    2323<?php echo $form['uri']->render() ?></td>
  • OpenPNE3/trunk/lib/model/NaviPeer.php

    r10085 r10123  
    2727  }
    2828
    29   public static function retrieveTypes()
     29  public static function retrieveTypes($isMobile)
    3030  {
    3131    $result = array();
    3232
    33     $defaultTypes = array(
    34       'insecure_global',
    35       'secure_global',
    36       'default',
    37       'friend',
    38       'community',
    39     );
     33    if ($isMobile)
     34    {
     35      $defaultTypes = array(
     36        'mobile_global',
     37        'mobile_home',
     38        'mobile_home_side',
     39        'mobile_friend',
     40        'mobile_community',
     41      );
     42    }
     43    else
     44    {
     45      $defaultTypes = array(
     46        'insecure_global',
     47        'secure_global',
     48        'default',
     49        'friend',
     50        'community',
     51      );
     52    }
    4053
    4154    $c = new Criteria();
     
    4558    $c->addAscendingOrderByColumn(self::SORT_ORDER);
    4659    $stmt = self::doSelectStmt($c);
    47     while ($res = $stmt->fetchColumn(1)) {
     60    while ($res = $stmt->fetchColumn(1))
     61    {
    4862      $result[] = $res;
    4963    }
Note: See TracChangeset for help on using the changeset viewer.