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

Changeset 10412


Ignore:
Timestamp:
Jan 26, 2009, 3:00:53 PM (12 years ago)
Author:
ebihara
Message:

#3372:added checking permissions to display links

Location:
OpenPNE3/plugins/opCommunityTopicPlugin/trunk/apps/pc_frontend/modules/communityTopic/templates
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/plugins/opCommunityTopicPlugin/trunk/apps/pc_frontend/modules/communityTopic/templates/_communityTopicList.php

    r10384 r10412  
    1 <?php if ($hasPermission): ?>
     1<?php if ($community->isViewableCommunityTopic($sf_user->getMemberId())): ?>
    22<?php use_helper('Date'); ?>
    33<tr>
     
    1515<li><?php echo link_to('もっと読む', 'communityTopic_list_community', $community); ?></li>
    1616<?php endif; ?>
     17<?php if ($community->isCreatableCommunityTopic($sf_user->getMemberId())): ?>
    1718<li><?php echo link_to('トピック作成', 'communityTopic_new', $community); ?></li>
     19<?php endif; ?>
    1820</ul>
    1921</td>
  • OpenPNE3/plugins/opCommunityTopicPlugin/trunk/apps/pc_frontend/modules/communityTopic/templates/listCommunitySuccess.php

    r10384 r10412  
    11<?php use_helper('Date'); ?>
    22
     3<?php if ($community->isCreatableCommunityTopic($sf_user->getMemberId())): ?>
    34<?php
    45$title = 'トピックを作成する';
     
    67include_box('communityTopicList', $title, $body);
    78?>
     9<?php endif; ?>
    810
    911<div class="dparts topicList"><div class="parts">
     
    2224<tr>
    2325<td class="border-left align-right">
    24 <?php
    25 echo link_to('編集', 'communityTopic/edit?id='.$topic->getId());
    26 echo ' | ';
    27 echo link_to('もっと見る'.'('.$topic->countCommunityTopicComments().')', 'communityTopic_show', $topic);
    28 ?></td>
     26<?php if ($topic->isEditable($sf_user->getMemberId())): ?>
     27<?php echo link_to('編集', 'communityTopic/edit?id='.$topic->getId()); ?>
     28<?php endif; ?>
     29 <?php echo link_to('もっと見る'.'('.$topic->countCommunityTopicComments().')', 'communityTopic_show', $topic); ?>
     30</td>
    2931</tr>
    3032<?php endforeach; ?>
  • OpenPNE3/plugins/opCommunityTopicPlugin/trunk/apps/pc_frontend/modules/communityTopic/templates/showSuccess.php

    r10384 r10412  
    1414</dd>
    1515</dl>
    16 
     16<?php if ($communityTopic->isEditable($sf_user->getMemberId())): ?>
    1717<div class="operation"><?php echo link_to('トピック編集', 'communityTopic/edit?id='.$communityTopic->getId()) ?></div>
     18<?php endif; ?>
    1819
    1920</div>
     
    2223<?php include_component('communityTopicComment', 'list', array('communityTopic' => $communityTopic)) ?>
    2324
     25<?php if ($communityTopic->isCreatableCommunityTopicComment($sf_user->getMemberId())): ?>
    2426<?php
    2527$options = array();
     
    2830op_include_form('formCommunityTopicComment', $form, $options);
    2931?>
     32<?php endif; ?>
    3033
    3134<ul>
Note: See TracChangeset for help on using the changeset viewer.