forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDL-58235 block_myoverview: clean theme style for block_myoverview
This is for the 'Timeline' view in Clean theme Part of MDL-55611
- Loading branch information
1 parent
c3d8643
commit 24b423f
Showing
12 changed files
with
582 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
104 changes: 104 additions & 0 deletions
104
theme/bootstrapbase/templates/block_myoverview/course-event-list.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
{{! | ||
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 block_myoverview/course-event-list | ||
This template renders a list of events for the myoverview block | ||
sort by courses view. | ||
Example context (json): | ||
{ | ||
} | ||
}} | ||
<div data-region="event-list-container" | ||
data-limit="{{$limit}}20{{/limit}}" | ||
data-course-id="{{$courseid}}{{/courseid}}" | ||
data-last-id="{{$lastid}}{{/lastid}}" | ||
id="event-list-container-{{$courseid}}{{/courseid}}"> | ||
|
||
<div data-region="event-list-content"> | ||
{{< block_myoverview/event-list-group }} | ||
{{$title}}{{#str}} recentlyoverdue, block_myoverview {{/str}}{{/title}} | ||
{{$extratitleclasses}}text-danger{{/extratitleclasses}} | ||
{{$startday}}-14{{/startday}} | ||
{{$endday}}0{{/endday}} | ||
{{$eventlistitems}} | ||
{{> block_myoverview/course-event-list-items }} | ||
{{/eventlistitems}} | ||
{{/ block_myoverview/event-list-group }} | ||
{{< block_myoverview/event-list-group }} | ||
{{$title}}{{#str}} today {{/str}}{{/title}} | ||
{{$extratitleclasses}}{{/extratitleclasses}} | ||
{{$startday}}0{{/startday}} | ||
{{$endday}}1{{/endday}} | ||
{{$eventlistitems}} | ||
{{> block_myoverview/course-event-list-items }} | ||
{{/eventlistitems}} | ||
{{/ block_myoverview/event-list-group }} | ||
{{< block_myoverview/event-list-group }} | ||
{{$title}}{{#str}} next7days, block_myoverview {{/str}}{{/title}} | ||
{{$extratitleclasses}}{{/extratitleclasses}} | ||
{{$startday}}1{{/startday}} | ||
{{$endday}}7{{/endday}} | ||
{{$eventlistitems}} | ||
{{> block_myoverview/course-event-list-items }} | ||
{{/eventlistitems}} | ||
{{/ block_myoverview/event-list-group }} | ||
{{< block_myoverview/event-list-group }} | ||
{{$title}}{{#str}} next30days, block_myoverview {{/str}}{{/title}} | ||
{{$extratitleclasses}}{{/extratitleclasses}} | ||
{{$startday}}7{{/startday}} | ||
{{$endday}}30{{/endday}} | ||
{{$eventlistitems}} | ||
{{> block_myoverview/course-event-list-items }} | ||
{{/eventlistitems}} | ||
{{/ block_myoverview/event-list-group }} | ||
{{< block_myoverview/event-list-group }} | ||
{{$title}}{{#str}} future, block_myoverview {{/str}}{{/title}} | ||
{{$extratitleclasses}}{{/extratitleclasses}} | ||
{{$startday}}30{{/startday}} | ||
{{$endday}}{{/endday}} | ||
{{$eventlistitems}} | ||
{{> block_myoverview/course-event-list-items }} | ||
{{/eventlistitems}} | ||
{{/ block_myoverview/event-list-group }} | ||
|
||
<div class="text-xs-center text-center m-b-1"> | ||
<button type="button" class="btn btn-secondary" data-action="view-more"> | ||
{{#str}} viewmore {{/str}} | ||
<span class="hidden" data-region="loading-icon-container"> | ||
{{> core/loading }} | ||
</span> | ||
</button> | ||
</div> | ||
</div> | ||
<div class="hidden text-xs-center text-center" data-region="empty-message"> | ||
<img class="empty-placeholder-image-sm" | ||
src="{{urls.noevents}}" | ||
alt="{{#str}} noevents, block_myoverview {{/str}}"> | ||
<p class="text-muted m-t-1">{{#str}} noevents, block_myoverview {{/str}}</p> | ||
<a href="{{viewurl}}" class="btn btn-secondary text-primary"> | ||
{{#str}} viewcourse, block_myoverview {{/str}} | ||
</a> | ||
</div> | ||
</div> | ||
{{#js}} | ||
require(['jquery', 'block_myoverview/event_list'], function($, EventList) { | ||
var root = $("#event-list-container-{{$courseid}}{{/courseid}}"); | ||
EventList.registerEventListeners(root); | ||
}); | ||
{{/js}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
theme/bootstrapbase/templates/block_myoverview/course-paging-content-item.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{{! | ||
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 block_myoverview/course-paging-content-item | ||
This template renders each course block. | ||
Example context (json): | ||
{ | ||
"page": 1, | ||
"active": true, | ||
"courses": [ | ||
{ | ||
"fullnamedisplay": "course 1", | ||
"viewurl": "https://www.google.com", | ||
"startdate": 1490252232, | ||
"enddate": 1490252232, | ||
"summary": "It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout." | ||
}, | ||
{ | ||
"fullnamedisplay": "course 2", | ||
"viewurl": "https://www.google.com", | ||
"startdate": 1490252232, | ||
"enddate": 1490252232, | ||
"summary": "It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout." | ||
} | ||
] | ||
} | ||
}} | ||
{{< block_myoverview/paging-content-item }} | ||
{{$content}} | ||
{{#courses}} | ||
{{> block_myoverview/courses-view-course-item }} | ||
{{/courses}} | ||
{{/content}} | ||
{{/ block_myoverview/paging-content-item }} |
Oops, something went wrong.