MDL-58348 block_myoverview: keep paging bar under courses
Part of MDL-55611 epic.
This commit is contained in:
committed by
Dan Poltawski
parent
db3b790920
commit
80a1ea5542
@@ -22,14 +22,15 @@
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
"enddate": "Nov 4th, 10am",
|
||||
"name": "Assignment due 1",
|
||||
"url": "https://www.google.com",
|
||||
"timesort": 1490320388,
|
||||
"action": {
|
||||
"name": "Submit assignment",
|
||||
"url": "https://www.google.com",
|
||||
"itemcount": 1,
|
||||
"showitemcount": true
|
||||
"showitemcount": true,
|
||||
"actionable": true
|
||||
},
|
||||
"icon": {
|
||||
"key": "icon",
|
||||
|
||||
@@ -24,13 +24,14 @@
|
||||
{
|
||||
"events": [
|
||||
{
|
||||
"enddate": "Nov 4th, 10am",
|
||||
"name": "Assignment due 1",
|
||||
"url": "https://www.google.com",
|
||||
"timesort": 1490320388,
|
||||
"action": {
|
||||
"name": "Submit assignment",
|
||||
"url": "https://www.google.com",
|
||||
"itemcount": 1
|
||||
"itemcount": 1,
|
||||
"actionable": true
|
||||
},
|
||||
"icon": {
|
||||
"key": "icon",
|
||||
@@ -39,13 +40,14 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"enddate": "Nov 4th, 10am",
|
||||
"name": "Assignment due 2",
|
||||
"url": "https://www.google.com",
|
||||
"timesort": 1490320388,
|
||||
"action": {
|
||||
"name": "Submit assignment",
|
||||
"url": "https://www.google.com",
|
||||
"itemcount": 1
|
||||
"itemcount": 1,
|
||||
"actionable": true
|
||||
},
|
||||
"icon": {
|
||||
"key": "icon",
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
{
|
||||
"shortname": "course 3",
|
||||
"viewurl": "https://www.google.com",
|
||||
"startdate": "Nov 1th, 10am",
|
||||
"enddate": "Nov 4th, 10am",
|
||||
"startdate": 1490320388,
|
||||
"enddate": 1490320388,
|
||||
"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."
|
||||
}
|
||||
}}
|
||||
|
||||
@@ -17,13 +17,32 @@
|
||||
{{!
|
||||
@template block_myoverview/course-paging-content-item
|
||||
|
||||
This template renders the each course block containing a summary and calendar events.
|
||||
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 }}
|
||||
{{$classes}}row{{/classes}}
|
||||
{{$content}}
|
||||
{{#courses}}
|
||||
{{> block_myoverview/courses-view-course-item }}
|
||||
|
||||
@@ -15,12 +15,34 @@
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
@template block_myoverview/paging-bar
|
||||
@template block_myoverview/course-paging-content
|
||||
|
||||
This template renders the each course block containing a summary and calendar events.
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
"pages": [
|
||||
{
|
||||
"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 }}
|
||||
|
||||
@@ -21,10 +21,10 @@
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
"shortname": "course 3",
|
||||
"fullnamedisplay": "course 3",
|
||||
"viewurl": "https://www.google.com",
|
||||
"startdate": "Nov 1th, 10am",
|
||||
"enddate": "Nov 4th, 10am",
|
||||
"startdate": 1490320388,
|
||||
"enddate": 1490320388,
|
||||
"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."
|
||||
}
|
||||
}}
|
||||
|
||||
@@ -15,16 +15,16 @@
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
@template block_myoverview/course-view-course-item
|
||||
@template block_myoverview/courses-view-course-item
|
||||
|
||||
This template renders the course summary (view by courses) for the myoverview block.
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
"shortname": "course 3",
|
||||
"fullnamedisplay": "course 3",
|
||||
"viewurl": "https://www.google.com",
|
||||
"startdate": "Nov 1th, 10am",
|
||||
"enddate": "Nov 4th, 10am",
|
||||
"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."
|
||||
}
|
||||
}}
|
||||
|
||||
@@ -21,17 +21,18 @@
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
"enddate": "Nov 4th, 10am",
|
||||
"name": "Assignment due 1",
|
||||
"url": "https://www.google.com",
|
||||
"timesort": 1490320388,
|
||||
"course": {
|
||||
"fullname": "Course 1"
|
||||
"fullnamedisplay": "Course 1"
|
||||
},
|
||||
"action": {
|
||||
"name": "Submit assignment",
|
||||
"url": "https://www.google.com",
|
||||
"itemcount": 1,
|
||||
"showitemcount": true
|
||||
"showitemcount": true,
|
||||
"actionable": true
|
||||
},
|
||||
"icon": {
|
||||
"key": "icon",
|
||||
|
||||
@@ -23,16 +23,17 @@
|
||||
{
|
||||
"events": [
|
||||
{
|
||||
"enddate": "Nov 4th, 10am",
|
||||
"name": "Assignment due 1",
|
||||
"url": "https://www.google.com",
|
||||
"timesort": 1490320388,
|
||||
"course": {
|
||||
"fullname": "Course 1"
|
||||
"fullnamedisplay": "Course 1"
|
||||
},
|
||||
"action": {
|
||||
"name": "Submit assignment",
|
||||
"url": "https://www.google.com",
|
||||
"itemcount": 1
|
||||
"itemcount": 1,
|
||||
"actionable": true
|
||||
},
|
||||
"icon": {
|
||||
"key": "icon",
|
||||
@@ -41,16 +42,17 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"enddate": "Nov 4th, 10am",
|
||||
"name": "Assignment due 2",
|
||||
"url": "https://www.google.com",
|
||||
"timesort": 1490320388,
|
||||
"course": {
|
||||
"fullname": "Course 1"
|
||||
"fullnamedisplay": "Course 1"
|
||||
},
|
||||
"action": {
|
||||
"name": "Submit assignment",
|
||||
"url": "https://www.google.com",
|
||||
"itemcount": 1
|
||||
"itemcount": 1,
|
||||
"actionable": true
|
||||
},
|
||||
"icon": {
|
||||
"key": "icon",
|
||||
|
||||
@@ -17,15 +17,19 @@
|
||||
{{!
|
||||
@template block_myoverview/paging-content-item
|
||||
|
||||
This template renders the each course block containing a summary and calendar events.
|
||||
This template renders the content of a page. It is to be used with
|
||||
the paging bar to toggle visibility of the content items.
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
"active": true,
|
||||
"page": 1,
|
||||
"content": "<p>Some page content</p>"
|
||||
}
|
||||
}}
|
||||
<div data-region="paging-content-item"
|
||||
data-page="{{page}}"
|
||||
class="{{#active}}active{{/active}}{{^active}}hidden{{/active}}">
|
||||
class="{{^active}}hidden{{/active}} {{$classes}}{{/classes}}">
|
||||
{{$content}}
|
||||
{{{content}}}
|
||||
{{/content}}
|
||||
|
||||
@@ -17,10 +17,22 @@
|
||||
{{!
|
||||
@template block_myoverview/paging-content
|
||||
|
||||
This template renders the each course block containing a summary and calendar events.
|
||||
This template renders each of the content regions for a paginated
|
||||
content section.
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
"pages": [
|
||||
{
|
||||
"active": true,
|
||||
"page": 1,
|
||||
"content": "<p>Some page content</p>"
|
||||
},
|
||||
{
|
||||
"page": 2,
|
||||
"content": "<p>Some page content</p>"
|
||||
}
|
||||
]
|
||||
}
|
||||
}}
|
||||
<div id="{{$pagingcontentid}}paging-content-{{uniqid}}{{/pagingcontentid}}" data-region="paging-content">
|
||||
|
||||
@@ -147,10 +147,11 @@ $doughnut-fill-colour: $brand-warning;
|
||||
/*rtl:ignore*/
|
||||
left: 50%;
|
||||
margin: 0;
|
||||
transform: translate(-45%, -45%);
|
||||
transform: translate(-48%, -50%);
|
||||
color: #fff;
|
||||
height: ($chart-size / 2);
|
||||
width: ($chart-size / 2);
|
||||
height: ($chart-size / 2) + 10px;
|
||||
width: ($chart-size / 2) + 10px;
|
||||
font-size: ($chart-size / 2) + 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user