mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 09:26:35 +02:00
MDL-46127 core_calendar: Removed tables when rendering a single event
This commit is contained in:
parent
d07b0302a9
commit
11edf09c61
6 changed files with 82 additions and 77 deletions
|
@ -102,29 +102,22 @@ echo $OUTPUT->box_start('eventlist');
|
|||
$url = new moodle_url(CALENDAR_URL.'delete.php', array('id'=>$event->id, 'confirm'=>true));
|
||||
$buttons = $OUTPUT->single_button($url, get_string('delete'));
|
||||
|
||||
// If there are repeated events then add a Delete Repeated button
|
||||
$repeatspan = '';
|
||||
// And add the cancel button.
|
||||
$buttons .= $OUTPUT->single_button($viewcalendarurl, get_string('cancel'));
|
||||
|
||||
// And show the buttons and notes.
|
||||
echo $OUTPUT->box_start('generalbox', 'notice');
|
||||
echo html_writer::tag('p', get_string('confirmeventdelete', 'calendar', format_string($event->name)));
|
||||
|
||||
// If there are repeated events then add a Delete Repeated button.
|
||||
if (!empty($event->eventrepeats) && $event->eventrepeats > 0) {
|
||||
$url = new moodle_url(CALENDAR_URL.'delete.php', array('id'=>$event->repeatid, 'confirm'=>true, 'repeats'=>true));
|
||||
$buttons .= $OUTPUT->single_button($url, get_string('deleteall'));
|
||||
$repeatspan = '<br /><br /><span>'.get_string('youcandeleteallrepeats', 'calendar', $event->eventrepeats).'</span>';
|
||||
echo html_writer::tag('p', get_string('youcandeleteallrepeats', 'calendar', $event->eventrepeats));
|
||||
}
|
||||
|
||||
// And add the cancel button
|
||||
$buttons .= $OUTPUT->single_button($viewcalendarurl, get_string('cancel'));
|
||||
|
||||
// And show the buttons and notes
|
||||
echo $OUTPUT->box_start('generalbox', 'notice');
|
||||
echo $OUTPUT->box(get_string('confirmeventdelete', 'calendar').$repeatspan);
|
||||
echo $OUTPUT->box($buttons, 'buttons');
|
||||
echo $OUTPUT->box_end();
|
||||
|
||||
// Print the event so that people can visually confirm they have the correct event
|
||||
$event->time = calendar_format_event_time($event, time(), null, false);
|
||||
$renderer = $PAGE->get_renderer('core_calendar');
|
||||
echo $renderer->start_layout();
|
||||
echo $renderer->event($event, false);
|
||||
echo $renderer->complete_layout();
|
||||
|
||||
echo $OUTPUT->box_end();
|
||||
echo $OUTPUT->footer();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue