Changeset 9870
- Timestamp:
- Jan 4, 2009, 12:53:30 PM (14 years ago)
- Location:
- OpenPNE3/plugins/opDiaryPlugin/trunk
- Files:
-
- 1 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
OpenPNE3/plugins/opDiaryPlugin/trunk/apps/mobile_frontend/modules/diary/templates/showSuccess.php
r9862 r9870 1 <?php include_page_title(__('Diary of %1%', array('%1%' => $ diary->getMember()->getName())), $diary->getTitle()) ?>1 <?php include_page_title(__('Diary of %1%', array('%1%' => $member->getName())), $diary->getTitle()) ?> 2 2 <?php use_helper('Date') ?> 3 3 -
OpenPNE3/plugins/opDiaryPlugin/trunk/apps/pc_frontend/modules/diary/actions/components.class.php
r9645 r9870 10 10 class diaryComponents extends opDiaryPluginDiaryComponents 11 11 { 12 public function executeSidemenu() 13 { 14 } 12 15 } -
OpenPNE3/plugins/opDiaryPlugin/trunk/apps/pc_frontend/modules/diary/templates/editSuccess.php
r9853 r9870 1 <?php decorate_with('layoutB') ?> 2 <?php slot('op_sidemenu', get_component('diary', 'sidemenu', array('member' => $member))) ?> 3 1 4 <?php 2 5 $options = array('form' => array($form)); … … 7 10 include_box('formDiary', $title, '', $options); 8 11 ?> 12 13 <div id="formDiaryDelete" class="dparts box"><div class="parts"> 14 <div class="partsHeading"> 15 <h3><?php echo __('Delete this diary') ?></h3> 16 </div> 17 <div class="block"> 18 <form action="<?php echo url_for('@diary_delete?id='.$diary->getId()) ?>" method="post"> 19 <div class="operation"> 20 <ul class="moreInfo button"> 21 <li> 22 <input class="input_submit" type="submit" value="<?php echo __('Delete') ?>" /> 23 </li> 24 </ul> 25 </div> 26 </form> 27 </div> 28 </div></div> -
OpenPNE3/plugins/opDiaryPlugin/trunk/apps/pc_frontend/modules/diary/templates/listMemberSuccess.php
r9853 r9870 1 1 <?php use_helper('Date'); ?> 2 3 <?php decorate_with('layoutB') ?> 4 <?php slot('op_sidemenu', get_component('diary', 'sidemenu', array('member' => $member))) ?> 2 5 3 6 <div class="dparts recentList"><div class="parts"> -
OpenPNE3/plugins/opDiaryPlugin/trunk/apps/pc_frontend/modules/diary/templates/newSuccess.php
r9853 r9870 1 <?php decorate_with('layoutB') ?> 2 <?php slot('op_sidemenu', get_component('diary', 'sidemenu', array('member' => $member))) ?> 3 1 4 <?php 2 5 $options = array('form' => array($form)); -
OpenPNE3/plugins/opDiaryPlugin/trunk/apps/pc_frontend/modules/diary/templates/showSuccess.php
r9862 r9870 1 1 <?php use_helper('Date') ?> 2 2 3 <?php decorate_with('layoutB') ?> 4 <?php slot('op_sidemenu', get_component('diary', 'sidemenu', array('member' => $member))) ?> 5 6 <?php /* {{{ diaryDetailBox */ ?> 3 7 <div class="dparts diaryDetailBox"><div class="parts"> 4 <div class="partsHeading"><h3><?php echo __('Diary of %1%', array('%1%' => $ diary->getMember()->getName())) ?></h3>8 <div class="partsHeading"><h3><?php echo __('Diary of %1%', array('%1%' => $member->getName())) ?></h3> 5 9 <p class="public">(<?php echo $diary->getPublicFlagLabel() ?>)</p></div> 6 10 <dl> … … 15 19 <ul class="photo"> 16 20 <?php foreach ($images as $image): ?> 17 <li>< ?php echo image_tag_sf_image($image->getFile(), array('size' => '120x120')) ?></li>21 <li><a href="<?php echo sf_image_path($image->getFile()) ?>" target="_blank"><?php echo image_tag_sf_image($image->getFile(), array('size' => '120x120')) ?></a></li> 18 22 <?php endforeach; ?> 19 23 </ul> … … 23 27 </dd> 24 28 </dl> 29 <?php if ($diary->getMemberId() === $sf_user->getMemberId()): ?> 30 <div class="operation"> 31 <form action="<?php echo url_for('diary_edit', $diary) ?>"> 32 <ul class="moreInfo button"> 33 <li><input type="submit" class="input_submit" value="<?php echo __('Edit this diary') ?>" /></li> 34 </ul> 35 </form> 36 </div> 37 <?php endif; ?> 25 38 </div></div> 26 27 <div class="parts"> 28 <?php if ($diary->getMemberId() === $sf_user->getMemberId()): ?> 29 <ul> 30 <li><?php echo link_to(__('Edit this diary'), 'diary_edit', $diary) ?></li> 31 <li><form action="<?php echo url_for('diary_delete', $diary) ?>" method="post"><input type="submit" value="<?php echo __('Delete this diary') ?>" /></form></li> 32 </ul> 33 <?php endif; ?> 34 </div> 39 <?php /* }}} */ ?> 35 40 36 41 <?php $comments = $diary->getDiaryComments() ?> 37 42 <?php if (count($comments)): ?> 38 <div class="dparts"><div class="parts"> 43 <?php /* {{{ commentList */ ?> 44 <div class="dparts commentList"><div class="parts"> 39 45 <div class="partsHeading"><h3><?php echo __('Comments') ?></h3></div> 40 46 <?php foreach ($comments as $comment): ?> 41 47 <dl> 42 48 <dt><?php echo format_datetime($comment->getCreatedAt(), 'f') ?></dt> 43 <dd><p><?php echo $comment->getMember()->getName() ?></p></dd> 49 <dd> 50 <div class="title"> 51 <p class="heading"><strong><?php echo $comment->getNumber() ?></strong>: 52 <?php if ($_member = $comment->getMember()): ?> <?php echo link_to($_member->getName(), 'member/profile?id='.$_member->getId()) ?><?php endif; ?> 53 <?php if ($diary->getMemberId() === $sf_user->getMemberId() || $comment->getMemberId() === $sf_user->getMemberId()): ?> 54 <?php echo link_to(__('Delete this comment'), 'diary_comment_delete', $comment) ?> 55 <?php endif; ?> 56 </p> 57 </div> 58 <div class="body"> 44 59 <?php $images = $comment->getDiaryCommentImages() ?> 45 60 <?php if (count($images)): ?> 46 <dd>47 61 <ul class="photo"> 48 62 <?php foreach ($images as $image): ?> 49 <li>< ?php echo image_tag_sf_image($image->getFile(), array('size' => '120x120')) ?></li>63 <li><a href="<?php echo sf_image_path($image->getFile()) ?>" target="_blank"><?php echo image_tag_sf_image($image->getFile(), array('size' => '120x120')) ?></a></li> 50 64 <?php endforeach; ?> 51 65 </ul> 66 <?php endif; ?> 67 <p class="text"><?php echo nl2br($comment->getBody()) ?></p> 68 </div> 52 69 </dd> 53 <?php endif; ?>54 <dd><p><?php echo nl2br($comment->getBody()) ?></p></dd>55 <?php if ($diary->getMemberId() === $sf_user->getMemberId() || $comment->getMemberId() === $sf_user->getMemberId()): ?>56 <dd><p><?php echo link_to(__('Delete this comment'), 'diary_comment_delete', $comment) ?></p></dd>57 <?php endif; ?>58 70 </dl> 59 71 <?php endforeach; ?> 60 72 </div></div> 73 <?php /* }}} */ ?> 61 74 <?php endif; ?> 62 75 -
OpenPNE3/plugins/opDiaryPlugin/trunk/lib/action/opDiaryPluginActions.class.php
r9860 r9870 18 18 { 19 19 $this->diary = $object; 20 $this-> setNavigation($this->diary->getMemberId());20 $this->member = $this->diary->getMember(); 21 21 } 22 22 elseif ($object instanceof DiaryComment) … … 24 24 $this->diaryComment = $object; 25 25 $this->diary = $this->diaryComment->getDiary(); 26 $this-> setNavigation($this->diary->getMemberId());26 $this->member = $this->diary->getMember(); 27 27 } 28 28 elseif ($object instanceof Member) 29 29 { 30 30 $this->member = $object; 31 $this->setNavigation($this->member->getId());32 31 } 33 32 } 34 33 } 35 34 36 p rotected function setNavigation($memberId)35 public function postExecute() 37 36 { 38 if ($memberId !== $this->getUser()->getMemberId()) 37 if (empty($this->member)) 38 { 39 $this->member = $this->getUser()->getMember(); 40 } 41 42 $this->setNavigation($this->member); 43 } 44 45 protected function setNavigation(Member $member) 46 { 47 if ($member->getId() !== $this->getUser()->getMemberId()) 39 48 { 40 49 sfConfig::set('sf_navi_type', 'friend'); 41 sfConfig::set('sf_navi_id', $member Id);50 sfConfig::set('sf_navi_id', $member->getId()); 42 51 } 43 52 } -
OpenPNE3/plugins/opDiaryPlugin/trunk/web/css/diary.css
r9559 r9870 6 6 .diaryDetailBox .partsHeading, 7 7 .diaryDetailBox dl, 8 .commentList dl, 8 9 .recentList dl, 9 10 .formTable .partsHeading, … … 15 16 .diaryDetailBox .partsHeading:after, 16 17 .diaryDetailBox dl:after, 18 .commentList dl:after, 17 19 .recentList dl:after, 18 20 .formTable .partsHeading:after, … … 191 193 192 194 /*============================================================================== 195 * 22. commentList(コメントリスト) 196 *----------------------------------------------------------------------------*/ 197 .commentList dl 198 { 199 border-top: 1px solid #CCCCCC; 200 } 201 .commentList dt 202 { 203 float: left; 204 width: 70px; 205 padding-top: 5px; 206 text-align: center; 207 } 208 .commentList dd 209 { 210 zoom: 1; 211 min-height: 5.5em; 212 margin-left: 70px; 213 border-left: 1px solid #CCCCCC; 214 } 215 * html .commentList dd 216 { 217 height: 5.5em; 218 } 219 #LayoutC .commentList dt 220 { 221 width: 110px; 222 } 223 #LayoutC .commentList dd 224 { 225 margin-left: 110px; 226 } 227 .commentList dd div 228 { 229 border-top: 1px solid #CCCCCC; 230 } 231 .commentList dd div p 232 { 233 padding: 4px 3px; 234 } 235 .commentList dd div.title 236 { 237 padding: 4px 3px; 238 border-top: none; 239 } 240 .commentList dd div.title p 241 { 242 padding: 0; 243 } 244 .commentList dd ul.photo 245 { 246 padding: 5px 5px 0; 247 } 248 .commentList dd ul.photo li 249 { 250 display: inline; 251 margin-left: 6px; 252 } 253 .commentList dd div.footer p 254 { 255 text-align: right; 256 } 257 .commentList div.operation 258 { 259 padding: 8px 0; 260 } 261 .commentList dd div.attachFile 262 { 263 padding: 16px 5px; 264 } 265 266 /*============================================================================== 193 267 * 23. searchResultList(検索結果リスト) 194 268 *----------------------------------------------------------------------------*/
Note: See TracChangeset
for help on using the changeset viewer.