diff options
Diffstat (limited to 'views/default/event_calendar')
36 files changed, 0 insertions, 1633 deletions
diff --git a/views/default/event_calendar/agenda_footer.php b/views/default/event_calendar/agenda_footer.php deleted file mode 100644 index 8749ebe08..000000000 --- a/views/default/event_calendar/agenda_footer.php +++ /dev/null @@ -1,5 +0,0 @@ -<?php - -echo '</tbody></table></div>'; - -?>
\ No newline at end of file diff --git a/views/default/event_calendar/agenda_header.php b/views/default/event_calendar/agenda_header.php deleted file mode 100644 index 712dbed8d..000000000 --- a/views/default/event_calendar/agenda_header.php +++ /dev/null @@ -1,12 +0,0 @@ -<?php - -$header .= '<div class="event_calendar_agenda_date_section">'; -$header .= '<div class="event_calendar_agenda_date">'.$vars['date'].'</div>'; -$header .= '<table><thead><tr>'; -$header .= '<th class="agenda_header">'.elgg_echo('event_calendar:agenda:column:time').'</th>'; -$header .= '<th class="agenda_header">'.elgg_echo('event_calendar:agenda:column:session').'</th>'; -$header .= '<th class="agenda_header">'.elgg_echo('event_calendar:agenda:column:venue').'</th>'; -$header .= '</td></thead><tbody>'; - -echo $header; -?>
\ No newline at end of file diff --git a/views/default/event_calendar/agenda_item_view.php b/views/default/event_calendar/agenda_item_view.php deleted file mode 100644 index 807982665..000000000 --- a/views/default/event_calendar/agenda_item_view.php +++ /dev/null @@ -1,26 +0,0 @@ -<?php -$event = $vars['event']; -$times = $vars['times']; -$time_bit = ''; -if ($times != 'no') { - if (is_numeric($event->start_time)) { - $time_bit = event_calendar_convert_time($event->start_time); - } - if (is_numeric($event->end_time)) { - $time_bit .= " - ".event_calendar_convert_time($event->end_time); - } - $time_bit .= ' '; -} -$info = '<tr>'; -$info .= '<td class="event_calendar_agenda_time">'.$time_bit.'</td>'; -$info .= '<td class="event_calendar_agenda_title"><a href="'.$event->getUrl().'">'.$event->title.'</a></td>'; -$info .= '<td class="event_calendar_agenda_venue">'.$event->venue.'</td>'; -$info .= '</tr>'; -if (trim($event->description)) { - $info .= '<tr class="event_calendar_agenda_description">'; - $info .= '<td class="event_calendar_agenda_time"> </td>'; - $info .= '<td colspan="2">'.$event->description.'</td></tr>'; -} - -echo $info; -?>
\ No newline at end of file diff --git a/views/default/event_calendar/agenda_view.php b/views/default/event_calendar/agenda_view.php deleted file mode 100644 index 05cdb6461..000000000 --- a/views/default/event_calendar/agenda_view.php +++ /dev/null @@ -1,34 +0,0 @@ -<?php -$nav = elgg_view('navigation/pagination',array( - -// 'baseurl' => $_SERVER['REQUEST_URI'], - 'baseurl' => $_SERVER['SCRIPT_NAME'].'/?'.$_SERVER['QUERY_STRING'], - 'offset' => $vars['offset'], - 'count' => $vars['count'], - 'limit' => $vars['limit'], - - )); -$event_calendar_times = elgg_get_plugin_setting('times', 'event_calendar'); -$events = $vars['events']; -$html = ''; -$date_format = 'j M Y'; -$current_date = ''; -if ($events) { - foreach($events as $event) { - $date = date($date_format,$event->start_date); - if ($date != $current_date) { - if ($html) { - $html .= elgg_view('event_calendar/agenda_footer'); - } - $html .= elgg_view('event_calendar/agenda_header',array('date'=>$date)); - - $current_date = $date; - } - $html .= elgg_view('event_calendar/agenda_item_view',array('event'=>$event,'times'=>$event_calendar_times)); - } - $html .= elgg_view('event_calendar/agenda_footer'); -} -$html = $nav.'<div class="event_calendar_agenda">'.$html.'</div>'.$nav; - -echo $html; -?>
\ No newline at end of file diff --git a/views/default/event_calendar/calendar.php b/views/default/event_calendar/calendar.php deleted file mode 100644 index ea12ff603..000000000 --- a/views/default/event_calendar/calendar.php +++ /dev/null @@ -1,70 +0,0 @@ -<?php -if ($vars['mode']) { - $mode = $vars['mode']; -} else { - $mode = 'month'; -} - -# event_calendar/list/<start_date>/<display_mode>/<filter_context>/<region> -if ($vars['group_guid']) { - $link_bit = $vars['url']."event_calendar/group/{$vars['group_guid']}/{$vars['original_start_date']}/%s"; -} else { - $link_bit = $vars['url']."event_calendar/list/{$vars['original_start_date']}/%s/{$vars['filter']}"; -} - -#$link_bit = "event_calendar/show_events.php?start_date='.$vars['original_start_date'].'&group_guid='.$vars['group_guid'].'&filter='.$vars['filter'].'&mode='; - -$range_bit = ''; -$first_date = $vars['first_date']; -if ($first_date) { - $range_bit .= 'minDate: $.datepicker.parseDate("yy-mm-dd", "'.$first_date.'"),'."\n"; -} -$last_date = $vars['last_date']; -if ($last_date) { - $range_bit .= 'maxDate: $.datepicker.parseDate("yy-mm-dd", "'.$last_date.'"),'."\n"; -} -if ($first_date || $last_date) { - if (substr($first_date,0,7) == substr($last_date,0,7)) { - $range_bit .= "changeMonth: false,\n"; - } - - if (substr($first_date,0,4) == substr($last_date,0,4)) { - $range_bit .= "changeYear: false,\n"; - } -} - -$body .= elgg_view("input/datepicker_inline", - array( - 'name' => 'my_datepicker', - 'mode' => $vars['mode']?$vars['mode']:'month', - 'start_date' => $vars['start_date'], - 'end_date' => $vars['end_date'], - 'group_guid' => $vars['group_guid'], - 'range_bit' => $range_bit, - ) -); - -$body .= '<div id="calendarmenucontainer">'; -$body .= '<ul id="calendarmenu">'; -if ($mode == 'day') { - $link_class = ' class="sys_selected"'; -} else { - $link_class = ''; -} -$body .= '<li'.$link_class.'><a href="'.sprintf($link_bit,'day').'">'.elgg_echo('event_calendar:day_label').'</a></li>'; -if ($mode == 'week') { - $link_class = ' class="sys_selected"'; -} else { - $link_class = ''; -} -$body .= '<li'.$link_class.'><a href="'.sprintf($link_bit,'week').'">'.elgg_echo('event_calendar:week_label').'</a></li>'; -if ($mode == 'month') { - $link_class = ' class="sys_selected sys_calmenu_last"'; -} else { - $link_class = ' class="sys_calmenu_last"'; -} -$body .= '<li'.$link_class.'><a href="'.sprintf($link_bit,'month').'">'.elgg_echo('event_calendar:month_label').'</a></li>'; -$body .= '</ul>'; -$body .= '</div>'; -echo $body; -?>
\ No newline at end of file diff --git a/views/default/event_calendar/calendar_toggle.php b/views/default/event_calendar/calendar_toggle.php deleted file mode 100644 index 30de15cf2..000000000 --- a/views/default/event_calendar/calendar_toggle.php +++ /dev/null @@ -1,18 +0,0 @@ -<?php -$event = $vars['event_calendar_event']; -$user = $vars['entity']; -$container = get_entity($event->container_guid); -if (event_calendar_has_personal_event($event->guid, $user->guid)) { - $label = elgg_echo('event_calendar:remove_from_the_calendar_button'); -} else { - $label = elgg_echo('event_calendar:add_to_the_calendar'); -} - -if ($container->canEdit()) { - $button = elgg_view('input/button',array( - 'id'=>'event_calendar_user_data_'.$event->guid.'_'.$user->guid, - 'class' => "event-calendar-personal-calendar-toggle", - 'value' => $label, - )); - echo '<div class="event-calendar-personal-calendar-toggle-wrapper">'.$button.'<div>'; -} diff --git a/views/default/event_calendar/conference_button.php b/views/default/event_calendar/conference_button.php deleted file mode 100644 index 79fa9c5a2..000000000 --- a/views/default/event_calendar/conference_button.php +++ /dev/null @@ -1,33 +0,0 @@ -<?php -// A non-admin / non-event-creator only sees the button if they have the event on his/her personal calendar -// and it is at most 15 minutes before the conference starts. - -// The button is removed for everyone (even admins) one day after the event end time. - -$event = $vars['event']; - -if ($event) { - elgg_load_library('elgg:event_calendar'); - $user_guid = elgg_get_logged_in_user_guid(); - $termination_time = strtotime("1 day",$event->real_end_time); - if ($termination_time < time()) { - $in_time_window = FALSE; - } else if ($event->canEdit()) { - $in_time_window = TRUE; - } else if (event_calendar_has_personal_event($event->guid, $user_guid) && (strtotime('-15 minutes',$event->start_date) <= time())) { - $in_time_window = TRUE; - } else { - $in_time_window = FALSE; - } - if ( $in_time_window ) { - $button = elgg_view('output/url', array( - 'href' => 'action/event_calendar/join_conference?event_guid='.$event->guid, - 'text' => elgg_echo('event_calendar:join_conf_button'), - 'class' => 'elgg-button elgg-button-action', - 'target' => '_blank', - 'is_action' => TRUE, - )); - - echo '<div class="event-calendar-conf-join-button">'.$button.'</div>'; - } -} diff --git a/views/default/event_calendar/container.php b/views/default/event_calendar/container.php deleted file mode 100644 index cb5c8620c..000000000 --- a/views/default/event_calendar/container.php +++ /dev/null @@ -1,28 +0,0 @@ -<?php -elgg_load_library('elgg:event_calendar'); -$site_calendar = elgg_get_plugin_setting('site_calendar', 'event_calendar'); -$group_calendar = elgg_get_plugin_setting('group_calendar', 'event_calendar'); -$admin = elgg_is_admin_logged_in(); -$containers = array(); -if (($site_calendar != 'no') && ($admin || !$site_calendar || ($site_calendar == 'loggedin'))) { - $containers[0] = elgg_echo('event_calendar:site_calendar'); -} -$user = elgg_get_logged_in_user_entity(); -$groups = $user->getGroups('',0,0); -foreach ($groups as $group) { - if (event_calendar_activated_for_group($group)) { - if ($admin || !$group_calendar || $group_calendar == 'members') { - if ($group->canWriteToContainer($user->guid)) { - $containers[$group->guid] = $group->name; - } - } else if ($group->canEdit()) { - $containers[$group->guid] = $group->name; - } - } -} -if ($vars['container_guid']) { - $value = $vars['container_guid']; -} else { - $value = 0; -} -echo elgg_view('input/dropdown',array('name'=>'group_guid', 'value'=>$vars['container_guid'],'options_values'=>$containers)); diff --git a/views/default/event_calendar/css.php b/views/default/event_calendar/css.php deleted file mode 100644 index 00cfd6cbb..000000000 --- a/views/default/event_calendar/css.php +++ /dev/null @@ -1,264 +0,0 @@ -<?php -//$background_colour = '#EBF1EB'; -//$highlight_colour = '#478787'; - -$background_colour = '#F5F5F5'; -$highlight_colour = '#3874B7'; -?> - -#calendarmenucontainer { - position:relative; - left: 25px; -} - -ul#calendarmenu li { - float: left; - border-top: 1px solid #969696; - border-left: 1px solid #969696; - border-bottom: 1px solid #969696; - background-color: <?php echo $background_colour; ?>; -} - - -ul#calendarmenu li.sys_calmenu_last { - border-right: 1px solid #969696; -} - -ul#calendarmenu li a { - text-decoration: none; - padding: 4px 12px; - float: left; -} - -ul#calendarmenu li a:hover, ul#calendarmenu li.sys_selected a{ - text-decoration: none; - padding: 4px 12px; - float: left; - color: #FFFFFF; - background: <?php echo $highlight_colour; ?>; -} - -.event-calendar-ical { - width: 200px; -} - -td.ui-datepicker-unselectable { - background-color: #FFFFFF !important; - color: #888888 !important; -} - -#my_datepicker .week-highlight a { - text-decoration: none; - color: #FFFFFF; - background: <?php echo $highlight_colour; ?>; -} - -.river_object_event_calendar_create { - background: url(<?php echo $vars['url']; ?>mod/event_calendar/images/river_icon_event.gif) no-repeat left -1px; -} -.river_object_event_calendar_update { - background: url(<?php echo $vars['url']; ?>mod/event_calendar/images/river_icon_event.gif) no-repeat left -1px; -} -#event_list { - width:510px; - margin:0; - float:left; - padding:5px 0 0 0; -} -#event_list .search_listing { - border:2px solid #cccccc; - margin:0 0 5px 0; -} - -.events { - min-height: 300px; -} - -div.event_calendar_agenda_date_section { - margin-bottom: 10px; -} - -.event_calendar_agenda_date { - font-size: 1.3em; - font-weight: bold; - margin-bottom: 3px; -} - -th.agenda_header { - font-weight: bold; -} - -td.event_calendar_agenda_time { - width: 120px; -} - -.event_calendar_agenda_title a { - font-weight: bold; -} - -td.event_calendar_agenda_title { - width: 180px; -} - -.event_calendar_agenda_venue { - margin-bottom: 5px; -} - -.event_calendar_paged_month { - font-size: 1.3em; - font-weight: bold; - margin-bottom: 5px; - text-transform:uppercase; -} - -td.event_calendar_paged_date { - width: 80px; -} -td.event_calendar_paged_time { - width: 60px; -} -td.event_calendar_paged_title { - width: 280px; -} - -td.event_calendar_paged_calendar { - padding-left: 30px; -} - -table.event_calendar_paged_table { - width:100%; - border-collapse:collapse; - border-bottom-width:1px; - border-bottom-style:solid; - border-bottom-color:#bfbfbf; - margin-bottom: 5px; -} - -table.event_calendar_paged_table td { - border-width:1px 0 0 0; - border-style:solid; - border-color:#bfbfbf; -} - -table.event_calendar_paged_table th { - font-family:verdana, helvetica, arial, sans-serif; - font-size:9pt; - color:#183e76; - background-color:#ececec; - font-weight:bold; - text-transform:none; - padding:3px 3px 3px 3px; -} - -.event_calendar_strapline { - font-size: 85%; -} - -.event-calendar-personal-calendar-toggle-wrapper { - width: 100%; - margin-bottom: 30px; -} - -.event-calendar-personal-calendar-toggle { - float: right; -} - -li.event-calendar-filter-menu-show-only { - border:0; - padding-top:.4em; - background:#fff; - margin:0 -.3em 0 1.5em; -} - -.event-calendar-compressed-date { - width: 150px !important; - margin-right: 10px; -} - -fieldset > legend { - font-weight: bold; - font-size: 1.2em; - line-height: 1.1em; - padding-bottom: 5px; -} -.event-calendar-repeating-wrapper { - padding: 0; - margin-top: 5px; -} -.event-calendar-repeating-unselected { - font-size: 16px; - font-weight: bold; - color: #DDDDDD; - background-color: #AAAAAA; - border: 1px solid #444444; - padding: 5px; - width: 25px; - text-align: center; - display: inline-block; - margin: 0; -} - -.event-calendar-repeating-unselected:hover { - text-decoration: none; -} - -.event-calendar-repeating-selected { - font-size: 16px; - font-weight: bold; - color: #000000; - background-color: #FFFFFF; - border: 1px solid #000000; - padding: 5px; - width: 25px; - text-align: center; - display: inline-block; - margin: 0; -} - -.event-calendar-repeating-selected:hover { - text-decoration: none; - color: #CCCCCC; -} - -.event-calendar-edit-form-schedule-block ul.elgg-vertical li { - display: block !important; - clear: both; -} - -.event-calendar-edit-form-block ul.elgg-vertical li label { - font-weight: normal; - width: 500px; -} - -.event-calendar-edit-form-block h2 { - font-size: 18px; - color: #000000; -} - -.event-calendar-edit-date-wrapper { - clear: both; - margin-left: 20px; - display: none; -} - -.event-calendar-edit-reminder-wrapper { - margin-top: 10px; - display: none; -} - -.event-calendar-edit-form-membership-block, .event-calendar-edit-form-share-block { - display: none; -} - -.event-calendar-description { - display: none; -} - -.event-calendar-edit-bottom { - clear: both; - margin-bottom: 5px; -} - -.event-calendar-date-selected { - background-color: #DDDDFF; -} diff --git a/views/default/event_calendar/datetime_edit.php b/views/default/event_calendar/datetime_edit.php deleted file mode 100644 index 2e0830167..000000000 --- a/views/default/event_calendar/datetime_edit.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php -$event_calendar_times = elgg_get_plugin_setting('times', 'event_calendar'); -$event_calendar_hide_end = elgg_get_plugin_setting('hide_end', 'event_calendar'); -$prefix = $vars['prefix']; -$body = ''; - -if ($event_calendar_times != 'no') { - if ($event_calendar_hide_end != 'yes') { - $body .= '<p><label>'.elgg_echo('event_calendar:from_label').'</label>'; - } - $body .= elgg_view("input/date", array( - 'class'=>'event-calendar-compressed-date', - 'name' => 'start_date', - 'value'=>$vars['start_date'], - )); - $body .= '<span id="event-calendar-start-time-wrapper">'; - $body .= elgg_view("input/timepicker",array('name' => 'start_time','value'=>$vars['start_time'])); - $body .= '</span>'; - if ($event_calendar_hide_end != 'yes') { - $body .= '</p><p id="event-calendar-to-time-wrapper"><label>'.elgg_echo('event_calendar:to_label').'</label>'; - $body .= elgg_view("input/date", array( - 'class'=>'event-calendar-compressed-date', - 'name' => 'end_date', - 'value'=>$vars['end_date'], - )); - $body .= '<span id="event-calendar-end-time-wrapper">'; - $body .= elgg_view("input/timepicker",array('name' => 'end_time','value'=>$vars['end_time'])); - $body .= '</span>'; - } - $body .= '</p>'; -} else { - - $body .= '<p><label>'.elgg_echo("event_calendar:start_date_label").'<br />'; - $body .= elgg_view("event_calendar/input/date_local",array('timestamp'=>TRUE, 'autocomplete'=>'off','name' => 'start_date','value'=>$vars['start_date'])); - $body .= '</label></p>'; - $body .= '<p class="description">'.$prefix['start_date'].elgg_echo('event_calendar:start_date_description').'</p>'; - - if ($event_calendar_hide_end != 'yes') { - $body .= '<p id="event-calendar-to-time-wrapper"><label>'.elgg_echo("event_calendar:end_date_label").'<br />'; - $body .= elgg_view("event_calendar/input/date_local",array('timestamp'=>TRUE,'autocomplete'=>'off','name' => 'end_date','value'=>$vars['end_date'])); - $body .= '</label></p>'; - //$body .= '<p class="description">'.$prefix['end_date'].elgg_echo('event_calendar:end_date_description').'</p>'; - } -} - -echo $body;
\ No newline at end of file diff --git a/views/default/event_calendar/entities/entity_list.php b/views/default/event_calendar/entities/entity_list.php deleted file mode 100644 index 84c2c0b7d..000000000 --- a/views/default/event_calendar/entities/entity_list.php +++ /dev/null @@ -1,66 +0,0 @@ -<?php -/** - * View a list of entities - * - * @package Elgg - * @author Curverider Ltd <info@elgg.com> - * @link http://elgg.com/ - * - */ - -$context = $vars['context']; -$offset = $vars['offset']; -$entities = $vars['entities']; -$limit = $vars['limit']; -$count = $vars['count']; -$baseurl = $vars['baseurl']; -$context = $vars['context']; -$viewtype = $vars['viewtype']; -$pagination = $vars['pagination']; -$fullview = $vars['fullview']; - -$html = ""; -$nav = ""; - -if (isset($vars['viewtypetoggle'])) { - $viewtypetoggle = $vars['viewtypetoggle']; -} else { - $viewtypetoggle = true; -} - -if ($context == "search" && $count > 0 && $viewtypetoggle) { - $nav .= elgg_view('navigation/viewtype', array( - 'baseurl' => $baseurl, - 'offset' => $offset, - 'count' => $count, - 'viewtype' => $viewtype, - )); -} - -if ($pagination) { - $nav .= elgg_view('navigation/pagination',array( - 'baseurl' => $baseurl, - 'offset' => $offset, - 'count' => $count, - 'limit' => $limit, - )); -} - -$html .= $nav; -if ($viewtype == 'list') { - if (is_array($entities) && sizeof($entities) > 0) { - foreach($entities as $entity) { - $html .= elgg_view_entity($entity, $fullview); - } - } -} else { - if (is_array($entities) && sizeof($entities) > 0) { - $html .= elgg_view('event_calendar/entities/gallery', array('entities' => $entities)); - } -} - -if ($count) { - $html .= $nav; -} - -echo $html;
\ No newline at end of file diff --git a/views/default/event_calendar/entities/gallery.php b/views/default/event_calendar/entities/gallery.php deleted file mode 100644 index a12dfa84a..000000000 --- a/views/default/event_calendar/entities/gallery.php +++ /dev/null @@ -1,44 +0,0 @@ -<?php -/** - * Elgg gallery view - * - * @package Elgg - * @subpackage Core - * @author Curverider Ltd - * @link http://elgg.org/ - */ - -$entities = $vars['entities']; -if (is_array($entities) && sizeof($entities) > 0) { - -?> - -<table class="entity_gallery"> - -<?php - - $col = 0; - foreach($entities as $entity) { - if ($col == 0) { - - echo "<tr>"; - - } - echo "<td class=\"entity_gallery_item\">"; - echo elgg_view('event_calendar/entities/gallery_item',array('entity'=>$entity)); - echo "</td>"; - $col++; - if ($col > 3) { - echo "</tr>"; - $col = 0; - } - } - if ($col > 0) echo "</tr>"; - -?> - -</table> - -<?php - -}
\ No newline at end of file diff --git a/views/default/event_calendar/entities/gallery_item.php b/views/default/event_calendar/entities/gallery_item.php deleted file mode 100644 index 9fc1edeca..000000000 --- a/views/default/event_calendar/entities/gallery_item.php +++ /dev/null @@ -1,63 +0,0 @@ -<?php - - /** - * Elgg user display (gallery) - * - * @package ElggProfile - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Curverider Ltd <info@elgg.com> - * @copyright Curverider Ltd 2008-2010 - * @link http://elgg.com/ - * - * @uses $vars['entity'] The user entity - */ - -$icon = elgg_view( - "profile/icon", array( - 'entity' => $vars['entity'], - 'size' => 'medium', - ) - ); - -$banned = $vars['entity']->isBanned(); - -$rel = ""; -if (elgg_get_page_owner_guid() == $vars['entity']->guid) - $rel = 'me'; -else if (check_entity_relationship(elgg_get_page_owner_guid(), 'friend', $vars['entity']->guid)) - $rel = 'friend'; - -if (!$banned) - $info .= "<p><b><a href=\"" . $vars['entity']->getUrl() . "\" rel=\"$rel\">" . $vars['entity']->name . "</a></b></p>"; -else - $info .= "<p><b><strike>" . $vars['entity']->name . "</b></strike><br />".elgg_echo('profile:banned')."</p>"; - -// TODO: look into a way to pass $authorised and $event_id in $vars -$authorised = FALSE; -$event_id = get_input('event_id', 0); -if ($event_id) { - if(isadminloggedin()) { - $authorised = TRUE; - } else { - // load the event from the database - $event = get_entity($event_id); - $user_id = elgg_get_logged_in_user_guid(); - if ($event && ($event->owner_guid == $user_id)) { - $authorised = TRUE; - } - } -} - -if ($authorised) { - $link = '<p><a href="#" '; - $link .= 'onclick="javascript:event_calendar_personal_toggle('.$event_id.','.$vars['entity']->guid.'); return false;" '; - $link .= ' >'; - $link .= '<span id="event_calendar_user_data_'.$vars['entity']->guid.'">'.elgg_echo('event_calendar:remove_from_the_calendar').'</span>'; - $link .= '</a></p>'; - $info .= $link; -} - -// echo elgg_view_image_block($icon, $info); -echo elgg_view('search/gallery_listing',array('icon' => $icon, 'info' => $info)); - -?>
\ No newline at end of file diff --git a/views/default/event_calendar/filter_menu.php b/views/default/event_calendar/filter_menu.php deleted file mode 100644 index 1364902a8..000000000 --- a/views/default/event_calendar/filter_menu.php +++ /dev/null @@ -1,78 +0,0 @@ -<?php -// generate a list of filter tabs -$group_guid = $vars['group_guid']; -$filter_context = $vars['filter']; -if ($group_guid) { - $url_start = "event_calendar/group/{$group_guid}/{$vars['start_date']}/{$vars['mode']}"; -} else { - $url_start = "event_calendar/list/{$vars['start_date']}/{$vars['mode']}"; -} - -$tabs = array( - 'all' => array( - 'text' => elgg_echo('event_calendar:show_all'), - 'href' => "$url_start/all", - 'selected' => ($filter_context == 'all'), - 'priority' => 200, - ), -); - -if (elgg_is_logged_in()) { - $tabs ['mine'] = array( - 'text' => elgg_echo('event_calendar:show_mine'), - 'href' => "$url_start/mine", - 'selected' => ($filter_context == 'mine'), - 'priority' => 300, - ); - $tabs['friend'] = array( - 'text' => elgg_echo('event_calendar:show_friends'), - 'href' => "$url_start/friends", - 'selected' => ($filter_context == 'friends'), - 'priority' => 400, - ); -} - -$tab_rendered = array(); - -$event_calendar_spots_display = elgg_get_plugin_setting('spots_display', 'event_calendar'); -if ($event_calendar_spots_display == "yes") { - $tabs['open'] = array( - 'text' => elgg_echo('event_calendar:show_open'), - 'href' => "$url_start/open", - 'selected' => ($filter_context == 'open'), - 'priority' => 100, - ); -} else { - $tab_rendered['open'] = ''; -} - -foreach ($tabs as $name => $tab) { - if ($tab['selected']) { - $state_selected = ' class="elgg-state-selected"'; - } else { - $state_selected = ''; - } - $tab_rendered[$name] = '<li'.$state_selected.'><a href="'.elgg_normalize_url($tab['href']).'">'.$tab['text'].'</a></li>'; - - //elgg_register_menu_item('filter', $tab); -} - -//echo elgg_view_menu('filter', array('sort_by' => 'priority', 'class' => 'elgg-menu-hz')); - -$menu = <<<__MENU -<ul class="elgg-menu elgg-menu-filter elgg-menu-hz elgg-menu-filter-default"> - {$tab_rendered['open']} - {$tab_rendered['all']} - {$tab_rendered['mine']} - {$tab_rendered['friend']} -</ul> -__MENU; - -echo $menu; - -$event_calendar_region_display = elgg_get_plugin_setting('region_display', 'event_calendar'); -if ($event_calendar_region_display == 'yes') { - elgg_load_js("elgg.event_calendar"); - $url_start .= "/$filter_context"; - echo elgg_view('event_calendar/region_select',array('url_start'=>$url_start,'region'=>$vars['region'])); -}
\ No newline at end of file diff --git a/views/default/event_calendar/forms/add_to_group.php b/views/default/event_calendar/forms/add_to_group.php deleted file mode 100644 index 2c8fdec53..000000000 --- a/views/default/event_calendar/forms/add_to_group.php +++ /dev/null @@ -1,74 +0,0 @@ -<?php -// Game plan - display two drop downs: one with a list of groups -// without this event, one with - can add using one and remove using -// the other -// the user must have the authority to edit the groups - -$event_id = $vars['event']->guid; -$event_container = $vars['event']->container_guid; - -// get the list of all groups: - -if (elgg_is_admin_logged_in()) { - $groups = elgg_get_entities(array( - 'type' => 'group', - 'limit' => 5000, - )); -} else { - $groups = elgg_get_entities(array( - 'type' => 'group', - 'owner_guid' => elgg_get_logged_in_user_guid(), - 'limit' => 5000, - )); -} - -// split the group list into two lists - -$add_options = array(); -$remove_options = array(); -$remove_group = elgg_get_entities_from_relationship(array( - 'relationship' => 'display_on_group', - 'relationship_guid' => $event_id, - 'inverse_relationship' => FALSE, - 'limit' => 5000, -)); -$remove_group_ids = array(); -foreach ($remove_group as $group) { - $remove_group_ids[] = $group->guid; - if ($group->guid != $event_container && $group->canEdit()) { - $remove_options[$group->guid] = $group->name; - } -} - -if ($remove_group) { - foreach($groups as $group) { - if (($group->guid != $event_container) && !in_array($group->guid,$remove_group_ids)) { - $add_options[$group->guid] = $group->name; - } - } -} else { - foreach($groups as $group) { - if ($group->guid != $event_container && $group->canEdit()) { - $add_options[$group->guid] = $group->name; - } - } -} - -if ($add_options || $remove_options) { - echo '<div class="contentWrapper" >'; - $event_bit = elgg_view('input/hidden', array("name" => "event_id","value" => $event_id)); - if ($add_options) { - echo "<h4>".elgg_echo('event_calendar:add_to_group:add_group_title')."</h4>"; - $add_pulldown = elgg_view("input/dropdown",array("name" => "group_id","options_values" => $add_options)); - $submit_button = "<p>".elgg_view("input/submit",array("value"=>elgg_echo('event_calendar:add_to_group:add_group_button')))."</p>"; - echo elgg_view ('input/form',array("body" => $event_bit.$add_pulldown.$submit_button,"action" => $vars['url']."action/event_calendar/add_to_group")); - } - - if ($remove_options) { - echo "<h4>".elgg_echo('event_calendar:add_to_group:remove_group_title')."</h4>"; - $remove_pulldown = elgg_view("input/dropdown",array("name" => "group_id","options_values" => $remove_options)); - $submit_button = "<p>".elgg_view("input/submit",array("value"=>elgg_echo('event_calendar:add_to_group:remove_group_button')))."</p>"; - echo elgg_view ('input/form',array("body" => $event_bit.$remove_pulldown.$submit_button,"action" => $vars['url']."action/event_calendar/remove_from_group")); - } - echo '</div>'; -} diff --git a/views/default/event_calendar/full_calendar_view.php b/views/default/event_calendar/full_calendar_view.php deleted file mode 100644 index 1a58321b5..000000000 --- a/views/default/event_calendar/full_calendar_view.php +++ /dev/null @@ -1,200 +0,0 @@ -<?php -elgg_load_js('elgg.full_calendar'); - -$timeformat = elgg_get_plugin_setting('timeformat', 'event_calendar') == 24 ? 'H(:mm)' : 'h(:mm)t'; - -// TODO: is there an easy way to avoid embedding JS? -?> -<script> - -var goToDateFlag = 0; - -handleEventClick = function(event) { - if (event.url) { - window.location.href = event.url; - event.preventDefault(); - } -}; - -handleDayClick = function(date,allDay,jsEvent,view) { - var iso = getISODate(date); - var link = $('.elgg-menu-item-event-calendar-0add').find('a').attr('href'); - var ss = link.split('/'); - var link = $('.elgg-menu-item-event-calendar-0add').find('a').attr('href'); - var ss = link.split('/'); - var last_ss = ss[ss.length-1]; - var group_guid; - if (last_ss == 'add') { - group_guid = 0; - } else if (last_ss.split('-').length == 3) { - group_guid = ss[ss.length-2]; - } else { - group_guid = last_ss; - } - var url = elgg.get_site_url(); - $('.fc-widget-content').removeClass('event-calendar-date-selected'); - var current_iso = $('#event-calendar-selected-date').val(); - if (current_iso == iso) { - // deselect - $('#event-calendar-selected-date').val(""); - $('.elgg-menu-item-event-calendar-0add').find('a').attr('href',url+'event_calendar/add/'+group_guid); - $('.event-calendar-button-add').attr('href',url+'event_calendar/add/'+group_guid); - $('.elgg-menu-item-event-calendar-1schedule').find('a').attr('href',url+'event_calendar/schedule/'+group_guid); - } else { - $('#event-calendar-selected-date').val(iso); - $('.elgg-menu-item-event-calendar-0add').find('a').attr('href',url+'event_calendar/add/'+group_guid+'/'+iso); - $('.event-calendar-button-add').attr('href',url+'event_calendar/add/'+group_guid+'/'+iso); - $('.elgg-menu-item-event-calendar-1schedule').find('a').attr('href',url+'event_calendar/schedule/'+group_guid+'/'+iso); - - $(this).addClass('event-calendar-date-selected'); - } -} - -handleEventDrop = function(event,dayDelta,minuteDelta,allDay,revertFunc) { - - if (!event.is_event_poll && !confirm("<?php echo elgg_echo('event_calendar:are_you_sure'); ?>")) { - revertFunc(); - } else { - if (event.is_event_poll) { - if (confirm("<?php echo elgg_echo('event_calendar:resend_poll_invitation'); ?>")) { - var resend = 1; - } else { - resend = 0; - } - var data = {event_guid: event.guid, startTime: event.start.toISOString(), dayDelta: dayDelta, minuteDelta: minuteDelta, resend: resend, minutes: event.minutes, iso_date: event.iso_date}; - } else { - data = {event_guid: event.guid, startTime: event.start.toISOString(), dayDelta: dayDelta, minuteDelta: minuteDelta}; - } - elgg.action('event_calendar/modify_full_calendar', - { - data: data, - success: function (res) { - var success = res.success; - var msg = res.message; - if (!success) { - elgg.register_error(msg,2000); - revertFunc() - } else { - event.minutes = res.minutes; - event.iso_date = res.iso_date; - } - } - } - ); - } -}; - -getISODate = function(d) { - var year = d.getFullYear(); - var month = d.getMonth()+1; - month = month < 10 ? '0' + month : month; - var day = d.getDate(); - day = day < 10 ? '0' + day : day; - return year +"-"+month+"-"+day; -} - -handleEventRender = function(event, element, view) { - /*if (event.is_event_poll) { - element.draggable = false; - }*/ -} - -handleGetEvents = function(start, end, callback) { - var start_date = getISODate(start); - var end_date = getISODate(end); - var url = "event_calendar/get_fullcalendar_events/"+start_date+"/"+end_date+"/<?php echo $vars['filter']; ?>/<?php echo $vars['group_guid']; ?>"; - elgg.getJSON(url, {success: - function(events) { - callback(events); - } - }); - // reset date links and classes - //$('.fc-widget-content').removeClass('event-calendar-date-selected'); - var link = $('.elgg-menu-item-event-calendar-0add').find('a').attr('href'); - if (link != undefined) { - var ss = link.split('/'); - var last_ss = ss[ss.length-1]; - var group_guid; - if (last_ss == 'add') { - group_guid = 0; - } else if (last_ss.split('-').length == 3) { - group_guid = ss[ss.length-2]; - } else { - group_guid = last_ss; - } - var url = elgg.get_site_url(); - $('.elgg-menu-item-event-calendar-0add').find('a').attr('href',url+'event_calendar/add/'+group_guid); - $('.elgg-menu-item-event-calendar-1schedule').find('a').attr('href',url+'event_calendar/schedule/'+group_guid); - } -} - -handleViewDisplay = function(view) { - // TODO: finish this, need to highlight selected date if any - var current_iso = $('#event-calendar-selected-date').val(); - if (view == 'month') { - goToDateFlag = 0; - } else if (goToDateFlag == 0 && current_iso != "") { - goToDateFlag = 1; - var a = current_iso.split("-"); - $('#calendar').fullCalendar('gotoDate',parseInt(a[0],10),parseInt(a[1],10)-1,parseInt(a[2],10)); - //$('.fc-widget-content').removeClass('event-calendar-date-selected'); - //$(".fc-widget-content[data-date='"+ciso+"']").addClass('event-calendar-date-selected'); - } - - //$(".fc-widget-content[data-date='20120105']") -} - -fullcalendarInit = function() { - - var loadFullCalendar = function() { - var locale = $.datepicker.regional[elgg.get_language()]; - if (!locale) { - locale = $.datepicker.regional['']; - } - $('#calendar').fullCalendar({ - header: { - left: 'prev,next today', - center: 'title', - right: 'month,agendaWeek,agendaDay' - }, - month: <?php echo date('n',strtotime($vars['start_date']))-1; ?>, - ignoreTimezone: true, - editable: true, - slotMinutes: 15, - eventRender: handleEventRender, - eventDrop: handleEventDrop, - eventClick: handleEventClick, - dayClick: handleDayClick, - events: handleGetEvents, - viewDisplay: handleViewDisplay, - - isRTL: locale.isRTL, - firstDay: locale.firstDay, - monthNames: locale.monthNames, - monthNamesShort: locale.monthNamesShort, - dayNames: locale.dayNames, - dayNamesShort: locale.dayNamesShort, - buttonText: { - today: locale.currentText, - month: elgg.echo('event_calendar:month_label'), - week: elgg.echo('event_calendar:week_label'), - day: elgg.echo('event_calendar:day_label') - }, - timeFormat: "<?php echo $timeformat; ?>", - }); - } - - elgg.get({ - url: elgg.config.wwwroot + 'vendors/jquery/i18n/jquery.ui.datepicker-'+ elgg.get_language() +'.js', - dataType: "script", - cache: true, - success: loadFullCalendar, - error: loadFullCalendar, // english language is already loaded. - }); -} - -elgg.register_hook_handler('init', 'system', fullcalendarInit); - -</script> -<div id='calendar'></div> -<input type="hidden" id="event-calendar-selected-date" /> diff --git a/views/default/event_calendar/group_module.php b/views/default/event_calendar/group_module.php deleted file mode 100644 index b1c1567e7..000000000 --- a/views/default/event_calendar/group_module.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php -/** - * Group event calendar module - */ - -$group = elgg_get_page_owner_entity(); - -if ($group->event_calendar_enable == "no") { - return true; -} - -elgg_push_context('widgets'); -$content = elgg_view('event_calendar/groupprofile_calendar'); -elgg_pop_context(); - -if (!$content) { - if (elgg_get_plugin_setting('group_always_display', 'event_calendar') == 'yes') { - $content = elgg_echo('event_calendar:no_events_found'); - } -} - -if ($content) { - $all_link = elgg_view('output/url', array( - 'href' => "event_calendar/group/$group->guid", - 'text' => elgg_echo('link:view:all'), - )); - $new_link = elgg_view('output/url', array( - 'href' => "event_calendar/add/$group->guid", - 'text' => elgg_echo('event_calendar:new'), - )); - echo elgg_view('groups/profile/module', array( - 'title' => elgg_echo('event_calendar:group'), - 'content' => $content, - 'all_link' => $all_link, - 'add_link' => $new_link, - )); -} diff --git a/views/default/event_calendar/groupprofile_calendar.php b/views/default/event_calendar/groupprofile_calendar.php deleted file mode 100644 index c71780be8..000000000 --- a/views/default/event_calendar/groupprofile_calendar.php +++ /dev/null @@ -1,33 +0,0 @@ -<?php - -/** - * Elgg event_calendar group profile content - * - * @package event_calendar - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Kevin Jardine <kevin@radagast.biz> - * @copyright Radagast Solutions 2008 - * @link http://radagast.biz/ - * - */ - -elgg_load_library('elgg:event_calendar'); - -$page_owner_entity = elgg_get_page_owner_entity(); - -if (event_calendar_activated_for_group($page_owner_entity)) { - $num = 5; - // Get the upcoming events - $start_date = time(); // now - $end_date = $start_date + 60*60*24*365*2; // maximum is two years from now - $events = event_calendar_get_events_between($start_date,$end_date,false,$num,0,elgg_get_page_owner_guid()); - - // If there are any events to view, view them - if (is_array($events) && sizeof($events) > 0) { - - foreach($events as $event) { - echo elgg_view("object/event_calendar",array('entity' => $event['event'])); - } - - } -} diff --git a/views/default/event_calendar/groupprofile_calendar_deprecated.php b/views/default/event_calendar/groupprofile_calendar_deprecated.php deleted file mode 100644 index 0d7d5101f..000000000 --- a/views/default/event_calendar/groupprofile_calendar_deprecated.php +++ /dev/null @@ -1,44 +0,0 @@ -<?php - -/** - * Elgg event_calendar group profile content - * - * @package event_calendar - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Kevin Jardine <kevin@radagast.biz> - * @copyright Radagast Solutions 2008 - * @link http://radagast.biz/ - * - */ - -elgg_load_library('elgg:event_calendar'); - -$page_owner_entity = elgg_get_page_owner_entity(); - -if (event_calendar_activated_for_group($page_owner_entity)) { - $num = 5; - // Get the upcoming events - $start_date = time(); // now - $end_date = $start_date + 60*60*24*365*2; // maximum is two years from now - $events = event_calendar_get_events_between($start_date,$end_date,false,$num,0,elgg_get_page_owner_guid()); - - // If there are any events to view, view them - if (is_array($events) && sizeof($events) > 0) { - - echo '<div id="group_pages_widget">'; - echo '<h2>'.elgg_echo("event_calendar:groupprofile").'</h2>'; - foreach($events as $event) { - echo elgg_view("object/event_calendar",array('entity' => $event)); - } - echo '<div class="forum_latest"><a href="'.$vars['url'].'pg/event_calendar/group/'.elgg_get_page_owner_guid().'">'.elgg_echo('event_calendar:view_calendar').'</a></div>'; - echo "</div>"; - - } else if (elgg_get_plugin_setting('group_always_display', 'event_calendar') == 'yes') { - echo '<div id="group_pages_widget">'; - echo '<h2>'.elgg_echo("event_calendar:groupprofile").'</h2>'; - echo '<div class="forum_latest">'.elgg_echo('event_calendar:no_events_found').'</div>'; - echo "</div>"; - } -} - -?>
\ No newline at end of file diff --git a/views/default/event_calendar/input/date_local.php b/views/default/event_calendar/input/date_local.php deleted file mode 100644 index a0ce7f4d3..000000000 --- a/views/default/event_calendar/input/date_local.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php -/** - * Elgg date input - * Displays a text field with a popup date picker. - * - * The elgg.ui JavaScript library initializes the jQueryUI datepicker based - * on the CSS class .elgg-input-date. It uses the ISO 8601 standard for date - * representation: yyyy-mm-dd. - * - * Unix timestamps are supported by setting the 'timestamp' parameter to true. - * The date is still displayed to the user in a text format but is submitted as - * a unix timestamp in seconds. - * - * @uses $vars['value'] The current value, if any (as a unix timestamp) - * @uses $vars['class'] Additional CSS class - * @uses $vars['timestamp'] Store as a Unix timestamp in seconds. Default = false - * Note: you cannot use an id with the timestamp option. - */ - -//@todo popup_calendar deprecated in 1.8. Remove in 2.0 -if (isset($vars['class'])) { - $vars['class'] = "elgg-input-date popup_calendar {$vars['class']}"; -} else { - $vars['class'] = "elgg-input-date popup_calendar"; -} - -$defaults = array( - 'value' => '', - 'disabled' => false, - 'timestamp' => false, -); - -$vars = array_merge($defaults, $vars); - -$timestamp = $vars['timestamp']; -unset($vars['timestamp']); - -if ($timestamp) { - echo elgg_view('input/hidden', array( - 'name' => $vars['name'], - 'value' => $vars['value'], - )); - - $vars['class'] = "{$vars['class']} elgg-input-timestamp"; - $vars['id'] = $vars['name']; - unset($vars['name']); -} - -// convert timestamps to text for display -if (is_numeric($vars['value'])) { - $vars['value'] = date('Y-m-d', $vars['value']); -} - -$attributes = elgg_format_attributes($vars); -echo "<input type=\"text\" $attributes />"; diff --git a/views/default/event_calendar/metatags.php b/views/default/event_calendar/metatags.php deleted file mode 100644 index 8375ef118..000000000 --- a/views/default/event_calendar/metatags.php +++ /dev/null @@ -1,2 +0,0 @@ -<link rel="stylesheet" href="<?php echo $vars['url']; ?>mod/event_calendar/datepicker.css" type="text/css" media="screen" title="Flora (Default)"> -<script type="text/javascript" src="<?php echo $vars['url']; ?>mod/event_calendar/ui.datepicker.js"></script> diff --git a/views/default/event_calendar/nav.php b/views/default/event_calendar/nav.php deleted file mode 100644 index 746a46151..000000000 --- a/views/default/event_calendar/nav.php +++ /dev/null @@ -1,38 +0,0 @@ -<?php -$allselect = ''; $friendsselect = ''; $mineselect = ''; -switch($vars['filter']) { - case 'all': $allselect = 'class="selected"'; - break; - case 'friends': $friendsselect = 'class="selected"'; - break; - case 'mine': $mineselect = 'class="selected"'; - break; - case 'open': $openselect = 'class="selected"'; - break; -} - -$url_start = $vars['url'].'mod/event_calendar/show_events.php?group_guid='.$vars['group_guid'].'&mode='.$vars['mod'].'&start_date='.$vars['start_date']; - -?> -<div id="elgg_horizontal_tabbed_nav"> - <ul> -<?php -$event_calendar_spots_display = elgg_get_plugin_setting('spots_display', 'event_calendar'); -if ($event_calendar_spots_display == "yes") { -?> - <li <?php echo $openselect; ?> ><a onclick="javascript:$('#event_list').load('<?php echo $url_start; ?>&filter=open&callback=true'); return false;" href="<?php echo $url_start; ?>&filter=open&callback=true"><?php echo elgg_echo('event_calendar:open'); ?></a></li> -<?php -} -?> - <li <?php echo $allselect; ?> ><a onclick="javascript:$('#event_list').load('<?php echo $url_start; ?>&filter=all&callback=true'); return false;" href="<?php echo $url_start; ?>&filter=all&callback=true"><?php echo elgg_echo('all'); ?></a></li> - <li <?php echo $friendsselect; ?> ><a onclick="javascript:$('#event_list').load('<?php echo $url_start; ?>&filter=friends&callback=true'); return false;" href="<?php echo $url_start; ?>&filter=friends&callback=true"><?php echo elgg_echo('friends'); ?></a></li> - <li <?php echo $mineselect; ?> ><a onclick="javascript:$('#event_list').load('<?php echo $url_start; ?>&filter=mine&callback=true'); return false;" href="<?php echo $url_start; ?>&filter=mine&callback=true"><?php echo elgg_echo('event_calendar:mine'); ?></a></li> - </ul> -</div> -<?php -$event_calendar_region_display = elgg_get_plugin_setting('region_display', 'event_calendar'); -if ($event_calendar_region_display == 'yes') { - $url_start .= '&filter='.$vars['filter']; - echo elgg_view('event_calendar/region_select',array('url_start'=>$url_start,'region'=>$vars['region'])); -} -?>
\ No newline at end of file diff --git a/views/default/event_calendar/paged_footer.php b/views/default/event_calendar/paged_footer.php deleted file mode 100644 index 954769104..000000000 --- a/views/default/event_calendar/paged_footer.php +++ /dev/null @@ -1,4 +0,0 @@ -<?php -echo '</tbody></table></div>'; -?> - diff --git a/views/default/event_calendar/paged_header.php b/views/default/event_calendar/paged_header.php deleted file mode 100644 index 5f4b8e59c..000000000 --- a/views/default/event_calendar/paged_header.php +++ /dev/null @@ -1,15 +0,0 @@ -<?php -$header .= '<div class="event_calendar_paged_header_section">'; -$header .= '<div class="event_calendar_paged_month">'.$vars['date'].'</div>'; -$header .= '<table class="event_calendar_paged_table"><thead><tr>'; -$header .= '<th class="paged_header">'.elgg_echo('event_calendar:paged:column:date').'</th>'; -$header .= '<th class="paged_header">'.elgg_echo('event_calendar:paged:column:time').'</th>'; -$header .= '<th class="paged_header">'.elgg_echo('event_calendar:paged:column:event').'</th>'; -$header .= '<th class="paged_header">'.elgg_echo('event_calendar:paged:column:venue').'</th>'; -if ($vars['personal_manage'] != 'no') { - $header .= '<th class="paged_header">'.elgg_echo('event_calendar:paged:column:calendar').'</th>'; -} -$header .= '</td></thead><tbody>'; - -echo $header; -?>
\ No newline at end of file diff --git a/views/default/event_calendar/paged_item_view.php b/views/default/event_calendar/paged_item_view.php deleted file mode 100644 index f2092bafc..000000000 --- a/views/default/event_calendar/paged_item_view.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php -$event = $vars['event']; -$time_bit = ''; -if (is_numeric($event->start_time)) { - $time_bit = event_calendar_convert_time($event->start_time); -} - -$date_bit = event_calendar_get_formatted_date($event->start_date); - -if (event_calendar_has_personal_event($event->guid,elgg_get_logged_in_user_guid())) { - $calendar_bit = 'checked = "checked"'; -} else { - $calendar_bit = ''; -} - -$info = '<tr>'; -$info .= '<td class="event_calendar_paged_date">'.$date_bit.'</td>'; -$info .= '<td class="event_calendar_paged_time">'.$time_bit.'</td>'; -$info .= '<td class="event_calendar_paged_title"><a href="'.$event->getUrl().'">'.$event->title.'</a></td>'; -$info .= '<td class="event_calendar_paged_venue">'.$event->venue.'</td>'; -if ($vars['personal_manage'] != 'no') { - $info .= '<td class="event_calendar_paged_calendar"><input class="event_calendar_paged_checkbox" id="event_calendar_paged_checkbox_'.$event->guid.'" '.$calendar_bit.' type="checkbox" /></td>'; -} -$info .= '</tr>'; - -echo $info; -?>
\ No newline at end of file diff --git a/views/default/event_calendar/paged_view.php b/views/default/event_calendar/paged_view.php deleted file mode 100644 index f8257792f..000000000 --- a/views/default/event_calendar/paged_view.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php -elgg_load_js('elgg.event_calendar'); -$nav = elgg_view('navigation/pagination',array( - -// 'baseurl' => $_SERVER['REQUEST_URI'], - 'baseurl' => $_SERVER['SCRIPT_NAME'].'/?'.$_SERVER['QUERY_STRING'], - 'offset' => $vars['offset'], - 'count' => $vars['count'], - 'limit' => $vars['limit'], - - )); -$event_calendar_times = elgg_get_plugin_setting('times', 'event_calendar'); -$event_calendar_personal_manage = elgg_get_plugin_setting('personal_manage', 'event_calendar'); -$events = $vars['events']; -$html = ''; -$date_format = 'F Y'; -$current_month = ''; -if ($events) { - foreach($events as $event) { - $month = date($date_format,$event->start_date); - if ($month != $current_month) { - if ($html) { - $html .= elgg_view('event_calendar/paged_footer'); - } - $html .= elgg_view('event_calendar/paged_header',array('date'=>$month,'personal_manage'=>$event_calendar_personal_manage)); - - $current_month = $month; - } - $html .= elgg_view('event_calendar/paged_item_view',array('event'=>$event,'times'=>$event_calendar_times,'personal_manage'=>$event_calendar_personal_manage)); - } - $html .= elgg_view('event_calendar/paged_footer'); -} -$msgs = '<div id="event_calendar_paged_messages"></div>'; -$html = $msgs.$nav.'<div class="event_calendar_paged">'.$html.'</div>'.$nav; - -echo $html; diff --git a/views/default/event_calendar/personal_manage_section.php b/views/default/event_calendar/personal_manage_section.php deleted file mode 100644 index 9e03db0ab..000000000 --- a/views/default/event_calendar/personal_manage_section.php +++ /dev/null @@ -1,20 +0,0 @@ -<?php -$fd = $vars['form_data']; -$event_calendar_personal_manage = elgg_get_plugin_setting('personal_manage', 'event_calendar'); -$body = ''; - -if ($event_calendar_personal_manage == 'by_event') { - $personal_manage_options = array( - elgg_echo('event_calendar:personal_manage:by_event:open') => 'open', - elgg_echo('event_calendar:personal_manage:by_event:closed') => 'closed', - elgg_echo('event_calendar:personal_manage:by_event:private') => 'private', - ); - $body .= '<div class="event-calendar-edit-form-block event-calendar-edit-form-membership-block">'; - $body .= '<h2>'.elgg_echo('event_calendar:personal_manage:label').'</h2>'; - $body .= elgg_view("input/radio",array('name' => 'personal_manage','value'=>$fd['personal_manage'],'options'=>$personal_manage_options)); - //$body .= '<p class="event-calendar-description">'.$prefix['personal_manage'].elgg_echo('event_calendar:personal_manage:description').'</p>'; - $body .= '<br clear="both" />'; - $body .= '</div>'; -} - -echo $body; diff --git a/views/default/event_calendar/personal_toggle_js.php b/views/default/event_calendar/personal_toggle_js.php deleted file mode 100644 index c0611e45c..000000000 --- a/views/default/event_calendar/personal_toggle_js.php +++ /dev/null @@ -1,20 +0,0 @@ -<?php -// TODO: put the rest into a JS function - -$elgg_ts = time(); -$elgg_token = generate_action_token($elgg_ts); -$tokens = "&__elgg_ts=$elgg_ts&__elgg_token=$elgg_token"; -?> -<script type="text/javascript"> -function event_calendar_personal_toggle(event_id,user_id) { - - var link = "<?php echo $vars['url']; ?>action/event_calendar/toggle_personal_calendar?"; - link += "user_id="+user_id+"&event_id="+event_id+"&other=true"; - link += "<?php echo $tokens; ?>"; - $.get(link, - function (res) { - $('#event_calendar_user_data_'+user_id).html(res); - } - ); -} -</script>
\ No newline at end of file diff --git a/views/default/event_calendar/region_select.php b/views/default/event_calendar/region_select.php deleted file mode 100644 index a987171a2..000000000 --- a/views/default/event_calendar/region_select.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -$region_list = trim(elgg_get_plugin_setting('region_list', 'event_calendar')); -// make sure that we are using Unix line endings -$region_list = str_replace("\r\n","\n",$region_list); -$region_list = str_replace("\r","\n",$region_list); -if ($region_list) { - $body = ''; - $options_values = array('-' =>elgg_echo('event_calendar:all')); - foreach(explode("\n",$region_list) as $region_item) { - $region_item = trim($region_item); - $options_values[$region_item] = $region_item; - } - - $body .= elgg_echo('event_calendar:region_filter_by_label'); - $body .= elgg_view('input/hidden',array('id'=>'event-calendar-region-url-start','value'=>$vars['url_start'])); - $body .= elgg_view("input/dropdown",array('id' => 'event-calendar-region','value'=>$vars['region'],'options_values'=>$options_values)); - $body .= '<br />'; -} - -echo $body; diff --git a/views/default/event_calendar/reminder_section.php b/views/default/event_calendar/reminder_section.php deleted file mode 100644 index fffa6d065..000000000 --- a/views/default/event_calendar/reminder_section.php +++ /dev/null @@ -1,28 +0,0 @@ -<?php -$fd = $vars['form_data']; -$event_calendar_reminders = elgg_get_plugin_setting('reminders', 'event_calendar'); -$body = ''; -if ($event_calendar_reminders == 'yes') { - $body .= '<div class="event-calendar-edit-reminder-wrapper">'; - if ($fd['send_reminder']) { - $body .= elgg_view('input/checkbox',array('name'=>'send_reminder','checked' => 'checked','value'=>1)); - } else { - $body .= elgg_view('input/checkbox',array('name'=>'send_reminder','value'=>1)); - } - $body .= elgg_echo('elgg_calendar:send_reminder_label'). ' '; - $numbers = array(); - for ($i=1;$i<60;$i++) { - $numbers[$i] = $i; - } - $intervals = array( - 1 => elgg_echo('event_calendar:interval:minute'), - 60 => elgg_echo('event_calendar:interval:hour'), - 60*24 => elgg_echo('event_calendar:interval:day'), - ); - - $body .= elgg_view('input/dropdown',array('name'=>'reminder_number','options_values'=>$numbers,'value'=>$fd['reminder_number'])); - $body .= elgg_view('input/dropdown',array('name'=>'reminder_interval','options_values'=>$intervals,'value'=>$fd['reminder_interval'])); - $body .= elgg_echo('elgg_calendar:send_reminder_before'); - $body .= '</div>'; -} -echo $body; diff --git a/views/default/event_calendar/repeat_form_element.php b/views/default/event_calendar/repeat_form_element.php deleted file mode 100644 index 5de858caf..000000000 --- a/views/default/event_calendar/repeat_form_element.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php -$event = $vars['event']; -$fd = $vars['form_data']; -$days = array('monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday'); - -if ($fd['repeats'] == 'yes') { - echo elgg_view('input/checkbox',array('name'=>'repeats','value'=>'yes','checked'=>'checked')); -} else { - echo elgg_view('input/checkbox',array('name'=>'repeats','value'=>'yes')); -} -echo elgg_echo('event_calendar:repeat_interval_label').' '; -echo elgg_view('input/dropdown',array('name'=>'repeat_interval','value'=>$fd['repeat_interval'],'options_values'=>array('1'=>'1','2'=>'2','3'=>'3','4'=>'4','5'=>'5','6'=>'6','7'=>'7','8'=>'8'))); -echo ' '.elgg_echo('event_calendar:repeat_weeks'); -echo ' '.elgg_echo('event_calendar:on_these_days'); - -echo '<div class="event-calendar-repeating-wrapper">'; - -foreach($days as $day) { - $label = elgg_echo("event_calendar:day_abbrev:$day"); - echo <<<HTML -<a id="event-calendar-repeating-$day" href="javascript:void(0);" class="event-calendar-repeating-unselected"> - $label -</a> -HTML; - -} - -echo '</div>'; - -foreach($days as $day) { - echo elgg_view('input/hidden', array('name' => "event-calendar-repeating-$day-value", 'value' => $fd["event-calendar-repeating-$day-value"])); -}
\ No newline at end of file diff --git a/views/default/event_calendar/review_requests.php b/views/default/event_calendar/review_requests.php deleted file mode 100644 index 11916b4e3..000000000 --- a/views/default/event_calendar/review_requests.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php - -foreach($vars['requests'] as $request) { - if ($request instanceof ElggUser) { - $icon = elgg_view("profile/icon", array( - 'entity' => $request, - 'size' => 'small' - )); - $info = '<a href="' . $request->getURL() . '" >'.$request->name.'</a>'; - $info .= '<div style="margin-top: 5px;" ></div>'; - $info .= elgg_view('output/confirmlink', - array( - 'class' => "elgg-button elgg-button-delete", - 'href' => 'action/event_calendar/killrequest?user_guid='.$request->guid.'&event_guid=' . $vars['entity']->guid, - 'confirm' => elgg_echo('event_calendar:request:remove:check'), - 'text' => elgg_echo('event_calendar:review_requests:reject'), - 'title' => elgg_echo('event_calendar:review_requests:reject:title'), - )); - $info .= ' '; - $info .= elgg_view('output/url', array( - 'text' => elgg_echo('event_calendar:review_requests:accept'), - 'title' => elgg_echo('event_calendar:review_requests:accept:title'), - 'href' => "action/event_calendar/addtocalendar?user_guid={$request->guid}&event_guid={$vars['entity']->guid}", - 'class' => "elgg-button elgg-button-submit", - 'is_action' => TRUE, - )); - //$url = elgg_add_action_tokens_to_url("{$vars['url']}action/event_calendar/addtocalendar?user_guid={$request->guid}&event_guid={$vars['entity']->guid}"); - echo elgg_view_image_block($icon,$info); - } -} diff --git a/views/default/event_calendar/schedule_section.php b/views/default/event_calendar/schedule_section.php deleted file mode 100644 index 3a74dc789..000000000 --- a/views/default/event_calendar/schedule_section.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -$event = $vars['event']; -$fd = $vars['form_data']; -$event_calendar_repeated_events = elgg_get_plugin_setting('repeated_events', 'event_calendar'); - -$body = '<div class="event-calendar-edit-date-wrapper">'; -$body .= elgg_view('event_calendar/datetime_edit', - array( - 'start_date' => $fd['start_date'], - 'end_date' => $fd['end_date'], - 'start_time' => $fd['start_time'], - 'end_time' => $fd['end_time'], - 'prefix' => $vars['prefix'], -)); -if ($event_calendar_repeated_events == 'yes') { - $body .= elgg_view('event_calendar/repeat_form_element',$vars); -} - -$body .= elgg_view('event_calendar/reminder_section',$vars); -$body .= '</div>'; - -echo $body; diff --git a/views/default/event_calendar/share_section.php b/views/default/event_calendar/share_section.php deleted file mode 100644 index c4f6cf45f..000000000 --- a/views/default/event_calendar/share_section.php +++ /dev/null @@ -1,26 +0,0 @@ -<?php -$fd = $vars['form_data']; -$event_calendar_hide_access = elgg_get_plugin_setting('hide_access', 'event_calendar'); -$body = '<fieldset>'; -$body .= '<legend>'.elgg_echo('event_calendar:permissions:header').'</legend>'; -if($event_calendar_hide_access == 'yes') { - $event_calendar_default_access = elgg_get_plugin_setting('default_access', 'event_calendar'); - if($event_calendar_default_access) { - $body .= elgg_view("input/hidden",array('name' => 'access_id','value'=>$event_calendar_default_access)); - } else { - $body .= elgg_view("input/hidden",array('name' => 'access_id','value'=>ACCESS_DEFAULT)); - } -} else { - $body .= '<p><label>'.elgg_echo('event_calendar:read_access').'</label>'; - $body .= elgg_view("input/access",array('name' => 'access_id','value'=>$fd['access_id'])); - $body .= '</p>'; -} -if (elgg_plugin_exists('entity_admins')) { - $body .= elgg_echo('event_calendar:share_ownership:label'); - $body .= '<br />'; - $body .= elgg_echo('event_calendar:share_ownership:description'); - $body .= elgg_view('input/entity_admins_dropdown',array('entity'=>$vars['event'])); -} -$body .= '</fieldset>'; - -echo $body; diff --git a/views/default/event_calendar/show_events.php b/views/default/event_calendar/show_events.php deleted file mode 100644 index 3a484e756..000000000 --- a/views/default/event_calendar/show_events.php +++ /dev/null @@ -1,64 +0,0 @@ -<?php -/** - * Elgg show events view - * - * @package event_calendar - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Kevin Jardine <kevin@radagast.biz> - * @copyright Radagast Solutions 2008-12 - * @link http://radagast.biz/ - * - */ - -elgg_load_library('elgg:event_calendar'); - -$listing_format = $vars['listing_format']; - -if ($vars['events']) { - if ($listing_format == 'agenda') { - $vars['events'] = event_calendar_flatten_event_structure($vars['events']); - $event_list = elgg_view('event_calendar/agenda_view',$vars); - } else if ($listing_format == 'paged') { - $vars['events'] = event_calendar_flatten_event_structure($vars['events']); - $event_list = elgg_view('event_calendar/paged_view',$vars); - } else if ($listing_format == 'full') { - $event_list = elgg_view('event_calendar/full_calendar_view',$vars); - } else { - $vars['events'] = event_calendar_flatten_event_structure($vars['events']); - $options = array( - 'list_class' => 'elgg-list-entity', - 'full_view' => FALSE, - 'pagination' => TRUE, - 'list_type' => 'listing', - 'list_type_toggle' => FALSE, - 'offset' => $vars['offset'], - 'limit' => $vars['limit'], - ); - $event_list = elgg_view_entity_list($vars['events'], $options); - } -} else { - if ($listing_format == 'full') { - // show the empty calendar - $event_list = elgg_view('event_calendar/full_calendar_view',$vars); - } else { - $event_list = '<p>'.elgg_echo('event_calendar:no_events_found').'</p>'; - } -} -if ($listing_format == 'paged' || $listing_format == 'full') { - echo $event_list; -} else { -?> -<div style="width:100%"> -<div id="event_list" style="float:left;"> -<?php -echo $event_list; -?> -</div> -<div style="float:right;"> -<?php -echo elgg_view('event_calendar/calendar',$vars); -?> -</div> -</div> -<?php -} diff --git a/views/default/event_calendar/strapline.php b/views/default/event_calendar/strapline.php deleted file mode 100644 index edc60aa3e..000000000 --- a/views/default/event_calendar/strapline.php +++ /dev/null @@ -1,18 +0,0 @@ -<div class="contentWrapper"> -<span class="event_calendar_strapline"> -<?php - - $event = $vars['entity']; - - $time_updated = $event->time_created; - $owner_guid = $event->owner_guid; - $owner = get_entity($owner_guid); - - echo sprintf(elgg_echo('event_calendar:strapline'), - elgg_view_friendly_time($time_updated), - "<a href=\"" . $owner->getURL() . "\">" . $owner->name ."</a>" - ); - -?> -</span> -</div>
\ No newline at end of file |