From c426fbebb786f4b33fd701f37372c30ebfed796a Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 26 May 2010 09:58:43 -0500 Subject: Highlight 'Packages' in navbar when browsing packages Get this working by doing some class business with CSS in order to highlight the correct tab. I had to add some stuff to a variety of pages but it should be working correctly now. Addresses FS#19591. Signed-off-by: Dan McGee --- media/archweb.css | 4 +++- public/views.py | 3 +-- templates/base.html | 13 +++++-------- templates/packages/details.html | 1 + templates/packages/files.html | 1 + templates/packages/flag.html | 1 + templates/packages/flagged.html | 1 + templates/packages/search.html | 1 + templates/packages/signoffs.html | 1 + templates/public/download.html | 1 + 10 files changed, 16 insertions(+), 11 deletions(-) diff --git a/media/archweb.css b/media/archweb.css index e360bce7..d6fd34c3 100644 --- a/media/archweb.css +++ b/media/archweb.css @@ -244,4 +244,6 @@ ul.admin-actions li { display: inline; padding-left: 1.5em; } #dev-signoffs .signed-username { color: #888; margin-left: 0.5em; } /* highlight current website in the navbar */ -#archnavbar ul li.selected a { color: white !important; } +#archnavbar.anb-home ul li#anb-home a { color: white !important; } +#archnavbar.anb-packages ul li#anb-packages a { color: white !important; } +#archnavbar.anb-download ul li#anb-download a { color: white !important; } diff --git a/public/views.py b/public/views.py index eaa57343..13589a80 100644 --- a/public/views.py +++ b/public/views.py @@ -53,8 +53,7 @@ def download(request): return list_detail.object_list(request, qset.order_by('mirror__country', 'mirror__name', 'protocol'), template_name="public/download.html", - template_object_name="mirror_url", - extra_context={"path": request.path}) + template_object_name="mirror_url") def feeds(request): context = { diff --git a/templates/base.html b/templates/base.html index 3227fbbf..a17ac54d 100644 --- a/templates/base.html +++ b/templates/base.html @@ -11,22 +11,19 @@ {% block head %}{% endblock %} - + -
+ diff --git a/templates/packages/details.html b/templates/packages/details.html index 88ee4539..c7945b25 100644 --- a/templates/packages/details.html +++ b/templates/packages/details.html @@ -1,5 +1,6 @@ {% extends "base.html" %} {% block title %}Arch Linux - {{ pkg.pkgname }} {{ pkg.pkgver }}-{{ pkg.pkgrel }} - Package Details{% endblock %} +{% block navbarclass %}anb-packages{% endblock %} {% block content %}
diff --git a/templates/packages/files.html b/templates/packages/files.html index 7dc111b4..ebdfb9cf 100644 --- a/templates/packages/files.html +++ b/templates/packages/files.html @@ -1,5 +1,6 @@ {% extends "base.html" %} {% block title %}Arch Linux - {{ pkg.pkgname }} {{ pkg.pkgver }}-{{ pkg.pkgrel }} - Package File List{% endblock %} +{% block navbarclass %}anb-packages{% endblock %} {% block content %}
diff --git a/templates/packages/flag.html b/templates/packages/flag.html index 1e85be89..71d84982 100644 --- a/templates/packages/flag.html +++ b/templates/packages/flag.html @@ -1,5 +1,6 @@ {% extends "base.html" %} {% block title %}Arch Linux - Flag Package - {{ pkg.pkgname }}{% endblock %} +{% block navbarclass %}anb-packages{% endblock %} {% block content %}
diff --git a/templates/packages/flagged.html b/templates/packages/flagged.html index 7d5e1c60..3a39d178 100644 --- a/templates/packages/flagged.html +++ b/templates/packages/flagged.html @@ -1,5 +1,6 @@ {% extends "base.html" %} {% block title %}Arch Linux - Flag Package - {{ pkg.pkgname }}{% endblock %} +{% block navbarclass %}anb-packages{% endblock %} {% block content %}
diff --git a/templates/packages/search.html b/templates/packages/search.html index 2c85f0bc..eaaa07be 100644 --- a/templates/packages/search.html +++ b/templates/packages/search.html @@ -1,6 +1,7 @@ {% extends "base.html" %} {% load package_extras %} {% block title %}Arch Linux - Package Database{% endblock %} +{% block navbarclass %}anb-packages{% endblock %} {% block head %} diff --git a/templates/packages/signoffs.html b/templates/packages/signoffs.html index 930b606e..3040f453 100644 --- a/templates/packages/signoffs.html +++ b/templates/packages/signoffs.html @@ -1,5 +1,6 @@ {% extends "base.html" %} {% block title %}Arch Linux - Package Signoffs{% endblock %} +{% block navbarclass %}anb-packages{% endblock %} {% block content %} {% if packages %} diff --git a/templates/public/download.html b/templates/public/download.html index 06224096..77131a62 100644 --- a/templates/public/download.html +++ b/templates/public/download.html @@ -1,5 +1,6 @@ {% extends "base.html" %} {% block title %}Arch Linux - Downloads{% endblock %} +{% block navbarclass %}anb-download{% endblock %} {% block content %}
-- cgit v1.2.3-54-g00ecf