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

Changeset 11635


Ignore:
Timestamp:
May 15, 2009, 5:28:14 PM (13 years ago)
Author:
nagasawa
Message:

#3820:added the community delete page

Location:
OpenPNE3/trunk
Files:
3 added
6 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/trunk/apps/mobile_frontend/i18n/messages.ja.xml

    r11626 r11635  
    439439        <target>該当するメンバーはいませんでした。</target>
    440440      </trans-unit>
     441      <trans-unit id="">
     442        <source>delete this community.if you delete this community please to report in advance for all this community members.</source>
     443        <target>このコミュニティを削除します。このコミュニティを削除する場合は、事前にこのコミュニティのメンバーに報告してください。</target>
     444      </trans-unit>
     445      <trans-unit id="">
     446        <source>Delete</source>
     447        <target>削除</target>
     448      </trans-unit>
     449      <trans-unit id="">
     450        <source>Delete this community</source>
     451        <target>コミュニティを削除する</target>
     452      </trans-unit>
     453      <trans-unit id="">
     454        <source>Do you delete this community?</source>
     455        <target>削除してよろしいですか?</target>
     456      </trans-unit>
     457      <trans-unit id="">
     458        <source>Yes</source>
     459        <target>はい</target>
     460      </trans-unit>
     461      <trans-unit id="">
     462        <source>No</source>
     463        <target>いいえ</target>
     464      </trans-unit>
    441465    </body>
    442466  </file>
  • OpenPNE3/trunk/apps/mobile_frontend/modules/community/templates/editSuccess.php

    r10939 r11635  
    2525</table>
    2626</form>
     27
     28<?php
     29if (!$communityForm->isNew())
     30{
     31  op_include_parts('buttonBox', 'deleteForm', array(
     32    'title' => __('Delete this community'),
     33    'body' => __('delete this community.if you delete this community please to report in advance for all this community members.'),
     34    'button' => __('Delete'),
     35    'method' => 'get',
     36    'url' => url_for('community/delete?id=' . $community->getId()),
     37  ));
     38}
     39?>
  • OpenPNE3/trunk/apps/pc_frontend/i18n/messages.ja.xml

    r11622 r11635  
    551551        <target>すべてのカテゴリー</target>
    552552      </trans-unit>
     553      <trans-unit id="">
     554        <source>delete this community.if you delete this community please to report in advance for all this community members.</source>
     555        <target>このコミュニティを削除します。このコミュニティを削除する場合は、事前にこのコミュニティのメンバーに報告してください。</target>
     556      </trans-unit>
     557      <trans-unit id="">
     558        <source>Delete</source>
     559        <target>削除</target>
     560      </trans-unit>
     561      <trans-unit id="">
     562        <source>Delete this community</source>
     563        <target>コミュニティを削除する</target>
     564      </trans-unit>
     565      <trans-unit id="">
     566        <source>Do you delete this community?</source>
     567        <target>削除してよろしいですか?</target>
     568      </trans-unit>
     569      <trans-unit id="">
     570        <source>Yes</source>
     571        <target>はい</target>
     572      </trans-unit>
     573      <trans-unit id="">
     574        <source>No</source>
     575        <target>いいえ</target>
     576      </trans-unit>
    553577    </body>
    554578  </file>
  • OpenPNE3/trunk/apps/pc_frontend/modules/community/templates/editSuccess.php

    r10939 r11635  
    1616
    1717op_include_form('formCommunity', array($communityForm, $communityConfigForm, $communityFileForm), $options);
     18
     19if (!$communityForm->isNew())
     20{
     21  op_include_parts('buttonBox', 'deleteForm', array(
     22    'title' => __('Delete this community'),
     23    'body' => __('delete this community.if you delete this community please to report in advance for all this community members.'),
     24    'button' => __('Delete'),
     25    'method' => 'get',
     26    'url' => url_for('community/delete?id=' . $community->getId()),
     27  ));
     28}
     29
    1830?>
  • OpenPNE3/trunk/apps/pc_frontend/templates/_partsYesNo.php

    r10618 r11635  
     1<?php $rawOptions =  $sf_data->getRaw('options') ?>
    12<?php
    23$url = url_for(sfContext::getInstance()->getRouting()->getCurrentInternalUri());
     
    1920<form action="<?php echo $options['yes_url'] ?>" method="<?php echo $options['yes_method'] ?>">
    2021<?php $yesFomrs = ($options['yes_form'] instanceof sfForm) ? array($options['yes_form']) : $options['yes_form'] ?>
     22<?php if(is_array($yesFomrs)): ?>
    2123<?php foreach($yesFomrs as $yesForm): ?>
    2224<?php echo $yesForm->renderHiddenFields() ?>
    2325<?php endforeach ?>
     26<?php else: ?>
     27<?php echo $rawOptions['yes_form'] ?>
     28<?php endif ?>
    2429<input type="submit" class="input_submit" value="<?php echo $options['yes_button'] ?>" />
    2530</form>
     
    2833<form action="<?php echo $options['no_url'] ?>" method="<?php echo $options['no_method'] ?>">
    2934<?php $noForms = ($options['no_form'] instanceof sfForm) ? array($options['no_form']) : $options['no_form'] ?>
     35<?php if(is_array($noForms)): ?>
    3036<?php foreach($noForms as $noForm): ?>
    3137<?php echo $noForm->renderHiddenFields() ?>
    3238<?php endforeach ?>
     39<?php else: ?>
     40<?php echo $rawOptions['no_form'] ?>
     41<?php endif ?>
    3342<input type="submit" class ="input_submit" value="<?php echo $options['no_button'] ?>" />
    3443</form>
  • OpenPNE3/trunk/lib/action/sfOpenPNECommunityAction.class.php

    r11479 r11635  
    6565      $this->community = new Community();
    6666    }
     67    else
     68    {
     69      if ($request->isMethod('post') && $request->hasParameter('is_delete'))
     70      {
     71        $this->redirect('community/delete');
     72      }
     73    }
    6774
    6875    $this->communityForm       = new CommunityForm($this->community);
     
    8996
    9097 /**
     98  * Executes delete action
     99  *
     100  * @param sfRequest $request A request object
     101  */
     102  public function executeDelete($request)
     103  {
     104    if ($this->id && !$this->isEditCommunity)
     105    {
     106      $this->forward('default', 'secure');
     107    }
     108
     109    if ($request->isMethod('post'))
     110    {
     111      if($request->hasParameter('is_delete'))
     112      {
     113        $community = Doctrine::getTable('Community')->find($this->id);
     114        if ($community)
     115        {
     116          $community->delete();
     117        }
     118        $this->redirect('community/search');
     119      }
     120      else
     121      {
     122        $this->redirect('community/home?id=' . $this->id);
     123      }
     124    }
     125    $this->community = Doctrine::getTable('Community')->find($this->id);
     126  }
     127
     128 /**
    91129  * Executes joinlist action
    92130  *
Note: See TracChangeset for help on using the changeset viewer.