Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
MOOC packages by hacklab
django-courses-legacy
Commits
351b8789
Commit
351b8789
authored
4 years ago
by
Leonardo Piccioni de Almeida
Browse files
Options
Download
Email Patches
Plain Diff
Fix regressions in collapsible table
parent
19662740
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
41 deletions
+34
-41
courses_legacy/static/js/reports/city-participation-report/city-participation-report.component.js
...rticipation-report/city-participation-report.component.js
+2
-2
courses_legacy/templates/components/city-participation-report-list.template.html
...s/components/city-participation-report-list.template.html
+12
-16
courses_legacy/templates/components/city-participation-report.template.html
...plates/components/city-participation-report.template.html
+20
-23
No files found.
courses_legacy/static/js/reports/city-participation-report/city-participation-report.component.js
View file @
351b8789
...
...
@@ -19,7 +19,7 @@
var
ctrl
=
this
;
ctrl
.
minimized
=
true
;
ctrl
.
cities_report
=
undefined
;
ctrl
.
cities_report
=
[]
;
ctrl
.
$onInit
=
function
()
{
};
...
...
@@ -27,7 +27,7 @@
ctrl
.
toggleDetails
=
toggleDetails
;
function
toggleDetails
()
{
if
(
ctrl
.
cities_report
===
undefined
)
{
if
(
ctrl
.
cities_report
.
length
===
0
)
{
NteMunicipiosReport
.
get
({
nte
:
ctrl
.
nte
.
id
},
(
data
)
=>
{
ctrl
.
cities_report
=
data
;
});
...
...
This diff is collapsed.
Click to expand it.
courses_legacy/templates/components/city-participation-report-list.template.html
View file @
351b8789
...
...
@@ -26,23 +26,19 @@
</select>
</div>
<div
class=
"table-wrapper"
>
<table>
<thead>
<tr>
<th>
Município por NTE
</th>
<th>
Participantes ativos
</th>
<th>
Participantes não ativos
</th>
<th>
Usuários não participantes
</th>
<th>
Total geral
</th>
<th></th>
</tr>
</thead>
<tbody
class=
"summary"
>
<city-participation-report
nte=
"nte"
ng-repeat=
"nte in $ctrl.ntes"
></city-participation-report>
</tbody>
</table>
<div
class=
"table"
role=
"table"
>
<div
class=
"table-header table-row"
role=
"row"
>
<div
role=
"columnheader"
>
Município por NTE
</div>
<div
role=
"columnheader"
>
Participantes ativos
</div>
<div
role=
"columnheader"
>
Participantes não ativos
</div>
<div
role=
"columnheader"
>
Usuários não participantes
</div>
<div
role=
"columnheader"
>
Total geral
</div>
<div></div>
</div>
<city-participation-report
nte=
"nte"
ng-repeat=
"nte in $ctrl.ntes"
></city-participation-report>
</div>
</div>
</main
>
</main
div
</section
>
{% endverbatim %}
This diff is collapsed.
Click to expand it.
courses_legacy/templates/components/city-participation-report.template.html
View file @
351b8789
{% verbatim %}
<div>
<tr>
<td><b>
{{ $ctrl.nte.name }}
</b></td>
<td>
{{ $ctrl.nte.activity_summary.actives }}
</td>
<td>
{{ $ctrl.nte.activity_summary.not_actives }}
</td>
<td>
{{ $ctrl.nte.activity_summary.not_involved }}
</td>
<td>
{{ $ctrl.nte.activity_summary.total }}
</td>
<td>
<button
class=
"btn btn-primary collapse-button"
ng-click=
"$ctrl.toggleDetails()"
>
{{ $ctrl.minimized ? 'Exibir' : 'Ocultar' }} municípios
<i
ng-class=
"['fa', $ctrl.minimized ? 'fa-chevron-down' : 'fa-chevron-up']"
aria-hidden=
"true"
></i>
</button>
</td>
</tr>
<div
class=
"summary table-row"
role=
"row"
>
<div
role=
"cell"
><b>
{{ $ctrl.nte.name }}
</b></div>
<div
role=
"cell"
>
{{ $ctrl.nte.activity_summary.actives }}
</div>
<div
role=
"cell"
>
{{ $ctrl.nte.activity_summary.not_actives }}
</div>
<div
role=
"cell"
>
{{ $ctrl.nte.activity_summary.not_involved }}
</div>
<div
role=
"cell"
>
{{ $ctrl.nte.activity_summary.total }}
</div>
<div
role=
"cell"
>
<button
class=
"btn btn-primary collapse-button"
ng-click=
"$ctrl.toggleDetails()"
>
{{ $ctrl.minimized ? 'Exibir' : 'Ocultar' }} municípios
<i
ng-class=
"['fa', $ctrl.minimized ? 'fa-chevron-down' : 'fa-chevron-up']"
aria-hidden=
"true"
></i>
</button>
</div>
</div>
<div
class=
"details"
ng-if=
"!$ctrl.minimized && $ctrl.cities_report"
>
<div
ng-repeat=
"(city, activity) in $ctrl.cities_report"
>
<tr>
<td><b>
{{ city }}
</b></td>
<td>
{{ activity.actives }}
</td>
<td>
{{ activity.not_actives }}
</td>
<td>
{{ activity.not_involved }}
</td>
<td>
{{ activity.actives + activity.not_actives + activity.not_involved }}
</td>
<td></td>
</tr>
<div
class=
"details"
ng-if=
"!$ctrl.minimized"
>
<div
class=
"detail table-row"
role=
"row"
ng-repeat=
"(city, activity) in $ctrl.cities_report"
>
<div
role=
"cell"
>
{{ city }}
</div>
<div
role=
"cell"
>
{{ activity.actives }}
</div>
<div
role=
"cell"
>
{{ activity.not_actives }}
</div>
<div
role=
"cell"
>
{{ activity.not_involved }}
</div>
<div
role=
"cell"
>
{{ activity.actives + activity.not_actives + activity.not_involved }}
</div>
<div></div>
</div>
</div>
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment