mirrored from git://git.moodle.org/moodle.git
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDL-75423 gradereport_singleview: Next/previous user/item links
Added navigation links similar to user report page. Removed top paging bar. Bottom paging bar and select per page are moved on same level with next/previous links.
- Loading branch information
1 parent
678a2bc
commit 6ae4e00
Showing
5 changed files
with
153 additions
and
42 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
65 changes: 65 additions & 0 deletions
65
grade/report/singleview/templates/report_navigation.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,65 @@ | ||
{{! | ||
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 gradereport_user/user_navigation | ||
The previous/next user navigation for the user report view. | ||
Context variables required for this template: | ||
* previoususer - (optional) The object containing information about the previous user. | ||
* name - The name of the previous user. | ||
* url - The URL to the previous user report. | ||
* nextuser - (optional) The object containing information about the next user. | ||
* name - The name of the next user. | ||
* url - The URL to the next user report. | ||
Example context (json): | ||
{ | ||
"previoususer": { | ||
"name": "John Smith", | ||
"url": "https://example.com/grade/report/user/index.php?id=2&userid=3" | ||
}, | ||
"previoususer": { | ||
"name": "Jane Doe", | ||
"url": "https://example.com/grade/report/user/index.php?id=2&userid=5" | ||
} | ||
} | ||
}} | ||
<div class="report-navigation w-100"> | ||
<div class="container w-100 d-flex"> | ||
{{#perpageselect}} | ||
<div class="d-flex report-paging"> | ||
{{{perpageselect}}} | ||
{{{pager}}} | ||
</div> | ||
{{/perpageselect}} | ||
<div class="d-flex ml-auto"> | ||
{{#previoususer}} | ||
<div class="previous d-flex"> | ||
<a href="{{url}}" aria-label="{{#str}} gotopreviousreport, gradereport_singleview {{/str}}"> | ||
<i class="fa fa-caret-left fa-lg pr-1"></i> | ||
{{name}} | ||
</a> | ||
</div> | ||
{{/previoususer}} | ||
</div> | ||
<div class="d-flex ml-auto"> | ||
{{#nextuser}} | ||
<div class="next d-flex ml-auto"> | ||
<a href="{{url}}" aria-label="{{#str}} gotonextreport, gradereport_singleview {{/str}}"> | ||
{{name}} | ||
<i class="fa fa-caret-right fa-lg pl-1"></i> | ||
</a> | ||
</div> | ||
{{/nextuser}} | ||
</div> | ||
</div> | ||
</div> |