Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closes #12128: Refresh the web UI to employ the Tabler CSS framework #14833

Merged
merged 87 commits into from
Jan 17, 2024
Merged
Changes from 1 commit
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
edcdc90
Remove dark mode styling
jeremystretch Dec 29, 2023
6b61b22
Condense & rename light mode stylesheet
jeremystretch Dec 29, 2023
f0ef7d8
Upgrade to Bootstrap 5.3.2
jeremystretch Dec 29, 2023
76d8344
Swap out Bootstrap for Tabler; remove custom styling
jeremystretch Dec 29, 2023
69f849d
Update base page layout for Tabler
jeremystretch Dec 29, 2023
4e18897
Update login page
jeremystretch Dec 29, 2023
f646576
Bump node to v18
jeremystretch Dec 29, 2023
ecb6347
Update button styles
jeremystretch Dec 30, 2023
0a03a7e
Update object list view
jeremystretch Dec 30, 2023
f746ab1
Tweak navbar size
jeremystretch Dec 30, 2023
6fc83eb
Clean up dashboard widgets
jeremystretch Jan 2, 2024
135aff7
Ditch separate stylesheet for print media
jeremystretch Jan 2, 2024
bb1e6aa
Remove simplebar
jeremystretch Jan 2, 2024
693cc27
Remove obsolete sidebar styling
jeremystretch Jan 2, 2024
1b0182b
Clean up object view template
jeremystretch Jan 3, 2024
13265eb
Clean up object edit template
jeremystretch Jan 3, 2024
17f400e
Standardize primary button sizing
jeremystretch Jan 3, 2024
b4a5e19
Clean up object list styling
jeremystretch Jan 3, 2024
68e9c14
Add buttons for add & import to navigation menu
jeremystretch Jan 3, 2024
a2a1c38
Fix global search bar
jeremystretch Jan 4, 2024
62626bb
Fix slim-select form widget styling
jeremystretch Jan 4, 2024
910d79d
Fix toast styling
jeremystretch Jan 4, 2024
dde1cca
Set base fonts
jeremystretch Jan 4, 2024
c91aec0
Clean up paginator styling
jeremystretch Jan 4, 2024
3696871
Clean up navigation menu group headings
jeremystretch Jan 4, 2024
a1830cb
Clean up footer links
jeremystretch Jan 4, 2024
f38973e
Clean up card styles
jeremystretch Jan 5, 2024
fc24534
Move SVG styles to a designated directory
jeremystretch Jan 5, 2024
fc8cee3
Restructure SCSS files
jeremystretch Jan 5, 2024
f30d0d0
Remove obsolete/redundant dependencies
jeremystretch Jan 5, 2024
d2eab22
Fix icon spacing
jeremystretch Jan 5, 2024
06b0e1e
Update background color classes
jeremystretch Jan 5, 2024
ee4842e
Tweak banner & footer styling and spacing
jeremystretch Jan 5, 2024
cdbf195
Fix badge background colors in table content
jeremystretch Jan 5, 2024
dde6803
Bump @types/bootstrap to 5.2.10
jeremystretch Jan 5, 2024
0658ea9
Clean up form layouts
jeremystretch Jan 5, 2024
5f2fe97
Fix object selector button style
jeremystretch Jan 5, 2024
39c0e68
Fix icon padding inside small buttons
jeremystretch Jan 5, 2024
e30ff42
Fix icon & badge spacing inside buttons and tabs
jeremystretch Jan 5, 2024
8197e83
Hide paginator for empty pages
jeremystretch Jan 5, 2024
bcf1596
Fix hover color for list items (Tabler bug #1694)
jeremystretch Jan 5, 2024
fb92905
Fix width of checkbox column in empty tables
jeremystretch Jan 5, 2024
c1ecd22
Clean up bulk edit template
jeremystretch Jan 5, 2024
ba34476
Fix border color of reslug button
jeremystretch Jan 5, 2024
dab4302
Package & serve Google fonts locally
jeremystretch Jan 8, 2024
6439a91
Fix tab styling
jeremystretch Jan 8, 2024
58628aa
Reduce vetical space at top of dashboard
jeremystretch Jan 9, 2024
a88919c
Remove obsolete content-wrapper template block
jeremystretch Jan 9, 2024
9bffd41
Fix icon spacing in dropdown menu items
jeremystretch Jan 9, 2024
08ee45b
Fix color label sizing
jeremystretch Jan 9, 2024
9b2c258
Separate bulk delete form & object list into tabs
jeremystretch Jan 9, 2024
ac2343f
Fix styling of filter group headings
jeremystretch Jan 9, 2024
95d68dd
Fix styling for object changelog & journal views
jeremystretch Jan 9, 2024
f394476
Standardize ordering & styling of action buttons
jeremystretch Jan 9, 2024
77dbf5c
Fix designation of active menu item
jeremystretch Jan 10, 2024
feda63d
Automatically expand menu section containing the active link
jeremystretch Jan 11, 2024
bc6508c
Clean up nav menu styling
jeremystretch Jan 11, 2024
15385ee
Remove button colors; hide buttons except on hover/active
jeremystretch Jan 11, 2024
f864fc6
Highlight menu group containing the active item
jeremystretch Jan 11, 2024
8eed94c
Update & standardize alert styling
jeremystretch Jan 11, 2024
d8a665d
Refactor base templates to ensure consistent display of header content
jeremystretch Jan 11, 2024
ed41ce3
Tweak styling for links inside badges
jeremystretch Jan 11, 2024
d74e420
Clean up top menu
jeremystretch Jan 11, 2024
db9a583
Fix JSON/YAML toggles for config context data
jeremystretch Jan 11, 2024
a9d30d3
Fix object template header
jeremystretch Jan 11, 2024
68ccee7
Constrain tabs to container-xl; tweak header margins
jeremystretch Jan 11, 2024
dad5c8c
Fix object identifier styling
jeremystretch Jan 11, 2024
2b2e722
Fix positioning of card header buttons
jeremystretch Jan 11, 2024
04dc9a1
Remove padding from HTMX tables inside cards
jeremystretch Jan 12, 2024
a16f272
Ensure consistent use of row headings in attribute tables
jeremystretch Jan 12, 2024
d8e853d
Remove padding surrounding tables inside cards
jeremystretch Jan 12, 2024
8e8a84f
Remove obsolete CSS classes
jeremystretch Jan 12, 2024
5e1e1a9
Misc cleanup of old styling
jeremystretch Jan 12, 2024
ae399eb
Refactor 'controls' template block; ditch old classes
jeremystretch Jan 12, 2024
0045c7a
Fix login button sizing
jeremystretch Jan 12, 2024
d61414a
Limit object edit form width
jeremystretch Jan 12, 2024
b84d023
Append asterisk to required form field labels
jeremystretch Jan 12, 2024
27a3de0
Remove obsolete styling
jeremystretch Jan 12, 2024
0d7417d
Remove obsolete styling
jeremystretch Jan 16, 2024
16e212e
Fix position of progress bar outside label
jeremystretch Jan 16, 2024
94e6dd6
Fix alignment of delete button in report/script lists
jeremystretch Jan 16, 2024
2ee68d3
Fix <pre> styling
jeremystretch Jan 16, 2024
ddb53ca
Clean up page headers
jeremystretch Jan 16, 2024
f28cae6
Replace SVG icons with Material Design icons
jeremystretch Jan 17, 2024
cdba308
Restore dark mode togle functionality
jeremystretch Jan 17, 2024
0ade488
Fix top navbar background color under dark mode
jeremystretch Jan 17, 2024
bbd71fd
Rebuild static assets
jeremystretch Jan 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Clean up bulk edit template
jeremystretch committed Jan 12, 2024

Verified

This commit was signed with the committer’s verified signature.
hotenov artem
commit c1ecd2246e1fa60031b7d494682b0b30574c3b90
132 changes: 62 additions & 70 deletions netbox/templates/generic/bulk_edit.html
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@

{# Edit form #}
<div class="tab-pane show active" id="edit-form" role="tabpanel" aria-labelledby="edit-form-tab">
<form action="" method="post" class="form form-horizontal">
<form action="" method="post" class="form form-horizontal mt-5">

{% csrf_token %}
{% if request.POST.return_url %}
@@ -48,83 +48,75 @@
{{ field }}
{% endfor %}

<div class="row">
<div class="col col-md-12 col-lg-10 offset-lg-1">
<div class="card">
<div class="card-body">
{% if form.fieldsets %}

{# Render grouped fields according to declared fieldsets #}
{% for group, fields in form.fieldsets %}
<div class="field-group mb-5">
<div class="row">
<h5 class="col-9 offset-3">
{% if group %}{{ group }}{% else %}{{ model|meta:"verbose_name"|bettertitle }}{% endif %}
</h5>
</div>
{% for name in fields %}
{% with field=form|getfield:name %}
{% if field.name in form.nullable_fields %}
{% render_field field bulk_nullable=True %}
{% else %}
{% render_field field %}
{% endif %}
{% endwith %}
{% endfor %}
</div>
{% endfor %}

{# Render tag add/remove fields #}
{% if form.add_tags and form.remove_tags %}
<div class="field-group mb-5">
<div class="row">
<h5 class="col-9 offset-3">{% trans "Tags" %}</h5>
</div>
{% render_field form.add_tags %}
{% render_field form.remove_tags %}
</div>
{% endif %}

{# Render custom fields #}
{% if form.custom_fields %}
<div class="field-group mb-5">
<div class="row">
<h5 class="col-9 offset-3">{% trans "Custom Fields" %}</h5>
</div>
{% render_custom_fields form %}
</div>
{% endif %}
{% if form.fieldsets %}

{# Render comments #}
{% if form.comments %}
<div class="field-group mb-5">
<div class="row">
<h5 class="col-9 offset-3">{% trans "Comments" %}</h5>
</div>
{% render_field form.comments bulk_nullable=True %}
</div>
{# Render grouped fields according to declared fieldsets #}
{% for group, fields in form.fieldsets %}
<div class="field-group mb-5">
<div class="row">
<h5 class="col-9 offset-3">
{% if group %}{{ group }}{% else %}{{ model|meta:"verbose_name"|bettertitle }}{% endif %}
</h5>
</div>
{% for name in fields %}
{% with field=form|getfield:name %}
{% if field.name in form.nullable_fields %}
{% render_field field bulk_nullable=True %}
{% else %}
{% render_field field %}
{% endif %}
{% endwith %}
{% endfor %}
</div>
{% endfor %}

{% else %}

{# Render all fields #}
{% for field in form.visible_fields %}
{% if field.name in form.nullable_fields %}
{% render_field field bulk_nullable=True %}
{% else %}
{% render_field field %}
{% endif %}
{% endfor %}
{# Render tag add/remove fields #}
{% if form.add_tags and form.remove_tags %}
<div class="field-group mb-5">
<div class="row">
<h5 class="col-9 offset-3">{% trans "Tags" %}</h5>
</div>
{% render_field form.add_tags %}
{% render_field form.remove_tags %}
</div>
{% endif %}

{% endif %}
{# Render custom fields #}
{% if form.custom_fields %}
<div class="field-group mb-5">
<div class="row">
<h5 class="col-9 offset-3">{% trans "Custom Fields" %}</h5>
</div>
{% render_custom_fields form %}
</div>
{% endif %}

<div class="text-end">
<button type="submit" name="_apply" class="btn btn-primary">{% trans "Apply" %}</button>
<a href="{{ return_url }}" class="btn btn-outline-danger">{% trans "Cancel" %}</a>
{# Render comments #}
{% if form.comments %}
<div class="field-group mb-5">
<div class="row">
<h5 class="col-9 offset-3">{% trans "Comments" %}</h5>
</div>
{% render_field form.comments bulk_nullable=True %}
</div>
</div>
{% endif %}

{% else %}

{# Render all fields #}
{% for field in form.visible_fields %}
{% if field.name in form.nullable_fields %}
{% render_field field bulk_nullable=True %}
{% else %}
{% render_field field %}
{% endif %}
{% endfor %}

{% endif %}

<div class="text-end">
<button type="submit" name="_apply" class="btn btn-primary">{% trans "Apply" %}</button>
<a href="{{ return_url }}" class="btn btn-outline-danger">{% trans "Cancel" %}</a>
</div>

</form>