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

Changeset 10352


Ignore:
Timestamp:
Jan 24, 2009, 7:08:25 PM (11 years ago)
Author:
ebihara
Message:

#3287:added ability to delete a member from the pc_backend application

Location:
OpenPNE3/trunk
Files:
3 added
4 edited

Legend:

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

    r10144 r10352  
    4949
    5050    $this->profiles = ProfilePeer::retrievesAll();
     51
     52    return sfView::SUCCESS;
     53  }
     54
     55 /**
     56  * Executes delete action
     57  *
     58  * @param sfRequest $request A request object
     59  */
     60  public function executeDelete(sfWebRequest $request)
     61  {
     62    $id = $request->getParameter('id');
     63    if ($id == 1)
     64    {
     65      return sfView::ERROR;
     66    }
     67
     68    $this->member = MemberPeer::retrieveByPK($id);
     69    $this->forward404Unless($this->member);
     70
     71    $this->form = new sfForm();
     72    if ($request->isMethod('post'))
     73    {
     74      $this->member->delete();
     75      $this->getUser()->setFlash('notice', '退会が完了しました');
     76      $this->redirect('member/list');
     77    }
    5178
    5279    return sfView::SUCCESS;
  • OpenPNE3/trunk/apps/pc_backend/modules/member/templates/listSuccess.php

    r10144 r10352  
    33<?php end_slot() ?>
    44
    5 <h2><?php echo __('メンバーリスト') ?></h2>
     5<?php slot('title', __('メンバーリスト')); ?>
    66
    77<form action="<?php echo url_for('member/list') ?>" method="get">
     
    1919
    2020<p>
     21<?php echo image_tag('icn_delete_account.gif', array('alt' => __('強制退会'))) ?>: <?php echo __('強制退会') ?>
     22&nbsp;
    2123<?php echo image_tag('icn_blacklist.gif', array('alt' => __('携帯電話個体識別番号をブラックリストに登録'))) ?>: <?php echo __('携帯電話個体識別番号をブラックリストに登録') ?>
    2224</p>
     
    2527
    2628<tr>
    27 <td colspan="<?php echo 4 + count($profiles) + 3 ?>">
     29<td colspan="<?php echo 5 + count($profiles) + 3 ?>">
    2830<?php echo pager_navigation($pager, 'member/list?page=%d', true, '?'.$sf_request->getCurrentQueryString()) ?>
    2931</td>
     
    3133
    3234<tr>
    33 <th><?php echo __('操作') ?></th>
     35<th colspan="2"><?php echo __('操作') ?></th>
    3436<th><?php echo __('ID') ?></th>
    3537<th><?php echo __('ニックネーム') ?></th>
     
    4648<tr style="background-color:<?php echo cycle_vars('member_list', '#fff, #eee') ?>;">
    4749<td>
    48 <?php if ($member->getConfig('mobile_uid')) : ?>
     50<?php if ($member->getId() != 1) : ?>
     51<?php echo link_to(image_tag('icn_delete_account.gif', array('alt' => __('強制退会'))), 'member/delete?id='.$member->getId()) ?>
     52<?php endif; ?>
     53</td>
     54<td>
    4955<?php echo link_to(image_tag('icn_blacklist.gif', array('alt' => __('携帯電話個体識別番号をブラックリストに登録'))), 'member/blacklist?uid='.$member->getConfig('mobile_uid')) ?>
    50 <?php endif; ?>
    5156</td>
    5257<td><?php echo $member->getId() ?></td>
  • OpenPNE3/trunk/apps/pc_backend/templates/layout.php

    r10345 r10352  
    3636</ul>
    3737<?php endif; ?>
     38<?php if (has_slot('title')): ?>
     39<h2><?php include_slot('title') ?></h2>
     40<?php endif; ?>
     41
     42<?php if ($sf_user->hasFlash('error')): ?>
     43<p id="flashError" class="flash"><?php echo __($sf_user->getFlash('error')) ?></p>
     44<?php endif; ?>
     45<?php if ($sf_user->hasFlash('notice')): ?>
     46<p id="flashNotice" class="flash"><?php echo __($sf_user->getFlash('notice')) ?></p>
     47<?php endif; ?>
     48
     49
    3850<?php echo $sf_content ?>
    3951</div>
  • OpenPNE3/trunk/web/css/backend.css

    r10226 r10352  
    142142}
    143143
     144.flash {
     145  margin: 0 0 15px -20px;
     146  padding: 10px;
     147  background-color: #FFFEEB;
     148  border-bottom: 1px #CCCCCC solid;
     149  border-top: 1px #CCCCCC solid;
     150}
     151#flashError {
     152  color: #ff0000;
     153}
     154
Note: See TracChangeset for help on using the changeset viewer.