From 7de1051448326b41e46aee872d23261930450729 Mon Sep 17 00:00:00 2001 From: Andromeda Yelton Date: Tue, 3 Jan 2012 16:17:04 -0500 Subject: [PATCH] it is not unlike a sidebar organizing the FAQs --- frontend/templates/basedocumentation.html | 2 +- frontend/templates/faqmenu.html | 46 +++++++++++++++++++++++ frontend/urls.py | 5 +-- frontend/views.py | 5 +++ static/css/documentation.css | 3 ++ static/less/documentation.less | 4 ++ 6 files changed, 61 insertions(+), 4 deletions(-) create mode 100644 frontend/templates/faqmenu.html diff --git a/frontend/templates/basedocumentation.html b/frontend/templates/basedocumentation.html index c3b84ee7..f2419b78 100644 --- a/frontend/templates/basedocumentation.html +++ b/frontend/templates/basedocumentation.html @@ -20,7 +20,7 @@
- {% include "explore.html" %} + {% include "faqmenu.html" %}
diff --git a/frontend/templates/faqmenu.html b/frontend/templates/faqmenu.html new file mode 100644 index 00000000..07c7f84b --- /dev/null +++ b/frontend/templates/faqmenu.html @@ -0,0 +1,46 @@ + diff --git a/frontend/urls.py b/frontend/urls.py index 993b8b41..a99a6081 100644 --- a/frontend/urls.py +++ b/frontend/urls.py @@ -5,7 +5,7 @@ from django.views.generic import ListView, DetailView from django.contrib.auth.decorators import login_required from regluit.core.models import Campaign -from regluit.frontend.views import CampaignFormView, GoodreadsDisplayView, LibraryThingView, PledgeView +from regluit.frontend.views import CampaignFormView, GoodreadsDisplayView, LibraryThingView, PledgeView, FAQView from regluit.frontend.views import CampaignListView, DonateView, WorkListView urlpatterns = patterns( @@ -23,8 +23,7 @@ urlpatterns = patterns( url(r"^rightsholders/claim/$", "claim", name="claim"), url(r"^rh_admin/$", "rh_admin", name="rh_admin"), url(r"^campaign_admin/$", "campaign_admin", name="campaign_admin"), - url(r"^faq/$", TemplateView.as_view(template_name="faq.html"), - name="faq"), + url(r"^faq/(?P\w*)/$", FAQView.as_view(), name="faq"), url(r"^wishlist/$", "wishlist", name="wishlist"), url(r"^campaigns/(?P\d+)/$",CampaignFormView.as_view(), name="campaign_by_id"), url(r"^campaigns/(?P\w*)$", CampaignListView.as_view(), name='campaign_list'), diff --git a/frontend/views.py b/frontend/views.py index c8b19688..a0eb3dfe 100755 --- a/frontend/views.py +++ b/frontend/views.py @@ -742,6 +742,11 @@ class CampaignFormView(FormView): logger.info("CampaignFormView paypal: Error " + str(t.reference)) return HttpResponse(response) +class FAQView(TemplateView): + template_name = "faq.html" + def get_context_data(self, **kwargs): + location = self.kwargs["location"] + return {'location': location} class GoodreadsDisplayView(TemplateView): template_name = "goodreads_display.html" diff --git a/static/css/documentation.css b/static/css/documentation.css index c4748a3d..e5b28990 100644 --- a/static/css/documentation.css +++ b/static/css/documentation.css @@ -195,3 +195,6 @@ dd { .errorlist li { border: solid #8dc63f 4px; } +.collapse ul { + display: none; +} diff --git a/static/less/documentation.less b/static/less/documentation.less index 4ae141a0..bd814b15 100644 --- a/static/less/documentation.less +++ b/static/less/documentation.less @@ -133,3 +133,7 @@ dd { .errorlist li { border: solid @call-to-action 4px; } + +.collapse ul { + display: none; +} \ No newline at end of file