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

Ignore:
Timestamp:
Feb 6, 2009, 12:39:24 PM (12 years ago)
Author:
ebihara
Message:

#3558:fixed the PhotoList? parts doesn't display all items of a list

File:
1 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/trunk/apps/pc_frontend/templates/_partsPhotoTable.php

    r10426 r10671  
    1 <?php if (count($options['list'])): ?>
     1<?php if (count($options->list)): ?>
    22
    33<?php
    4 $options->setDefault('row', 10);
    54$options->setDefault('col', 5);
    65$options->setDefault('type', 'full');
     6
     7$options->addRequiredOption('pager');
    78?>
    89
    910<?php ob_start() ?>
    10 <?php include_partial('global/pagerRelative', array('pager' => $options['pager'], 'link_to' => $options->getRaw('link_to_pager'))) ?>
     11<?php include_partial('global/pagerRelative', array('pager' => $options->pager, 'link_to' => $options->getRaw('link_to_pager'))) ?>
    1112<?php $pager = ob_get_flush() ?>
    1213
    1314<table>
    14 <?php $row = ceil(count($options['list']) / $options['row']) ?>
     15<?php $row = ceil(count($options->list) / $options->col) ?>
    1516<?php for ($i = $j = 1; $row >= $i; $i++): ?>
    16 <?php if ($options['type'] === 'full' || $options['type'] === 'only_image'): ?>
     17<?php if ($options->type === 'full' || $options->type === 'only_image'): ?>
    1718<tr class="photo">
    18 <?php for ($j = ($i * $options['col']) - $options['col']; ($i * $options['col']) > $j; $j++): ?>
    19 <td><?php if (!empty($options['list'][$j])): ?>
    20 <?php echo link_to(image_tag_sf_image($options['list'][$j]->getImageFileName(), array('size' => '76x76')), $options['link_to'].$options['list'][$j]->getId()) ?>
     19<?php for ($j = ($i * $options->col) - $options->col; ($i * $options->col) > $j; $j++): ?>
     20<td><?php if (!empty($options->list[$j])): ?>
     21<?php echo link_to(image_tag_sf_image($options->list[$j]->getImageFileName(), array('size' => '76x76')), $options->link_to.$options->list[$j]->getId()) ?>
    2122<?php endif; ?></td>
    2223<?php endfor; ?>
    2324</tr>
    2425<?php endif; ?>
    25 <?php if ($options['type'] === 'full' || $options['type'] === 'only_name'): ?>
     26<?php if ($options->type === 'full' || $options->type === 'only_name'): ?>
    2627<tr class="text">
    27 <?php for ($j = ($i * $options['col']) - $options['col']; ($i * $options['col']) > $j; $j++): ?>
    28 <td><?php if (!empty($options['list'][$j])): ?>
    29 <?php echo link_to($options['list'][$j]->getName(), 'member/profile?id='.$options['list'][$j]->getId()) ?>
     28<?php for ($j = ($i * $options->col) - $options->col; ($i * $options->col) > $j; $j++): ?>
     29<td><?php if (!empty($options->list[$j])): ?>
     30<?php echo link_to($options->list[$j]->getName(), 'member/profile?id='.$options->list[$j]->getId()) ?>
    3031<?php endif; ?></td>
    3132<?php endfor; ?>
Note: See TracChangeset for help on using the changeset viewer.