mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Merge branch 'develop' into develop-2.9
This commit is contained in:
3
docs/models/extras/imageattachment.md
Normal file
3
docs/models/extras/imageattachment.md
Normal file
@ -0,0 +1,3 @@
|
||||
# Image Attachments
|
||||
|
||||
Certain objects in NetBox support the attachment of uploaded images. These will be saved to the NetBox server and made available whenever the object is viewed.
|
@ -1,5 +1,14 @@
|
||||
# NetBox v2.8
|
||||
|
||||
## v2.8.9 (FUTURE)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* [#4875](https://github.com/netbox-community/netbox/issues/4875) - Fix documentation for image attachments
|
||||
* [#4876](https://github.com/netbox-community/netbox/issues/4876) - Fix labels for sites in staging or decommissioning status
|
||||
|
||||
---
|
||||
|
||||
## v2.8.8 (2020-07-21)
|
||||
|
||||
### Enhancements
|
||||
|
@ -260,8 +260,10 @@ class Site(ChangeLoggedModel, CustomFieldModel):
|
||||
]
|
||||
|
||||
STATUS_CLASS_MAP = {
|
||||
SiteStatusChoices.STATUS_ACTIVE: 'success',
|
||||
SiteStatusChoices.STATUS_PLANNED: 'info',
|
||||
SiteStatusChoices.STATUS_STAGING: 'primary',
|
||||
SiteStatusChoices.STATUS_ACTIVE: 'success',
|
||||
SiteStatusChoices.STATUS_DECOMMISSIONING: 'warning',
|
||||
SiteStatusChoices.STATUS_RETIRED: 'danger',
|
||||
}
|
||||
|
||||
|
@ -27,12 +27,12 @@ def _get_viewname(instance, action):
|
||||
|
||||
@register.inclusion_tag('buttons/clone.html')
|
||||
def clone_button(instance):
|
||||
viewname = _get_viewname(instance, 'add')
|
||||
url = reverse(_get_viewname(instance, 'add'))
|
||||
|
||||
# Populate cloned field values
|
||||
param_string = prepare_cloned_fields(instance)
|
||||
if param_string:
|
||||
url = '{}?{}'.format(reverse(viewname), param_string)
|
||||
url = f'{url}?{param_string}'
|
||||
|
||||
return {
|
||||
'url': url,
|
||||
|
Reference in New Issue
Block a user