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

Changeset 9498


Ignore:
Timestamp:
Dec 7, 2008, 4:09:19 PM (11 years ago)
Author:
ebihara
Message:

#3192:added styles for LayoutB and added pageNav parts

Location:
OpenPNE3/trunk
Files:
2 added
5 edited

Legend:

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

    r9157 r9498  
    5757  public function executeConfig($request)
    5858  {
    59     $this->forms = array();
    60     $categories = sfConfig::get('openpne_member_category');
     59    $this->categories = sfConfig::get('openpne_member_category');
     60    $this->categoryName = $request->getParameter('category', 'general');
     61    $this->forward404Unless(array_key_exists($this->categoryName, $this->categories), 'Undefined category');
    6162
    62     foreach ($categories as $category => $config) {
    63       $formClass = 'MemberConfig'.ucfirst($category).'Form';
    64       $this->forms[$category] = new $formClass($this->getUser()->getMember());
    65     }
     63    $formClass = 'MemberConfig'.ucfirst($this->categoryName).'Form';
     64    $this->form = new $formClass($this->getUser()->getMember());
    6665
    6766    if ($request->isMethod('post')) {
    68       $targetForm = $this->forms[$request->getParameter('category')];
    69       $targetForm->bind($request->getParameter('member_config'));
    70       if ($targetForm->isValid()) {
    71         $targetForm->save($this->getUser()->getMemberId());
     67      $this->form->bind($request->getParameter('member_config'));
     68      if ($this->form->isValid()) {
     69        $this->form->save($this->getUser()->getMemberId());
    7270        $this->redirect('member/config');
    7371      }
  • OpenPNE3/trunk/apps/pc_frontend/modules/member/config/view.yml

    r9496 r9498  
    66      parts   : [information]
    77      target  : [bottom]
     8
     9configSuccess:
     10  layout: layoutB
  • OpenPNE3/trunk/apps/pc_frontend/modules/member/templates/configSuccess.php

    r8929 r9498  
    1 <?php foreach ($forms as $category => $form) : ?>
     1<?php slot('op_sidemenu'); ?>
     2<?php
     3$list = array();
     4foreach ($categories as $key => $value)
     5{
     6  $list[$key] = link_to($key, 'member/config?category='.$key);
     7}
     8include_parts('pageNav', 'pagenavi', array('list' => $list, 'current' => $categoryName));
     9?>
     10<?php end_slot(); ?>
    211
    3 <?php include_box('form'.$category, $category, '', array(
     12<?php include_box('form'.$categoryName, $categoryName, '', array(
    413  'form' => array($form),
    5   'url' => 'member/config?category=' . $category)
     14  'url' => 'member/config?category='.$categoryName)
    615) ?>
    7 
    8 <?php endforeach; ?>
  • OpenPNE3/trunk/lib/helper/PartsHelper.php

    r9336 r9498  
    7777}
    7878
     79function include_parts($parts_name, $id, $option = array())
     80{
     81  $params = array(
     82    'id'     => $id,
     83    'option' => $option,
     84  );
     85  include_partial('global/parts'.ucfirst($parts_name), $params);
     86}
     87
    7988/**
    8089 * Includes customizes.
  • OpenPNE3/trunk/web/css/main.css

    r9497 r9498  
    202202}
    203203
     204#LayoutB #Sidemenu {
     205        float: left;
     206        width: 180px;
     207}
     208#LayoutB #Contents {
     209        float: right;
     210        width: 540px;
     211}
     212
    204213#LayoutC #Contents {
    205214  width: 650px;
    206215  margin-left: 30px;
     216}
     217
     218
     219/*----------------------------------------------
     220 * Sidemenu
     221 *--------------------------------------------*/
     222#LayoutB #Sidemenu div {
     223  background-color: #FFFFFF;
     224  border: 8px solid #CCCCCC;
     225  margin: 0 auto 10px;
     226  width: 150px;
     227}
     228#LayoutB #Sidemenu .pageNav ul {
     229  margin: 1px;
     230}
     231#LayoutB #Sidemenu .pageNav li {
     232  background: transparent url(../images/icon_1.gif) no-repeat scroll 8px 50%;
     233  padding: 4px 0 4px 18px;
     234}
     235#LayoutB #Sidemenu .pageNav li.current {
     236  background-color: #EEEEEE;
    207237}
    208238
     
    389419  padding: 5px;
    390420}
    391 
Note: See TracChangeset for help on using the changeset viewer.