aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
Diffstat (limited to 'views')
-rw-r--r--views/default/event_calendar/calendar_toggle.php20
-rw-r--r--views/default/event_calendar/css.php15
-rw-r--r--views/default/event_calendar/filter_menu.php1
-rw-r--r--views/default/event_calendar/group_module.php48
-rw-r--r--views/default/event_calendar/groupprofile_calendar.php11
-rw-r--r--views/default/event_calendar/groupprofile_calendar_deprecated.php44
-rw-r--r--views/default/event_calendar/paged_item_view.php6
-rw-r--r--views/default/event_calendar/paged_view.php21
-rw-r--r--views/default/event_calendar/region_select.php10
-rw-r--r--views/default/event_calendar/review_requests.php21
-rw-r--r--views/default/event_calendar/show_events.php28
-rw-r--r--views/default/js/event_calendar/event_calendar.php69
-rw-r--r--views/default/object/event_calendar.php3
-rw-r--r--views/default/river/object/event_calendar/create.php18
-rw-r--r--views/default/river/object/event_calendar/update.php12
-rw-r--r--views/default/settings/event_calendar/edit.php71
16 files changed, 267 insertions, 131 deletions
diff --git a/views/default/event_calendar/calendar_toggle.php b/views/default/event_calendar/calendar_toggle.php
new file mode 100644
index 000000000..7180dec75
--- /dev/null
+++ b/views/default/event_calendar/calendar_toggle.php
@@ -0,0 +1,20 @@
+<?php
+$event = $vars['event_calendar_event'];
+$user = $vars['entity'];
+$container = get_entity($event->container_guid);
+
+if ($container->canEdit()) {
+ $link = '<p class="event-calendar-personal-calendar-toggle"><a href="javascript:void(0);" ';
+ $link .= 'onclick="javascript:event_calendar_personal_toggle('.$event->guid.','.$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>';
+
+ $button = elgg_view('input/button',array(
+ 'id'=>'event_calendar_user_data_'.$event->guid.'_'.$user->guid,
+ 'class' => "event-calendar-personal-calendar-toggle",
+ 'value' => elgg_echo('event_calendar:remove_from_the_calendar_button'),
+ ));
+}
+
+echo '<div class="event-calendar-personal-calendar-toggle-wrapper">'.$button.'<div>';
diff --git a/views/default/event_calendar/css.php b/views/default/event_calendar/css.php
index 7e399c547..2059a3ea9 100644
--- a/views/default/event_calendar/css.php
+++ b/views/default/event_calendar/css.php
@@ -8,7 +8,7 @@ $highlight_colour = '#3874B7';
#calendarmenucontainer {
position:relative;
- left: 40px;
+ left: 25px;
}
ul#calendarmenu li {
@@ -117,6 +117,10 @@ 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;
@@ -144,4 +148,13 @@ table.event_calendar_paged_table th {
.event_calendar_strapline {
font-size: 85%;
+}
+
+.event-calendar-personal-calendar-toggle-wrapper {
+ width: 100%;
+ margin-bottom: 30px;
+}
+
+.event-calendar-personal-calendar-toggle {
+ float: right;
} \ No newline at end of file
diff --git a/views/default/event_calendar/filter_menu.php b/views/default/event_calendar/filter_menu.php
index 62d38939b..2d4805bd4 100644
--- a/views/default/event_calendar/filter_menu.php
+++ b/views/default/event_calendar/filter_menu.php
@@ -49,6 +49,7 @@ echo elgg_view_menu('filter', array('sort_by' => 'priority', 'class' => 'elgg-me
$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/group_module.php b/views/default/event_calendar/group_module.php
index 5fc644e8b..b1c1567e7 100644
--- a/views/default/event_calendar/group_module.php
+++ b/views/default/event_calendar/group_module.php
@@ -9,35 +9,29 @@ if ($group->event_calendar_enable == "no") {
return true;
}
-$all_link = elgg_view('output/url', array(
- 'href' => "event_calendar/group/$group->guid/all",
- 'text' => elgg_echo('link:view:all'),
-));
-
elgg_push_context('widgets');
-$options = array(
- 'type' => 'object',
- 'subtype' => 'event_calendar',
- 'container_guid' => elgg_get_page_owner_guid(),
- 'limit' => 6,
- 'full_view' => false,
- 'pagination' => false,
-);
-$content = elgg_list_entities($options);
+$content = elgg_view('event_calendar/groupprofile_calendar');
elgg_pop_context();
-if (!$content) {
- $content = '<p>' . elgg_echo('event_calendar:no_events_found') . '</p>';
+if (!$content) {
+ if (elgg_get_plugin_setting('group_always_display', 'event_calendar') == 'yes') {
+ $content = elgg_echo('event_calendar:no_events_found');
+ }
}
-$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,
-));
+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
index 826fafa67..7ee09104f 100644
--- a/views/default/event_calendar/groupprofile_calendar.php
+++ b/views/default/event_calendar/groupprofile_calendar.php
@@ -20,24 +20,15 @@ if (event_calendar_activated_for_group($page_owner_entity)) {
// 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,page_owner());
+ $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/'.page_owner().'">'.elgg_echo('event_calendar:view_calendar').'</a></div>';
- echo "</div>";
- } else if (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>";
}
}
diff --git a/views/default/event_calendar/groupprofile_calendar_deprecated.php b/views/default/event_calendar/groupprofile_calendar_deprecated.php
new file mode 100644
index 000000000..081a0eb2d
--- /dev/null
+++ b/views/default/event_calendar/groupprofile_calendar_deprecated.php
@@ -0,0 +1,44 @@
+<?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/'.page_owner().'">'.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/paged_item_view.php b/views/default/event_calendar/paged_item_view.php
index 77c8bed4e..f2092bafc 100644
--- a/views/default/event_calendar/paged_item_view.php
+++ b/views/default/event_calendar/paged_item_view.php
@@ -7,21 +7,19 @@ if (is_numeric($event->start_time)) {
$date_bit = event_calendar_get_formatted_date($event->start_date);
-if (event_calendar_has_personal_event($event->guid,get_loggedin_userid())) {
+if (event_calendar_has_personal_event($event->guid,elgg_get_logged_in_user_guid())) {
$calendar_bit = 'checked = "checked"';
} else {
$calendar_bit = '';
}
-$calendar_bit .= ' onclick="javascript:event_calendar_personal_toggle('.$event->guid.'); return true;" ';
-
$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 id="event_calendar_paged_checkbox_'.$event->guid.'" type="checkbox" '.$calendar_bit.' /></td>';
+ $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>';
diff --git a/views/default/event_calendar/paged_view.php b/views/default/event_calendar/paged_view.php
index 7c2ea2eaa..f8257792f 100644
--- a/views/default/event_calendar/paged_view.php
+++ b/views/default/event_calendar/paged_view.php
@@ -1,4 +1,5 @@
<?php
+elgg_load_js('elgg.event_calendar');
$nav = elgg_view('navigation/pagination',array(
// 'baseurl' => $_SERVER['REQUEST_URI'],
@@ -8,8 +9,8 @@ $nav = elgg_view('navigation/pagination',array(
'limit' => $vars['limit'],
));
-$event_calendar_times = get_plugin_setting('times', 'event_calendar');
-$event_calendar_personal_manage = get_plugin_setting('personal_manage', 'event_calendar');
+$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';
@@ -33,19 +34,3 @@ $msgs = '<div id="event_calendar_paged_messages"></div>';
$html = $msgs.$nav.'<div class="event_calendar_paged">'.$html.'</div>'.$nav;
echo $html;
-?>
-<script type="text/javascript">
-function event_calendar_personal_toggle(guid) {
- $.get("<?php echo $vars['url'].'action/event_calendar/toggle_personal_calendar?'.event_calendar_security_fields().'&event_id='; ?>"+guid,
- function (res) {
- var flag = res.substring(0,3);
- var msg = res.substring(3);
- $('#event_calendar_paged_messages').html(msg);
- if (flag == '@f@') {
- // action failed so toggle checkbox
- $("#event_calendar_paged_checkbox_"+guid).attr('checked',!$("#event_calendar_paged_checkbox_"+guid).attr('checked'));
- }
- }
- );
-}
-</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
index 81407b27d..a987171a2 100644
--- a/views/default/event_calendar/region_select.php
+++ b/views/default/event_calendar/region_select.php
@@ -1,6 +1,6 @@
<?php
-$region_list = trim(get_plugin_setting('region_list', 'event_calendar'));
+$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);
@@ -11,13 +11,11 @@ if ($region_list) {
$region_item = trim($region_item);
$options_values[$region_item] = $region_item;
}
- $js = "onchange=\"javascript:$('#event_list').load('".$vars['url_start']
- ."&amp;callback=true&region='+escape($('#region').val() ));\"";
- //$js = "onchange=\"javascript:$('#event_list').load('".$vars['url_start']."&amp;callback=true&region='+$('#region').val());\"";
+
$body .= elgg_echo('event_calendar:region_filter_by_label');
- $body .= elgg_view("input/pulldown",array('internalid' => 'region','js'=>$js,'value'=>$vars['region'],'options_values'=>$options_values));
+ $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;
-?> \ No newline at end of file
diff --git a/views/default/event_calendar/review_requests.php b/views/default/event_calendar/review_requests.php
index e1866a32b..11916b4e3 100644
--- a/views/default/event_calendar/review_requests.php
+++ b/views/default/event_calendar/review_requests.php
@@ -10,16 +10,21 @@ foreach($vars['requests'] as $request) {
$info .= '<div style="margin-top: 5px;" ></div>';
$info .= elgg_view('output/confirmlink',
array(
- 'class' => "cancel_button",
- 'href' => $vars['url'] . 'action/event_calendar/killrequest?user_guid='.$request->guid.'&event_id=' . $vars['entity']->guid,
+ '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('delete'),
+ 'text' => elgg_echo('event_calendar:review_requests:reject'),
+ 'title' => elgg_echo('event_calendar:review_requests:reject:title'),
));
$info .= '&nbsp;&nbsp;';
- $url = elgg_add_action_tokens_to_url("{$vars['url']}action/event_calendar/addtocalendar?user_guid={$request->guid}&event_id={$vars['entity']->guid}");
- $info .= '<a href="'.$url.'" class="add_topic_button">'.elgg_echo('accept').'</a>';
- echo elgg_view_listing($icon,$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/show_events.php b/views/default/event_calendar/show_events.php
index 580fb5a45..b51b1c05f 100644
--- a/views/default/event_calendar/show_events.php
+++ b/views/default/event_calendar/show_events.php
@@ -13,23 +13,21 @@
$listing_format = $vars['listing_format'];
if ($vars['events']) {
- if (elgg_get_plugin_setting('agenda_view', 'event_calendar') == 'yes') {
+ if ($listing_format == 'agenda') {
$event_list = elgg_view('event_calendar/agenda_view',$vars);
+ } else if ($listing_format == 'paged') {
+ $event_list = elgg_view('event_calendar/paged_view',$vars);
} else {
- if ($listing_format == 'paged') {
- $event_list = elgg_view('event_calendar/paged_view',$vars);
- } else {
- $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);
- }
+ $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 {
$event_list = '<p>'.elgg_echo('event_calendar:no_events_found').'</p>';
diff --git a/views/default/js/event_calendar/event_calendar.php b/views/default/js/event_calendar/event_calendar.php
new file mode 100644
index 000000000..f3f5b68c8
--- /dev/null
+++ b/views/default/js/event_calendar/event_calendar.php
@@ -0,0 +1,69 @@
+//<script type="text/javascript">
+elgg.provide('elgg.event_calendar');
+
+elgg.event_calendar.init = function () {
+ $('.event_calendar_paged_checkbox').click(elgg.event_calendar.handlePagedPersonalCalendarToggle);
+ $('.event-calendar-personal-calendar-toggle').click(elgg.event_calendar.handleDisplayPagePersonalCalendarToggle);
+ $('#event-calendar-region').change(elgg.event_calendar.handleRegionChange);
+}
+
+elgg.event_calendar.handleRegionChange = function(e) {
+ url = $('#event-calendar-region-url-start').val()+"/"+escape($('#event-calendar-region').val());
+ elgg.forward(url);
+}
+
+elgg.event_calendar.handlePagedPersonalCalendarToggle = function() {
+ guid = parseInt($(this).attr('id').substring('event_calendar_paged_checkbox_'.length));
+ elgg.event_calendar.togglePagedPersonalCalendar(guid);
+}
+elgg.event_calendar.togglePagedPersonalCalendar = function(guid) {
+ elgg.action('event_calendar/toggle_personal_calendar',
+ {
+ data: {event_guid: guid},
+ success: function (res) {
+ var success = res.success;
+ var msg = res.message;
+ if (success) {
+ elgg.system_message(msg,2000);
+ } else {
+ elgg.register_error(msg,2000);
+ }
+ //$('#event_calendar_paged_messages').html(msg);
+ if (!success) {
+ // action failed so toggle checkbox
+ $("#event_calendar_paged_checkbox_"+guid).attr('checked',!$("#event_calendar_paged_checkbox_"+guid).attr('checked'));
+ }
+ }
+ }
+ );
+}
+
+elgg.event_calendar.handleDisplayPagePersonalCalendarToggle = function() {
+ var guidBit = $(this).attr('id').substring('event_calendar_user_data_'.length);
+ var guids = guidBit.split('_');
+ var event_guid = parseInt(guids[0]);
+ var user_guid = parseInt(guids[1]);
+ elgg.event_calendar.toggleDisplayPagePersonalCalendar(event_guid,user_guid);
+}
+
+elgg.event_calendar.toggleDisplayPagePersonalCalendar = function(event_guid,user_guid) {
+ elgg.action('event_calendar/toggle_personal_calendar',
+ {
+ data: {event_guid: event_guid,user_guid: user_guid, other: 'yes'},
+ success: function (res) {
+ var success = res.success;
+ var msg = res.message;
+ if (success) {
+ var button_text = res.button_text;
+ $('#event_calendar_user_data_'+event_guid+'_'+user_guid).val(button_text);
+ //elgg.system_message(msg,2000);
+ } else {
+ elgg.register_error(msg,2000);
+ }
+ }
+ }
+ );
+}
+
+elgg.register_hook_handler('init', 'system', elgg.event_calendar.init);
+//</script> \ No newline at end of file
diff --git a/views/default/object/event_calendar.php b/views/default/object/event_calendar.php
index 43e7847dc..c3c18cc92 100644
--- a/views/default/object/event_calendar.php
+++ b/views/default/object/event_calendar.php
@@ -12,8 +12,9 @@
*/
$event = $vars['entity'];
+$full = elgg_extract('full_view', $vars, FALSE);
-if ($vars['full']) {
+if ($full) {
$body = elgg_view('event_calendar/strapline',$vars);
$event_items = event_calendar_get_formatted_full_items($event);
$body .= '<br />';
diff --git a/views/default/river/object/event_calendar/create.php b/views/default/river/object/event_calendar/create.php
index f144ca610..e74a8f891 100644
--- a/views/default/river/object/event_calendar/create.php
+++ b/views/default/river/object/event_calendar/create.php
@@ -1,12 +1,22 @@
<?php
- $performed_by = get_entity($vars['item']->subject_guid);
+ /*$performed_by = get_entity($vars['item']->subject_guid);
$object = get_entity($vars['item']->object_guid);
$url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
$string = sprintf(elgg_echo("event_calendar:river:created"),$url) . " ";
- $string .= elgg_echo("event_calendar:river:create")." <a href=\"" . $object->getURL() . "\">" . $object->title . "</a>";
+ $string .= elgg_echo("event_calendar:river:create")." <a href=\"" . $object->getURL() . "\">" . $object->title . "</a>";*/
-?>
+/**
+ * Event calendar river view.
+ */
-<?php echo $string; ?> \ No newline at end of file
+$object = $vars['item']->getObjectEntity();
+$excerpt = strip_tags($object->description);
+$vars['excerpt'] = elgg_get_excerpt($excerpt);
+
+echo elgg_view('page/components/image_block', array(
+ 'image' => '<img src="'.$vars['url'] . 'mod/event_calendar/images/event_icon.gif" />',
+ 'body' => elgg_view('river/elements/body', $vars),
+ 'class' => 'elgg-river-item',
+)); \ No newline at end of file
diff --git a/views/default/river/object/event_calendar/update.php b/views/default/river/object/event_calendar/update.php
index 5a5d376b1..f4526cd2a 100644
--- a/views/default/river/object/event_calendar/update.php
+++ b/views/default/river/object/event_calendar/update.php
@@ -1,12 +1,16 @@
<?php
- $performed_by = get_entity($vars['item']->subject_guid);
+ /*$performed_by = get_entity($vars['item']->subject_guid);
$object = get_entity($vars['item']->object_guid);
$url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
$string = sprintf(elgg_echo("event_calendar:river:updated"),$url) . " ";
- $string .= elgg_echo("event_calendar:river:the_event")." <a href=\"" . $object->getURL() . "\">" . $object->title . "</a>";
+ $string .= elgg_echo("event_calendar:river:the_event")." <a href=\"" . $object->getURL() . "\">" . $object->title . "</a>";*/
-?>
+$object = $vars['item']->getObjectEntity();
-<?php echo $string; ?> \ No newline at end of file
+echo elgg_view('page/components/image_block', array(
+ 'image' => '<img src="'.$vars['url'] . 'mod/event_calendar/images/event_icon.gif" />',
+ 'body' => elgg_view('river/elements/body', $vars),
+ 'class' => 'elgg-river-item',
+));
diff --git a/views/default/settings/event_calendar/edit.php b/views/default/settings/event_calendar/edit.php
index 429a85b26..51bd2c49f 100644
--- a/views/default/settings/event_calendar/edit.php
+++ b/views/default/settings/event_calendar/edit.php
@@ -10,12 +10,13 @@ $access_options = array( ACCESS_PRIVATE => elgg_echo("PRIVATE"),
// TODO - merge the agenda view into the list format options
$listing_options = array(elgg_echo('event_calendar:settings:paged')=>'paged',
+ elgg_echo('event_calendar:settings:agenda')=>'agenda',
elgg_echo('event_calendar:settings:month')=>'month',
);
$body = '';
-$event_calendar_hide_access = get_plugin_setting('hide_access', 'event_calendar');
+$event_calendar_hide_access = elgg_get_plugin_setting('hide_access', 'event_calendar');
if (!$event_calendar_hide_access) {
$event_calendar_hide_access = 'no';
}
@@ -26,7 +27,7 @@ $body .= elgg_view('input/radio',array('internalname'=>'params[hide_access]','va
$body .= '<br />';
-$event_calendar_default_access = get_plugin_setting('default_access', 'event_calendar');
+$event_calendar_default_access = elgg_get_plugin_setting('default_access', 'event_calendar');
if (!$event_calendar_default_access) {
$event_calendar_default_access = ACCESS_LOGGED_IN;
}
@@ -37,7 +38,7 @@ $body .= elgg_view('input/pulldown',array('internalname'=>'params[default_access
$body .= '<br /><br />';
-$event_calendar_hide_end = get_plugin_setting('hide_end', 'event_calendar');
+$event_calendar_hide_end = elgg_get_plugin_setting('hide_end', 'event_calendar');
if (!$event_calendar_hide_end) {
$event_calendar_hide_end = 'no';
}
@@ -48,7 +49,7 @@ $body .= elgg_view('input/radio',array('internalname'=>'params[hide_end]','value
$body .= '<br />';
-$event_calendar_listing_format = get_plugin_setting('listing_format', 'event_calendar');
+$event_calendar_listing_format = elgg_get_plugin_setting('listing_format', 'event_calendar');
if (!$event_calendar_listing_format) {
$event_calendar_listing_format = 'month';
}
@@ -59,7 +60,7 @@ $body .= elgg_view('input/radio',array('internalname'=>'params[listing_format]',
$body .= '<br />';
-$event_calendar_times = get_plugin_setting('times', 'event_calendar');
+$event_calendar_times = elgg_get_plugin_setting('times', 'event_calendar');
if (!$event_calendar_times) {
$event_calendar_times = 'no';
}
@@ -70,7 +71,7 @@ $body .= elgg_view('input/radio',array('internalname'=>'params[times]','value'=>
$body .= '<br />';
-$event_calendar_autopersonal = get_plugin_setting('autopersonal', 'event_calendar');
+$event_calendar_autopersonal = elgg_get_plugin_setting('autopersonal', 'event_calendar');
if (!$event_calendar_autopersonal) {
$event_calendar_autopersonal = 'yes';
}
@@ -81,7 +82,7 @@ $body .= elgg_view('input/radio',array('internalname'=>'params[autopersonal]','v
$body .= '<br />';
-$event_calendar_autogroup = get_plugin_setting('autogroup', 'event_calendar');
+$event_calendar_autogroup = elgg_get_plugin_setting('autogroup', 'event_calendar');
if (!$event_calendar_autogroup) {
$event_calendar_autogroup = 'no';
}
@@ -92,7 +93,7 @@ $body .= elgg_view('input/radio',array('internalname'=>'params[autogroup]','valu
$body .= '<br />';
-$event_calendar_add_to_group_calendar = get_plugin_setting('add_to_group_calendar', 'event_calendar');
+$event_calendar_add_to_group_calendar = elgg_get_plugin_setting('add_to_group_calendar', 'event_calendar');
if (!$event_calendar_add_to_group_calendar) {
$event_calendar_add_to_group_calendar = 'no';
}
@@ -103,7 +104,9 @@ $body .= elgg_view('input/radio',array('internalname'=>'params[add_to_group_cale
$body .= '<br />';
-$event_calendar_agenda_view = get_plugin_setting('agenda_view', 'event_calendar');
+// agenda view is now handled in the listing area
+
+/*$event_calendar_agenda_view = get_plugin_setting('agenda_view', 'event_calendar');
if (!$event_calendar_agenda_view) {
$event_calendar_agenda_view = 'no';
}
@@ -112,9 +115,9 @@ $body .= elgg_echo('event_calendar:settings:agenda_view:title');
$body .= '<br />';
$body .= elgg_view('input/radio',array('internalname'=>'params[agenda_view]','value'=>$event_calendar_agenda_view,'options'=>$yn_options));
-$body .= '<br />';
+$body .= '<br />';*/
-$event_calendar_venue_view = get_plugin_setting('venue_view', 'event_calendar');
+$event_calendar_venue_view = elgg_get_plugin_setting('venue_view', 'event_calendar');
if (!$event_calendar_venue_view) {
$event_calendar_venue_view = 'no';
}
@@ -130,7 +133,7 @@ $options = array(elgg_echo('event_calendar:settings:no')=>'no',
elgg_echo('event_calendar:settings:site_calendar:loggedin')=>'loggedin',
);
-$event_calendar_site_calendar = get_plugin_setting('site_calendar', 'event_calendar');
+$event_calendar_site_calendar = elgg_get_plugin_setting('site_calendar', 'event_calendar');
if (!$event_calendar_site_calendar) {
$event_calendar_site_calendar = 'admin';
}
@@ -145,7 +148,7 @@ $options = array(elgg_echo('event_calendar:settings:no')=>'no',
elgg_echo('event_calendar:settings:group_calendar:members')=>'members',
);
-$event_calendar_group_calendar = get_plugin_setting('group_calendar', 'event_calendar');
+$event_calendar_group_calendar = elgg_get_plugin_setting('group_calendar', 'event_calendar');
if (!$event_calendar_group_calendar) {
$event_calendar_group_calendar = 'members';
}
@@ -159,7 +162,7 @@ $options = array(elgg_echo('event_calendar:settings:group_default:yes')=>'yes',
elgg_echo('event_calendar:settings:group_default:no')=>'no',
);
-$event_calendar_group_default = get_plugin_setting('group_default', 'event_calendar');
+$event_calendar_group_default = elgg_get_plugin_setting('group_default', 'event_calendar');
if (!$event_calendar_group_default) {
$event_calendar_group_default = 'yes';
}
@@ -170,7 +173,7 @@ $body .= elgg_view('input/radio',array('internalname'=>'params[group_default]','
$body .= '<br />';
-$event_calendar_group_always_display = get_plugin_setting('group_always_display', 'event_calendar');
+$event_calendar_group_always_display = elgg_get_plugin_setting('group_always_display', 'event_calendar');
if (!$event_calendar_group_always_display) {
$event_calendar_group_always_display = 'no';
}
@@ -181,12 +184,14 @@ $body .= elgg_view('input/radio',array('internalname'=>'params[group_always_disp
$body .= '<br />';
-$options = array(elgg_echo('event_calendar:settings:group_profile_display_option:left')=>'left',
+// There does not seem to be a way to determine where the group calendar box will appear in Elgg 1.8
+
+/*$options = array(elgg_echo('event_calendar:settings:group_profile_display_option:left')=>'left',
elgg_echo('event_calendar:settings:group_profile_display_option:right')=>'right',
elgg_echo('event_calendar:settings:group_profile_display_option:none')=>'none',
);
-$event_calendar_group_profile_display = get_plugin_setting('group_profile_display', 'event_calendar');
+$event_calendar_group_profile_display = elgg_get_plugin_setting('group_profile_display', 'event_calendar');
if (!$event_calendar_group_profile_display) {
$event_calendar_group_profile_display = 'right';
}
@@ -194,9 +199,9 @@ if (!$event_calendar_group_profile_display) {
$body .= elgg_echo('event_calendar:settings:group_profile_display:title').'<br />';
$body .= elgg_view('input/radio',array('internalname'=>'params[group_profile_display]','value'=>$event_calendar_group_profile_display,'options'=>$options));
-$body .= '<br />';
+$body .= '<br />';*/
-$event_calendar_add_users = get_plugin_setting('add_users', 'event_calendar');
+$event_calendar_add_users = elgg_get_plugin_setting('add_users', 'event_calendar');
if (!$event_calendar_add_users) {
$event_calendar_add_users = 'no';
}
@@ -207,7 +212,7 @@ $body .= elgg_view('input/radio',array('internalname'=>'params[add_users]','valu
$body .= '<br />';
-$event_calendar_add_users_notify = get_plugin_setting('add_users_notify', 'event_calendar');
+$event_calendar_add_users_notify = elgg_get_plugin_setting('add_users_notify', 'event_calendar');
if (!$event_calendar_add_users_notify) {
$event_calendar_add_users_notify = 'no';
}
@@ -218,7 +223,7 @@ $body .= elgg_view('input/radio',array('internalname'=>'params[add_users_notify]
$body .= '<br />';
-$event_calendar_personal_manage = get_plugin_setting('personal_manage', 'event_calendar');
+$event_calendar_personal_manage = elgg_get_plugin_setting('personal_manage', 'event_calendar');
if (!$event_calendar_personal_manage) {
$event_calendar_personal_manage = 'yes';
}
@@ -229,7 +234,7 @@ $body .= elgg_view('input/radio',array('internalname'=>'params[personal_manage]'
$body .= '<br />';
-$event_calendar_spots_display = get_plugin_setting('spots_display', 'event_calendar');
+$event_calendar_spots_display = elgg_get_plugin_setting('spots_display', 'event_calendar');
if (!$event_calendar_spots_display) {
$event_calendar_spots_display = 'no';
}
@@ -240,7 +245,7 @@ $body .= elgg_view('input/radio',array('internalname'=>'params[spots_display]','
$body .= '<br />';
-$event_calendar_no_collisions = get_plugin_setting('no_collisions', 'event_calendar');
+$event_calendar_no_collisions = elgg_get_plugin_setting('no_collisions', 'event_calendar');
if (!$event_calendar_no_collisions) {
$event_calendar_no_collisions = 'no';
}
@@ -251,7 +256,7 @@ $body .= elgg_view('input/radio',array('internalname'=>'params[no_collisions]','
$body .= '<br />';
-$event_calendar_collision_length = get_plugin_setting('collision_length', 'event_calendar');
+$event_calendar_collision_length = elgg_get_plugin_setting('collision_length', 'event_calendar');
if (!$event_calendar_collision_length) {
$event_calendar_collision_length = '3600';
}
@@ -262,7 +267,7 @@ $body .= elgg_view('input/text',array('internalname'=>'params[collision_length]'
$body .= '<br /><br />';
-$event_calendar_region_display = get_plugin_setting('region_display', 'event_calendar');
+$event_calendar_region_display = elgg_get_plugin_setting('region_display', 'event_calendar');
if (!$event_calendar_region_display) {
$event_calendar_region_display = 'no';
}
@@ -273,7 +278,7 @@ $body .= elgg_view('input/radio',array('internalname'=>'params[region_display]',
$body .= '<br />';
-$event_calendar_region_list = get_plugin_setting('region_list', 'event_calendar');
+$event_calendar_region_list = elgg_get_plugin_setting('region_list', 'event_calendar');
if (!$event_calendar_region_list) {
$event_calendar_region_list = '';
}
@@ -284,7 +289,7 @@ $body .= elgg_view('event_calendar/input/longtext',array('internalname'=>'params
$body .= '<br />';
-$event_calendar_region_list_handles = get_plugin_setting('region_list_handles', 'event_calendar');
+$event_calendar_region_list_handles = elgg_get_plugin_setting('region_list_handles', 'event_calendar');
if (!$event_calendar_region_list_handles) {
$event_calendar_region_list_handles = 'no';
}
@@ -295,7 +300,7 @@ $body .= elgg_view('input/radio',array('internalname'=>'params[region_list_handl
$body .= '<br />';
-$event_calendar_type_display = get_plugin_setting('type_display', 'event_calendar');
+$event_calendar_type_display = elgg_get_plugin_setting('type_display', 'event_calendar');
if (!$event_calendar_type_display) {
$event_calendar_type_display = 'no';
}
@@ -306,7 +311,7 @@ $body .= elgg_view('input/radio',array('internalname'=>'params[type_display]','v
$body .= '<br />';
-$event_calendar_type_list = get_plugin_setting('type_list', 'event_calendar');
+$event_calendar_type_list = elgg_get_plugin_setting('type_list', 'event_calendar');
if (!$event_calendar_type_list) {
$event_calendar_type_list = '';
}
@@ -317,7 +322,7 @@ $body .= elgg_view('event_calendar/input/longtext',array('internalname'=>'params
$body .= '<br />';
-$event_calendar_type_list_handles = get_plugin_setting('type_list_handles', 'event_calendar');
+$event_calendar_type_list_handles = elgg_get_plugin_setting('type_list_handles', 'event_calendar');
if (!$event_calendar_type_list_handles) {
$event_calendar_type_list_handles = 'no';
}
@@ -328,7 +333,7 @@ $body .= elgg_view('input/radio',array('internalname'=>'params[type_list_handles
$body .= '<br />';
-$event_calendar_first_date = get_plugin_setting('first_date', 'event_calendar');
+$event_calendar_first_date = elgg_get_plugin_setting('first_date', 'event_calendar');
if (!$event_calendar_first_date) {
$event_calendar_first_date = '';
}
@@ -339,7 +344,7 @@ $body .= elgg_view('input/text',array('internalname'=>'params[first_date]','valu
$body .= '<br /><br />';
-$event_calendar_last_date = get_plugin_setting('last_date', 'event_calendar');
+$event_calendar_last_date = elgg_get_plugin_setting('last_date', 'event_calendar');
if (!$event_calendar_last_date) {
$event_calendar_last_date = '';
}
@@ -350,7 +355,7 @@ $body .= elgg_view('input/text',array('internalname'=>'params[last_date]','value
$body .= '<br /><br />';
-$event_calendar_more_required = get_plugin_setting('more_required', 'event_calendar');
+$event_calendar_more_required = elgg_get_plugin_setting('more_required', 'event_calendar');
if (!$event_calendar_more_required) {
$event_calendar_more_required = 'no';
}