[PR #2453] [CLOSED] Make netbox pages more print-friendly #12377

Closed
opened 2025-12-29 22:21:10 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/2453
Author: @bbock
Created: 9/22/2018
Status: Closed

Base: developHead: printfriendly


📝 Commits (4)

  • f1b50fe Hide sub-header in print
  • 68a269b Hide search panel and tags panel in print
  • 7d7368a CSS-only: Hide more elements in print
  • 52c1e79 Hide related elements in print

📊 Changes

25 files changed (+60 additions, -30 deletions)

View changed files

📝 netbox/project-static/css/base.css (+33 -3)
📝 netbox/templates/circuits/circuit.html (+1 -1)
📝 netbox/templates/circuits/provider.html (+1 -1)
📝 netbox/templates/dcim/device.html (+2 -2)
📝 netbox/templates/dcim/devicetype.html (+1 -1)
📝 netbox/templates/dcim/interface.html (+1 -1)
📝 netbox/templates/dcim/rack.html (+1 -1)
📝 netbox/templates/dcim/site.html (+1 -1)
📝 netbox/templates/extras/configcontext.html (+1 -1)
📝 netbox/templates/extras/objectchange.html (+2 -2)
📝 netbox/templates/extras/report.html (+1 -1)
📝 netbox/templates/inc/search_panel.html (+1 -1)
📝 netbox/templates/inc/tags_panel.html (+1 -1)
📝 netbox/templates/ipam/aggregate.html (+1 -1)
📝 netbox/templates/ipam/ipaddress.html (+2 -2)
📝 netbox/templates/ipam/prefix.html (+1 -1)
📝 netbox/templates/ipam/service.html (+1 -1)
📝 netbox/templates/ipam/vlan.html (+1 -1)
📝 netbox/templates/ipam/vlangroup_vlans.html (+1 -1)
📝 netbox/templates/ipam/vrf.html (+1 -1)

...and 5 more files

📄 Description

Fixes: #2435

This change hides several elements that make no sense for printing by adapting CSS.
Some classes and ids needed to be inserted into the templates.

Hidden / removed:

  • search and tags panels in list views
  • navigation tabs
  • textual relative URLs for each link (default feature of Bootstrap that makes no sense for netbox)
  • sub header (breadcrumbs and search box)
  • buttons
  • "related" panels: the links don't make sense on paper
  • padding at top of page

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/2453 **Author:** [@bbock](https://github.com/bbock) **Created:** 9/22/2018 **Status:** ❌ Closed **Base:** `develop` ← **Head:** `printfriendly` --- ### 📝 Commits (4) - [`f1b50fe`](https://github.com/netbox-community/netbox/commit/f1b50fe12fdc6d5af37b79f1fee54760367e3fbb) Hide sub-header in print - [`68a269b`](https://github.com/netbox-community/netbox/commit/68a269b26643c8f7a3ace0e09967adf30ae0bac6) Hide search panel and tags panel in print - [`7d7368a`](https://github.com/netbox-community/netbox/commit/7d7368a52f6b514bf031fe4aa61b01b47fc6e6b8) CSS-only: Hide more elements in print - [`52c1e79`](https://github.com/netbox-community/netbox/commit/52c1e795a1f7fdffecd668012a9bbd46f298a38a) Hide related elements in print ### 📊 Changes **25 files changed** (+60 additions, -30 deletions) <details> <summary>View changed files</summary> 📝 `netbox/project-static/css/base.css` (+33 -3) 📝 `netbox/templates/circuits/circuit.html` (+1 -1) 📝 `netbox/templates/circuits/provider.html` (+1 -1) 📝 `netbox/templates/dcim/device.html` (+2 -2) 📝 `netbox/templates/dcim/devicetype.html` (+1 -1) 📝 `netbox/templates/dcim/interface.html` (+1 -1) 📝 `netbox/templates/dcim/rack.html` (+1 -1) 📝 `netbox/templates/dcim/site.html` (+1 -1) 📝 `netbox/templates/extras/configcontext.html` (+1 -1) 📝 `netbox/templates/extras/objectchange.html` (+2 -2) 📝 `netbox/templates/extras/report.html` (+1 -1) 📝 `netbox/templates/inc/search_panel.html` (+1 -1) 📝 `netbox/templates/inc/tags_panel.html` (+1 -1) 📝 `netbox/templates/ipam/aggregate.html` (+1 -1) 📝 `netbox/templates/ipam/ipaddress.html` (+2 -2) 📝 `netbox/templates/ipam/prefix.html` (+1 -1) 📝 `netbox/templates/ipam/service.html` (+1 -1) 📝 `netbox/templates/ipam/vlan.html` (+1 -1) 📝 `netbox/templates/ipam/vlangroup_vlans.html` (+1 -1) 📝 `netbox/templates/ipam/vrf.html` (+1 -1) _...and 5 more files_ </details> ### 📄 Description ### Fixes: #2435 This change hides several elements that make no sense for printing by adapting CSS. Some classes and ids needed to be inserted into the templates. Hidden / removed: - search and tags panels in list views - navigation tabs - textual relative URLs for each link (default feature of Bootstrap that makes no sense for netbox) - sub header (breadcrumbs and search box) - buttons - "related" panels: the links don't make sense on paper - padding at top of page --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 22:21:10 +01:00
adam closed this issue 2025-12-29 22:21:10 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12377