Commit Graph

4 Commits

Author SHA1 Message Date
Akihiro Motoki 95629a337e Fix H405 (multi line docstring) warnings (horizon)
H405: multi line docstring summary not separated with an empty line

Partial-Bug: #1696996
Change-Id: I58f71206def1a25f3eda04b9297f1aa7d3caa646
2017-06-09 16:04:57 +00:00
Rob Cresswell 3488ab3d40 Fix compatibility issues with Django 1.10
Required modifying our URL pattern decorator to
be compatible with the slightly different callback
attribute mechanism in 1.10

Modified breadcrumb structures to always be 2-tuples
as tuple unpacking is now strictly enforced in 1.10

Also made the following things changed in Django 1.10.
- fixed the now-deprecated TEMPLATE_DEBUG.
- Caught up with Request context change
- SimpleTestCase.urls is removed in 1.10.
  ROOT_URLCONF needs to be used instead.

Co-Authored-By: Richard Jones <r1chardj0n3s@gmail.com>
Co-Authored-By: Akihiro Motoki <motoki@da.jp.nec.com>
Change-Id: I59cbd8bff117813258539ed0724fe89a9f5b77ee
Implements: blueprint dj110
2016-09-20 12:29:16 +01:00
Rob Cresswell d5b24d7b97 Use breadcrumb nav across Horizon
We've added breadcrumbs to the Details pages, but its a pretty
inconsistent experience. This patch adds breadcrumbs to the base
template, making the breadcrumbs consistent across all pages; this will
be useful when the side nav is hidden for responsive design. This patch
also makes the breadcrumbs on the detail pages behave better with
theming.

- Made the detail header and actions avoid using floats
- Moved breadcrumb truncating to the front end, so that it can be
  customised easily via CSS
- Manually added breadcrumb for ngcontainers page
- Removed overly specific HTML check from Key Pair Details test
- Fixed <dt> alignment on Key Pair Details page

Closes-Bug: 1554812
Partially-Implements: blueprint navigation-improvements
Change-Id: Ibcd4c369b5d8ad62f7c839c0deeaefc750677b40
2016-05-05 23:12:59 +00:00
Rob Cresswell 7a58d15aec Navigation + cleanup for details pages
Adds a common detail page and a breadcrumb templatetag. The breadcrumb
templatetag defaults to displaying the panel name and the existing page
title, which is usually name_or_id. The templatetag can also access the
context, and accepts a "custom_breadcrumb", for complex nested pages or
customised layouts.

This type of navigation is also useful for small devices (mobile/
tablet), providing logical direction that isn't dependant on the
sidebar being displayed.

Currently implemented in Images, Volumes (simple breadcrumb), Ports and
Subnets (more complex nesting).

This approach has been chosen as manipulation of the URLs was seen as
undesirable, making request.path too unreliable. Furthermore, the
templatetag seperation means this could easily be used in other views.

NOTE: The network details page itself will be updated following the
resolution of https://bugs.launchpad.net/horizon/+bug/1416838

Change-Id: I7443b2ffa61560e5d1fd4d6d91b11201f1db6fac
Partial-Bug: 1413823
2015-11-09 07:01:04 +00:00