mirror of
https://github.com/moodle/moodle.git
synced 2025-03-03 15:29:08 +01:00
Merge branch 'MDL-65318-master' of git://github.com/lameze/moodle
This commit is contained in:
commit
78920136bb
2
calendar/amd/build/view_manager.min.js
vendored
2
calendar/amd/build/view_manager.min.js
vendored
@ -1 +1 @@
|
||||
define(["jquery","core/templates","core/str","core/notification","core_calendar/repository","core_calendar/events","core_calendar/selectors","core/modal_factory","core/modal_events","core_calendar/summary_modal"],function(a,b,c,d,e,f,g,h,i,j){var k=function(b){b=a(b),b.on("click",g.links.eventLink,function(b){var c,d=a(b.target),e=null;c=d.is(g.actions.viewEvent)?d:d.closest(g.actions.viewEvent),e=c.length?c.data("eventId"):d.find(g.actions.viewEvent).data("eventId"),e&&(b.preventDefault(),b.stopPropagation(),w(e))}),b.on("click",g.links.navLink,function(c){var d=b.find(g.wrapper),e=d.data("view"),f=d.data("courseid"),h=d.data("categoryid"),i=a(c.currentTarget);"month"===e?(m(b,i.attr("href"),i.data("year"),i.data("month"),f,h),c.preventDefault()):"day"===e&&(q(b,i.attr("href"),i.data("year"),i.data("month"),i.data("day"),f,h),c.preventDefault())})},l=function(c,h,i,j,k,l){r(c),l=l||c.find(g.wrapper),M.util.js_pending([c.get("id"),h,i,j].join("-"));var m=c.data("includenavigation"),n=c.data("mini");return e.getCalendarMonthData(h,i,j,k,m,n).then(function(a){return b.render(c.attr("data-template"),a)}).then(function(a,c){return b.replaceNode(l,a,c)}).then(function(){a("body").trigger(f.viewUpdated)}).always(function(){return M.util.js_complete([c.get("id"),h,i,j].join("-")),s(c)}).fail(d.exception)},m=function(b,c,d,e,g,h){return l(b,d,e,g,h).then(function(){return c.length&&"#"!==c&&window.history.pushState({},"",c),arguments}).then(function(){return a("body").trigger(f.monthChanged,[d,e,g,h]),arguments})},n=function(a,b,c){var d=a.find(g.wrapper).data("year"),e=a.find(g.wrapper).data("month");return"undefined"==typeof b&&(b=a.find(g.wrapper).data("courseid")),"undefined"==typeof c&&(c=a.find(g.wrapper).data("categoryid")),l(a,d,e,b,c)},o=function(c,h,i,j,k,l,m){r(c),m=m||c.find(g.wrapper),M.util.js_pending([c.get("id"),h,i,j,k,l].join("-"));var n=c.data("includenavigation");return e.getCalendarDayData(h,i,j,k,l,n).then(function(a){return b.render(c.attr("data-template"),a)}).then(function(a,c){return b.replaceNode(m,a,c)}).then(function(){a("body").trigger(f.viewUpdated)}).always(function(){return M.util.js_complete([c.get("id"),h,i,j,k,l].join("-")),s(c)}).fail(d.exception)},p=function(a,b,c){var d=a.find(g.wrapper),e=d.data("year"),f=d.data("month"),h=d.data("day");return b||(b=a.find(g.wrapper).data("courseid")),"undefined"==typeof c&&(c=a.find(g.wrapper).data("categoryid")),o(a,e,f,h,b,c)},q=function(b,c,d,e,g,h,i){return o(b,d,e,g,h,i).then(function(){return c.length&&"#"!==c&&window.history.pushState({},"",c),arguments}).then(function(){return a("body").trigger(f.dayChanged,[d,e,g,h,i]),arguments})},r=function(a){var b=a.find(g.containers.loadingIcon);b.removeClass("hidden")},s=function(a){var b=a.find(g.containers.loadingIcon);b.addClass("hidden")},t=function(c,h,i){r(c);var j=c.find(g.wrapper);return"undefined"==typeof h&&(h=c.find(g.wrapper).data("courseid")),"undefined"==typeof i&&(i=c.find(g.wrapper).data("categoryid")),e.getCalendarUpcomingData(h,i).then(function(a){return b.render(c.attr("data-template"),a)}).then(function(a,c){return b.replaceNode(j,a,c)}).then(function(){a("body").trigger(f.viewUpdated)}).always(function(){return s(c)}).fail(d.exception)},u=function(a){switch(a){case"user":return"user";case"site":return"site";case"group":return"group";case"category":return"category";default:return"course"}},v=function(a){return"calendar_event_"+u(a)},w=function(a){var c="";e.getEventById(a).then(function(b){if(!b.event)throw new Error("Error encountered while trying to fetch calendar event with ID: "+a);var d=b.event;return c=v(d.eventtype),x(d.eventtype).then(function(a){return d.eventtype=a,d})}).then(function(a){var d={title:a.name,type:j.TYPE,body:b.render("core_calendar/event_summary_body",a),templateContext:{canedit:a.canedit,candelete:a.candelete,headerclasses:c,isactionevent:a.isactionevent,url:a.url}};return h.create(d)}).done(function(a){a.getRoot().on(i.hidden,function(){a.destroy()}),a.show()}).fail(d.exception)},x=function(a){var b="type"+u(a);return c.get_string(b,"core_calendar").then(function(a){return a})};return{init:function(a){k(a)},reloadCurrentMonth:n,changeMonth:m,refreshMonthContent:l,reloadCurrentDay:p,changeDay:q,refreshDayContent:o,reloadCurrentUpcoming:t}});
|
||||
define(["jquery","core/templates","core/str","core/notification","core_calendar/repository","core_calendar/events","core_calendar/selectors","core/modal_factory","core/modal_events","core_calendar/summary_modal"],function(a,b,c,d,e,f,g,h,i,j){var k=function(b){b=a(b),b.on("click",g.links.eventLink,function(b){var c,d=a(b.target),e=null;c=d.is(g.actions.viewEvent)?d:d.closest(g.actions.viewEvent),e=c.length?c.data("eventId"):d.find(g.actions.viewEvent).data("eventId"),e&&(b.preventDefault(),b.stopPropagation(),v(e))}),b.on("click",g.links.navLink,function(c){var d=b.find(g.wrapper),e=d.data("view"),f=d.data("courseid"),h=d.data("categoryid"),i=a(c.currentTarget);"month"===e?(m(b,i.attr("href"),i.data("year"),i.data("month"),f,h),c.preventDefault()):"day"===e&&(q(b,i.attr("href"),i.data("year"),i.data("month"),i.data("day"),f,h),c.preventDefault())})},l=function(c,h,i,j,k,l){r(c),l=l||c.find(g.wrapper),M.util.js_pending([c.get("id"),h,i,j].join("-"));var m=c.data("includenavigation"),n=c.data("mini");return e.getCalendarMonthData(h,i,j,k,m,n).then(function(a){return b.render(c.attr("data-template"),a)}).then(function(a,c){return b.replaceNode(l,a,c)}).then(function(){a("body").trigger(f.viewUpdated)}).always(function(){return M.util.js_complete([c.get("id"),h,i,j].join("-")),s(c)}).fail(d.exception)},m=function(b,c,d,e,g,h){return l(b,d,e,g,h).then(function(){return c.length&&"#"!==c&&window.history.pushState({},"",c),arguments}).then(function(){return a("body").trigger(f.monthChanged,[d,e,g,h]),arguments})},n=function(a,b,c){var d=a.find(g.wrapper).data("year"),e=a.find(g.wrapper).data("month");return"undefined"==typeof b&&(b=a.find(g.wrapper).data("courseid")),"undefined"==typeof c&&(c=a.find(g.wrapper).data("categoryid")),l(a,d,e,b,c)},o=function(c,h,i,j,k,l,m){r(c),m=m||c.find(g.wrapper),M.util.js_pending([c.get("id"),h,i,j,k,l].join("-"));var n=c.data("includenavigation");return e.getCalendarDayData(h,i,j,k,l,n).then(function(a){return b.render(c.attr("data-template"),a)}).then(function(a,c){return b.replaceNode(m,a,c)}).then(function(){a("body").trigger(f.viewUpdated)}).always(function(){return M.util.js_complete([c.get("id"),h,i,j,k,l].join("-")),s(c)}).fail(d.exception)},p=function(a,b,c){var d=a.find(g.wrapper),e=d.data("year"),f=d.data("month"),h=d.data("day");return b||(b=a.find(g.wrapper).data("courseid")),"undefined"==typeof c&&(c=a.find(g.wrapper).data("categoryid")),o(a,e,f,h,b,c)},q=function(b,c,d,e,g,h,i){return o(b,d,e,g,h,i).then(function(){return c.length&&"#"!==c&&window.history.pushState({},"",c),arguments}).then(function(){return a("body").trigger(f.dayChanged,[d,e,g,h,i]),arguments})},r=function(a){var b=a.find(g.containers.loadingIcon);b.removeClass("hidden")},s=function(a){var b=a.find(g.containers.loadingIcon);b.addClass("hidden")},t=function(c,h,i){r(c);var j=c.find(g.wrapper);return"undefined"==typeof h&&(h=c.find(g.wrapper).data("courseid")),"undefined"==typeof i&&(i=c.find(g.wrapper).data("categoryid")),e.getCalendarUpcomingData(h,i).then(function(a){return b.render(c.attr("data-template"),a)}).then(function(a,c){return b.replaceNode(j,a,c)}).then(function(){a("body").trigger(f.viewUpdated)}).always(function(){return s(c)}).fail(d.exception)},u=function(a){return"calendar_event_"+a},v=function(a){var c="";e.getEventById(a).then(function(b){if(!b.event)throw new Error("Error encountered while trying to fetch calendar event with ID: "+a);var d=b.event;return c=u(d.normalisedeventtype),d}).then(function(a){var d={title:a.name,type:j.TYPE,body:b.render("core_calendar/event_summary_body",a),templateContext:{canedit:a.canedit,candelete:a.candelete,headerclasses:c,isactionevent:a.isactionevent,url:a.url}};return h.create(d)}).done(function(a){a.getRoot().on(i.hidden,function(){a.destroy()}),a.show()}).fail(d.exception)};return{init:function(a){k(a)},reloadCurrentMonth:n,changeMonth:m,refreshMonthContent:l,reloadCurrentDay:p,changeDay:q,refreshDayContent:o,reloadCurrentUpcoming:t}});
|
@ -339,28 +339,6 @@ define([
|
||||
.fail(Notification.exception);
|
||||
};
|
||||
|
||||
/**
|
||||
* Convert the given event type into one of either user, site,
|
||||
* group, category, or course.
|
||||
*
|
||||
* @param {String} eventType The calendar event type
|
||||
* @return {String}
|
||||
*/
|
||||
var normaliseEventType = function(eventType) {
|
||||
switch (eventType) {
|
||||
case 'user':
|
||||
return 'user';
|
||||
case 'site':
|
||||
return 'site';
|
||||
case 'group':
|
||||
return 'group';
|
||||
case 'category':
|
||||
return 'category';
|
||||
default:
|
||||
return 'course';
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the CSS class to apply for the given event type.
|
||||
*
|
||||
@ -368,7 +346,7 @@ define([
|
||||
* @return {String}
|
||||
*/
|
||||
var getEventTypeClassFromType = function(eventType) {
|
||||
return 'calendar_event_' + normaliseEventType(eventType);
|
||||
return 'calendar_event_' + eventType;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -385,12 +363,9 @@ define([
|
||||
throw new Error('Error encountered while trying to fetch calendar event with ID: ' + eventId);
|
||||
}
|
||||
var eventData = getEventResponse.event;
|
||||
typeClass = getEventTypeClassFromType(eventData.eventtype);
|
||||
typeClass = getEventTypeClassFromType(eventData.normalisedeventtype);
|
||||
|
||||
return getEventType(eventData.eventtype).then(function(eventType) {
|
||||
eventData.eventtype = eventType;
|
||||
return eventData;
|
||||
});
|
||||
return eventData;
|
||||
}).then(function(eventData) {
|
||||
// Build the modal parameters from the event data.
|
||||
var modalParams = {
|
||||
@ -422,19 +397,6 @@ define([
|
||||
}).fail(Notification.exception);
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the event type lang string.
|
||||
*
|
||||
* @param {String} eventType The event type.
|
||||
* @return {promise} The lang string promise.
|
||||
*/
|
||||
var getEventType = function(eventType) {
|
||||
var lang = 'type' + normaliseEventType(eventType);
|
||||
return Str.get_string(lang, 'core_calendar').then(function(langStr) {
|
||||
return langStr;
|
||||
});
|
||||
};
|
||||
|
||||
return {
|
||||
init: function(root) {
|
||||
registerEventListeners(root);
|
||||
|
@ -52,9 +52,6 @@ class calendar_event_exporter extends event_exporter_base {
|
||||
'type' => PARAM_BOOL,
|
||||
'default' => false,
|
||||
];
|
||||
$values['calendareventtype'] = [
|
||||
'type' => PARAM_TEXT,
|
||||
];
|
||||
$values['popupname'] = [
|
||||
'type' => PARAM_RAW,
|
||||
];
|
||||
@ -172,8 +169,6 @@ class calendar_event_exporter extends event_exporter_base {
|
||||
$values['popupname'] = get_string('eventnameandcourse', 'calendar', $eventnameparams);
|
||||
}
|
||||
|
||||
$values['calendareventtype'] = $this->get_calendar_event_type();
|
||||
|
||||
if ($event->get_course_module()) {
|
||||
$values = array_merge($values, $this->get_module_timestamp_limits($event));
|
||||
} else if ($hascourse && $course->id != SITEID && empty($event->get_group())) {
|
||||
|
1
calendar/classes/external/event_exporter.php
vendored
1
calendar/classes/external/event_exporter.php
vendored
@ -55,7 +55,6 @@ class event_exporter extends event_exporter_base {
|
||||
'type' => event_action_exporter::read_properties_definition(),
|
||||
'optional' => true,
|
||||
];
|
||||
|
||||
return $values;
|
||||
}
|
||||
|
||||
|
@ -236,6 +236,12 @@ class event_exporter_base extends exporter {
|
||||
'default' => null,
|
||||
'null' => NULL_ALLOWED
|
||||
],
|
||||
'normalisedeventtype' => [
|
||||
'type' => PARAM_TEXT
|
||||
],
|
||||
'normalisedeventtypetext' => [
|
||||
'type' => PARAM_TEXT
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
@ -254,11 +260,14 @@ class event_exporter_base extends exporter {
|
||||
$values['isactionevent'] = false;
|
||||
$values['iscourseevent'] = false;
|
||||
$values['iscategoryevent'] = false;
|
||||
$values['normalisedeventtype'] = $event->get_type();
|
||||
if ($moduleproxy = $event->get_course_module()) {
|
||||
// We need a separate property to flag if an event is action event.
|
||||
// That's required because canedit return true but action action events cannot be edited on the calendar UI.
|
||||
// But they are considered editable because you can drag and drop the event on the month view.
|
||||
$values['isactionevent'] = true;
|
||||
// Activity events are normalised to "look" like course events.
|
||||
$values['normalisedeventtype'] = 'course';
|
||||
} else if ($event->get_type() == 'course') {
|
||||
$values['iscourseevent'] = true;
|
||||
} else if ($event->get_type() == 'category') {
|
||||
@ -266,6 +275,7 @@ class event_exporter_base extends exporter {
|
||||
}
|
||||
$timesort = $event->get_times()->get_sort_time()->getTimestamp();
|
||||
$iconexporter = new event_icon_exporter($event, ['context' => $context]);
|
||||
$values['normalisedeventtypetext'] = get_string('type' . $values['normalisedeventtype'], 'calendar');
|
||||
|
||||
$values['icon'] = $iconexporter->export($output);
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
@template calendar/calendar_day
|
||||
@template core_calendar/calendar_day
|
||||
|
||||
Calendar day view.
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
@template calendar/day_detailed
|
||||
@template core_calendar/day_detailed
|
||||
|
||||
Calendar day view.
|
||||
|
||||
|
120
calendar/templates/event_details.mustache
Normal file
120
calendar/templates/event_details.mustache
Normal file
@ -0,0 +1,120 @@
|
||||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
@template core_calendar/event_details
|
||||
|
||||
Calendar event details.
|
||||
|
||||
The purpose of this template is to render the event details.
|
||||
|
||||
This template is used in the summary modal, day and upcoming views to output event information consistently
|
||||
across the calendar.
|
||||
|
||||
Classes required for JS:
|
||||
* none
|
||||
|
||||
Data attributes required for JS:
|
||||
* none
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
"formattedtime": "Wednesday, 17 April, 9:27 AM",
|
||||
"normalisedeventtype": "Group",
|
||||
"description": "An random event description",
|
||||
"location": "Moodle HQ",
|
||||
"isactionevent": "true",
|
||||
"course": {
|
||||
"viewurl": "http://mymoodlesite/course/view.php?id=1",
|
||||
"fullname": "Course name"
|
||||
},
|
||||
"source": "Ical imported",
|
||||
"groupname": "Group 1",
|
||||
"iscategoryevent": "true",
|
||||
"category": {
|
||||
"nestedname": "Category name"
|
||||
},
|
||||
"iscourseevent": "true",
|
||||
"groupname": "Group name",
|
||||
"subscription": "true",
|
||||
"displayeventsource": "true",
|
||||
"subscriptionname": "Subscription name",
|
||||
"subscriptionurl": "http://subscriptionurl"
|
||||
}
|
||||
}}
|
||||
<div class="row">
|
||||
<div class="col-xs-1">{{#pix}} i/calendareventtime, core, {{#str}} when, core_calendar {{/str}} {{/pix}}</div>
|
||||
<div class="col-xs-11">{{{formattedtime}}}</div>
|
||||
</div>
|
||||
<div class="row mt-1">
|
||||
<div class="col-xs-1">{{#pix}} i/calendar, core, {{#str}} eventtype, core_calendar {{/str}} {{/pix}}</div>
|
||||
<div class="col-xs-11">{{normalisedeventtypetext}}</div>
|
||||
</div>
|
||||
{{#description}}
|
||||
<div class="row mt-1">
|
||||
<div class="col-xs-1">{{#pix}} i/calendareventdescription, core, {{#str}} description {{/str}} {{/pix}}</div>
|
||||
<div class="description-content col-xs-11">{{{.}}}</div>
|
||||
</div>
|
||||
{{/description}}
|
||||
{{#location}}
|
||||
<div class="row mt-1">
|
||||
<div class="col-xs-1">{{#pix}} i/location, core, {{#str}} location {{/str}} {{/pix}}</div>
|
||||
<div class="location-content col-xs-11">{{{.}}}</div>
|
||||
</div>
|
||||
{{/location}}
|
||||
{{#isactionevent}}
|
||||
<div class="row mt-1">
|
||||
<div class="col-xs-1">{{#pix}} i/courseevent, core, {{#str}} course {{/str}} {{/pix}}</div>
|
||||
<div class="col-xs-11"><a href="{{course.viewurl}}">{{{course.fullname}}}</a></div>
|
||||
</div>
|
||||
{{/isactionevent}}
|
||||
{{#iscategoryevent}}
|
||||
<div class="row mt-1">
|
||||
<div class="col-xs-1">{{#pix}} i/categoryevent, core, {{#str}} category {{/str}} {{/pix}}</div>
|
||||
<div class="col-xs-11">{{{category.nestedname}}}</div>
|
||||
</div>
|
||||
{{/iscategoryevent}}
|
||||
{{#iscourseevent}}
|
||||
<div class="row mt-1">
|
||||
<div class="col-xs-1">{{#pix}} i/courseevent, core, {{#str}} course {{/str}} {{/pix}}</div>
|
||||
<div class="col-xs-11"><a href="{{url}}">{{{course.fullname}}}</a></div>
|
||||
</div>
|
||||
{{/iscourseevent}}
|
||||
{{#groupname}}
|
||||
<div class="row mt-1">
|
||||
<div class="col-xs-1">{{#pix}} i/courseevent, core, {{#str}} course {{/str}} {{/pix}}</div>
|
||||
<div class="col-xs-11"><a href="{{url}}">{{{course.fullname}}}</a></div>
|
||||
</div>
|
||||
<div class="row mt-1">
|
||||
<div class="col-xs-1">{{#pix}} i/groupevent, core, {{#str}} group {{/str}} {{/pix}}</div>
|
||||
<div class="col-xs-11">{{{groupname}}}</div>
|
||||
</div>
|
||||
{{/groupname}}
|
||||
{{#subscription}}
|
||||
{{#displayeventsource}}
|
||||
<div class="row mt-1">
|
||||
<div class="col-xs-1">{{#pix}} i/rss, core, {{#str}} eventsource, core_calendar {{/str}} {{/pix}}</div>
|
||||
<div class="col-xs-11">
|
||||
{{#subscriptionurl}}
|
||||
<p><a href="{{subscriptionurl}}">{{#str}}subscriptionsource, core_calendar, {{{subscriptionname}}}{{/str}}</a></p>
|
||||
{{/subscriptionurl}}
|
||||
{{^subscriptionurl}}
|
||||
<p>{{#str}}subscriptionsource, core_calendar, {{{subscriptionname}}}{{/str}}</p>
|
||||
{{/subscriptionurl}}
|
||||
</div>
|
||||
</div>
|
||||
{{/displayeventsource}}
|
||||
{{/subscription}}
|
@ -15,7 +15,7 @@
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
@template calendar/event_item
|
||||
@template core_calendar/event_item
|
||||
|
||||
Calendar event item.
|
||||
|
||||
@ -29,19 +29,35 @@
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
"id": 1,
|
||||
"name": "Sample event name",
|
||||
"normalisedeventtype": "course",
|
||||
"course": {
|
||||
"id": 1
|
||||
},
|
||||
"canedit": true,
|
||||
"candelete": true,
|
||||
"isactionevent": true,
|
||||
"icon": {
|
||||
"key": "i/courseevent",
|
||||
"component": "core",
|
||||
"alttext": "Some course event"
|
||||
},
|
||||
"editurl": "#",
|
||||
"url": "#"
|
||||
}
|
||||
}}
|
||||
<div{{!
|
||||
}} data-type="event"{{!
|
||||
}} data-course-id="{{course.id}}"{{!
|
||||
}} data-event-id="{{id}}"{{!
|
||||
}} class="event"{{!
|
||||
}} data-eventtype-{{calendareventtype}}="1"{{!
|
||||
}} class="event m-t-1"{{!
|
||||
}} data-eventtype-{{normalisedeventtype}}="1"{{!
|
||||
}} data-event-title="{{name}}"{{!
|
||||
}} data-event-count="{{eventcount}}"{{!
|
||||
}}>
|
||||
<div class="card">
|
||||
<div class="box card-header clearfix p-y-1">
|
||||
<div class="card rounded">
|
||||
<div class="box card-header clearfix calendar_event_{{normalisedeventtype}}">
|
||||
<div class="commands float-sm-right">
|
||||
{{#canedit}}
|
||||
{{#candelete}}
|
||||
@ -59,23 +75,15 @@
|
||||
{{#icon}}<div class="d-inline-block mt-1 align-top">{{#pix}} {{key}}, {{component}}, {{alttext}} {{/pix}}</div>{{/icon}}
|
||||
<div class="d-inline-block">
|
||||
<h3 class="name d-inline-block">{{{name}}}</h3>
|
||||
<span class="date float-sm-right mr-1">{{{formattedtime}}}</span>
|
||||
<div class="location">{{#location}}{{{location}}}{{/location}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="description card-block calendar_event_{{eventtype}}">
|
||||
<p>{{{description}}}</p>
|
||||
{{#iscourseevent}}
|
||||
<div><a href="{{url}}">{{course.fullname}}</a></div>
|
||||
{{/iscourseevent}}
|
||||
{{> core_calendar/event_subscription}}
|
||||
{{#isactionevent}}
|
||||
<a href="{{url}}">{{#str}} gotoactivity, core_calendar {{/str}}</a>
|
||||
{{/isactionevent}}
|
||||
{{#groupname}}
|
||||
<div><a href="{{url}}">{{{course.fullname}}}</a></div>
|
||||
<div>{{{groupname}}}</div>
|
||||
{{/groupname}}
|
||||
<div class="description card-body">
|
||||
{{> core_calendar/event_details }}
|
||||
</div>
|
||||
{{#isactionevent}}
|
||||
<div class="card-footer text-right bg-transparent">
|
||||
<a href="{{url}}" class="card-link">{{#str}} gotoactivity, core_calendar {{/str}}</a>
|
||||
</div>
|
||||
{{/isactionevent}}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -15,7 +15,7 @@
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
@template calendar/event_list
|
||||
@template core_calendar/event_list
|
||||
|
||||
Calendar event list.
|
||||
|
||||
|
@ -40,68 +40,6 @@
|
||||
}} data-edit-url="{{editurl}}"{{!
|
||||
}}>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-xs-1">{{#pix}} i/calendareventtime, core, {{#str}} when, core_calendar {{/str}} {{/pix}}</div>
|
||||
<div class="col-xs-11">{{{formattedtime}}}</div>
|
||||
</div>
|
||||
<div class="row mt-1">
|
||||
<div class="col-xs-1">{{#pix}} i/calendar, core, {{#str}} eventtype, core_calendar {{/str}} {{/pix}}</div>
|
||||
<div class="col-xs-11">{{eventtype}}</div>
|
||||
</div>
|
||||
{{#description}}
|
||||
<div class="row mt-1">
|
||||
<div class="col-xs-1">{{#pix}} i/calendareventdescription, core, {{#str}} description {{/str}} {{/pix}}</div>
|
||||
<div class="description-content col-xs-11">{{{.}}}</div>
|
||||
</div>
|
||||
{{/description}}
|
||||
{{#location}}
|
||||
<div class="row mt-1">
|
||||
<div class="col-xs-1">{{#pix}} i/location, core, {{#str}} location {{/str}} {{/pix}}</div>
|
||||
<div class="location-content col-xs-11">{{{.}}}</div>
|
||||
</div>
|
||||
{{/location}}
|
||||
{{#isactionevent}}
|
||||
<div class="row mt-1">
|
||||
<div class="col-xs-1">{{#pix}} i/courseevent, core, {{#str}} course {{/str}} {{/pix}}</div>
|
||||
<div class="col-xs-11"><a href="{{course.viewurl}}">{{{course.fullname}}}</a></div>
|
||||
</div>
|
||||
{{/isactionevent}}
|
||||
{{#iscategoryevent}}
|
||||
<div class="row mt-1">
|
||||
<div class="col-xs-1">{{#pix}} i/categoryevent, core, {{#str}} category {{/str}} {{/pix}}</div>
|
||||
<div class="col-xs-11">{{{category.nestedname}}}</div>
|
||||
</div>
|
||||
{{/iscategoryevent}}
|
||||
{{#iscourseevent}}
|
||||
<div class="row mt-1">
|
||||
<div class="col-xs-1">{{#pix}} i/courseevent, core, {{#str}} course {{/str}} {{/pix}}</div>
|
||||
<div class="col-xs-11"><a href="{{url}}">{{{course.fullname}}}</a></div>
|
||||
</div>
|
||||
{{/iscourseevent}}
|
||||
{{#groupname}}
|
||||
<div class="row mt-1">
|
||||
<div class="col-xs-1">{{#pix}} i/courseevent, core, {{#str}} course {{/str}} {{/pix}}</div>
|
||||
<div class="col-xs-11"><a href="{{url}}">{{{course.fullname}}}</a></div>
|
||||
</div>
|
||||
<div class="row mt-1">
|
||||
<div class="col-xs-1">{{#pix}} i/groupevent, core, {{#str}} group {{/str}} {{/pix}}</div>
|
||||
<div class="col-xs-11">{{{groupname}}}</div>
|
||||
</div>
|
||||
{{/groupname}}
|
||||
{{#subscription}}
|
||||
{{#displayeventsource}}
|
||||
<div class="row mt-1">
|
||||
<div class="col-xs-1">{{#pix}} i/rss, core, {{#str}} eventsource, core_calendar {{/str}} {{/pix}}</div>
|
||||
<div class="col-xs-11">
|
||||
{{#subscriptionurl}}
|
||||
<p><a href="{{subscriptionurl}}">{{#str}}subscriptionsource, core_calendar, {{{subscriptionname}}}{{/str}}</a></p>
|
||||
{{/subscriptionurl}}
|
||||
{{^subscriptionurl}}
|
||||
<p>{{#str}}subscriptionsource, core_calendar, {{{subscriptionname}}}{{/str}}</p>
|
||||
{{/subscriptionurl}}
|
||||
</div>
|
||||
</div>
|
||||
{{/displayeventsource}}
|
||||
{{/subscription}}
|
||||
{{> core_calendar/event_details }}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -87,7 +87,7 @@
|
||||
{{/underway}}
|
||||
{{^underway}}
|
||||
<li data-region="event-item"
|
||||
data-eventtype-{{calendareventtype}}="1"
|
||||
data-eventtype-{{normalisedeventtype}}="1"
|
||||
{{#draggable}}
|
||||
draggable="true"
|
||||
data-drag-type="move"
|
||||
@ -106,7 +106,7 @@
|
||||
{{/draggable}}>
|
||||
|
||||
<a data-action="view-event" data-event-id="{{id}}" href="{{url}}" title="{{name}}">
|
||||
<span class="badge badge-circle calendar_event_{{calendareventtype}}">
|
||||
<span class="badge badge-circle calendar_event_{{normalisedeventtype}}">
|
||||
|
||||
</span>
|
||||
{{> core_calendar/event_icon}}
|
||||
|
@ -135,7 +135,7 @@
|
||||
{{$nocontent}}{{#str}}eventnone, calendar{{/str}}{{/nocontent}}
|
||||
{{$content}}
|
||||
{{#events}}
|
||||
<div data-popover-eventtype-{{calendareventtype}}="1">
|
||||
<div data-popover-eventtype-{{normalisedeventtype}}="1">
|
||||
{{#modulename}}
|
||||
{{#pix}} icon, {{modulename}} {{/pix}}
|
||||
{{/modulename}}
|
||||
|
@ -41,7 +41,7 @@
|
||||
{{#events}}
|
||||
<div{{!
|
||||
}} class="event"{{!
|
||||
}} data-eventtype-{{calendareventtype}}="1"{{!
|
||||
}} data-eventtype-{{normalisedeventtype}}="1"{{!
|
||||
}} data-region="event-item"{{!
|
||||
}}>
|
||||
<span>{{#icon}}{{#pix}} {{key}}, {{component}}, {{alttext}} {{/pix}}{{/icon}}</span>
|
||||
|
@ -427,14 +427,12 @@ table.calendartable caption {
|
||||
}
|
||||
}
|
||||
|
||||
.summary-modal-container {
|
||||
.description-content {
|
||||
> p {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
.location-content {
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
.location-content {
|
||||
overflow-wrap: break-word;
|
||||
.description-content {
|
||||
> p {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
@ -11659,12 +11659,12 @@ table.calendartable caption {
|
||||
.day-popover-content:empty + .day-popover-alternate {
|
||||
display: block; }
|
||||
|
||||
.summary-modal-container .description-content > p {
|
||||
margin: 0; }
|
||||
|
||||
.summary-modal-container .location-content {
|
||||
.location-content {
|
||||
overflow-wrap: break-word; }
|
||||
|
||||
.description-content > p {
|
||||
margin: 0; }
|
||||
|
||||
/* course.less */
|
||||
/* COURSE CONTENT */
|
||||
.section-modchooser-link img {
|
||||
|
@ -11900,12 +11900,12 @@ table.calendartable caption {
|
||||
.day-popover-content:empty + .day-popover-alternate {
|
||||
display: block; }
|
||||
|
||||
.summary-modal-container .description-content > p {
|
||||
margin: 0; }
|
||||
|
||||
.summary-modal-container .location-content {
|
||||
.location-content {
|
||||
overflow-wrap: break-word; }
|
||||
|
||||
.description-content > p {
|
||||
margin: 0; }
|
||||
|
||||
/* course.less */
|
||||
/* COURSE CONTENT */
|
||||
.section-modchooser-link img {
|
||||
|
Loading…
x
Reference in New Issue
Block a user