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

Changeset 10255


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

divided box parts into two parts

Location:
OpenPNE3/branches/ogawa_parts
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/branches/ogawa_parts/apps/pc_frontend/templates/_partsBox.php

    r10246 r10255  
    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, 'lastRow') ?>
    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/branches/ogawa_parts/lib/helper/PartsHelper.php

    r10253 r10255  
    113113function include_box($id, $title = '', $body = '', $options = array())
    114114{
     115  $options['title'] = $title;
     116
    115117  if (!empty($options['form']))
    116118  {
     
    130132  else
    131133  {
    132     $options['title'] = $title;
    133 
    134134    op_include_parts('box', $id, $body, $options);
    135135  }
  • OpenPNE3/branches/ogawa_parts/web/css/main.css

    r10221 r10255  
    551551}
    552552
    553 /*----------------------------------------------
    554  * Form Table
    555  *--------------------------------------------*/
    556 .formTable textarea {
    557   width: 98%;
    558 }
    559 
    560553/*==============================================================================
    561554 * descriptionBox
     
    608601}
    609602
    610 .box form th, .box form td {
     603.box .operation {
     604  padding: 10px 0;
     605}
     606
     607/*==============================================================================
     608 * form
     609 *----------------------------------------------------------------------------*/
     610.form th,
     611.form td {
    611612  padding: 5px;
    612613}
    613 .box form th {
     614
     615.form th {
    614616  width: 140px;
    615617  border-left: medium none;
    616618}
    617619
    618 .box .operation {
    619   padding: 10px 0;
     620.form textarea {
     621  width: 98%;
    620622}
    621623
Note: See TracChangeset for help on using the changeset viewer.