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

Changeset 10675


Ignore:
Timestamp:
Feb 6, 2009, 3:49:03 PM (13 years ago)
Author:
nagasawa
Message:

#3290:added invited list

Location:
OpenPNE3/trunk
Files:
4 added
6 edited

Legend:

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

    r10634 r10675  
    475475        <target>メッセージ(任意)</target>
    476476      </trans-unit>
    477       </body>
     477      <trans-unit id="">
     478        <source>Mail address list during invitation</source>
     479        <target>招待中メールアドレス一覧</target>
     480      </trans-unit>
     481      <trans-unit id="">
     482        <source>Y/m/d</source>
     483        <target>Y年m月d日</target>
     484      </trans-unit>
     485    </body>
    478486  </file>
    479487</xliff>
  • OpenPNE3/trunk/apps/pc_frontend/modules/member/templates/inviteInput.php

    r10555 r10675  
    11<?php
     2
    23$options = array(
    34  'title' => __('Invite a friend to %1%', array('%1%' => $op_config['sns_name'])),
     
    78op_include_form('inviteForm', $form, $options);
    89?>
     10
     11<?php if (count($invites)): ?>
     12<div class="dparts recentList" id="invitelistForm">
     13<div class="parts">
     14
     15<div class="partsHeading">
     16<h3><?php echo __('Mail address list during invitation') ?></h3>
     17</div>
     18
     19<form method="post" action="<?php echo url_for('member/invite') ?>">
     20
     21<?php $i = 0 ?>
     22<?php foreach ($listform as $field): ?>
     23<?php if ($field->isHidden()) continue; ?>
     24<dl>
     25<dt><?php echo date(__('Y/m/d'), strtotime($invites[$i]->getCreatedAt())) ?></dt>
     26<dd>
     27<?php echo $field ?>
     28<?php echo $field->renderLabel() ?>
     29</dd>
     30</dl>
     31<?php $i++ ?>
     32<?php endforeach ?>
     33
     34<div class="operation">
     35<ul class="moreInfo button">
     36<li>
     37<?php echo $listform->renderHiddenFields() ?>
     38<input type="submit" value="<?php echo __('Delete') ?>" class="input_submit"/>
     39</li>
     40</ul>
     41</div>
     42
     43</form>
     44
     45</div>
     46</div>
     47<?php endif ?>
  • OpenPNE3/trunk/config/schema.yml

    r10568 r10675  
    136136    uid: { type: varchar(32), index: unique, required: true, defaultValue: "" }
    137137    memo: { type: longvarchar }
     138
     139  invitelist:
     140    created_at: ~
     141    member_id_from: { type:integer, foreignTable: member, foreignReference: id, opDelete: cascade }
     142    member_id_to: { type:integer, foreignTable: member, foreignReference: id }
     143    mail_address: { type: longvarchar }
  • OpenPNE3/trunk/lib/action/opAuthAction.class.php

    r10119 r10675  
    3434
    3535    $this->getUser()->setIsSNSMember(true);
     36    InvitePeer::deleteInvitesByMemberIdTo($member->getId());
    3637    $this->redirect('member/home');
    3738  }
  • OpenPNE3/trunk/lib/action/sfOpenPNEMemberAction.class.php

    r10348 r10675  
    268268    }
    269269
     270    $id = $this->getUser()->getMemberId();
     271    $this->invites = InvitelistPeer::getInvitesByMemberIdFrom($id);
     272    $this->listform = new InvitelistForm(
     273      array(),
     274      array('invites' => $this->invites)
     275    );
     276    if ($request->isMethod('post'))
     277    {
     278      $this->listform->bind($request->getParameter('invitelist'));
     279      if ($this->listform->isValid())
     280      {
     281        $this->listform->save();
     282        $this->redirect('member/invite');
     283      }
     284    }
     285 
    270286    return sfView::INPUT;
    271287  }
  • OpenPNE3/trunk/lib/form/InviteForm.class.php

    r10634 r10675  
    119119      }
    120120      $relation->setFriend();
     121      InvitelistPeer::addInvite($fromMemberId, $toMemberId, $this->getValue('mail_address'));
    121122    }
    122123  }
Note: See TracChangeset for help on using the changeset viewer.