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

Ignore:
Timestamp:
Jan 20, 2009, 6:59:16 PM (14 years ago)
Author:
ogawa
Message:

#3448:added op_include_parts()

Location:
OpenPNE3/trunk/apps/pc_frontend
Files:
8 edited
2 copied

Legend:

Unmodified
Added
Removed
  • OpenPNE3/trunk/apps/pc_frontend/modules/default/templates/_informationBox.php

    r9582 r10258  
    11<?php
    2 include_information_box('information', $sf_data->getRaw('widget')->getConfig('value'))
     2op_include_parts('informationBox', 'information', $sf_data->getRaw('widget')->getConfig('value'), array('single' => true))
    33?>
  • OpenPNE3/trunk/apps/pc_frontend/modules/member/templates/profileSuccess.php

    r10234 r10258  
    3939<?php slot('op_top'); ?>
    4040<?php if ($relation->isSelf()): ?>
    41 <?php
    42 $option = array(
    43   'body' => '
     41<?php ob_start() ?>
    4442<p>※他のメンバーから見たあなたのページはこのようになります。</p>
    4543<p>他のメンバーにあなたのページを教える場合は、以下のURLを使ってください。<br />
    46 '.url_for('member/profile?id='.$member->getId(), true).'</p>
    47 <p>プロフィールを変更する場合は「'.link_to(__('プロフィール変更'), 'member/editProfile').'」よりおこなってください。</p>
    48 ');
    49 include_parts('descriptionBox', 'informationAboutThisIsYourProfilePage', $option);
    50 ?>
     44<?php echo url_for('member/profile?id='.$member->getId(), true) ?></p>
     45<p>プロフィールを変更する場合は「<?php echo link_to(__('プロフィール変更'), 'member/editProfile') ?>」よりおこなってください。</p>
     46<?php $content = ob_get_clean() ?>
     47<?php op_include_parts('descriptionBox', 'informationAboutThisIsYourProfilePage', $content) ?>
    5148<?php endif; ?>
    5249<?php end_slot(); ?>
  • OpenPNE3/trunk/apps/pc_frontend/templates/_layout.php

    r10225 r10258  
    1414</div><!-- Header -->
    1515
     16<div id="Layout<?php echo $layout ?>">
     17
     18<div id="Contents">
     19
    1620<?php if ($sf_user->hasFlash('error')): ?>
    1721<?php include_alert_box('flashError', __($sf_user->getFlash('error'))) ?>
     
    2024<?php include_alert_box('flashNotice', __($sf_user->getFlash('notice'))) ?>
    2125<?php endif; ?>
    22 
    23 <div id="Layout<?php echo $layout ?>">
    24 
    25 <div id="Contents">
    2626
    2727<?php if (has_slot('op_top')): ?>
  • OpenPNE3/trunk/apps/pc_frontend/templates/_partsAlertBox.php

    r9823 r10258  
    1 <?php include_customizes($id, 'before') ?>
    2 <div id="<?php echo $id ?>" class="dparts alertBox"><div class="parts">
    3 <table><tr>
     1<table>
     2<tr>
    43<th><img src="<?php echo public_path('images/icon_alert.gif') ?>" alt="" /></th>
    5 <td>
    6 <?php include_customizes($id, 'top') ?>
    7 <?php echo $sf_data->getRaw('body') ?>
    8 <?php include_customizes($id, 'bottom') ?>
    9 </td>
    10 </tr></table>
    11 </div></div>
    12 <?php include_customizes($id, 'after') ?>
     4<td><?php echo $sf_data->getRaw('content') ?></td>
     5</tr>
     6</table>
  • OpenPNE3/trunk/apps/pc_frontend/templates/_partsBox.php

    r10213 r10258  
    1 <?php if (empty($option['form'])) : ?>
    21<div class="body">
    32<?php include_customizes($id, 'bodyTop') ?>
    4 <?php echo $sf_data->getRaw('body') ?>
     3<?php echo $sf_data->getRaw('content') ?>
    54<?php include_customizes($id, 'bodyBottom') ?>
    65</div>
    7 <?php endif; ?>
    8 
    9 <?php if (isset($option['form'])) : ?>
    10 <?php if (!empty($body)) : ?>
    11 <div class="body">
    12 <?php include_customizes($id, 'bodyTop') ?>
    13 <?php echo $sf_data->getRaw('body') ?>
    14 <?php include_customizes($id, 'bodyBottom') ?>
    15 </div>
    16 <?php endif; ?>
    17 <?php $option_raw = $sf_data->getRaw('option') ?>
    18 <form action="<?php echo url_for($option_raw['url']) ?>" method="post"<?php if (!empty($option['isMultipart'])) : ?> enctype="multipart/form-data"<?php endif; ?>>
    19 <?php include_customizes($id, 'formTop') ?>
    20 
    21 <table class="formTable">
    22 <?php
    23 $forms = ($option['form'] instanceof sfForm) ? array($option['form']) : $option['form'];
    24 foreach ($forms as $form)
    25 {
    26   foreach ($form as $field)
    27   {
    28     if ($field->isHidden()) continue;
    29 
    30     $widget = $field->getWidget();
    31     if ($widget instanceof sfWidgetFormInput)
    32     {
    33       $widget->setAttribute('class', sprintf('input_%s', $widget->getOption('type')));
    34     }
    35     elseif ($widget instanceof sfWidgetFormChoice)
    36     {
    37       if ($widget->getRenderer() instanceof sfWidgetFormSelectRadio)
    38       {
    39         echo '<tr>'."\n"
    40            . '  <th>'.$field->renderLabel().'</th>'."\n"
    41            . '  <td><div id="'.$field->renderId().'">'.$field->render(array('class' => 'input_radio')).'</div></td>'."\n"
    42            . '</tr>'."\n";
    43         continue;
    44       }
    45     }
    46     elseif ($widget instanceof opWidgetFormDate)
    47     {
    48       echo '<tr>'."\n"
    49          . '  <th>'.$field->renderLabel().'</th>'."\n"
    50          . '  <td><div id="'.$field->renderId().'">'.$field->render().'</div></td>'."\n"
    51          . '</tr>'."\n";
    52       continue;
    53     }
    54     echo $field->renderRow();
    55   }
    56 }
    57 ?>
    58 <?php include_customizes($id, 'lastRaw') ?>
    59 </table>
    60 
    61 <?php if (!empty($option['moreInfo'])) : ?>
    62 <div class="block moreInfo">
    63 <ul class="moreInfo">
    64 <?php foreach ($option['moreInfo'] as $key => $value) : ?>
    65 <li><?php echo $option['moreInfo']->getRaw($key); ?></li>
    66 <?php endforeach; ?>
    67 </ul>
    68 </div>
    69 <?php endif; ?>
    70 <div class="operation">
    71 <ul class="moreInfo button">
    72 <li>
    73 <?php foreach ($forms as $form) echo $form->renderHiddenFields() ?><input type="submit" class="input_submit" value="<?php echo $option['button'] ?>" />
    74 </li>
    75 </ul>
    76 </div>
    77 <?php include_customizes($id, 'formBottom') ?>
    78 </form>
    79 <?php endif; ?>
  • OpenPNE3/trunk/apps/pc_frontend/templates/_partsDescriptionBox.php

    r9949 r10258  
    1 <?php include_customizes($id, 'before') ?>
    2 <div id="<?php echo $id ?>" class="dparts descriptionBox"><div class="parts">
    3 <?php include_customizes($id, 'top') ?>
    4 <?php echo $sf_data->get('option')->getRaw('body') ?>
    5 <?php include_customizes($id, 'bottom') ?>
    6 </div></div>
    7 <?php include_customizes($id, 'after') ?>
     1<?php echo $sf_data->getRaw('content') ?>
  • OpenPNE3/trunk/apps/pc_frontend/templates/_partsInformationBox.php

    r8914 r10258  
    1 <?php include_customizes($id, 'before') ?>
    2 <div id="<?php echo $id ?>" class="parts informationBox">
    31<div class="body">
    4 <?php include_customizes($id, 'top') ?>
    5 <?php echo $sf_data->getRaw('body') ?>
    6 <?php include_customizes($id, 'bottom') ?>
     2<?php echo $sf_data->getRaw('content') ?>
    73</div>
    8 </div>
    9 <?php include_customizes($id, 'after') ?>
  • OpenPNE3/trunk/apps/pc_frontend/templates/_partsListBox.php

    r9589 r10258  
    1 <?php include_customizes($id, 'before') ?>
    2 <div id="<?php echo $id ?>" class="dparts listBox"><div class="parts">
    3 
    4 <?php if (isset($options['title'])) : ?>
    5 <div class="partsHeading">
    6 <?php include_customizes($id, 'headTop') ?>
    7 <h3><?php echo $options['title'] ?></h3>
    8 <?php include_customizes($id, 'headBottom') ?>
    9 </div>
    10 <?php endif; ?>
    11 
    121<table>
    13 <?php foreach ($list as $key => $value): ?>
     2<?php foreach ($content as $key => $value): ?>
    143<tr>
    154<th><?php echo $key ?></th>
    16 <td><?php echo $list->getRaw($key) ?></td>
     5<td><?php echo $content->getRaw($key) ?></td>
    176</tr>
    187<?php endforeach; ?>
    19 <?php include_customizes($id, 'lastRaw') ?>
     8<?php include_customizes($id, 'lastRow') ?>
    209</table>
    2110
    22 <?php if(isset($options['moreInfo'])) : ?>
     11<?php if (isset($options['moreInfo'])): ?>
    2312<div class="block moreInfo">
    2413<ul class="moreInfo">
     
    2918</div>
    3019<?php endif; ?>
    31 
    32 </div>
    33 </div>
    34 <?php include_customizes($id, 'after') ?>
Note: See TracChangeset for help on using the changeset viewer.