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

Changeset 10286


Ignore:
Timestamp:
Jan 20, 2009, 11:38:54 PM (11 years ago)
Author:
ogawa
Message:

#3448:replaced include_parts() with op_include_parts()

Location:
OpenPNE3/trunk
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/trunk/apps/pc_frontend/modules/community/templates/_joinListBox.php

    r10260 r10286  
    11<?php
    2 $option = array(
     2$options = array(
    33  'title' => __('コミュニティリスト'),
    44  'list' => $communities,
     
    99  'col' => $col,
    1010);
    11 include_parts('nineTable', 'communityList', $option);
     11op_include_parts('nineTable', 'communityList', '', $options);
  • OpenPNE3/trunk/apps/pc_frontend/modules/community/templates/homeSuccess.php

    r9761 r10286  
    11<?php slot('op_sidemenu'); ?>
    2 <?php include_parts('memberImageBox', 'image', array('name' => $community->getName(), 'image' => $community->getImageFileName())) ?>
     2<?php
     3$options = array(
     4  'name'   => $community->getName(),
     5  'image'  => $community->getImageFileName(),
     6  'single' => true,
     7);
     8op_include_parts('memberImageBox', 'memberImageBox', '', $options);
     9?>
    310
    411<?php
    5 $option = array(
     12$options = array(
    613  'title' => __('コミュニティメンバー'),
    714  'list' => $community->getMembers(9),
    815  'link_to' => 'member/profile?id=',
    9   'moreInfo' => array(sprintf('%s(%d)', __('全てを見る'), $community->countCommunityMembers()) => 'community/memberList?id=' . $community->getId()),
     16  'moreInfo' => array(sprintf('%s(%d)', __('全てを見る'), $community->countCommunityMembers()) => 'community/memberList?id='.$community->getId()),
    1017);
    11 
    1218if ($isAdmin)
    1319{
    14   $option['moreInfo'][__('メンバー管理')] = 'community/memberManage?id='.$community->getId();
     20  $options['moreInfo'][__('メンバー管理')] = 'community/memberManage?id='.$community->getId();
    1521}
    16 
    17 include_parts('nineTable', 'frendList', $option);
     22op_include_parts('nineTable', 'frendList', '', $options);
    1823?>
    19 
    2024<?php end_slot(); ?>
    2125
     
    3236
    3337<ul>
    34 <?php if ($isEditCommunity) : ?>
     38<?php if ($isEditCommunity): ?>
    3539<li><?php echo link_to('このコミュニティを編集する', 'community/edit?id=' . $community->getId()) ?></li>
    3640<?php endif; ?>
    3741
    38 <?php if (!$isAdmin) : ?>
    39 <?php if ($isCommunityMember) : ?>
     42<?php if (!$isAdmin): ?>
     43<?php if ($isCommunityMember): ?>
    4044<li><?php echo link_to('このコミュニティを退会する', 'community/quit?id=' . $community->getId()) ?></li>
    4145<?php else : ?>
  • OpenPNE3/trunk/apps/pc_frontend/modules/community/templates/searchSuccess.php

    r9614 r10286  
    11<?php
    22$options = array(
    3   'form'   => $filters,
     3  'title'   => __('コミュニティ検索'),
    44  'url'    => 'community/search',
    55  'button' => __('検索'),
     
    77);
    88
    9 include_box('searchCommunity', __('コミュニティ検索'), '', $options);
     9op_include_parts('form', 'searchCommunity', $filters, $options);
    1010?>
    1111
     
    2222
    2323$options = array(
     24  'title'          => __('検索結果'),
    2425  'pager'          => $pager,
    2526  'link_to_page'   => 'community/search?page=%d',
     
    2829);
    2930
    30 include_parts('searchResultList', 'searchCommunityResult', $options);
     31op_include_parts('searchResultList', 'searchCommunityResult', '', $options);
    3132?>
    3233<?php else: ?>
    33 <?php include_box('searchCommunityResult', __('検索結果'), __('該当するコミュニティはありませんでした。')) ?>
     34<?php op_include_parts('box', 'searchCommunityResult', __('該当するコミュニティはありませんでした。'), array('title' => __('検索結果'))) ?>
    3435<?php endif; ?>
  • OpenPNE3/trunk/apps/pc_frontend/modules/default/templates/_memberImageBox.php

    r9948 r10286  
    1 <?php include_parts('memberImageBox', 'image', array(
     1<?php
     2$options = array(
    23  'name'     => $sf_user->getMember()->getName(),
    34  'image'    => $sf_user->getMember()->getImageFileName(),
     
    67    link_to(__('プロフィール確認'), 'member/profile'),
    78  ),
    8 )) ?>
     9  'single'   => true,
     10);
     11op_include_parts('memberImageBox', 'memberImageBox', '', $options);
  • OpenPNE3/trunk/apps/pc_frontend/modules/default/templates/_searchBox.php

    r9605 r10286  
    1 <?php include_parts('searchFormLine', 'searchBox', array(
     1<?php op_include_parts('searchFormLine', 'searchBox', '', array(
    22  'button' => '検索',
    33  'items' => array(
    44    'member' => __('メンバー'),
    55    'community' => __('コミュニティ'),
    6   )
     6  ),
     7  'single' => true,
    78)) ?>
  • OpenPNE3/trunk/apps/pc_frontend/modules/friend/templates/_friendListBox.php

    r10260 r10286  
    11<?php
    2 $option = array(
     2$options = array(
    33  'title' => __('フレンドリスト'),
    44  'list' => $friends,
     
    1212if ($member->getId() == $sf_user->getMember()->getId())
    1313{
    14   $option['moreInfo'][__('フレンド管理')] = 'friend/manage';
     14  $options['moreInfo'][__('フレンド管理')] = 'friend/manage';
    1515}
    1616
    17 include_parts('nineTable', 'frendList', $option);
     17op_include_parts('nineTable', 'frendList', '', $options);
  • OpenPNE3/trunk/apps/pc_frontend/modules/member/templates/configImageSuccess.php

    r9544 r10286  
    1 <?php include_parts('memberImageUploadBox', 'memberImageUploadBox', array(
     1<?php op_include_parts('memberImageUploadBox', 'memberImageUploadBox', '', array(
     2  'title'  => __('写真を編集する'),
    23  'images' => $sf_user->getMember()->getMemberImages(),
    34  'form'   => $form,
  • OpenPNE3/trunk/apps/pc_frontend/modules/member/templates/configSuccess.php

    r10270 r10286  
    99  }
    1010}
    11 include_parts('pageNav', 'pagenav', array('list' => $list, 'current' => $categoryName));
     11op_include_parts('pageNav', 'pageNav', '', array('list' => $list, 'current' => $categoryName));
    1212?>
    1313<?php end_slot(); ?>
    1414
    15 <?php if ($categoryName) : ?>
    16 <?php include_box('form'.$categoryName, $categoryCaptions[$categoryName], '', array(
    17   'form' => array($form),
    18   'url' => 'member/config?category='.$categoryName)
    19 ) ?>
     15<?php if ($categoryName): ?>
     16<?php op_include_parts('form', $categoryName.'Form', $form, array('title' => $categoryCaptions[$categoryName], 'url' => 'member/config?category='.$categoryName)) ?>
    2017<?php else: ?>
    21 <?php include_box('configInformation', __('設定変更'), __('メニューから設定したい項目を選択してください。')); ?>
     18<?php op_include_parts('box', 'configInformation', __('メニューから設定したい項目を選択してください。'), array('title' => __('設定変更'))); ?>
    2219<?php endif; ?>
  • OpenPNE3/trunk/apps/pc_frontend/modules/member/templates/profileSuccess.php

    r10258 r10286  
    1010}
    1111
    12 include_parts('memberImageBox', 'image', array(
     12$options = array(
    1313  'name'     => $member->getName(),
    1414  'image'    => $member->getImageFileName(),
    1515  'moreInfo' => $moreInfo,
    16 )) ?>
     16  'single'   => true,
     17);
     18op_include_parts('memberImageBox', 'memberImageBox', '', $options);
     19?>
    1720
    1821<?php
    19 $option = array(
     22$options = array(
    2023  'title' => __('フレンドリスト'),
    2124  'list' => $member->getFriends(9),
     
    2326  'moreInfo' => array(sprintf('%s(%d)', __('全てを見る'), $member->countFriends()) => 'friend/list?id='.$member->getId()),
    2427);
    25 include_parts('nineTable', 'frendList', $option);
     28op_include_parts('nineTable', 'frendList', '', $options);
    2629?>
    2730
    2831<?php
    29 $option = array(
     32$options = array(
    3033  'title' => __('コミュニティリスト'),
    3134  'list' => $communities,
     
    3336  'moreInfo' => array(sprintf('%s(%d)', __('全てを見る'), $member->countCommunityMembers()) => 'community/joinlist'),
    3437);
    35 include_parts('nineTable', 'communityList', $option);
     38op_include_parts('nineTable', 'communityList', '', $options);
    3639?>
    3740<?php end_slot(); ?>
  • OpenPNE3/trunk/apps/pc_frontend/modules/member/templates/searchSuccess.php

    r10234 r10286  
    11<?php
    22$options = array(
    3   'form'   => $filters,
     3  'title'  => __('メンバー検索'),
    44  'url'    => 'member/search',
    55  'button' => __('検索'),
    66);
    77
    8 include_box('searchMember', __('メンバー検索'), '', $options);
     8op_include_parts('form', 'searchMember', $filters, $options);
    99?>
    1010
     
    2626
    2727$options = array(
     28  'title'          =>  __('検索結果'),
    2829  'pager'          => $pager,
    2930  'link_to_page'   => 'member/search?page=%d',
     
    3233);
    3334
    34 include_parts('searchResultList', 'searchCommunityResult', $options);
     35op_include_parts('searchResultList', 'searchCommunityResult', '', $options);
    3536?>
    3637<?php else: ?>
    37 <?php include_box('searchMemberResult', __('検索結果'), __('該当するメンバーはいませんでした。')) ?>
     38<?php op_include_parts('box', 'searchMemberResult', __('該当するメンバーはいませんでした。'), array('title' => __('検索結果'))) ?>
    3839<?php endif; ?>
  • OpenPNE3/trunk/apps/pc_frontend/templates/_partsForm.php

    r10258 r10286  
     1<?php
     2$options = array_merge(array(
     3  'button' => __('変更'),
     4), $sf_data->getRaw('options'));
     5?>
    16<?php if (!empty($options['body'])): ?>
    27<div class="body">
     
    6065<div class="block moreInfo">
    6166<ul class="moreInfo">
    62 <?php foreach ($options['moreInfo'] as $key => $value) : ?>
    63 <li><?php echo $options['moreInfo']->getRaw($key); ?></li>
     67<?php foreach ($options['moreInfo'] as $key => $value): ?>
     68<li><?php echo $value ?></li>
    6469<?php endforeach; ?>
    6570</ul>
  • OpenPNE3/trunk/apps/pc_frontend/templates/_partsMemberImageBox.php

    r10203 r10286  
    1 <div class="parts memberImageBox">
    21<p class="photo">
    3 <?php $imgParam = array('size' => '180x180', 'alt' => $option['name']) ?>
    4 <?php if ($option['image']) : ?>
    5 <?php echo image_tag_sf_image($option['image'], $imgParam) ?>
    6 <?php else : ?>
     2<?php $imgParam = array('size' => '180x180', 'alt' => $options['name']) ?>
     3<?php if ($options['image']): ?>
     4<?php echo image_tag_sf_image($options['image'], $imgParam) ?>
     5<?php else: ?>
    76<?php echo image_tag('no_image.gif', $imgParam) ?>
    87<?php endif; ?>
    98</p>
    10 <p class="text"><?php echo $option['name'] ?></p>
    11 <?php if (!empty($option['moreInfo'])) : ?>
     9<p class="text"><?php echo $options['name'] ?></p>
     10<?php if (!empty($options['moreInfo'])): ?>
    1211<ul>
    13 <?php foreach ($option['moreInfo'] as $key => $value) : ?>
    14 <li><?php echo $option['moreInfo']->getRaw($key) ?></li>
     12<?php foreach ($options['moreInfo'] as $key => $value): ?>
     13<li><?php echo $options['moreInfo']->getRaw($key) ?></li>
    1514<?php endforeach; ?>
    1615</ul>
    1716<?php endif; ?>
    18 </div>
  • OpenPNE3/trunk/apps/pc_frontend/templates/_partsMemberImageUploadBox.php

    r10213 r10286  
    1 <div class="dparts memberImageUploadBox"><div class="parts">
    2 <div class="partsHeading"><h3><?php echo(__('写真を編集する')) ?></h3></div>
    31<table>
    42<tr>
    53<?php for ($i = 0; $i < 3; $i++) : ?>
    64<td>
    7 <?php if (isset($option['images'][$i])) : ?>
    8 <?php $image = $option['images'][$i] ?>
     5<?php if (isset($options['images'][$i])) : ?>
     6<?php $image = $options['images'][$i] ?>
    97<?php echo image_tag_sf_image($image->getFile(), array('size' => '180x180')) ?><br />
    108[
     
    2523
    2624<div class="block">
    27 <?php echo $option['form']->renderFormTag(url_for('member/configImage')) ?>
     25<?php echo $options['form']->renderFormTag(url_for('member/configImage')) ?>
    2826<p>
    29 <?php echo $option['form']['file'] ?>
    30 <?php echo $option['form']->renderHiddenFields(); ?>
     27<?php echo $options['form']['file'] ?>
     28<?php echo $options['form']->renderHiddenFields(); ?>
    3129</p>
    3230<p><input type="submit" class="input_submit" value="<?php echo __('アップロードする') ?>" /></p>
     
    3836</ul>
    3937</div>
    40 </div></div>
  • OpenPNE3/trunk/apps/pc_frontend/templates/_partsNineTable.php

    r10203 r10286  
     1<?php if (count($options['list'])): ?>
    12<?php
    2 $option = array_merge(array(
     3$options = array_merge(array(
    34  'row' => 3,
    45  'col' => 3,
    56  'type' => 'full',
    6 ), $sf_data->getRaw('option'));
     7), $sf_data->getRaw('options'));
    78?>
    8 
    9 <?php if (count($option['list'])) : ?>
    10 <div class="dparts nineTable"><div class="parts">
    11 <div class="partsHeading"><h3><?php echo __($option['title']) ?></h3></div>
    129<table>
    13 <?php $row = ceil(count($option['list']) / $option['row']) ?>
    14 <?php for ($i = $j = 1; $row >= $i; $i++) : ?>
    15 <?php if ($option['type'] === 'full' || $option['type'] === 'only_image') : ?>
     10<?php $row = ceil(count($options['list']) / $options['row']) ?>
     11<?php for ($i = $j = 1; $row >= $i; $i++): ?>
     12<?php if ($options['type'] === 'full' || $options['type'] === 'only_image'): ?>
    1613<tr class="photo">
    17 <?php for ($j = ($i * $option['col']) - $option['col']; ($i * $option['col']) > $j; $j++) : ?>
    18 <td><?php if (!empty($option['list'][$j])) : ?>
    19 <?php echo link_to(image_tag_sf_image($option['list'][$j]->getImageFileName(), array('size' => '76x76')), $option['link_to'].$option['list'][$j]->getId()) ?>
     14<?php for ($j = ($i * $options['col']) - $options['col']; ($i * $options['col']) > $j; $j++): ?>
     15<td><?php if (!empty($options['list'][$j])): ?>
     16<?php echo link_to(image_tag_sf_image($options['list'][$j]->getImageFileName(), array('size' => '76x76')), $options['link_to'].$options['list'][$j]->getId()) ?>
    2017<?php endif; ?></td>
    2118<?php endfor; ?>
    2219</tr>
    2320<?php endif; ?>
    24 <?php if ($option['type'] === 'full' || $option['type'] === 'only_name') : ?>
     21<?php if ($options['type'] === 'full' || $options['type'] === 'only_name'): ?>
    2522<tr class="text">
    26 <?php for ($j = ($i * $option['col']) - $option['col']; ($i * $option['col']) > $j; $j++) : ?>
    27 <td><?php if (!empty($option['list'][$j])) : ?>
    28 <?php echo link_to($option['list'][$j]->getName(), 'member/profile?id='.$option['list'][$j]->getId()) ?>
     23<?php for ($j = ($i * $options['col']) - $options['col']; ($i * $options['col']) > $j; $j++): ?>
     24<td><?php if (!empty($options['list'][$j])): ?>
     25<?php echo link_to($options['list'][$j]->getName(), 'member/profile?id='.$options['list'][$j]->getId()) ?>
    2926<?php endif; ?></td>
    3027<?php endfor; ?>
     
    3330<?php endfor; ?>
    3431</table>
    35 <?php if ($option['moreInfo']) : ?>
     32<?php if ($options['moreInfo']): ?>
    3633<div class="block moreInfo">
    3734<ul class="moreInfo">
    38 <?php foreach ($option['moreInfo'] as $key => $value) : ?>
     35<?php foreach ($options['moreInfo'] as $key => $value): ?>
    3936<li><?php echo link_to($key, $value) ?></li>
    4037<?php endforeach; ?>
     
    4239</div>
    4340<?php endif; ?>
    44 </div></div>
    4541<?php endif; ?>
  • OpenPNE3/trunk/apps/pc_frontend/templates/_partsPageNav.php

    r10203 r10286  
    1 <?php include_customizes($id, 'before') ?>
    2 <div class="parts pageNav">
    3 <?php include_customizes($id, 'top') ?>
    41<ul>
    52<?php include_customizes($id, 'listBegin') ?>
    6 <?php foreach ($option['list'] as $key => $value) : ?>
    7 <?php if ($key === $option['current']) : ?>
     3<?php foreach ($options['list'] as $key => $value): ?>
     4<?php if ($key === $options['current']) : ?>
    85<li class="current">
    9 <?php else : ?>
     6<?php else: ?>
    107<li>
    118<?php endif; ?>
    12 <?php echo $option['list']->getRaw($key) ?>
     9<?php echo $options['list']->getRaw($key) ?>
    1310</li>
    1411<?php endforeach; ?>
    1512<?php include_customizes($id, 'listEnd') ?>
    1613</ul>
    17 <?php include_customizes($id, 'bottom') ?>
    18 </div>
    19 <?php include_customizes($id, 'after') ?>
  • OpenPNE3/trunk/apps/pc_frontend/templates/_partsSearchFormLine.php

    r10213 r10286  
    1212<select name="search_module">
    1313<?php include_customizes($id, 'itemFirst') ?>
    14 <?php foreach($option['items'] as $key => $value) : ?>
     14<?php foreach($options['items'] as $key => $value) : ?>
    1515<option value="<?php echo $key ?>"><?php echo $value ?></option>
    1616<?php endforeach; ?>
     
    1919</li>
    2020<li>
    21 <input type="submit" class="input_submit" value="<?php echo $option['button'] ?>" />
     21<input type="submit" class="input_submit" value="<?php echo $options['button'] ?>" />
    2222</li>
    2323</ul>
  • OpenPNE3/trunk/apps/pc_frontend/templates/_partsSearchResultList.php

    r9740 r10286  
    1 <?php $raw_option = $sf_data->getRaw('option'); ?>
     1<?php $raw_options = $sf_data->getRaw('options'); ?>
    22
    3 <div class="dparts searchResultList"><div class="parts">
    4 <div class="partsHeading"><h3><?php echo __('検索結果') ?></h3></div>
    5 
    6 <div class="pagerRelative"><p class="number"><?php echo pager_navigation($option['pager'], $option['link_to_page']); ?></p></div>
     3<div class="pagerRelative"><p class="number"><?php echo pager_navigation($options['pager'], $options['link_to_page']); ?></p></div>
    74
    85<div class="block">
    9 <?php foreach ($option['pager']->getResults() as $key => $result): ?>
     6<?php foreach ($options['pager']->getResults() as $key => $result): ?>
    107<div class="ditem"><div class="item"><table><tbody><tr>
    11 <td rowspan="<?php echo count($option['list'][$key]) + 1 ?>" class="photo">
    12 <?php echo link_to(image_tag_sf_image($result->getImageFilename(), array('size' => '76x76')), sprintf($option['link_to_detail'], $result->getId())); ?><br />
    13 <?php echo link_to(__('詳細を見る'), sprintf($option['link_to_detail'], $result->getId())) ?>
     8<td rowspan="<?php echo count($options['list'][$key]) + 1 ?>" class="photo">
     9<?php echo link_to(image_tag_sf_image($result->getImageFilename(), array('size' => '76x76')), sprintf($options['link_to_detail'], $result->getId())); ?><br />
     10<?php echo link_to(__('詳細を見る'), sprintf($options['link_to_detail'], $result->getId())) ?>
    1411</td>
    1512<th>
    1613<?php
    17 $keys = array_keys($raw_option['list'][$key]);
     14$keys = array_keys($raw_options['list'][$key]);
    1815echo array_shift($keys);
    1916?>
    2017</th><td>
    21 <?php echo array_shift($raw_option['list'][$key]); ?>
     18<?php echo array_shift($raw_options['list'][$key]); ?>
    2219</td>
    2320</tr>
    24 <?php foreach ($raw_option['list'][$key] as $caption => $item) : ?>
     21<?php foreach ($raw_options['list'][$key] as $caption => $item) : ?>
    2522<tr>
    2623<th><?php echo $caption ?></th><td><?php echo $item ?></td>
     
    3128</div>
    3229
    33 <div class="pagerRelative"><p class="number"><?php echo pager_navigation($option['pager'], $option['link_to_page']); ?></p></div>
    34 
    35 </div></div>
     30<div class="pagerRelative"><p class="number"><?php echo pager_navigation($options['pager'], $options['link_to_page']); ?></p></div>
  • OpenPNE3/trunk/apps/pc_frontend/templates/_partsSimpleBox.php

    r10184 r10286  
    11<?php include_customizes($id, 'before') ?>
    2 <?php if ($option['border']): ?>
    3 <div id="<?php echo $id ?>" class="dparts <?php echo $option['class'] ?>">
     2<?php if ($options['border']): ?>
     3<div id="<?php echo $id ?>" class="dparts <?php echo $options['class'] ?>">
    44<div class="parts">
    55<?php else: ?>
    6 <div class="parts <?php echo $option['class'] ?>">
     6<div class="parts <?php echo $options['class'] ?>">
    77<?php endif ?>
    88
  • OpenPNE3/trunk/lib/helper/PartsHelper.php

    r10258 r10286  
    4444  }
    4545
     46  if ('' === trim($params['op_content']))
     47  {
     48    return;
     49  }
     50
    4651  include_partial('global/partsLayout', $params);
    4752}
     
    139144{
    140145  $params = array(
    141     'id'     => $id,
    142     'option' => $option,
     146    'id'      => $id,
     147    'options' => $option,
    143148  );
    144149  include_partial('global/parts'.ucfirst($parts_name), $params);
Note: See TracChangeset for help on using the changeset viewer.