Skip to content

Commit 20dca4c

Browse files
Merge branch 'main' into main
2 parents 41fe87f + 8dd7fb9 commit 20dca4c

File tree

15 files changed

+23
-440
lines changed

15 files changed

+23
-440
lines changed

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
jobs:
1111
build:
1212
name: ${{ matrix.travis_job }} (Python ${{ matrix.python-version }})
13-
runs-on: ubuntu-20.04
13+
runs-on: ubuntu-24.04
1414
services:
1515
postgres:
1616
image: postgres:10.8
@@ -34,7 +34,7 @@ jobs:
3434
- uses: actions/checkout@v4
3535
- uses: niden/actions-memcached@v7
3636
- name: Set up Python ${{ matrix.python-version }}
37-
uses: actions/setup-python@v4
37+
uses: deadsnakes/[email protected]
3838
with:
3939
python-version: ${{ matrix.python-version }}
4040
- name: Prepare for Installing Dependencies

esp/esp/program/modules/handlers/programprintables.py

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1646,63 +1646,6 @@ def classchecklists(self, request, tl, one, two, module, extra, prog):
16461646

16471647
return render_to_response(self.baseDir()+'classchecklists.html', request, context)
16481648

1649-
@aux_call
1650-
@needs_admin
1651-
def adminbinder(self, request, tl, one, two, module, extra, prog):
1652-
1653-
if extra not in ['teacher', 'classid', 'timeblock']:
1654-
return self.goToCore(tl)
1655-
context = {'module': self}
1656-
1657-
scheditems = []
1658-
1659-
1660-
if extra == 'teacher':
1661-
teachers = sorted(self.program.teachers())
1662-
list(map(ESPUser, teachers))
1663-
1664-
scheditems = []
1665-
1666-
for teacher in teachers:
1667-
classes = [ cls for cls in teacher.getTaughtClasses()
1668-
if cls.isAccepted() and
1669-
cls.parent_program == self.program ]
1670-
for cls in classes:
1671-
scheditems.append({'teacher': teacher,
1672-
'class' : cls})
1673-
1674-
context['scheditems'] = scheditems
1675-
return render_to_response(self.baseDir()+'adminteachers.html', request, context)
1676-
1677-
1678-
1679-
if extra == 'classid':
1680-
classes = [cls for cls in self.program.classes()
1681-
if cls.isAccepted() ]
1682-
1683-
classes.sort(key=ClassSubject.idcmp)
1684-
1685-
for cls in classes:
1686-
for teacher in cls.get_teachers():
1687-
scheditems.append({'teacher': teacher,
1688-
'class' : cls})
1689-
context['scheditems'] = scheditems
1690-
return render_to_response(self.baseDir()+'adminclassid.html', request, context)
1691-
1692-
1693-
if extra == 'timeblock':
1694-
classes = sorted([cls for cls in self.program.classes()
1695-
if cls.isAccepted() ])
1696-
1697-
1698-
for cls in classes:
1699-
for teacher in cls.get_teachers():
1700-
scheditems.append({'teacher': teacher,
1701-
'cls' : cls})
1702-
1703-
context['scheditems'] = scheditems
1704-
return render_to_response(self.baseDir()+'adminclasstime.html', request, context)
1705-
17061649
@aux_call
17071650
@needs_admin
17081651
def certificate(self, request, tl, one, two, module, extra, prog):

esp/esp/utils/widgets.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ class NavStructureWidget(forms.Widget):
324324
var delete_button = $j("<button class='btn btn-mini btn-danger'>Delete link</button>");
325325
delete_button.on("click", {{ name }}_delete_link);
326326
entry.append(delete_button);
327-
$j("#{{ name }}_entries input").on("change", {{ name }}_save);
327+
$j("#{{ name }}_entries input, #{{ name }}_entries select").on("change", {{ name }}_save);
328328
}
329329
330330
function {{ name }}_add_tab(obj, data)
@@ -785,8 +785,9 @@ def compress(self, value):
785785
class NavStructureWidgetWithIcons(NavStructureWidget):
786786
add_link_body = """
787787
entry.append($j("<span>Icon: </span>"));
788-
var select = $j("<select class='data_icon nav_secondary_field input-medium glyphicon' />");
789-
select.append($j("<option value=''" +
788+
var select = $j("<select style='font-family: Glyphicons Halflings'" +
789+
"class='data_icon nav_secondary_field input-medium glyphicon' />");
790+
select.append($j("<option style='font-family: Glyphicons Halflings' value=''" +
790791
(data.icon ? "" : " selected") +
791792
">(none)</option>"));
792793
%(entries)s
@@ -795,7 +796,7 @@ class NavStructureWidgetWithIcons(NavStructureWidget):
795796
""" % {
796797
'super_add_link_body': NavStructureWidget.add_link_body,
797798
'entries': '\n'.join('''
798-
select.append($j("<option value='%(icon)s'" +
799+
select.append($j("<option style='font-family: Glyphicons Halflings' value='%(icon)s'" +
799800
(data.icon === "%(icon)s" ? " selected" : "") +
800801
">%(unicode)s (%(icon)s)</option>"));'''
801802
% {'icon': icon, 'unicode': text_unicode}

esp/templates/program/modules/programprintables/studentreceipts.html renamed to esp/public/media/default_styles/rosters.css

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
1-
<html>
2-
<head>
3-
<title>Student Receipts</title>
4-
<style type="text/css" media="print,screen">
51
body { font-family: georgia; }
62
.classtitle { text-align: center; font-size: 15pt; font-weight: bold; font-family: georgia; padding: .3in;}
73

84
.classroster { text-align: center; }
9-
.title span { font-weight:bolder; text-decoration: underline;
10-
font-size:16pt; }
11-
12-
.blocks { padding: 4px; font-size: 10pt; font-weight: bold; }
5+
.blocks { padding: 8px; font-size: 10pt; font-weight: bold; }
136
.classroom { padding: 8px; font-size: 10pt; font-weight: bold; }
147
.pretty {border: 1px solid black; }
158
.pretty td { border: 1px solid black; }
@@ -19,17 +12,11 @@
1912
.teachername span { border: 1px solid black; padding: 3px;
2013
width: auto; }
2114
.classroom { vertical-align: top; }
22-
.blokcs { vertical-align: top; }
15+
.blocks { vertical-align: top; }
2316
#pagebreak {page-break-after: always; }
24-
</style>
25-
</head>
26-
<body>
27-
{% for receipt in receipts %}
28-
{% if not forloop.first %}
29-
<div style="page-break-after: always;">&nbsp;</div>
30-
{% endif %}
31-
{% include "program/modules/programprintables/studentreceipt.html" %}
32-
{% endfor %}
33-
34-
</body>
35-
</html>
17+
table.sortable thead {
18+
background-color:#eee;
19+
color:#666666;
20+
font-weight: bold;
21+
cursor: default;
22+
}

esp/templates/program/modules/commmodule/userlist.html

Lines changed: 0 additions & 55 deletions
This file was deleted.

esp/templates/program/modules/listgenmodule/list_html.html

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,7 @@
11
<html>
22
<head>
33
<title>User List</title>
4-
<style type="text/css" media="print,screen">
5-
body { font-family: georgia; }
6-
.classtitle { text-align: center; font-size: 15pt; font-weight: bold; font-family: georgia; padding: .3in;}
7-
8-
.classroster { text-align: center; }
9-
.title span { font-weight:bolder; text-decoration: underline;
10-
font-size:16pt; }
11-
12-
.blocks { padding: 4px; font-size: 10pt; font-weight: bold; }
13-
.classroom { padding: 8px; font-size: 10pt; font-weight: bold; }
14-
.pretty {border: 1px solid black; }
15-
.pretty td { border: 1px solid black; }
16-
.pretty th { border: 1px solid black; }
17-
.pretty td { vertical-align: top; }
18-
.teachername { font-size: 9pt; }
19-
.teachername span { border: 1px solid black; padding: 3px;
20-
width: auto; }
21-
.classroom { vertical-align: top; }
22-
.blokcs { vertical-align: top; }
23-
.pretty td.oldnew { border-bottom: 0; border-top: 2px; }
24-
.pretty td.old { border-bottom: 0;
25-
border-top: 0;}
26-
#pagebreak {page-break-after: always; }
27-
</style>
4+
<link rel="stylesheet" type="text/css" href="/media/styles/rosters.css" media="print,screen">
285
<script src="/media/scripts/sorttable.js"></script>
296
</head>
307
<body>

esp/templates/program/modules/programprintables/adminclasstime.html

Lines changed: 0 additions & 67 deletions
This file was deleted.

esp/templates/program/modules/programprintables/classattendance.html

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,8 @@
11
<html>
22
<head>
33
<title>Class Rosters</title>
4-
<style type="text/css" media="print,screen">
5-
body { font-family: georgia; }
6-
.classtitle { text-align: center; font-size: 15pt; font-weight: bold; font-family: georgia; padding: .3in;}
4+
<link rel="stylesheet" type="text/css" href="/media/styles/rosters.css" media="print,screen">
75

8-
.classroster { text-align: center; }
9-
.title span { font-weight:bolder; text-decoration: underline;
10-
font-size:16pt; }
11-
12-
.blocks { padding: 4px; font-size: 10pt; font-weight: bold; }
13-
.classroom { padding: 8px; font-size: 10pt; font-weight: bold; }
14-
.pretty {border: 1px solid black; }
15-
.pretty td { border: 1px solid black; }
16-
.pretty th { border: 1px solid black; }
17-
.pretty td { vertical-align: top; }
18-
.teachername { font-size: 9pt; }
19-
.teachername span { border: 1px solid black; padding: 3px;
20-
width: auto; }
21-
.classroom { vertical-align: top; }
22-
.blokcs { vertical-align: top; }
23-
#pagebreak {page-break-after: always; }
24-
</style>
256
</head>
267
<body>
278
{% for item in scheditems %}

esp/templates/program/modules/programprintables/classchecklists.html

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,9 @@
11
<html>
22
<head>
33
<title>Class Check-in Checklists</title>
4+
<link rel="stylesheet" type="text/css" href="/media/styles/rosters.css" media="print,screen">
45
<style type="text/css" media="print,screen">
5-
body { font-family: georgia; }
6-
.classtitle { text-align: center; font-size: 15pt; font-weight: bold; font-family: georgia; padding: .3in;}
7-
8-
.classroster { text-align: center; }
9-
.title span { font-weight:bolder; text-decoration: underline;
10-
font-size:16pt; }
11-
126
.blocks { padding: 4px; font-size: 10pt; font-weight: bold; }
13-
.classroom { padding: 8px; font-size: 10pt; font-weight: bold; }
14-
.pretty {border: 1px solid black; }
15-
.pretty td { border: 1px solid black; }
16-
.pretty th { border: 1px solid black; }
17-
.pretty td { vertical-align: top; }
18-
.teachername { font-size: 9pt; }
19-
.teachername span { border: 1px solid black; padding: 3px;
20-
width: auto; }
21-
.classroom { vertical-align: top; }
22-
.blokcs { vertical-align: top; }
23-
#pagebreak {page-break-after: always; }
247
</style>
258
</head>
269
<body>

esp/templates/program/modules/programprintables/classrosters.html

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,7 @@
11
<html>
22
<head>
33
<title>Class Rosters</title>
4-
<style type="text/css" media="print,screen">
5-
body { font-family: georgia; }
6-
.classtitle { text-align: center; font-size: 15pt; font-weight: bold; font-family: georgia; padding: .3in;}
7-
8-
.classroster { text-align: center; }
9-
.title span { font-weight:bolder; text-decoration: underline;
10-
font-size:16pt; }
11-
12-
.blocks { padding: 4px; font-size: 10pt; font-weight: bold; }
13-
.classroom { padding: 8px; font-size: 10pt; font-weight: bold; }
14-
.pretty {border: 1px solid black; }
15-
.pretty td { border: 1px solid black; }
16-
.pretty th { border: 1px solid black; }
17-
.pretty td { vertical-align: top; }
18-
.teachername { font-size: 9pt; }
19-
.teachername span { border: 1px solid black; padding: 3px;
20-
width: auto; }
21-
.classroom { vertical-align: top; }
22-
.blokcs { vertical-align: top; }
23-
#pagebreak {page-break-after: always; }
24-
</style>
4+
<link rel="stylesheet" type="text/css" href="/media/styles/rosters.css" media="print,screen">
255
</head>
266
<body>
277
{% for item in scheditems %}

0 commit comments

Comments
 (0)