Merge branch 'MDL-60156-master' of git://github.com/andrewnicols/moodle

This commit is contained in:
Eloy Lafuente (stronk7) 2017-09-26 20:36:25 +02:00
commit 25759080d6
4 changed files with 83 additions and 31 deletions

View file

@ -0,0 +1,43 @@
{{!
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 calendar/add_event_button
Button to launch the "Add new event" dialogue.
The purpose of this template is to render the button used to generate the new event dialogue.
Classes required for JS:
* none
Data attributes required for JS:
* none
Example context (json):
{
"defaulteventcontext": "2"
}
}}
{{#defaulteventcontext}}
<button{{!
}} class="btn btn-secondary pull-xs-right pull-right"{{!
}} data-context-id="{{defaulteventcontext}}"{{!
}} data-action="new-event-button"{{!
}}>
{{#str}}newevent, core_calendar{{/str}}
</button>
{{/defaulteventcontext}}

View file

@ -31,8 +31,14 @@
{
}
}}
<div class="calendarwrapper" data-courseid="{{courseid}}" data-month="{{date.mon}}" data-year="{{date.year}}">
<div{{!
}} class="calendarwrapper"{{!
}} data-courseid="{{courseid}}"{{!
}} data-month="{{date.mon}}"{{!
}} data-year="{{date.year}}"{{!
}}>
{{> core_calendar/header }}
{{> core_calendar/add_event_button}}
{{> core_calendar/month_navigation }}
{{> core/overlay_loading}}
<table id="month-detailed-{{uniqid}}" class="calendarmonth calendartable card-deck m-b-0">