Пример #1
0
printf('%03d', $comment->getNumber());
?>
]<?php 
echo op_format_date($comment->getCreatedAt(), 'MM/dd HH:mm');
if ($comment->isDeletable($sf_user->getMemberId())) {
    ?>
&nbsp;[<?php 
    echo link_to(__('Delete'), '@communityTopic_comment_delete_confirm?id=' . $comment->getId());
    ?>
]
<?php 
}
?>
<br>
<?php 
echo op_community_topic_link_to_member($comment->getMember());
?>
<br>
<?php 
echo op_auto_link_text_for_mobile(nl2br($comment->getBody()));
?>

<?php 
if (count($comment->getImages())) {
    ?>
<br>
<?php 
    foreach ($comment->getImages() as $image) {
        ?>
<br><?php 
        echo link_to(__('Image %number%', array('%number%' => $image->getNumber())), sf_image_path($image->File, array('size' => '240x320', 'f' => 'jpg')));
Пример #2
0
<dl>
<dt><?php 
echo nl2br(op_format_date($communityTopic->getCreatedAt(), 'XDateTimeJaBr'));
?>
</dt>
<dd>
<div class="title">
<p><?php 
echo $communityTopic->getName();
?>
</p>
</div>
<div class="name">
<p><?php 
if ($_member = $communityTopic->getMember()) {
    echo op_community_topic_link_to_member($_member);
}
?>
</p>
</div>
<div class="body">
<?php 
if (count($images = $communityTopic->getImages()) != 0) {
    ?>
<ul class="photo">
<?php 
    foreach ($images as $image) {
        ?>
<li><a href="<?php 
        echo sf_image_path($image->File);
        ?>
Пример #3
0
use_helper('Date', 'opCommunityTopic');
?>

<?php 
$body = '';
$images = $communityEvent->getImages();
if (count($images)) {
    $body .= '<ul class="photo">';
    foreach ($images as $image) {
        $body .= '<li><a href="' . sf_image_path($image->File) . '" target="_blank">' . image_tag_sf_image($image->File, array('size' => '120x120')) . '</a></li>';
    }
    $body .= '</ul>';
}
$body .= nl2br($communityEvent->getBody());
$list = array('Writer' => op_community_topic_link_to_member($communityEvent->getMember()), 'Name' => $communityEvent->getName(), 'Open date' => op_format_date($communityEvent->getOpenDate(), 'D') . ($communityEvent->getOpenDate() ? ' ' . $communityEvent->getOpenDateComment() : ''), 'Area' => op_url_cmd($communityEvent->getArea()), 'Body' => op_url_cmd($body), 'Application deadline' => op_format_date($communityEvent->getApplicationDeadline(), 'D'), 'Capacity' => $communityEvent->getCapacity(), 'Count of Member' => $communityEvent->getCommunityEventMember()->count());
if ($list['Count of Member']) {
    $list['Count of Member'] .= '(' . link_to(__('See Member List'), '@communityEvent_memberList?id=' . $communityEvent->getId()) . ')';
}
$i18nlist = array();
foreach ($list as $key => $value) {
    $i18nlist[__($key, array(), 'community_event_form')] = $value;
}
$options = array('title' => '[' . $community->getName() . '] ' . __('Event'), 'list' => $i18nlist);
op_include_parts('listBox', 'communityEvent', $options);
?>


<?php 
if ($communityEvent->isEditable($sf_user->getMemberId())) {
    ?>
Пример #4
0
<?php

use_helper('opCommunityTopic');
op_mobile_page_title($community->getName(), $communityEvent->getName());
?>

<?php 
echo op_within_page_link();
$list = array('Writer' => op_community_topic_link_to_member($communityEvent->getMember()), 'Open date' => op_format_date($communityEvent->getOpenDate(), 'D') . ($communityEvent->getOpenDate() ? ' ' . $communityEvent->getOpenDateComment() : ''), 'Area' => op_auto_link_text_for_mobile($communityEvent->getArea()), 'Capacity' => $communityEvent->getCapacity() ? $communityEvent->getCapacity() : __('Limitless'), 'Count of Member' => __('%1% persons', array('%1%' => $communityEvent->countCommunityEventMembers())));
if ($communityEvent->countCommunityEventMembers()) {
    $list['Count of Member'] .= '<br>' . link_to(__('See Member List'), '@communityEvent_memberList?id=' . $communityEvent->getId());
}
if ($communityEvent->getApplicationDeadline()) {
    $list['Application deadline'] = op_format_date($communityEvent->getApplicationDeadline(), 'D');
}
$image_html = '';
if (count($communityEvent->getImages())) {
    $image_html .= '<br>';
    foreach ($communityEvent->getImages() as $image) {
        $image_html .= '<br>' . link_to(__('Image %number%', array('%number%' => $image->getNumber())), sf_image_path($image->File, array('size' => '240x320', 'f' => 'jpg')));
    }
}
$list['Body'] = op_auto_link_text_for_mobile(nl2br($communityEvent->getBody())) . $image_html . '<br>' . op_format_date($communityEvent->getCreatedAt(), 'MM/dd HH:mm');
if ($communityEvent->isEditable($sf_user->getMemberId())) {
    $list[__('Edit this event')] = link_to(__('See event edit form'), '@communityEvent_edit?id=' . $communityEvent->getId());
}
foreach ($list as $key => $value) {
    echo '<br>' . __($key, array(), 'community_event_form') . ':<br>' . $value . '<br>';
}
?>