Skip to content

Commit

Permalink
MDL-76150 gradereport_grader: status icons stick to the row's buttom
Browse files Browse the repository at this point in the history
- There's 20px gap between status icons
- The row height adapt to the content
  • Loading branch information
rezaies authored and paulholden committed Apr 5, 2023
1 parent d93c99f commit 0867203
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 21 deletions.
15 changes: 11 additions & 4 deletions grade/report/grader/styles.css
Expand Up @@ -26,6 +26,7 @@
border-left-width: 0;
padding: 10px;
vertical-align: top;
height: 1em;
}

.path-grade-report-grader .overriddengrade {
Expand All @@ -43,12 +44,19 @@
color: #ca3120;
}

.path-grade-report-grader .gradecell {
.path-grade-report-grader .grade_icons,
.path-grade-report-grader .category_grade_icons {
white-space: nowrap;
margin-top: 10px;
margin-right: 10px;
}

.path-grade-report-grader .gradecell > * {
white-space: normal;
.path-grade-report-grader .grade_icons .icon {
margin-right: 20px;
}

.path-grade-report-grader .grade_icons .icon:last-child {
margin-right: 0;
}

.path-grade-report-grader .grade_icons {
Expand Down Expand Up @@ -86,7 +94,6 @@
*/
.path-grade-report-grader .gradeparent .user.cell {
white-space: nowrap;
height: 100px;
}

.path-grade-report-grader .gradeparent .highlightable.cell {
Expand Down
36 changes: 23 additions & 13 deletions grade/report/grader/templates/cell.mustache
Expand Up @@ -33,16 +33,26 @@
"name": "grade[313][624]"
}
}}
{{#iseditable}}
{{#scale}}
{{>core_grades/grades/grader/scale}}
{{/scale}}
{{^scale}}
{{>core_grades/grades/grader/input}}
{{/scale}}
{{/iseditable}}
{{^iseditable}}
{{>core_grades/grades/grader/text}}
{{/iseditable}}
{{{actionmenu}}}
{{{statusicons}}}
<div class="d-flex flex-column h-100">
<div class="d-flex">
<div class="d-flex flex-grow-1">
{{#iseditable}}
{{#scale}}
{{>core_grades/grades/grader/scale}}
{{/scale}}
{{^scale}}
{{>core_grades/grades/grader/input}}
{{/scale}}
{{/iseditable}}
{{^iseditable}}
{{>core_grades/grades/grader/text}}
{{/iseditable}}
</div>
<div>
{{{actionmenu}}}
</div>
</div>
<div class="d-flex flex-grow-1 align-items-end">
{{{statusicons}}}
</div>
</div>
18 changes: 14 additions & 4 deletions grade/report/grader/templates/headercell.mustache
Expand Up @@ -27,7 +27,17 @@
"statusicons": "<div class='grade_icons'><i class='icon fa fa-lock fa-fw text-muted' title='Locked' role='img' aria-label='Locked'></i></div>"
}
}}
{{{headerlink}}}
{{{arrow}}}
{{{singleview}}}
{{{statusicons}}}
<div class="d-flex flex-column h-100">
<div>
<div class="d-flex flex-grow-1">
{{{headerlink}}}
{{{arrow}}}
</div>
<div>
{{{singleview}}}
</div>
</div>
<div class="d-flex flex-grow-1 align-items-end">
{{{statusicons}}}
</div>
</div>

0 comments on commit 0867203

Please sign in to comment.