Ejemplo n.º 1
0
/**
 * This file is part of the OpenPNE package.
 * (c) OpenPNE Project (http://www.openpne.jp/)
 *
 * For the full copyright and license information, please view the LICENSE
 * file and the NOTICE file that were distributed with this source code.
 */
function op_diary_link_to_show($diary, $withName = true, $withIcon = true)
{
    $html = '';
    $html .= link_to(op_diary_get_title_and_count($diary), op_diary_url_for_show($diary));
    if ($withName) {
        $html .= ' (' . $diary->getMember()->getName() . ')';
    }
    if ($withIcon) {
        $html .= op_diary_image_icon($diary);
    }
    return $html;
}
Ejemplo n.º 2
0
<?php

use_helper('opDiary');
?>

<?php 
if (count($diaryList)) {
    $list = array();
    foreach ($diaryList as $diary) {
        $list[] = sprintf('[%s] %s', op_format_date($diary->created_at, 'XShortDate'), link_to(op_diary_get_title_and_count($diary, false, 28), 'diary_show', $diary));
    }
    $moreInfo = array();
    $moreInfo[] = link_to(__('More'), '@diary_list_member?id=' . $memberId);
    $options = array('title' => __('Recently Posted Diaries'), 'border' => true, 'moreInfo' => $moreInfo);
    op_include_list('memberDiaryList', $list, $options);
}
Ejemplo n.º 3
0
<?php

use_helper('opDiary');
?>

<?php 
if (count($diaryList)) {
    $list = array();
    foreach ($diaryList as $diary) {
        $list[] = sprintf("[%s] %s<br>%s", op_format_date($diary->created_at, 'XShortDate'), $diary->Member->name, link_to(op_diary_get_title_and_count($diary, false, 28), 'diary_show', $diary));
    }
    $moreInfo = array();
    $moreInfo[] = link_to(__('More'), 'diary/listFriend');
    $options = array('title' => __('Recently Posted Diaries of %my_friend%', array('%my_friend%' => $op_term['my_friend']->pluralize()->titleize())), 'border' => true, 'moreInfo' => $moreInfo);
    op_include_list('friendDiaryList', $list, $options);
}
Ejemplo n.º 4
0
        echo image_tag_sf_image($diary->Member->getImageFilename(), array('size' => '76x76'));
        ?>
</a></td>
<th><?php 
        echo __('%Nickname%');
        ?>
</th><td><?php 
        echo $diary->Member->name;
        ?>
</td>
</tr><tr>
<th><?php 
        echo __('Title');
        ?>
</th><td><?php 
        echo op_diary_get_title_and_count($diary);
        echo op_diary_image_icon($diary);
        ?>
</td>
</tr><tr>
<th><?php 
        echo __('Body');
        ?>
</th><td><?php 
        echo op_truncate(op_decoration($diary->body, true), 36, '', 3);
        ?>
</td>
</tr><tr class="operation">
<th><?php 
        echo __('Created at');
        ?>
Ejemplo n.º 5
0
use_helper('opDiary');
?>

<?php 
if ($pager->getNbResults()) {
    ?>

<center>
<?php 
    op_include_pager_total($pager);
    ?>
</center>
<?php 
    $list = array();
    foreach ($pager->getResults() as $diary) {
        $list[] = sprintf("%s<br>%s (%s)", op_format_date($diary->created_at, 'XDateTime'), link_to(op_diary_get_title_and_count($diary, false, 28), 'diary_show', $diary), $diary->Member->name);
    }
    $options = array('border' => true);
    op_include_list('diaryList', $list, $options);
    echo op_include_pager_navigation($pager, '@diary_list_friend?page=%d', array('is_total' => false));
    ?>

<?php 
} else {
    ?>

<?php 
    echo __('There are no diaries.');
    ?>

<?php 
Ejemplo n.º 6
0
<?php

use_helper('opDiary');
?>

<?php 
if (count($list)) {
    $result = array();
    foreach ($list as $diaryCommentUpdate) {
        $diary = $diaryCommentUpdate->Diary;
        $result[] = sprintf("[%s] %s<br>%s", op_format_date($diaryCommentUpdate->last_comment_time, 'XShortDate'), $diary->Member->name, link_to(op_diary_get_title_and_count($diary, false, 28), 'diary_show', $diary));
    }
    $moreInfo = array();
    $moreInfo[] = link_to(__('More'), '@diary_comment_history');
    $options = array('title' => __('Diary Comment History'), 'border' => true, 'moreInfo' => $moreInfo);
    op_include_list('diaryCommentHistory', $result, $options);
}
Ejemplo n.º 7
0
?>

<?php 
if ($pager->getNbResults()) {
    ?>

<center>
<?php 
    op_include_pager_total($pager);
    ?>
</center>
<?php 
    $list = array();
    foreach ($pager->getResults() as $diaryCommentUpdate) {
        $diary = $diaryCommentUpdate->Diary;
        $list[] = sprintf("%s<br>%s (%s)", op_format_date($diaryCommentUpdate->last_comment_time, 'XDateTime'), link_to(op_diary_get_title_and_count($diary, false, 28), 'diary_show', $diary), $diary->Member->name);
    }
    $options = array('border' => true);
    op_include_list('diaryList', $list, $options);
    op_include_pager_navigation($pager, '@diary_comment_history?page=%d', array('is_total' => false));
    ?>

<?php 
} else {
    ?>

<?php 
    echo __('There are no diaries.');
    ?>

<?php 
Ejemplo n.º 8
0
    if ($day->isLast()) {
        echo '</tr>';
    }
}
?>
</tbody></table>
</div>

<?php 
if (count($recentDiaryList)) {
    ?>
<div class="parts pageNav">
<div class="partsHeading"><h3><?php 
    echo __('Recently Posted Diaries');
    ?>
</h3></div>
<ul>
<?php 
    foreach ($recentDiaryList as $_diary) {
        ?>
<li><?php 
        echo link_to(op_diary_get_title_and_count($_diary), 'diary_show', $_diary);
        ?>
</li>
<?php 
    }
    ?>
</ul>
</div>
<?php 
}