aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2012-08-10 12:18:59 +0200
committerSem <sembrestels@riseup.net>2012-08-10 12:18:59 +0200
commit6fd66b2c46ed6c3eb68fd0b05c1e02cd5b996824 (patch)
treebba9be7b9d037d4bb7b844f23103e6a268d273b3
parent3ac2c8fd0cacc57b8080be5f7d381b8cf5524f2f (diff)
parent066365aa7ff1c407040a672e69d999ed8bd337f6 (diff)
downloadelgg-6fd66b2c46ed6c3eb68fd0b05c1e02cd5b996824.tar.gz
elgg-6fd66b2c46ed6c3eb68fd0b05c1e02cd5b996824.tar.bz2
Merge branch 'ical-icon' of github.com:sembrestels/Elgg-Event-Calendar
-rw-r--r--models/model.php33
-rw-r--r--views/default/event_calendar/full_calendar_view.php2
-rw-r--r--views/default/object/event_calendar.php8
3 files changed, 24 insertions, 19 deletions
diff --git a/models/model.php b/models/model.php
index ba1393a8c..649d6027a 100644
--- a/models/model.php
+++ b/models/model.php
@@ -1481,29 +1481,24 @@ function event_calendar_get_page_content_list($page_type,$container_guid,$start_
elgg_push_context('groups');
elgg_set_page_owner_guid($container_guid);
$user_guid = elgg_get_logged_in_user_guid();
- // TODO - ideally avoid the check on the event_poll plugin, perhaps by having event_poll remove the menu item
if(event_calendar_can_add($container_guid)) {
- if (!elgg_plugin_exists('event_poll')) {
- elgg_register_menu_item('title', array(
- 'name' => 'add',
- 'href' => "event_calendar/add/".$container_guid,
- 'text' => elgg_echo('event_calendar:add'),
- 'class' => 'elgg-button elgg-button-action',
- ));
- }
+ elgg_register_menu_item('title', array(
+ 'name' => 'add',
+ 'href' => "event_calendar/add/".$container_guid,
+ 'text' => elgg_echo('event_calendar:add'),
+ 'class' => 'elgg-button elgg-button-action event-calendar-button-add',
+ ));
}
} else {
elgg_push_breadcrumb(elgg_echo('item:object:event_calendar'));
$user_guid = elgg_get_logged_in_user_guid();
if(event_calendar_can_add($container_guid)) {
- if (!elgg_plugin_exists('event_poll')) {
- elgg_register_menu_item('title', array(
- 'name' => 'add',
- 'href' => "event_calendar/add",
- 'text' => elgg_echo('event_calendar:add'),
- 'class' => 'elgg-button elgg-button-action',
- ));
- }
+ elgg_register_menu_item('title', array(
+ 'name' => 'add',
+ 'href' => "event_calendar/add",
+ 'text' => elgg_echo('event_calendar:add'),
+ 'class' => 'elgg-button elgg-button-action event-calendar-button-add',
+ ));
}
}
@@ -1520,7 +1515,7 @@ function event_calendar_get_page_content_list($page_type,$container_guid,$start_
$menu_options = array(
'name' => 'ical',
'id' => 'event-calendar-ical-link',
- 'text' => '<img src="'.elgg_get_site_url().'mod/event_calendar/images/ics.png" />',
+ 'text' => elgg_view_icon('calendar'),
'href' => $url,
'title' => elgg_echo('feed:ical'),
'priority' => 800,
@@ -1884,7 +1879,7 @@ function event_calendar_get_page_content_view($event_guid,$light_box = FALSE) {
}
elgg_push_breadcrumb($event->title);
- $content = elgg_view_entity($event, array('full_view' => true));
+ $content = elgg_view_entity($event, array('full_view' => true,'light_box'=>$light_box));
//check to see if comment are on - TODO - add this feature to all events
if ($event->comments_on != 'Off') {
$content .= elgg_view_comments($event);
diff --git a/views/default/event_calendar/full_calendar_view.php b/views/default/event_calendar/full_calendar_view.php
index 4316b5359..3e0c583ce 100644
--- a/views/default/event_calendar/full_calendar_view.php
+++ b/views/default/event_calendar/full_calendar_view.php
@@ -43,10 +43,12 @@ handleDayClick = function(date,allDay,jsEvent,view) {
// 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');
diff --git a/views/default/object/event_calendar.php b/views/default/object/event_calendar.php
index afd4325f1..5779c004c 100644
--- a/views/default/object/event_calendar.php
+++ b/views/default/object/event_calendar.php
@@ -59,9 +59,17 @@ if ($full) {
} else {
echo '<p>'.$event->description.'</p>';
}
+ if ($vars['light_box'] == TRUE) {
+ $event_calendar_add_users = elgg_get_plugin_setting('add_users', 'event_calendar');
+ if ($event_calendar_add_users == 'yes') {
+ $url = "event_calendar/manage_users/$event->guid";
+ echo '<p>'.elgg_view('output/url',array('text'=> elgg_echo('event_calendar:manage_users:breadcrumb'), 'href'=>$url)).'</p>';
+ }
+ }
if (elgg_get_plugin_setting('add_to_group_calendar', 'event_calendar') == 'yes') {
echo elgg_view('event_calendar/forms/add_to_group',array('event' => $event));
}
+
} else {
$time_bit = event_calendar_get_formatted_time($event);