<?php

$event = $data['object'];
$event_label = $event->title;
if (isset($data['calendar_node']) && $data['calendar_node']) {
    $event_url = "{$data['calendar_node'][MIDCOM_NAV_FULLURL]}event/{$event->guid}";
    $event_js = org_openpsa_calendar_interface::calendar_editevent_js($event->guid, $data['calendar_node']);
    $event_label = "<a href=\"{$event_url}\" onclick=\"{$event_js}\">{$event_label}</a>";
}
?>
<tr class="event &(data['class']);">
    <td class="time">
        <?php 
echo date('H:i', $event->start) . '-' . date('H:i', $event->end);
?>
    </td>
    <td>
        <?php 
echo "{$event_label}";
?>
    </td>
    <td>
        <?php 
echo "{$event->location}";
?>
    </td>
    <td>&nbsp;</td>
</tr>
Exemple #2
0
<?php

$nap = new midcom_helper_nav();
$node = $nap->get_node($nap->get_current_node());
$event = new org_openpsa_widgets_calendar_event($data['event']);
$event->link = '#';
$event->onclick = org_openpsa_calendar_interface::calendar_editevent_js($data['event']->guid, $node);
echo $event->render('li');
Exemple #3
0
 /**
  * Day view
  *
  * @param String $handler_id    Name of the request handler
  * @param array $args           Variable arguments
  * @param array &$data          Public request data, passed by reference
  */
 public function _handler_day($handler_id, array $args, array &$data)
 {
     midcom::get('auth')->require_valid_user();
     $this->_generate_date($args);
     // Instantiate calendar widget
     $this->_calendar = new org_openpsa_widgets_calendar(date('Y', $this->_selected_time), date('m', $this->_selected_time), date('d', $this->_selected_time));
     $this->_calendar->type = org_openpsa_widgets_calendar::DAY;
     // Slots are 2 hours long
     $this->_calendar->calendar_slot_length = $this->_config->get('day_slot_length') * 60;
     $this->_calendar->start_hour = $this->_config->get('day_start_time');
     $this->_calendar->end_hour = $this->_config->get('day_end_time');
     $this->_calendar->column_width = 60;
     $this->_populate_toolbar('day');
     $this->_view_toolbar->add_item(array(MIDCOM_TOOLBAR_URL => 'month/' . $this->_get_datestring() . '/', MIDCOM_TOOLBAR_LABEL => $this->_l10n->get('month view'), MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/properties.png'));
     $this->_view_toolbar->add_item(array(MIDCOM_TOOLBAR_URL => 'week/' . $this->_get_datestring() . '/', MIDCOM_TOOLBAR_LABEL => $this->_l10n->get('week view'), MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/properties.png'));
     // Clicking a free slot should bring up 'new event' dialogue
     $nap = new midcom_helper_nav();
     $this_node = $nap->get_node($nap->get_current_node());
     if ($this->_root_event->can_do('midgard:create')) {
         $this->_calendar->reservation_div_options = array('onclick' => org_openpsa_calendar_interface::calendar_editevent_js('__GUID__', $this_node));
     }
     $this->_calendar->free_div_options = array('onclick' => org_openpsa_calendar_interface::calendar_newevent_js($this_node, '__START__', '__RESOURCE__'));
     // Populate contacts
     $this->_populate_calendar_contacts($this->_calendar->get_day_start(), $this->_calendar->get_day_end());
     $this->_request_data['calendar'] =& $this->_calendar;
     // Set the breadcrumb
     $this->add_breadcrumb('year/' . date('Y-01-01', $this->_selected_time) . '/', strftime('%Y', $this->_selected_time));
     $this->add_breadcrumb('month/' . date('Y-m-01', $this->_selected_time) . '/', strftime('%B', $this->_selected_time));
     $this->add_breadcrumb('day/' . date('Y-m-d', $this->_selected_time) . '/', strftime('%x', $this->_selected_time));
     midcom::get('head')->set_pagetitle(strftime("%x", $this->_selected_time));
 }
Exemple #4
0
}
?>
        <div class="description">
            &(view_task['description']:h);
        </div>

        <div class="bookings">
            <?php 
echo "<h2>" . $data['l10n']->get('booked times') . "</h2>\n";
if (count($data['task_bookings']['confirmed']) > 0) {
    echo "<ul>\n";
    foreach ($data['task_bookings']['confirmed'] as $booking) {
        echo "<li>";
        echo strftime('%x', $booking->start) . ' ' . date('H', $booking->start) . '-' . date('H', $booking->end);
        if ($data['calendar_node']) {
            echo ": <a href=\"#\" onclick=\"" . org_openpsa_calendar_interface::calendar_editevent_js($booking->guid, $data['calendar_node']) . "\">{$booking->title}</a>";
        } else {
            echo ": {$booking->title}";
        }
        echo " (";
        foreach ($booking->participants as $participant_id => $display) {
            $participant = org_openpsa_widgets_contact::get($participant_id);
            echo $participant->show_inline();
        }
        echo ")</li>\n";
    }
    echo "</ul>\n";
}
if ($data['task_booked_percentage'] >= 105) {
    $status = 'acceptable';
} else {