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

Changeset 9630


Ignore:
Timestamp:
Dec 22, 2008, 6:07:30 PM (12 years ago)
Author:
ShogoKawahara
Message:

fixed friendListBox widget doesn't show more than 10 friends

Location:
OpenPNE3/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/trunk/apps/pc_frontend/modules/friend/actions/components.class.php

    r9597 r9630  
    88    $c = new Criteria();
    99    $c->addAscendingOrderByColumn(Propel::getDB()->random(time()));
    10     $this->friends = $this->member->getFriends(9, $c);
     10    $this->row = $this->widget->getConfig('row');
     11    $this->col = $this->widget->getConfig('col');
     12    $this->friends = $this->member->getFriends($this->row * $this->col, $c);
    1113  }
    1214}
  • OpenPNE3/trunk/apps/pc_frontend/modules/friend/templates/_friendListBox.php

    r9597 r9630  
    66  'moreInfo' => array(sprintf('%s(%d)', __('全てを見る'), $member->countFriends()) => 'friend/list?id='.$member->getId()),
    77  'type' => $sf_data->getRaw('widget')->getConfig('type'),
    8   'col' => $sf_data->getRaw('widget')->getConfig('col'),
    9   'row' => $sf_data->getRaw('widget')->getConfig('row'),
     8  'row' => $row,
     9  'col' => $col,
    1010);
    1111include_parts('nineTable', 'frendList', $option);
  • OpenPNE3/trunk/apps/pc_frontend/templates/_partsNineTable.php

    r9599 r9630  
    33<div class="partsHeading"><h3><?php echo __($option['title']) ?></h3></div>
    44<table>
    5 <?php for ($i = $j = 1; $option['row'] >= $i; $i++) : ?>
    6 <?php if (count($option['list']) >= $j && $j % $option['row']) : ?>
     5<?php $row = ceil(count($option['list']) / $option['row']) ?>
     6<?php for ($i = $j = 1; $row >= $i; $i++) : ?>
    77<?php if ($option['type'] === 'full' || $option['type'] === 'only_image') : ?>
    88<tr class="photo">
     
    2323</tr>
    2424<?php endif; ?>
    25 <?php endif; ?>
    2625<?php endfor; ?>
    2726</table>
  • OpenPNE3/trunk/lib/config/config/widget.yml

    r9605 r9630  
    2727  component: [friend, friendListBox]
    2828  config:
    29     col:
    30       Name:      "col"
     29    row:
     30      Name:      "row"
    3131      Caption:   "表示する行"
    3232      FormType:  "select"
     
    3535      Default:    3
    3636      Choices:    {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6}
    37     row:
    38       Name:      "row"
     37    col:
     38      Name:      "col"
    3939      Caption:   "表示する列"
    4040      FormType:  "select"
Note: See TracChangeset for help on using the changeset viewer.