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

Changeset 10073


Ignore:
Timestamp:
Jan 10, 2009, 9:11:58 PM (11 years ago)
Author:
ogawa
Message:

#3422:added Recently Posted Diaries of All to home

Location:
OpenPNE3/plugins/opDiaryPlugin/trunk
Files:
2 added
8 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/plugins/opDiaryPlugin/trunk/apps/mobile_frontend/modules/diary/templates/_myDiaryList.php

    r9878 r10073  
    1717$moreInfo[] = link_to(__('Post a diary'), 'diary_new');
    1818$options = array(
    19   'title'  => __('Recently Posted Diaries'),
     19  'title'  => __('My Diaries'),
    2020  'border' => true,
    2121  'moreInfo' => $moreInfo,
  • OpenPNE3/plugins/opDiaryPlugin/trunk/apps/mobile_frontend/modules/member/config/view.yml

    r10070 r10073  
    1616      parts:    [profileEdit]
    1717      target:   [before]
    18     myDiaryList:
    19       template: [diary, myDiaryList]
     18    diaryList:
     19      template: [diary, diaryList]
    2020      is_component: true
    2121      parts:    [profileEdit]
  • OpenPNE3/plugins/opDiaryPlugin/trunk/apps/pc_frontend/modules/diary/templates/_myDiaryList.php

    r9878 r10073  
    22
    33<div class="dparts"><div class="parts">
    4 <div class="partsHeading"><h3><?php echo __('Recently Posted Diaries') ?></h3></div>
     4<div class="partsHeading"><h3><?php echo __('My Diaries') ?></h3></div>
    55<div class="box"><div class="body">
    66<?php if (count($diaryList)): ?>
  • OpenPNE3/plugins/opDiaryPlugin/trunk/config/widget.yml

    r10072 r10073  
    4040        7: 7
    4141        10: 10
     42
     43diaryList:
     44  caption:
     45    ja_JP: "全体の最新日記"
     46  description:
     47    ja_JP: "全体の最新日記を新着順に表示します。"
     48  component: [diary, diaryList]
     49  config:
     50    max:
     51      Name:      "max"
     52      Caption:   "最大表示件数"
     53      FormType:  "select"
     54      ValueType:  "int"
     55      IsRequired: true
     56      Default:    5
     57      Choices:
     58        1: 1
     59        3: 3
     60        5: 5
     61        7: 7
     62        10: 10
  • OpenPNE3/plugins/opDiaryPlugin/trunk/data/fixtures/020_widget.yml

    r9855 r10073  
    44    name: "diaryFriendList"
    55    sort_order: 101
    6 
     6  diay_list:
     7    type: "contents"
     8    name: "diaryList"
     9    sort_order: 102
    710  diary_my_list:
    811    type: "contents"
    912    name: "diaryMyList"
    10     sort_order: 102
     13    sort_order: 103
  • OpenPNE3/plugins/opDiaryPlugin/trunk/i18n/messages.ja.xml

    r10071 r10073  
    155155        <target>%1%さんのページ</target>
    156156      </trans-unit>
     157      <trans-unit id="39">
     158        <source>Recently Posted Diaries of All</source>
     159        <target>全体の最新日記</target>
     160      </trans-unit>
     161      <trans-unit id="40">
     162        <source>My Diaries</source>
     163        <target>自分の日記</target>
     164      </trans-unit>
    157165    </body>
    158166  </file>
  • OpenPNE3/plugins/opDiaryPlugin/trunk/lib/action/opDiaryPluginDiaryComponents.class.php

    r10072 r10073  
    1818class opDiaryPluginDiaryComponents extends sfComponents
    1919{
     20  public function executeDiaryList()
     21  {
     22    $max = ($this->widget) ? $this->widget->getConfig('max') : 5;
     23    $this->diaryList = DiaryPeer::getDiaryList($max);
     24  }
     25
    2026  public function executeMyDiaryList()
    2127  {
    22     $max = $this->widget->getConfig('max');
     28    $max = ($this->widget) ? $this->widget->getConfig('max') : 5;
    2329    $this->diaryList = DiaryPeer::getMemberDiaryList($this->getUser()->getMemberId(), $max, $this->getUser()->getMemberId());
    2430  }
     
    2632  public function executeFriendDiaryList()
    2733  {
    28     $max = $this->widget->getConfig('max');
     34    $max = ($this->widget) ? $this->widget->getConfig('max') : 5;
    2935    $this->diaryList = DiaryPeer::getFriendDiaryList($this->getUser()->getMemberId(), $max);
    3036  }
  • OpenPNE3/plugins/opDiaryPlugin/trunk/lib/model/DiaryPeer.php

    r10011 r10073  
    3131
    3232    return array_map(array(sfContext::getInstance()->getI18N(), '__'), self::$publicFlags);
     33  }
     34
     35  public static function getDiaryList($limit = 5, $publicFlag = self::PUBLIC_FLAG_SNS)
     36  {
     37    $c = self::getOrderdCriteria();
     38    self::addPublicFlagCriteria($c, $publicFlag);
     39    $c->setLimit($limit);
     40
     41    return self::doSelect($c);
    3342  }
    3443
Note: See TracChangeset for help on using the changeset viewer.