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-57445 block_myoverview: templates for theme clean
Part of MDL-55611 epic.
- Loading branch information
1 parent
b858d66
commit 42f80a9
Showing
6 changed files
with
118 additions
and
4 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
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
64 changes: 64 additions & 0 deletions
64
theme/bootstrapbase/templates/block_myoverview/event-list-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,64 @@ | ||
{{! | ||
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/event-list-item | ||
This template renders an event list item for the myoverview block. | ||
Example context (json): | ||
{ | ||
"actionname": "Submit assignment", | ||
"actionurl": "https://www.google.com", | ||
"enddate": "Nov 4th, 10am", | ||
"contextname": "Assignment due 1", | ||
"contexturl": "https://www.google.com", | ||
"coursename": "Course 1", | ||
"itemcount": 1, | ||
"icon": { | ||
"key": "icon", | ||
"component": "mod_assign", | ||
"alttext": "Assignment icon" | ||
} | ||
} | ||
}} | ||
<li class="list-group-item" data-region="event-list-item"> | ||
<div class="container-fluid"> | ||
<div class="row-fluid"> | ||
{{#itemcount}} | ||
<div class="pull-xs-right visible-desktop m-l-1"> | ||
<span class="tag tag-pill tag-default">{{.}}</span> | ||
</div> | ||
{{/itemcount}} | ||
<div class="d-inline-block pull-xs-right m-l-1"><a class="visible-desktop" href="{{{actionurl}}}">{{actionname}}</a></div> | ||
<div class="d-inline-block pull-xs-right"><div class="visible-desktop">{{enddate}}</div></div> | ||
<div class="d-inline-block"> | ||
{{#icon}}{{#pix}} {{key}}, {{component}}, {{alttext}} {{/pix}}{{/icon}} | ||
</div> | ||
<div class="d-inline-block m-l-1"> | ||
<div class="container-fluid"> | ||
<div class="row-fluid"> | ||
<a href="{{{contexturl}}}">{{contextname}}</a> | ||
</div> | ||
<div class="row-fluid text-muted"> | ||
{{coursename}} | ||
</div> | ||
</div> | ||
</div> | ||
<div class="text-xs-right text-right hidden-desktop">{{enddate}}</div> | ||
</div> | ||
</div> | ||
</li> |
50 changes: 50 additions & 0 deletions
50
theme/bootstrapbase/templates/block_myoverview/main.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/main | ||
This template renders the main content area for the myoverview block. | ||
Example context (json): | ||
{} | ||
}} | ||
|
||
<div id="block-myoverview-{{uniqid}}" class="block-myoverview container-fluid" data-region="myoverview"> | ||
<div class="row"> | ||
<ul class="nav nav-tabs" role="tablist"> | ||
<li class="nav-item active"> | ||
<a class="nav-link" href="#myoverview_timeline_view" role="tab" data-toggle="tab"> | ||
{{#str}} timeline, block_myoverview {{/str}} | ||
</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="#myoverview_courses_view" role="tab" data-toggle="tab"> | ||
{{#str}} courses {{/str}} | ||
</a> | ||
</li> | ||
</ul> | ||
</div> | ||
|
||
<div class="tab-content"> | ||
<div role="tabpanel" class="tab-pane fade in active" id="myoverview_timeline_view"> | ||
{{> block_myoverview/timeline-view }} | ||
</div> | ||
<div role="tabpanel" class="tab-pane fade" id="myoverview_courses_view"> | ||
{{> block_myoverview/courses-view }} | ||
</div> | ||
</div> | ||
</div> |