Skip to content

Commit 72a2e47

Browse files
committed
Rename template parameters
1 parent e847a0d commit 72a2e47

9 files changed

Lines changed: 18 additions & 23 deletions

File tree

src/uproot/default/Bare.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,31 +15,31 @@
1515
<meta name="viewport" content="width=device-width, initial-scale=1">
1616
<meta name="robots" content="noindex, nofollow, noarchive">
1717

18-
{% if nobootstrap is not defined %}
18+
{% if not (disable_bootstrap | default(false)) %}
1919
<link rel="stylesheet" href="{{ internalstatic('vendor/bootstrap/bootstrap.min.css') }}">
2020
<script src="{{ internalstatic('vendor/bootstrap/bootstrap.bundle.min.js') }}"></script>
2121
{% endif %}
2222

2323
<link rel="stylesheet" href="{{ internalstatic('style.css') }}">
2424

25-
{% if nowebfonts is not defined %}
25+
{% if not (disable_uproot_fonts | default(false)) %}
2626
<link rel="stylesheet" href="{{ internalstatic('webfonts.css') }}">
27-
{% if normalnums is not defined %}
27+
{% if not (disable_tabular_numbers | default(false)) %}
2828
<link rel="stylesheet" href="{{ internalstatic('inter-tnum.css') }}">
2929
{% endif %}
3030
{% endif %}
3131

3232
<script src="{{ internalstatic('uproot.js') }}"></script>
33-
{% if noterms is not defined %}
33+
{% if not (disable_terms | default(false)) %}
3434
<script src="{{ uproot_terms_url }}"></script>
3535
{% endif %}
3636
<script>
3737
uproot.vars = {{ _uproot_js | tojson | safe }};
3838
window.C = uproot.vars._uproot_internal?.C;
3939

40-
{% if noautostart is not defined %}
40+
{% if not (disable_auto_start | default(false)) %}
4141
uproot.onStart(() => {
42-
{% if noconnectionlostmodal is not defined %}
42+
{% if not (disable_connection_lost_modal | default(false)) %}
4343
// Enable Connection lost modal monitoring first (includes startup failsafe)
4444
uproot.enableConnectionLostModal();
4545
{% endif %}
@@ -138,7 +138,7 @@ <h5 class="modal-title">
138138
</div>
139139
</div>
140140

141-
{% if noconnectionlostmodal is not defined %}
141+
{% if not (disable_connection_lost_modal | default(false)) %}
142142
<div class="modal fade" id="connection-timeout-modal" tabindex="-1" aria-hidden="true" data-bs-backdrop="static" data-bs-keyboard="false" aria-modal="true" role="alertdialog">
143143
<div class="modal-dialog">
144144
<div class="modal-content">

src/uproot/default/Base.html

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
{% extends "Bare.html" %}
22

33

4-
{% if buttons is not defined %}
5-
{% set buttons = True %}
6-
{% endif %}
7-
8-
94
{% block titlearea %}
105

116
{% if _uproot_title %}
@@ -19,7 +14,7 @@ <h1 id="uproot-title" class="my-4">
1914

2015
{% block uproot_main_buttons %}
2116

22-
{% if buttons and not buttons_placed.placed %}
17+
{% if (buttons | default(true)) and not buttons_placed.placed %}
2318
<div id="uproot-button-wrapper">
2419
{% if page.allow_back %}
2520
<button type="button" id="uproot-button-back" class="btn btn-outline-secondary" onclick="uproot.goBack()">

src/uproot/default/JustPOST.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% extends "Bare.html" %}
2-
{% set noautostart = True %}
2+
{% set disable_auto_start = True %}
33

44
{% block main %}
55

src/uproot/default/RoomFull.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33

44
{% set buttons = False %}
5-
{% set noautostart = True %}
5+
{% set disable_auto_start = True %}
66

77

88
{% block title %}

src/uproot/default/RoomHello.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{% extends "Base.html" %}
22
{% set buttons = False %}
3-
{% set noautostart = True %}
3+
{% set disable_auto_start = True %}
44

55
{% block title %}
66
{% if _uproot_internal.needlabel %}

src/uproot/default/admin/Admin.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ <h5 class="modal-title" id="error-modalLabel">
101101
</div>
102102
</div>
103103

104-
{% if nonav is not defined %}
104+
{% if not (disable_navigation | default(false)) %}
105105
<nav class="navbar navbar-dark navbar-expand-lg bg-uproot sticky-top shadow-sm" id="uproot-navbar">
106106
<div class="container">
107107
<h1 class="fs-4 p-0 mb-1"><a class="link-light link-offset-2 link-underline-light link-underline-opacity-0 link-underline-opacity-100-hover" href="{{ _uproot_internal.root }}/admin/" tabindex="-1">uproot</a></h1>
@@ -195,7 +195,7 @@ <h2 id="uproot-title" class="fw-semibold my-4">
195195
<div class="col-12 col-lg-6">
196196
<a class="btn btn-xs btn-danger me-2 mb-2 mt-1" href="https://github.com/mrpg/uproot/issues" target="_blank">{% translate %}Report a bug{% endtranslate %}</a>
197197
<a class="btn btn-xs btn-warning me-2 mb-2 mt-1" href="https://q.mg.sb/uproot-help" target="_blank">{% translate %}Get help{% endtranslate %}</a>
198-
{% if nonav is not defined %}
198+
{% if not (disable_navigation | default(false)) %}
199199
<button type="button" class="btn btn-xs btn-success mb-2 mt-1" onclick="praise()">{% translate %}Submit praise{% endtranslate %}</button>
200200
{% endif %}
201201
</div>

src/uproot/default/admin/Login.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{% extends "Admin.html" %}
22

33

4-
{% set nonav = True %}
4+
{% set disable_navigation = True %}
55

66

77
{% block title %}

src/uproot/default/admin/Room.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ <h3 class="border-bottom border-uproot-light fw-semibold mb-0 mt-2 pb-3 text-upr
127127
<input type="hidden" name="assignees" id="assignees" value="">
128128
<div class="ps-1">
129129
<div class="form-check mt-3">
130-
<input class="form-check-input" type="checkbox" id="nogrow" name="nogrow" value="1" checked>
131-
<label for="nogrow">Set room capacity to number of players</label>
130+
<input class="form-check-input" type="checkbox" id="disable_growth" name="disable_growth" value="1" checked>
131+
<label for="disable_growth">Set room capacity to number of players</label>
132132
<small class="d-block form-text pt-2">
133133
{% translate %}
134134
If this box is unchecked, the room’s capacity will not be changed. This means that new room entrants can grow the session.

src/uproot/server2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,7 @@ async def new_session_in_room(
734734
settings: str = Form(""),
735735
sname: str = Form(""),
736736
unames: str = Form(""),
737-
nogrow: Optional[bool] = Form(False),
737+
disable_growth: Optional[bool] = Form(False),
738738
simulate: Optional[bool] = Form(False),
739739
auth: dict[str, Any] = Depends(auth_required),
740740
) -> Response:
@@ -784,7 +784,7 @@ async def new_session_in_room(
784784
admin.rooms[roomname]["sname"] = sid.sname
785785
admin.rooms[roomname]["open"] = True
786786

787-
if nogrow:
787+
if disable_growth:
788788
admin.rooms[roomname]["capacity"] = nplayers
789789

790790
with t.materialize(sid) as session:

0 commit comments

Comments
 (0)