diff options
author | Francis Irving <francis@mysociety.org> | 2010-10-04 01:51:51 +0100 |
---|---|---|
committer | Francis Irving <francis@mysociety.org> | 2010-10-04 01:51:51 +0100 |
commit | 39aceecbb862f5d3b406a56d17d010f5534f4ce1 (patch) | |
tree | d201b8f8656b9b270035e368c1baf3d170828145 | |
parent | e86c8fbc7a3f18e31ef751236b5ba439b33eafb6 (diff) |
Factor out sidebar into shared between help pages.
-rw-r--r-- | app/views/help/_sidebar.rhtml | 19 | ||||
-rw-r--r-- | app/views/help/about.rhtml | 16 | ||||
-rw-r--r-- | app/views/help/api.rhtml | 10 | ||||
-rw-r--r-- | todo.txt | 1 |
4 files changed, 28 insertions, 18 deletions
diff --git a/app/views/help/_sidebar.rhtml b/app/views/help/_sidebar.rhtml new file mode 100644 index 000000000..3fa77011f --- /dev/null +++ b/app/views/help/_sidebar.rhtml @@ -0,0 +1,19 @@ +<div id="about_sidebar"> + <h1>Help pages</h1> + <ul> + <li><%= link_to_unless_current "Introduction", "/help/about" %></li> + <li><%= link_to_unless_current "Making requests", "/help/about#making_requests" %></li> + <li><%= link_to_unless_current "Privacy policy", "/help/about#privacy" %></li> + <li><%= link_to_unless_current "FOI officers", "/help/about#officers" %></li> + <li><%= link_to_unless_current "Credits", "/help/about#credits" %></li> + <li><%= link_to_unless_current "Programmers API", "/help/api" %></li> + <li><%= link_to_unless_current "Advanced search", "/search" %></li> + </ul> + + <h1 id="contact">Contact us</h1> + <p>If your question isn't answered here, or you just wanted to let us know + something about the site, <a href="/help/contact">contact us</a>. + </p> +</div> + + diff --git a/app/views/help/about.rhtml b/app/views/help/about.rhtml index 762f683bf..d6b56906e 100644 --- a/app/views/help/about.rhtml +++ b/app/views/help/about.rhtml @@ -1,20 +1,6 @@ <% @title = "About" %> -<div id="about_sidebar"> - <h1>Contents</h1> - <ul> - <li><a href="#introduction">Introduction</a></li> - <li><a href="#making_requests">Making requests</a></li> - <li><a href="#privacy">Privacy policy</a></li> - <li><a href="#officers">FOI officers</a></li> - <li><a href="#credits">Credits</a></li> - </ul> - - <h1 id="contact">Contact us</h1> - <p>If your question isn't answered here, or you just wanted to let us know - something about the site, <a href="/help/contact">contact us</a>. - </p> -</div> +<%= render :partial => 'sidebar' %> <h1 id="introduction">Introduction to WhatDoTheyKnow <a href="#introduction">#</a> </h1> <dl> diff --git a/app/views/help/api.rhtml b/app/views/help/api.rhtml index af4740d65..569d92c25 100644 --- a/app/views/help/api.rhtml +++ b/app/views/help/api.rhtml @@ -1,11 +1,17 @@ <% @title = "Application Programming Interface - API" %> +<%= render :partial => 'sidebar' %> + <h1><%=@title %></h1> <h2> Introduction </h2> -<p>WhatDoTheyKnow does not have a full API yet, but we are gradually -adding lots of things that are similar in use to an API as they are requested. +<p>This page explains how programmers can make other websites and software +interact with WhatDoTheyKnow via an "API". +</p> + +<p>WhatDoTheyKnow does not have a full API yet, but we are gradually adding +lots of things that are similar in use to an API as they are requested. </p> <h2> Linking to new requests </h2> @@ -1,4 +1,3 @@ -Something nice to wrap salutation round it Link to API help - mention history on it |