Changeset 11174
- Timestamp:
- Mar 26, 2009, 11:45:28 AM (12 years ago)
- Location:
- OpenPNE3/plugins/opCommunityTopicPlugin/trunk/apps/mobile_frontend/modules/communityEvent
- Files:
-
- 12 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
OpenPNE3/plugins/opCommunityTopicPlugin/trunk/apps/mobile_frontend/modules/communityEvent/actions/actions.class.php
r11143 r11174 29 29 } 30 30 } 31 32 /** 33 * Executes list community. 34 * 35 * @param sfWebRequest $request 36 */ 37 public function executeListCommunity(sfWebRequest $request) 38 { 39 $this->size = 10; 40 41 return parent::executeListCommunity($request); 42 } 43 44 /** 45 * Executes recently event list. 46 * 47 * @param sfWebRequest $request 48 */ 49 public function executeRecentlyEventList(sfWebRequest $request) 50 { 51 $this->size = 10; 52 53 return parent::executeRecentlyEventList($request); 54 } 31 55 } -
OpenPNE3/plugins/opCommunityTopicPlugin/trunk/apps/mobile_frontend/modules/communityEvent/config/view.yml
r11155 r11174 1 all:2 stylesheets: [/opCommunityTopicPlugin/css/communityTopic] -
OpenPNE3/plugins/opCommunityTopicPlugin/trunk/apps/mobile_frontend/modules/communityEvent/templates/_communityEventList.php
r11143 r11174 1 1 <?php if ($community->isViewableCommunityTopic($sf_user->getMemberId())): ?> 2 <?php $sf_response->addStylesheet('/opCommunityTopicPlugin/css/communityTopic') ?> 3 <?php use_helper('Date'); ?> 4 <tr class="communityEvent"> 5 <th><?php echo __('Community Events') ?></th> 6 <td> 7 <?php if ($count = count($communityEvents)): ?> 8 <ul class="articleList"> 9 <?php foreach ($communityEvents as $key => $communityEvent): ?> 10 <li> 11 <span class="date"><?php echo op_format_date($communityEvent->getUpdatedAt(), 'XShortDateJa'); ?></span> 12 <?php echo link_to(sprintf('%s(%d)', op_truncate($communityEvent->getName(), 36), $communityEvent->countCommunityEventComments()), 'communityEvent_show', $communityEvent) ?> 13 </li> 14 <?php endforeach; ?> 15 </ul> 2 <?php use_helper('Date') ?> 3 <?php 4 $list = array(); 5 foreach ($communityEvents as $communityEvent) 6 { 7 $list[] = sprintf("[%s] %s", 8 op_format_date($communityEvent->getUpdatedAt(), 'XShortDate'), 9 link_to(sprintf("%s(%d)", 10 op_truncate($communityEvent->getName(), 28), 11 $communityEvent->countCommunityEventComments() 12 ), 'communityEvent_show', $communityEvent 13 )); 14 } 15 $moreInfo = array(); 16 if (count($communityEvents)) 17 { 18 $moreInfo[] = link_to(__('More'), 'communityEvent_list_community', $community); 19 } 20 if ($community->isCreatableCommunityTopic($sf_user->getMemberId())) 21 { 22 $moreInfo[] = link_to(__('Create a new event'), 'communityEvent_new', $community); 23 } 24 $option = array( 25 'title' => __('Community Events'), 26 'border' => true, 27 'moreInfo' => $moreInfo, 28 ); 29 op_include_list('communityEvent', $list, $option); 30 ?> 16 31 <?php endif; ?> 17 <div class="moreInfo">18 <ul class="moreInfo">19 <?php if($count): ?>20 <li><?php echo link_to(__('More'), 'communityEvent_list_community', $community); ?></li>21 <?php endif; ?>22 <?php if ($community->isCreatableCommunityTopic($sf_user->getMemberId())): ?>23 <li><?php echo link_to(__('Create a new event'), 'communityEvent_new', $community); ?></li>24 <?php endif; ?>25 </ul>26 </div>27 </tr>28 <?php endif; ?> -
OpenPNE3/plugins/opCommunityTopicPlugin/trunk/apps/mobile_frontend/modules/communityEvent/templates/_eventCommentListBox.php
r11143 r11174 1 1 <?php if (count($communityEvent)): ?> 2 <div id="homeRecentList_<?php echo $gadget->getId() ?>" class="dparts homeRecentList"><div class="parts"> 3 <div class="partsHeading"><h3><?php echo __('Recently Posted Community Events') ?></h3></div> 4 <div class="block"> 5 <ul class="articleList"> 6 <?php foreach ($communityEvent as $event): ?> 7 <li><span class="date"><?php echo op_format_date($event->getUpdatedAt(), 'XShortDateJa') ?></span> 8 <?php echo sprintf('%s (%s)', 9 link_to(sprintf('%s(%d)', 10 op_truncate($event->getName(), 36), 11 $event->countCommunityEventComments() 12 ), 'communityEvent_show', $event), 13 $event->getCommunity()->getName() 14 ) ?></li> 15 <?php endforeach; ?> 16 </ul> 17 <div class="moreInfo"> 18 <ul class="moreInfo"> 19 <li><?php echo link_to(__('More'), 'communityEvent_recently_event_list') ?></li> 20 </ul> 21 </div> 22 </div> 23 </div></div> 2 <?php 3 $list = array(); 4 foreach ($communityEvent as $event) 5 { 6 $list[] = sprintf("[%s] %s<br>%s", 7 op_format_date($event->getUpdatedAt(), 'XShortDate'), 8 $event->getCommunity()->getName(), 9 link_to(sprintf("%s(%d)", 10 op_truncate($event->getName(), 28), 11 $event->countCommunityEventComments() 12 ),'communityEvent_show', $event 13 ) 14 ); 15 } 16 $options = array( 17 'title' => __('Recently Posted Community Events'), 18 'border' => true, 19 'moreInfo' => array( 20 link_to(__('More'), 'communityEvent_recently_event_list') 21 ), 22 ); 23 op_include_list('communityList', $list, $options); 24 ?> 25 24 26 <?php endif; ?> -
OpenPNE3/plugins/opCommunityTopicPlugin/trunk/apps/mobile_frontend/modules/communityEvent/templates/deleteConfirmSuccess.php
r11143 r11174 4 4 'url' => url_for('communityEvent_delete', $communityEvent), 5 5 )) ?> 6 7 <?php use_helper('Javascript') ?>8 <?php op_include_line('backLink', link_to_function(__('Back to previous page'), 'history.back()')) ?> -
OpenPNE3/plugins/opCommunityTopicPlugin/trunk/apps/mobile_frontend/modules/communityEvent/templates/editSuccess.php
r11143 r11174 1 1 <?php 2 $options = array(); 3 $options['title'] = __('Edit the event'); 4 $options['url'] = url_for('communityEvent_update', $communityEvent); 2 $options = array( 3 'title' => __('Edit the event'), 4 'url' => url_for('communityEvent_update', $communityEvent), 5 'button' => __('Edit') 6 ); 5 7 op_include_form('formCommunityEvent', $form, $options); 6 8 ?> 7 9 8 10 <?php 9 op_include_parts('buttonBox', 'toDelete',array(10 'title' 11 $options = array( 12 'title' => __('Delete the event and comments'), 11 13 'button' => __('Delete'), 12 14 'url' => url_for('communityEvent_delete_confirm', $communityEvent), 13 'method' => 'get', 14 )); 15 'method' => 'get' 16 ); 17 op_include_parts('buttonBox', 'toDelete', $options); 15 18 ?> -
OpenPNE3/plugins/opCommunityTopicPlugin/trunk/apps/mobile_frontend/modules/communityEvent/templates/listCommunitySuccess.php
r11143 r11174 1 <?php use_helper('Date');?>1 <?php op_mobile_page_title($community->getName(), __('Event List')) ?> 2 2 3 <?php if ($community->isCreatableCommunityTopic($sf_user->getMemberId())): ?> 3 <?php if ($pager->getNbResults()): ?> 4 5 <center> 6 <?php echo pager_total($pager); ?> 7 </center> 4 8 <?php 5 op_include_parts('buttonBox', 'communityEventList', array( 6 'title' => __('Create a new event'), 7 'button' => __('Create'), 8 'url' => url_for('communityEvent_new', $community), 9 'method' => 'get', 10 )); 9 $list = array(); 10 foreach ($pager->getResults() as $event) 11 { 12 $list[] = sprintf("%s<br>%s", 13 op_format_date($event->getUpdatedAt(), 'XDateTime'), 14 link_to(sprintf("%s(%d)", 15 op_truncate($event->getName(), 28), 16 $event->countCommunityEventComments() 17 ), 'communityEvent_show', $event) 18 ); 19 } 20 $options = array( 21 'border' => true, 22 ); 23 op_include_list('communityEventList', $list, $options); 11 24 ?> 25 26 <?php if ($pager->haveToPaginate()): ?> 27 <?php op_include_pager_navigation($pager, 'communityEvent/listCommunity?id='.$community->getId().'&page=%d', array('is_total' => false)) ?> 12 28 <?php endif; ?> 13 29 14 <?php if ($pager->getNbResults()): ?> 15 <div class="dparts recentList"><div class="parts"> 16 <div class="partsHeading"> 17 <h3><?php echo __('List of events') ?></h3> 18 </div> 30 <?php else: ?> 19 31 20 <?php ob_start() ?> 21 <?php op_include_pager_navigation($pager, '@communityEvent_list_community?page=%d&id='.$community->getId()) ?> 22 <?php $pager_navi = ob_get_contents() ?> 23 <?php ob_end_flush() ?> 32 <?php echo __('There are no events') ?> 24 33 25 <?php foreach ($pager->getResults() as $event): ?> 26 <dl> 27 <dt><?php echo format_datetime($event->getUpdatedAt(), 'f') ?></dt> 28 <dd><?php echo link_to(sprintf($event->getName().'(%d)', $event->countCommunityEventComments()), 'communityEvent_show', $event) ?></dd> 29 </dl> 30 <?php endforeach; ?> 34 <?php endif; ?> 31 35 32 <?php echo $pager_navi ?> 33 34 </div> 35 </div> 36 <?php endif; ?> 36 <?php echo link_to(__('Community Top'), 'community/home?id='.$community->getId()) ?> -
OpenPNE3/plugins/opCommunityTopicPlugin/trunk/apps/mobile_frontend/modules/communityEvent/templates/memberListError.php
r11155 r11174 1 <?php op_include_box('noMembers', __('Nobody joins this event'), array('title' => __('Error'))) ?> 2 3 <?php use_helper('Javascript') ?> 4 <?php op_include_line('backLink', link_to_function(__('Back to previous page'), 'history.back()')) ?> 1 <?php op_mobile_page_title($community->getName(), __('Event Members')) ?> 2 <?php echo __('Nobody joins this event.') ?> -
OpenPNE3/plugins/opCommunityTopicPlugin/trunk/apps/mobile_frontend/modules/communityEvent/templates/memberListSuccess.php
r11155 r11174 1 <?php op_mobile_page_title($community->getName(), __('Event Members')) ?> 2 3 <center> 4 <?php op_include_pager_total($pager); ?> 5 </center> 6 1 7 <?php 2 $ options = array(3 'title' => __('Event Members'), 4 'list' => $pager->getResults(),5 'link_to' => 'member/profile?id=', 6 'pager' => $pager, 7 ' link_to_pager' => '@communityEvent_memberList?page=%d&id='.$community->getId(),8 $list = array(); 9 foreach ($pager->getResults() as $member) { 10 $list[] = link_to(sprintf('%s(%d)', $member->getName(), $member->countFriends()), 'member/profile?id='.$member->getId()); 11 } 12 $option = array( 13 'border' => true, 8 14 ); 9 op_include_ parts('photoTable', 'communityEventMembersList', $options)15 op_include_list('memberList', $list, $option); 10 16 ?> 17 18 <?php op_include_pager_navigation($pager, '@communityEvent_memberList?page=%d&id='.$community->getId(), array('is_total' => false)); ?> -
OpenPNE3/plugins/opCommunityTopicPlugin/trunk/apps/mobile_frontend/modules/communityEvent/templates/newSuccess.php
r11143 r11174 1 1 <?php 2 $options = array(); 3 $options['title'] = __('Create a new event'); 4 $options['url'] = url_for('communityEvent_create', $community); 5 op_include_form('formCommunityEvent', $form, $options); 6 ?> 2 op_include_form('formCommunityEvent', $form, array( 3 'title' => __('Create a new event'), 4 'url' => url_for('communityEvent_create', $community), 5 'button' => __('Create') 6 )); -
OpenPNE3/plugins/opCommunityTopicPlugin/trunk/apps/mobile_frontend/modules/communityEvent/templates/recentlyTopicListSuccess.php
r11143 r11174 1 <?php if ($pager->getNbResults()): ?> 1 2 <?php use_helper('Date') ?> 2 <?php if ($pager->getNbResults()): ?>3 <div class="dparts recentList"><div class="parts">4 <div class="partsHeading">5 <h3><?php echo __('Recently Posted Community Events') ?></h3>6 </div>7 3 8 <?php ob_start() ?> 9 <?php op_include_pager_navigation($pager, '@communityEvent_recently_event_list?page=%d') ?> 10 <?php $pager_navi = ob_get_contents() ?> 11 <?php ob_end_flush() ?> 4 <center> 5 <?php echo pager_total($pager) ?> 6 </center> 12 7 13 <?php foreach ($pager->getResults() as $event): ?> 14 <dl> 15 <dt><?php echo format_datetime($event->getUpdatedAt(), 'f') ?></dt> 16 <dd> 17 <?php echo sprintf('%s (%s)', 18 link_to(sprintf('%s(%d)', 19 $event->getName(), 20 $event->countCommunityEventComments() 21 ),'communityEvent_show', $event), 22 $event->getCommunity()->getName() 23 ) 24 ?></dd> 25 </dl> 26 <?php endforeach; ?> 8 <?php 9 $list = array(); 10 foreach ($pager->getResults() as $event) 11 { 12 $list[] = sprintf("%s<br>%s (%s)", 13 op_format_date($event->getUpdatedAt(), 'XDateTime'), 14 link_to(sprintf("%s(%d)", 15 op_truncate($event->getName(), 28), 16 $event->countCommunityEventComments() 17 ),'communityEvent_show', $event 18 ), 19 op_truncate($event->getCommunity()->getName(), 28) 20 ); 21 } 22 $options = array( 23 'title' => __('Recently Posted Community Events'), 24 'border' => true, 25 ); 26 op_include_list('communityList', $list, $options); 27 ?> 27 28 28 <?php echo $pager_navi ?> 29 <?php if ($pager->haveToPaginate()): ?> 30 <?php op_include_pager_navigation($pager, '@communityEvent_recently_event_list?page=%d', array('is_total' => false)) ?> 31 <?php endif; ?> 29 32 30 </div>31 </div>32 33 <?php endif; ?> -
OpenPNE3/plugins/opCommunityTopicPlugin/trunk/apps/mobile_frontend/modules/communityEvent/templates/showSuccess.php
r11155 r11174 1 <?php use_helper('Date');?>1 <?php op_mobile_page_title($community->getName(), $communityEvent->getName()) ?> 2 2 3 <?php echo op_within_page_link() ?> 4 <?php echo op_format_date($communityEvent->getEventUpdatedAt(), 'XDateTime') ?> 5 <?php if ($communityEvent->getMemberId() === $sf_user->getMemberId()): ?> 6 <?php endif; ?> 7 <?php if ($communityEvent->isEditable($sf_user->getMemberId())): ?> 8 [<?php echo link_to(__('Edit') ,'communityEvent_edit', $communityEvent) ?>] 9 <?php endif ?> 10 <br> 3 11 <?php 4 5 12 $list = array( 13 'Writer' => link_to($communityEvent->getMember()->getName(), 'member/profile?id='.$communityEvent->getMember()->getId()), 6 14 'Name' => $communityEvent->getName(), 7 15 'Open date' => op_format_date($communityEvent->getOpenDate(), 'D'), … … 18 26 } 19 27 20 $i18nlist = array();21 28 foreach ($list as $key => $value) 22 29 { 23 $i18nlist[__($key, array(), 'community_event_form')] = $value;30 echo '<font color="#999966">'.__($key, array(), 'community_event_form').':</font><br>'.$value.'<br>'; 24 31 } 25 26 $options = array(27 'title' => '['.$community->getName().'] '.__('Event'),28 'list' => $i18nlist,29 );30 op_include_parts('listBox', 'communityEvent', $options);31 32 ?> 32 33 34 <?php if ($communityEvent->isEditable($sf_user->getMemberId())): ?>35 <div class="operation">36 <form action="<?php echo url_for('@communityEvent_edit?id='.$communityEvent->getId()) ?>" method="get">37 <ul class="moreInfo button">38 <li><input class="input_submit" type="submit" value="<?php echo __('Edit') ?>" /></li>39 </ul>40 </form>41 </div>42 <?php endif; ?>43 33 44 34 <?php include_component('communityEventComment', 'list', array('communityEvent' => $communityEvent)) ?> 45 35 36 <?php echo op_within_page_link('') ?> 46 37 <?php if ($communityEvent->isCreatableCommunityEventComment($sf_user->getMemberId())): ?> 47 <form action="<?php echo url_for('@communityEvent_comment_create?id='.$communityEvent->getId()) ?>" method="post"> 48 <div class="parts form"> 49 <div class="partsHeading"> 50 <h3><?php echo __('Post a new event comment') ?></h3> 38 <hr> 39 <div id="formEventComment"> 40 <table width="100%"> 41 <tbody><tr><td bgcolor="#7ddadf"> 42 <font color="#000000"><?php echo __('Post a new event comment') ?></font><br> 43 </td></tr> 44 </tbody></table> 45 <table> 46 <form action="<?php echo url_for('communityEvent_comment_create', $communityEvent) ?>" method="post"> 47 <?php echo $form ?> 48 <?php if ($communityEvent->isEventMember($sf_user->getMemberId())): ?> 49 <input name="cancel" class="input_submit" type="submit" value="<?php echo __('Cancel') ?>" /> 50 <?php else: ?> 51 <input name="participate" class="input_submit" type="submit" value="<?php echo __('Participate in this event') ?>" /> 52 <?php endif; ?> 53 <input name="comment" class="input_submit" type="submit" value="<?php echo __('Add a comment only') ?>" /> 54 </form> 55 </table> 51 56 </div> 52 <table>53 <?php echo $form ?>54 </table>55 <div class="operation">56 <ul class="moreInfo button">57 <?php if ($communityEvent->isEventMember($sf_user->getMemberId())): ?>58 <li><input name="cancel" class="input_submit" type="submit" value="<?php echo __('Cancel') ?>" /></li>59 <?php else: ?>60 <li><input name="participate" class="input_submit" type="submit" value="<?php echo __('Participate in this event') ?>" /></li>61 57 <?php endif; ?> 62 <li><input name="comment" class="input_submit" type="submit" value="<?php echo __('Add a comment only') ?>" /></li> 63 </ul> 64 </div> 65 </div> 66 </form> 67 <?php endif; ?> 58 <hr> 68 59 69 <?php op_include_line('linkLine', link_to('['.$community->getName().'] '.__('Community Top Page'), 'community/home?id='.$community->getId())) ?> 60 <?php echo link_to(__('Event List'), 'communityEvent_list_community', $community) ?><br> 61 <?php echo link_to(__('Community Top'), 'community/home?id='.$community->getId()) ?>
Note: See TracChangeset
for help on using the changeset viewer.