HTMl fix.

HTMl fix.

<% @title = "About" %>

<%= render :partial => 'help/alpha_notice' %>

Contact Us

If your question isn't answered here, or you just wanted to let us know
something about the site, contact us.

Introduction to WhatDoTheyKnow

What is WhatDoTheyKnow for?

To help you find out inside information about what the UK government
is doing.

How does the site work?

You choose the public authority that you would like information from, then
write a brief note describing what you want to know. We then send your request
to the public authority. Any response they make is automatically published on the
website for you and anyone else to find and read.

Why would I bother to do this?

You pay taxes, and then government does things with the money. All sorts of
things that affect your life, from healthcare through to national defence. Some
it does badly, some it does well. The more we find out about how government
works, the better able we are to make suggestions to improve the things that
are done badly, and to celebrate the things that are done well.

Why would the public authority bother to reply?

Under Freedom of Information (FOI) law, they have to respond.

Who makes it?

WhatDoTheyKnow is made by mySociety,
and was initially funded by the JRSST Charitable Trust. mySociety is a project of the
registered charity UK Citizens Online Democracy.
If you like what we're doing, then you can
make a donation.

Making requests

You're missing the public authority that I want to request from!

Please contact us with the name of the public authority and,
if you can find it, their contact email address for Freedom of Information requests.
If you'd like to help add a whole category of public authority to the site, for example all
primary care trusts or all schools, then please
edit this shared spreadsheet (Google account required).

How quickly will I get a response?

By law public authorities must respond within 20 days, excluding weekends and
any UK bank holidays. The date that the response is due by is shown on the
page for your request. You will be emailed if this date goes by without
a response, so you can send the public authority another note to hurry them up.

What if I'm not satisfied with the response?

If you didn't get the information you asked for, or you didn't get it in time,
then read our page 'Unhappy about the response you got?'.

Can you tell me more of the nitty gritty about the process of making requests?

Have a look at the
access to official information
pages on the Information Commisioner's website.

Can I request information about myself?

Not using this site. Requests made using WhatDoTheyKnow are public, made under the
Freedom of Information Act, and cannot help you find information about a
private individual. If you would like to know what information a public
authority holds about yourself, you should make a "Subject Access Request" in
private using Data Protection law.  The leaflet Subject
Access - A guide for data subjects (on the Information Commisioner's
website) explains how to do this.

I'd like to keep my request secret! (At least until I publish my story)

WhatDoTheyKnow is currently only designed for public requests. All
responses that we receive are automatically published on the website for anyone
to read.  You should contact the public authority directly if you would like to
make a request in private.  If you're interested in buying a system which helps
you manage FOI requests in secret, then contact us.

Privacy policy

Who gets to see my email address?

We will not disclose your email address to anyone, including the public
authority you are sending a request to, unless we are obliged to by law,
or you ask us to. If you send a message to another user on the site, then
it will reveal your email address to them. You will be told that this
is going to happen.

Will you send nasty, brutish spam to my email address?

Nope. After you sign up to WhatDoTheyKnow we will only send you emails
about the site or related mySociety services. We will never give or sell
your email addresses to anyone else, unless we are obliged to by law, or you
ask us to.

Why will my name appear publically on the site?

It means that someone researching the same area can get in touch with you,
and maybe give you more information or ideas relating to your request.  Also,
we're going to publish the response with the name of the civil servant who
wrote it, so it seems only fair that your name should be public too!
Therefore, we encourage you to use your real name, but you may use a pseudonym
if you would like to be anonymous.

So I can make an FOI request using a pseudonym?

Yes, you can. It is good practice for the public authority to reply to such
a request, except in special circumstances such as if they suspect you of
making vexatious requests. See Freedom of Information Good Practice Guidance No 6 for details. You
should refer to this if a public authority attempts to refuse a request because you used a pseudonym.
Saying that, you can avoid the problem by simply making your pseudonym look like a real person's name,
as there is no general obligation to prove your identity.

Why does the list of things that I'm tracking appear publically on the site?

This helps you find others who are researching the same area of government,
so you can form groups to investigate or campaign together. It also helps us
show requests which are related to other requests. If you've ever used a
"social bookmarking" website such as Delicious, Digg or reddit, think of it like
that.

Credit where credit is due

Which people made WhatDoTheyKnow?

Oh, nearly everyone (and maybe you too)! Heather Brook
(vampy!) has
been pushing the idea of a UK FOI archive for years now. Both Phil Rodgers and
Francis Irving
entered it in a mySociety competition for ideas for public interest websites to build.
It won,
and then Chris Lightfoot (RIP :()
thought up the wheeze of intercepting email responses to requests and
automatically publishing them.  Tom Steinberg managed to get the cash to pay for the site out of
a dead chocolate mogul, so
that Francis Irving, Angie Ahl, Tommy Martin, Louise Crow, Matthew Somerville
and Tom Steinberg could do the complex mixture of design and coding to build
what you see today. Thanks particularly to Julian Todd (great blog!), Francis Davey, and
Etienne Pollard for using the site early on and giving feedback (and/or legal
advice!), and also to all our other users and testers.  Lots of
people have been looking up FOI email addresses, and a few volunteering to
administrate the site - most especially Adam McGreggor, Alex Skene and John
Cross. Finally we couldn't do any of this without those
crazy people who volunteer,
amongst many other things, to do the accounts and fill in our VAT return.
You're all stars.


Use #cycle in preference to calculating the even rows to shade.

<%= render :partial => "admin/articles/page_nav" %>

<% if @article -%>
Comments on <%= link_to @article.title, edit_article_path(@article), :style => 'border:none' %> <%= @article.published? ? link_to(image_tag('/images/mephisto/icons/24-zoom-in.png', :style => 'vertical-align: middle'), @site.permalink_for(@article), :style => 'border:none;') : ' ' %>
<% else -%>
Comments for all articles
<% end -%>

<% if @article -%>
  <%= link_to_function "New comment", "$('new-comment-form').toggle()" %>

<%= render :partial => "new_comment" %>

<% end -%>

  <% if @comments.any? %>
  <% @comments.reverse.each do |comment| -%>
  <li class="event-comment<%= cycle("", " shade") %>" id="comment-<%= comment.id %>">
    <a name="comment-<%= comment.id %>">
    <% unless comment.body.blank? -%>

"<%= strip_tags(comment.body) %>"

    <% end -%>

      — <%= author_link_for comment %><%= %( (#{comment.author_email})) unless comment.author_email.blank? %> said <%=  time_ago_in_words comment.created_at %> ago

    <%= link_to_remote 'Edit', :url => edit_article_comment_path(comment.article, comment), :method => :get %> |
    <% if comment.approved? -%>
      <%= link_to_remote 'Unapprove', :url => unapprove_article_comment_path(comment.article, comment) %> |
    <% else -%>
      <%= link_to_remote 'Approve',   :url => approve_article_comment_path(comment.article, comment) %> |
    <% end -%>
    <%= link_to_remote 'Delete',    :url => article_comment_path(comment.article, comment), :method => :delete %>

  <% end -%>
  <% else %>

This article has no <%= params[:filter].to_s.humanize.downcase %> comments.

  <% end %>

<% content_for :sidebar do %>
  <% if @articles.size > 1 -%>

Comments awaiting your approval

    <% @articles.each do |article, count| -%>
    <% if @article.nil? || article.title != @article.title -%>

<%= link_to "(#{count}) #{h(article.title)}", :controller => 'comments', :action => 'index', :article_id => article.id, :filter => :unapproved %>

    <% end -%>
    <% end -%>

  <% end -%>
<% end %>

<%= render :partial => "admin/articles/page_nav" %>

<% if @article -%>
Comments on <%= link_to @article.title, edit_article_path(@article), :style => 'border:none' %> <%= @article.published? ? link_to(image_tag('/images/mephisto/icons/24-zoom-in.png', :style => 'vertical-align: middle'), @site.permalink_for(@article), :style => 'border:none;') : ' ' %>
<% else -%>
Comments for all articles
<% end -%>

<% if @article -%>
  <%= link_to_function "New comment", "$('new-comment-form').toggle()" %>

<%= render :partial => "new_comment" %>

<% end -%>

  <% if @comments.any? %>
  <% @comments.reverse.each_with_index do |comment, i| -%>
  <li class="event-comment<%= " shade" if (i % 2 > 0) %>" id="comment-<%= comment.id %>">
    <a name="comment-<%= comment.id %>">
    <% unless comment.body.blank? -%>

"<%= strip_tags(comment.body) %>"

    <% end -%>

      — <%= author_link_for comment %><%= %( (#{comment.author_email})) unless comment.author_email.blank? %> said <%=  time_ago_in_words comment.created_at %> ago

    <%= link_to_remote 'Edit', :url => edit_article_comment_path(comment.article, comment), :method => :get %> |
    <% if comment.approved? -%>
      <%= link_to_remote 'Unapprove', :url => unapprove_article_comment_path(comment.article, comment) %> |
    <% else -%>
      <%= link_to_remote 'Approve',   :url => approve_article_comment_path(comment.article, comment) %> |
    <% end -%>
    <%= link_to_remote 'Delete',    :url => article_comment_path(comment.article, comment), :method => :delete %>

  <% end -%>
  <% else %>

This article has no <%= params[:filter].to_s.humanize.downcase %> comments.

  <% end %>

<% content_for :sidebar do %>
  <% if @articles.size > 1 -%>

Comments awaiting your approval

    <% @articles.each do |article, count| -%>
    <% if @article.nil? || article.title != @article.title -%>

<%= link_to "(#{count}) #{h(article.title)}", :controller => 'comments', :action => 'index', :article_id => article.id, :filter => :unapproved %>

    <% end -%>
    <% end -%>

  <% end -%>
<% end %>


add support info to withdrawn pile for those with access

<% @withdrawn ||= project.withdrawns %>

<% if !@withdrawn.empty? %>
  <%= sortable_table %>

      <%= th 'Name' %>
      <%= th 'appln (entire)' %>
      <%= th 'status' %>
      <%= th 'class when
withdrawn' %>
      <%= th 'status when
withdrawn' %>
      <%= th 'withdrawn by' %>
      <%= th 'withdrawn at' %>
      <% if @full_view || @restricted_full_view %>
        <%= th 'support claimed', 'currency' %>
        <%= th 'support recvd', 'currency' %>
        <%= th 'support goal', 'currency'%>
      <% end %>
      <%= th 'reason' %>
      <% if @viewer.is_eventgroup_coordinator?(@eg) %>
        <%= th 'notes' %>
      <% end %>
      <%= th 'other' %>

  <% for withdrawn in @withdrawn
       viewer = withdrawn.viewer %>

      <%= viewer ? viewer.name : 'unknown (pid='+withdrawn.id.to_s+')' %>
      <%= view_entire_processor_link withdrawn.id %>
      <%= withdrawn.status %>
      <%= withdrawn.class_when_withdrawn %>
      <%= withdrawn.status_when_withdrawn %>
      <%= wd = withdrawn.withdrawn_by; wd.name if wd %>
      <%= format_datetime withdrawn.withdrawn_at %>
      <%- if @full_view || @restricted_full_view %>
      <%= format_currency withdrawn.support_claimed %>
<%= format_date withdrawn.support_claimed_updated_at %>
      <%= format_currency withdrawn.donations_total %>
      <%= format_currency withdrawn.cached_costing_total %>
      <%- end %>
      <%= withdrawn.reason%>
      <% if @viewer.is_projects_coordinator? %>
        <%= withdrawn.reason_notes %>
      <% end %>
      <%= withdraw_move_link withdrawn.id, 'move' %>

  <% end %>

<% else %>
  empty
<% end %>

<% @withdrawn ||= project.withdrawns %>

<% if !@withdrawn.empty? %>
  <%= sortable_table %>

      <%= th 'Name' %>
      <%= th 'appln (entire)' %>
      <%= th 'status' %>
      <%= th 'class when withdrawn' %>
      <%= th 'status when withdrawn' %>
      <%= th 'withdrawn by' %>
      <%= th 'withdrawn at' %>
      <%= th 'reason' %>
      <% if @viewer.is_eventgroup_coordinator?(@eg) %>
        <%= th 'notes' %>
      <% end %>
      <%= th 'other' %>

  <% for withdrawn in @withdrawn
       viewer = withdrawn.viewer %>

      <%= viewer ? viewer.name : 'unknown (pid='+withdrawn.id.to_s+')' %>
      <%= view_entire_processor_link withdrawn.id %>
      <%= withdrawn.status %>
      <%= withdrawn.class_when_withdrawn %>
      <%= withdrawn.status_when_withdrawn %>
      <%= wd = withdrawn.withdrawn_by; wd.name if wd %>
      <%= format_datetime withdrawn.withdrawn_at %>
      <%= withdrawn.reason%>
      <% if @viewer.is_projects_coordinator? %>
        <%= withdrawn.reason_notes %>
      <% end %>
      <%= withdraw_move_link withdrawn.id, 'move' %>

  <% end %>

<% else %>
  empty
<% end %>


Try to improve FB sharing with OG meta data

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="<%= I18n.locale %>">

        <% if @title %>
        <title><%=@title%> - <%= site_name %></title>
        <meta property="og:title" content="<%=@title%> - <%= site_name %>" />
        <% else %>
        <title><%= site_name %> - <%= _('Make and browse Freedom of Information (FOI) requests') %></title>
        <meta property="og:title" content="<%= site_name %> - <%= _('Make and browse Freedom of Information (FOI) requests') %>" />
        <% end %>

        <meta property="og:type" content="web" />
        <meta property="og:image" content="http://www.tuderechoasaber.es/tuderechoasaber-theme/images/logo.png?1330664009" />

        <link rel="shortcut icon" href="/favicon.ico">
        <%= stylesheet_link_tag 'main', :title => "Main", :rel => "stylesheet", :media => "all" %>
        <%= stylesheet_link_tag 'fonts', :rel => "stylesheet", :media => "all"  %>
        <%= stylesheet_link_tag 'print', :rel => "stylesheet", :media => "print"  %>
        <% if !params[:print_stylesheet].nil? %>
         <%= stylesheet_link_tag 'print', :rel => "stylesheet", :media => "all"  %>
        <% end %>

        <%= javascript_include_tag 'jquery.js', 'jquery-ui.min','jquery.cookie.js' %>

        <% if @profile_photo_javascript %>

            <link rel="stylesheet" href="/stylesheets/jquery.Jcrop.css" type="text/css" >
        <% end %>

        <%= stylesheet_link_tag 'admin-theme/jquery-ui-1.8.15.custom.css', :rel => 'stylesheet'%>

        <% if force_registration_on_new_request %>
        <%= stylesheet_link_tag 'jquery.fancybox-1.3.4', :rel => "stylesheet"  %>
        <% end %>

        <% if @feed_autodetect %>
            <% for feed in @feed_autodetect %>
                <link rel="alternate" type="application/atom+xml" title="<%=h feed[:title] %>" href="<%=h feed[:url]%>">
                <% if feed[:has_json] %>
                    <link rel="alternate" type="application/json" title="JSON version of <%=h feed[:title] %>" href="<%=h feed[:url]%>.json">
                <% end %>
            <% end %>
        <% end %>
        <% if @has_json %>
            <link rel="alternate" type="application/json" title="JSON version of this page" href="<%=h main_url(request.request_uri, '.json') %>">
        <% end %>

        <% if @no_crawl %>
            <meta name="robots" content="noindex, nofollow">
        <% end %>

        <%= render :partial => 'general/before_head_end' %>

    <body <%= "class='front'" if params[:action] == 'frontpage' %>>

    <% if force_registration_on_new_request && !@user %>
    <%= javascript_include_tag 'jquery.fancybox-1.3.4.pack' %>

    <% end %>

<% # code for popup advert for a campaign etc.
=begin

Close

    [ message goes here ]

Close

=end
%>

  <%= link_to _("¡Colabora con nosotros!"), help_help_out_path %>

<%= render :partial => 'general/locale_switcher' %>

        <% if not (controller.action_name == 'signin' or controller.action_name == 'signup') %>

          <% if @user %>
              <%= _('Hello, {{username}}!', :username => h(@user.name))%>

                <% if @user %>
                    <%=link_to _("My requests"), show_user_requests_path(:url_name => @user.url_name) %>
                    <%=link_to _("My profile"), show_user_profile_path(:url_name => @user.url_name) %>
                <% end %>

              <%= link_to _("Sign out"), signout_url(:r => request.request_uri) %>
          <% else %>
              <%= link_to _("Sign in or sign up"), signin_url(:r => request.request_uri) %>
          <% end %>

        <% end %>

            <% form_tag({:controller => "general", :action => "search_redirect"}, {:id => "navigation_search_form"}) do %>

                   <%= text_field_tag 'query', params[:query], { :size => 40, :id => "navigation_search_query" } %>
                   <%= image_submit_tag('search-button.png') %>

            <% end %>

        <%= render :partial => 'general/orglink' %>

        <%= render :partial => 'general/topnav' %>

            <% if flash[:notice] %>

<%= flash[:notice] %>

            <% end %>
            <% if flash[:error] %>

<%= flash[:error] %>

            <% end %>

            <div id="<%= controller.controller_name + "_" + controller.action_name %>" class="controller_<%= controller.controller_name %>">
            <%= yield :layout %>

    <%= render :partial => 'general/footer' %>

    <%= render :partial => 'general/before_body_end' %>

X
<%= _("Paste this link into emails, tweets, and anywhere else:") %>

<input type="text">

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="<%= I18n.locale %>">

        <title>
        <% if @title %>
            <%=@title%> - <%= site_name %>
        <% else %>
            <%= site_name %> - <%= _('Make and browse Freedom of Information (FOI) requests') %>
        <% end %>
        </title>

        <link rel="shortcut icon" href="/favicon.ico">
        <%= stylesheet_link_tag 'main', :title => "Main", :rel => "stylesheet", :media => "all" %>
        <%= stylesheet_link_tag 'fonts', :rel => "stylesheet", :media => "all"  %>
        <%= stylesheet_link_tag 'print', :rel => "stylesheet", :media => "print"  %>
        <% if !params[:print_stylesheet].nil? %>
         <%= stylesheet_link_tag 'print', :rel => "stylesheet", :media => "all"  %>
        <% end %>

        <%= javascript_include_tag 'jquery.js', 'jquery-ui.min','jquery.cookie.js' %>

        <% if @profile_photo_javascript %>

            <link rel="stylesheet" href="/stylesheets/jquery.Jcrop.css" type="text/css" >
        <% end %>

        <%= stylesheet_link_tag 'admin-theme/jquery-ui-1.8.15.custom.css', :rel => 'stylesheet'%>

        <% if force_registration_on_new_request %>
        <%= stylesheet_link_tag 'jquery.fancybox-1.3.4', :rel => "stylesheet"  %>
        <% end %>

        <% if @feed_autodetect %>
            <% for feed in @feed_autodetect %>
                <link rel="alternate" type="application/atom+xml" title="<%=h feed[:title] %>" href="<%=h feed[:url]%>">
                <% if feed[:has_json] %>
                    <link rel="alternate" type="application/json" title="JSON version of <%=h feed[:title] %>" href="<%=h feed[:url]%>.json">
                <% end %>
            <% end %>
        <% end %>
        <% if @has_json %>
            <link rel="alternate" type="application/json" title="JSON version of this page" href="<%=h main_url(request.request_uri, '.json') %>">
        <% end %>

        <% if @no_crawl %>
            <meta name="robots" content="noindex, nofollow">
        <% end %>

        <%= render :partial => 'general/before_head_end' %>

    <body <%= "class='front'" if params[:action] == 'frontpage' %>>

    <% if force_registration_on_new_request && !@user %>
    <%= javascript_include_tag 'jquery.fancybox-1.3.4.pack' %>

    <% end %>

<% # code for popup advert for a campaign etc.
=begin

Close

    [ message goes here ]

Close

=end
%>

  <%= link_to _("¡Colabora con nosotros!"), help_help_out_path %>

<%= render :partial => 'general/locale_switcher' %>

        <% if not (controller.action_name == 'signin' or controller.action_name == 'signup') %>

          <% if @user %>
              <%= _('Hello, {{username}}!', :username => h(@user.name))%>

                <% if @user %>
                    <%=link_to _("My requests"), show_user_requests_path(:url_name => @user.url_name) %>
                    <%=link_to _("My profile"), show_user_profile_path(:url_name => @user.url_name) %>
                <% end %>

              <%= link_to _("Sign out"), signout_url(:r => request.request_uri) %>
          <% else %>
              <%= link_to _("Sign in or sign up"), signin_url(:r => request.request_uri) %>
          <% end %>

        <% end %>

            <% form_tag({:controller => "general", :action => "search_redirect"}, {:id => "navigation_search_form"}) do %>

                   <%= text_field_tag 'query', params[:query], { :size => 40, :id => "navigation_search_query" } %>
                   <%= image_submit_tag('search-button.png') %>

            <% end %>

        <%= render :partial => 'general/orglink' %>

        <%= render :partial => 'general/topnav' %>

            <% if flash[:notice] %>

<%= flash[:notice] %>

            <% end %>
            <% if flash[:error] %>

<%= flash[:error] %>

            <% end %>

            <div id="<%= controller.controller_name + "_" + controller.action_name %>" class="controller_<%= controller.controller_name %>">
            <%= yield :layout %>

    <%= render :partial => 'general/footer' %>

    <%= render :partial => 'general/before_body_end' %>

X
<%= _("Paste this link into emails, tweets, and anywhere else:") %>

<input type="text">


Escaping fixes

Escaping fixes

<% @title = _("{{site_name}} blog and tweets", :site_name => site_name) %>

<% if !@twitter_user.empty? %>

<%= _("Stay up to date") %>

     <a href="https://twitter.com/<%= @twitter_user %>"><%= _("Follow us on twitter") %>

     <a href="<%= @feed_url %>"><%= _("Subscribe to blog") %>

  <% if Configuration::twitter_widget_id %>

    <a class="twitter-timeline" data-dnt=true href="https://twitter.com/<%= Configuration::twitter_username %>" data-widget-id="<%= Configuration::twitter_widget_id %>">Tweets by @<%= Configuration::twitter_username %>

  <% end %>

<% end %>

<%=@title %>

    <% for item in @blog_items: %>

          <h2 id="<%= Time.parse(item['pubDate'][0]).to_i %>"><a href="<%=item['link']%>"><%=h item['title'] %>

<%= _("Posted on {{date}} by {{author}}", :date=>simple_date(Time.parse(item['pubDate'][0])), :author=>item['creator']) %>

            <% if item['encoded'] %>
              <%= raw item['encoded'] %>
            <% elsif item['description'] %>
              <%= raw item['description'] %>
            <% end %>

            <% if item['comments'] %>
              <a href="<%=item['comments'][0]%>"><%= _("{{number_of_comments}} comments", :number_of_comments=>item['comments'][1]) %>
            <% end %>

    <% end   %>

<% @title = _("{{site_name}} blog and tweets", :site_name => site_name) %>

<% if !@twitter_user.empty? %>

<%= _("Stay up to date") %>

     <a href="https://twitter.com/<%= @twitter_user %>"><%= _("Follow us on twitter") %>

     <a href="<%= @feed_url %>"><%= _("Subscribe to blog") %>

  <% if Configuration::twitter_widget_id %>

    <a class="twitter-timeline" data-dnt=true href="https://twitter.com/<%= Configuration::twitter_username %>" data-widget-id="<%= Configuration::twitter_widget_id %>">Tweets by @<%= Configuration::twitter_username %>

  <% end %>

<% end %>

<%=@title %>

    <% for item in @blog_items: %>

          <h2 id="<%= Time.parse(item['pubDate'][0]).to_i %>"><a href="<%=item['link']%>"><%=h item['title'] %>

<%= _("Posted on {{date}} by {{author}}", :date=>simple_date(Time.parse(item['pubDate'][0])), :author=>item['creator']) %>

            <% if item['encoded'] %>
              <%= item['encoded'] %>
            <% elsif item['description'] %>
              <%= item['description'] %>
            <% end %>

            <% if item['comments'] %>
              <a href="<%=item['comments'][0]%>"><%= _("{{number_of_comments}} comments", :number_of_comments=>item['comments'][1]) %>
            <% end %>

    <% end   %>


Learn to spell.

Learn to spell.


Add media contacts

Add media contacts

<% @title = "Contact us" %>

<%= foi_error_messages_for :contact %>

<%= @title %>

    <% if !flash[:notice] %>

Contact an authority to get official information

Go here to make a request, in public, for information
            from public authorities.

            Asking for private information about yourself?
            Please read our
            help page.

    <% end %>

Contact the <%= site_name %> team

    <% if !flash[:notice] %>

If you would like to interview us for a story about Right To Know get in touch with our media contacts Matthew Landauer (0424 563 655) or Henare Degan (0415 551 873).

Otherwise:

            Please read the  help page first, as it may
            answer your question quicker.

We'd love to hear how you've found using this site.
               Either fill in this form, or send an email to <a
               href="mailto:<%=@contact_email%>"><%=@contact_email%>

We are a charity and not part of the
            Government.

    <% end %>

<% form_for :contact do |f| %>

    <% if not @user %>

            Your name:
            <%= f.text_field :name, :size => 20 %>
            (or <%= link_to "sign in", signin_url(:r => request.request_uri) %>)

            Your email:
            <%= f.text_field :email, :size => 20 %>

    <% end %>

        Subject:
        <%= f.text_field :subject, :size => 50 %>

        Message to website:
        <%= f.text_area :message, :rows => 10, :cols => 60 %>

    <% if !@last_request.nil? %>

            Include link to request:
            <%=request_link(@last_request) %>
            <%= submit_tag "remove", :name => 'remove' %>

    <% end %>
    <% if !@last_body.nil? %>

            Include link to authority:
            <%=public_body_link(@last_body) %>
            <%= submit_tag "remove", :name => 'remove' %>

    <% end %>

    We can only help you with technical problems, or questions
    about Freedom of Information.

        <%= hidden_field_tag(:submitted_contact_form, 1) %>
        <%= submit_tag "Send message to the charity" %>
        <-- we run this site, not the Government!

<% end %>

<% @title = "Contact us" %>

<%= foi_error_messages_for :contact %>

<%= @title %>

    <% if !flash[:notice] %>

Contact an authority to get official information

Go here to make a request, in public, for information
            from public authorities.

            Asking for private information about yourself?
            Please read our
            help page.

    <% end %>

Contact the <%= site_name %> team

    <% if !flash[:notice] %>

            Please read the  help page first, as it may
            answer your question quicker.

We'd love to hear how you've found using this site.
               Either fill in this form, or send an email to <a
               href="mailto:<%=@contact_email%>"><%=@contact_email%>

We are a charity and not part of the
            Government.

    <% end %>

<% form_for :contact do |f| %>

    <% if not @user %>

            Your name:
            <%= f.text_field :name, :size => 20 %>
            (or <%= link_to "sign in", signin_url(:r => request.request_uri) %>)

            Your email:
            <%= f.text_field :email, :size => 20 %>

    <% end %>

        Subject:
        <%= f.text_field :subject, :size => 50 %>

        Message to website:
        <%= f.text_area :message, :rows => 10, :cols => 60 %>

    <% if !@last_request.nil? %>

            Include link to request:
            <%=request_link(@last_request) %>
            <%= submit_tag "remove", :name => 'remove' %>

    <% end %>
    <% if !@last_body.nil? %>

            Include link to authority:
            <%=public_body_link(@last_body) %>
            <%= submit_tag "remove", :name => 'remove' %>

    <% end %>

    We can only help you with technical problems, or questions
    about Freedom of Information.

        <%= hidden_field_tag(:submitted_contact_form, 1) %>
        <%= submit_tag "Send message to the charity" %>
        <-- we run this site, not the Government!

<% end %>


Fix capitalisation of mySociety

Fix capitalisation of mySociety

<% @title = "Credit where credit is due" %>

<%= render :partial => 'sidebar' %>

<%= @title%> #

Which people made <%= site_name %>? #

    Matthew Landauer, Henare Degan, Katherine Szuminska and Alexander Sadleir set up the software that runs Right To Know, collected and collated the information, adapted the help text and generally pushed, prodded and poked until things worked.

    Guy King's donation to the OpenAustralia Foundation, made building and running this site possible.

    Our early testers, for checking over all the legal help text and making sure that things worked as expected.

    Peter Timmins, Australia's foremost authority on Freedom of Information law, has kept us informed through the years with his indespensable blog Open and Shut.

    Everyone who has helped look up Freedom of Information email addresses.

    All the amazing staff and volunteers at mySociety, past and present, who created WhatDoTheyKnow.com in the UK, which ultimately was spun out into the international software project Alaveteli, on which <%= site_name %> runs.

    Finally, all the officers who will and have answered the requests
    made through the site. Their diligence, patience and professionalism is
    what has actually made the information that you see here. Thank them for
    helping make Government more transparent.

You're all stars.

Can I help out? #

Yes please! We're built out of our supporters and volunteers.

You can make a donation. We're a charity with Deductible Gift Recipient (DGR) status. That means your donation is tax-deductible.

Help people find successful requests, and monitor performance of authorities, by
    playing the categorisation game.

Find out the Freedom of Information email addresses of authorities that we're missing.

Write a blog post about either <%= site_name %> or an interesting request that you've
    found. Post about it on a forum that you frequent. Tell friends about it.

If you're
    a programmer, get the source code for our parent project, Alaveteli
    and tell us about patches we can pull. It's made in Ruby on Rails.

Read more about volunteering.

Attribution #

    Some descriptions of public authorities were sourced and adapted from australia.gov.au in which the text content is licensed under Creative Commons Attribution 3.0 Australia.

<% @title = "Credit where credit is due" %>

<%= render :partial => 'sidebar' %>

<%= @title%> #

Which people made <%= site_name %>? #

    Matthew Landauer, Henare Degan, Katherine Szuminska and Alexander Sadleir set up the software that runs Right To Know, collected and collated the information, adapted the help text and generally pushed, prodded and poked until things worked.

    Guy King's donation to the OpenAustralia Foundation, made building and running this site possible.

    Our early testers, for checking over all the legal help text and making sure that things worked as expected.

    Peter Timmins, Australia's foremost authority on Freedom of Information law, has kept us informed through the years with his indespensable blog Open and Shut.

    Everyone who has helped look up Freedom of Information email addresses.

    All the amazing staff and volunteers at MySociety, past and present, who created WhatDoTheyKnow.com in the UK, which ultimately was spun out into the international software project Alaveteli, on which <%= site_name %> runs.

    Finally, all the officers who will and have answered the requests
    made through the site. Their diligence, patience and professionalism is
    what has actually made the information that you see here. Thank them for
    helping make Government more transparent.

You're all stars.

Can I help out? #

Yes please! We're built out of our supporters and volunteers.

You can make a donation. We're a charity with Deductible Gift Recipient (DGR) status. That means your donation is tax-deductible.

Help people find successful requests, and monitor performance of authorities, by
    playing the categorisation game.

Find out the Freedom of Information email addresses of authorities that we're missing.

Write a blog post about either <%= site_name %> or an interesting request that you've
    found. Post about it on a forum that you frequent. Tell friends about it.

If you're
    a programmer, get the source code for our parent project, Alaveteli
    and tell us about patches we can pull. It's made in Ruby on Rails.

Read more about volunteering.

Attribution #

    Some descriptions of public authorities were sourced and adapted from australia.gov.au in which the text content is licensed under Creative Commons Attribution 3.0 Australia.


minor change

minor change

Assignment: <%= @assignment.title %>

Course: <%= @course.title %>

Feedback for <%= @user.display_name %>

<%= link_to 'Back to my turn-ins', :controller => 'turnins', :course => @course, :assignment => @assignment %> | <%= link_to 'Back to assignment', :controller => 'assignments', :course => @course, :id => @assignment, :action => 'view', :assignment => nil %>

<% if @grade_item %>
  <% if @grade_entry.nil? %>

No grade has been submitted.

  <% else %>

Your grade: <%= sprintf("%.1f",@grade_entry.points) %> out of <%= sprintf("%.1f",@grade_item.points) %> possible points

Instructor Comments:

        <%= @feedback_html %>

  <% end %>
<% end %>

<% if @current_turnin %>

 Jump to file

 <% for utf in @current_turnin.user_turnin_files %>
  <% unless utf.directory_entry? %>

<a href="#file_<%=utf.id%>"> <%= image_tag utf.icon %> <%= utf.full_filename( @directories ) %>

  <% end %>
 <% end %>

  <% for utf in @current_turnin.user_turnin_files %>

    <%= image_tag utf.icon %>
    <% if utf.directory_entry? %>Directory:
    <% else %>File:
    <% end %><a name="file_<%=utf.id%>"><%= utf.full_filename( @directories ) %>
        <%= image_tag 'arrow_up' %>

	<% if utf.directory_entry? %>

Directory entry

	<% else %>
	  <% directory = @current_turnin.get_dir( @app['external_dir'] )
	     lines = FileManager.format_file( @app['enscript_command'], "#{directory}#{utf.full_filename( @directories )}", utf.extension )
	     comment_hash = utf.file_comments_hash
	   %>

	   <% line_num = 0 %>

	     <% for line in lines %>
	       <% line_num = line_num.next %>
	       <% numbers = line_num.to_s
	          numbers.size.upto(8) { |x| numbers = " #{numbers}" } %>
	       <%= numbers %>: <%= line %>

	       <% if comment_hash[line_num] %>

	Comment on line <%=line_num%> left by <%= comment_hash[line_num].user.display_name %>

	<%= comment_hash[line_num].comments.to_html %>

	       <% end %>
	     <% end %>

	<% end %>

  <% end %>

<% else %>

No turn-in found

<% end %>

Assignment: <%= @assignment.title %>

Course: <%= @course.title %>

Feedback for <%= @user.display_name %>

<%= link_to 'Back to my turn-ins', :controller => 'turnins', :course => @course, :assignment => @assignment %> | <%= link_to 'Back to assignment', :controller => 'assignments', :course => @course, :id => @assignment, :action => 'view', :assignment => nil %>

<% if @grade_item %>
  <% unless @grade_entry.nil? %>

No grade has been submitted.

  <% else %>

Your grade: <%= sprintf("%.1f",@grade_entry.points) %> out of <%= sprintf("%.1f",@grade_item.points) %> possible points

Instructor Comments:

        <%= @feedback_html %>

  <% end %>
<% end %>

<% if @current_turnin %>

 Jump to file

 <% for utf in @current_turnin.user_turnin_files %>
  <% unless utf.directory_entry? %>

<a href="#file_<%=utf.id%>"> <%= image_tag utf.icon %> <%= utf.full_filename( @directories ) %>

  <% end %>
 <% end %>

  <% for utf in @current_turnin.user_turnin_files %>

    <%= image_tag utf.icon %>
    <% if utf.directory_entry? %>Directory:
    <% else %>File:
    <% end %><a name="file_<%=utf.id%>"><%= utf.full_filename( @directories ) %>
        <%= image_tag 'arrow_up' %>

	<% if utf.directory_entry? %>

Directory entry

	<% else %>
	  <% directory = @current_turnin.get_dir( @app['external_dir'] )
	     lines = FileManager.format_file( @app['enscript_command'], "#{directory}#{utf.full_filename( @directories )}", utf.extension )
	     comment_hash = utf.file_comments_hash
	   %>

	   <% line_num = 0 %>

	     <% for line in lines %>
	       <% line_num = line_num.next %>
	       <% numbers = line_num.to_s
	          numbers.size.upto(8) { |x| numbers = " #{numbers}" } %>
	       <%= numbers %>: <%= line %>

	       <% if comment_hash[line_num] %>

	Comment on line <%=line_num%> left by <%= comment_hash[line_num].user.display_name %>

	<%= comment_hash[line_num].comments.to_html %>

	       <% end %>
	     <% end %>

	<% end %>

  <% end %>

<% else %>

No turn-in found

<% end %>


fix url

fix url

<!DOCTYPE html>

  <meta content="text/html;charset=utf-8" http-equiv="content-type">
  <title>Free & Open Source Postal Code to Electoral District Web Service</title>

Postal Code to Electoral District API

Examples

http://postal-code-to-edid-webservice.heroku.com/postal_codes/A1A1A1

http://postal-code-to-edid-webservice.heroku.com/postal_codes/K0A1K0

http://postal-code-to-edid-webservice.heroku.com/postal_codes/K0A1K0/csv

Documentation

See here

<!DOCTYPE html>

  <meta content="text/html;charset=utf-8" http-equiv="content-type">
  <title>Free & Open Source Postal Code to Electoral District Web Service</title>

Postal Code to Electoral District API

Examples

http://postal-code-to-edid-webservice.heroku.com/postal_codes/A1A1A1

http://postal-code-to-edid-webservice.heroku.com/postal_codes/K0A1K0

http://postal-code-to-edid-webservice.heroku.com/postal_codes/K0A1K0

Documentation

See here


Fix admin title prefix checkbox to actually allow you to uncheck it

git-svn-id: 70ab0960c3db1cbf656efd6df54a8f3de72dc710@1317 820eb932-12ee-0310-9ca8-eeb645f39767

<% @page_heading = 'Blog settings' %>

  <% form_tag :action => 'update' do %>

Which settings group would you like to edit?

General Settings

Text Filter

Spam Protection

Resource Defaults

Cache

General Settings

      Blog name:
      <input name="setting[blog_name]" id="blog_name" type="text" value="<%=h this_blog.blog_name %>" />

      Blog subtitle:
      <input name="setting[blog_subtitle]" id="blog_subtitle" type="text" value="<%=h this_blog.blog_subtitle %>" />

      <input name="setting[title_prefix]" id="blog_title_prefix" type="checkbox" value="1" <%= 'checked="checked"' if this_blog.title_prefix %> />
      <input name="setting[title_prefix]" type="hidden" value="0" />
      Prefix page title with blog name

      Base Url:
      <input name="setting[base_url]" id="base_url" type="text" value="<%=h this_blog.base_url %>" />

      <input name="setting[default_allow_comments]" id="default_allow_comments" type="checkbox" value="1" <%= 'checked="checked"' if this_blog.default_allow_comments%> />
      <input name="setting[default_allow_comments]" type="hidden" value="0"/>
        Enable comments by default

      <input name="setting[default_allow_pings]" id="default_allow_pings" type="checkbox" value="1" <%= 'checked="checked"' if this_blog.default_allow_pings%> />
      <input name="setting[default_allow_pings]" type="hidden" value="0"/>
        Enable Trackbacks by default

      Display
      <input name="setting[limit_article_display]" size="4" id="limit_article_display" type="text" value="<%= this_blog.limit_article_display %>" /> articles on my homepage by default.

      Display
      <input name="setting[limit_rss_display]" size="4" id="limit_rss_display" type="text" value="<%= this_blog.limit_rss_display %>" /> articles in my rss feed by default.

      <input name="setting[show_extended_on_rss]" id="show_extended_on_rss" type="checkbox" value="1" <%= 'checked="checked"' if this_blog.show_extended_on_rss%> />
      <input name="setting[show_extended_on_rss]" type="hidden" value="0"/>
        Show full article on rss feed

Should the blog show mailto: links to your email address?

<input name="setting[link_to_author]" id="link_to_author" type="checkbox" value="1" <%= 'checked="checked"' if this_blog.link_to_author%> /><input name="setting[link_to_author]" type="hidden" value="0"/> Enable E-Mail public display

Should the blog use of the Globally Recognized Avatar (Gravatar) service in comments?

      <input name="setting[use_gravatar]" id="use_gravatar" type="checkbox" value="1" <%= 'checked="checked"' if this_blog.use_gravatar %> />
      <input name="setting[use_gravatar]" type="hidden" value="0"/>
      Enable Gravatar integration

Would you like to include your latitude and longitude in your blog's HTML pages? See GeoURL for details.
Example: <tt>47.774,-122.201</tt>

      Latitude, Longitude:
      <input name="setting[geourl_location]" size="20" id="geourl_location" type="text" value="<%= this_blog.geourl_location %>" />

This setting allows you to disable trackbacks for every article in
    your blog.  It won't remove existing trackbacks, but it will prevent
    any further attempt to add a trackback anywhere on your blog.  You can
    enable or disable trackbacks per-article using the article's extended
    settings.  See also the
      "Enable Trackbacks by default" setting above.

      <input name="setting[global_pings_disable]" id="global_pings_disable" type="checkbox" value="1" <%= 'checked="checked"' if this_blog.global_pings_disable%> />
         <input name="setting[global_pings_disable]" type="hidden" value="0"/>
           Disable trackbacks site-wide

Should Typo send trackbacks to websites that you link to?  This should be disabled
       for private blogs, as it will leak non-public information to sites that you're discussing.
       For public blogs, there's no real point in disabling this.

      <input name="setting[send_outbound_pings]" id="send_outbound_pings" type="checkbox" value="1" <%= 'checked="checked"' if this_blog.send_outbound_pings%> />
         <input name="setting[send_outbound_pings]" type="hidden" value="0"/>
           Send trackbacks to external sites

      URLs to ping automatically:

      <textarea name="setting[ping_urls]" id="ping_urls" rows="5" cols="50"><%=h this_blog.ping_urls %></textarea>

<%= save("Save My Settings") %>

Text Filter

Typo supports a number of text filtering options.  To add new filters, see the "filters" tab on the toolbar above.

        <select name="setting[text_filter]" id="text_filter">
          <%= options_for_select text_filter_options, TextFilter.find_by_name(this_blog.text_filter) %>
        </select>
        Article filter

        <select name="setting[comment_text_filter]" id="comment_text_filter">
        <%= options_for_select text_filter_options, TextFilter.find_by_name(this_blog.comment_text_filter) %>
        </select>
        Comments filter

<%= save("Save My Settings") %>

Notification

Typo can notify you when new articles or comments are posted

      Email address to use in From: field when Typo sends mail:
      <input name="setting[email_from]" size="20" id="email_from" type="text" value="<%= this_blog.email_from %>" />

      Jabber account to use when sending Jabber notifications:
      <input name="setting[jabber_address]" size="20" id="jabber_address" type="text" value="<%= this_blog.jabber_address %>" />

      Password for Jabber account:
      <input name="setting[jabber_password]" size="20" id="jabber_password" type="password" value="<%= this_blog.jabber_password %>" />

<%= save("Save My Settings") %>

Spam Protection

Enabling spam protection will make typo compare the IP address of posters as well as the contents of their posts against local and remote blacklists. Good defense against spam bots.

          <input name="setting[sp_global]" id="sp_global" type="checkbox" value="1" <%= 'checked="checked"' if this_blog.sp_global%> /><input name="setting[sp_global]" type="hidden" value="0"/>
          Enable spam protection

Typo can (optionally) use the Akismet spam-filtering service.  You need to register with
           Akismet and receive an API key before you can use their service.  If you have an Akismet key, enter it here.

          Akismet Key
          <input name="setting[sp_akismet_key]" id="sp_akismet_key" type="text" value="<%=h this_blog.sp_akismet_key %>"/>

You can optionally disable non-Ajax comments.  Typo will always use Ajax for comment submission if Javascript is enabled,
           so non-Ajax comments are either from spammers or users without Javascript.

          <input name="setting[sp_allow_non_ajax_comments]" id="sp_allow_non_ajax_comments" type="checkbox" value="1" <%= 'checked="checked"' if this_blog.sp_allow_non_ajax_comments%> />
          <input name="setting[sp_allow_non_ajax_comments]" type="hidden" value="0" />
          Allow non-ajax comments

(Spam bots usually don't know anything about ajax comments)

          Disable comments after
          <input name="setting[sp_article_auto_close]" size="4" id="sp_article_auto_close" type="text" value="<%= this_blog.sp_article_auto_close %>" /> days

(Set to 0 to never disable comments)

Typo will automatically reject comments and trackbacks which contain over a certain amount of links in them.

          Max URLs:
          <input name="setting[sp_url_limit]" size="4" id="sp_url_limit" type="text" value="<%= this_blog.sp_url_limit %>" /> links

(Set to 0 to never reject comments)

<%= save("Save My Settings") %>

Resource Defaults

          The below settings act as defaults when you choose to publish an enclosure with iTunes metadata.

          Author:
          <input name="setting[itunes_author]" size="25" id="itunes_author" type="text" value="<%= this_blog.itunes_author %>" />

          Subtitle:
          <input name="setting[itunes_subtitle]" size="25" id="itunes_subtitle" type="text" value="<%= this_blog.itunes_subtitle %>" />(setting for channel)

        Summary:(setting for channel)

          <textarea name="setting[itunes_summary]" cols="40" rows="3"><%=h this_blog.itunes_summary %></textarea>

          Email:
          <input name="setting[itunes_email]" size="25" id="itunes_email" type="text" value="<%= this_blog.itunes_email %>" />  Not Published by Apple

          Optional Name:
          <input name="setting[itunes_name]" size="25" id="itunes_name" type="text" value="<%= this_blog.itunes_name %>" />  Not Published by Apple

          Copyright Information:
          <input name="setting[itunes_copyright]" size="25" id="itunes_copyright" type="text" value="<%= this_blog.itunes_copyright %>" />

          Explicit:
          <input name="setting[itunes_explicit]" id="itunes_explicit" type="checkbox"  value="1" <%= 'checked="checked"' if this_blog.itunes_explicit%> /><input name="setting[itunes_explicit]" type="hidden" value="0" />

<%= save("Save My Settings") %>

Cache

   <%= link_to 'Empty Fragment Cache', :controller => '/admin/cache', :action => 'sweep' %>

   <%= link_to 'Rebuild cached HTML', :controller => '/admin/cache', :action => 'sweep_html' %>

There are <%= @page_cache_size %> entries in the cache

    <%= save("Save My Settings") %>

  <% end %>

<% @page_heading = 'Blog settings' %>

  <% form_tag :action => 'update' do %>

Which settings group would you like to edit?

General Settings

Text Filter

Spam Protection

Resource Defaults

Cache

General Settings

      Blog name:
      <input name="setting[blog_name]" id="blog_name" type="text" value="<%=h this_blog.blog_name %>" />

      Blog subtitle:
      <input name="setting[blog_subtitle]" id="blog_subtitle" type="text" value="<%=h this_blog.blog_subtitle %>" />

      <input name="setting[title_prefix]" id="blog_title_prefix" type="checkbox" value="1" <%= 'checked="checked"' if this_blog.title_prefix %> />
      Prefix page title with blog name

      Base Url:
      <input name="setting[base_url]" id="base_url" type="text" value="<%=h this_blog.base_url %>" />

      <input name="setting[default_allow_comments]" id="default_allow_comments" type="checkbox" value="1" <%= 'checked="checked"' if this_blog.default_allow_comments%> />
      <input name="setting[default_allow_comments]" type="hidden" value="0"/>
        Enable comments by default

      <input name="setting[default_allow_pings]" id="default_allow_pings" type="checkbox" value="1" <%= 'checked="checked"' if this_blog.default_allow_pings%> />
      <input name="setting[default_allow_pings]" type="hidden" value="0"/>
        Enable Trackbacks by default

      Display
      <input name="setting[limit_article_display]" size="4" id="limit_article_display" type="text" value="<%= this_blog.limit_article_display %>" /> articles on my homepage by default.

      Display
      <input name="setting[limit_rss_display]" size="4" id="limit_rss_display" type="text" value="<%= this_blog.limit_rss_display %>" /> articles in my rss feed by default.

      <input name="setting[show_extended_on_rss]" id="show_extended_on_rss" type="checkbox" value="1" <%= 'checked="checked"' if this_blog.show_extended_on_rss%> />
      <input name="setting[show_extended_on_rss]" type="hidden" value="0"/>
        Show full article on rss feed

Should the blog show mailto: links to your email address?

<input name="setting[link_to_author]" id="link_to_author" type="checkbox" value="1" <%= 'checked="checked"' if this_blog.link_to_author%> /><input name="setting[link_to_author]" type="hidden" value="0"/> Enable E-Mail public display

Should the blog use of the Globally Recognized Avatar (Gravatar) service in comments?

      <input name="setting[use_gravatar]" id="use_gravatar" type="checkbox" value="1" <%= 'checked="checked"' if this_blog.use_gravatar %> />
      <input name="setting[use_gravatar]" type="hidden" value="0"/>
      Enable Gravatar integration

Would you like to include your latitude and longitude in your blog's HTML pages? See GeoURL for details.
Example: <tt>47.774,-122.201</tt>

      Latitude, Longitude:
      <input name="setting[geourl_location]" size="20" id="geourl_location" type="text" value="<%= this_blog.geourl_location %>" />

This setting allows you to disable trackbacks for every article in
    your blog.  It won't remove existing trackbacks, but it will prevent
    any further attempt to add a trackback anywhere on your blog.  You can
    enable or disable trackbacks per-article using the article's extended
    settings.  See also the
      "Enable Trackbacks by default" setting above.

      <input name="setting[global_pings_disable]" id="global_pings_disable" type="checkbox" value="1" <%= 'checked="checked"' if this_blog.global_pings_disable%> />
         <input name="setting[global_pings_disable]" type="hidden" value="0"/>
           Disable trackbacks site-wide

Should Typo send trackbacks to websites that you link to?  This should be disabled
       for private blogs, as it will leak non-public information to sites that you're discussing.
       For public blogs, there's no real point in disabling this.

      <input name="setting[send_outbound_pings]" id="send_outbound_pings" type="checkbox" value="1" <%= 'checked="checked"' if this_blog.send_outbound_pings%> />
         <input name="setting[send_outbound_pings]" type="hidden" value="0"/>
           Send trackbacks to external sites

      URLs to ping automatically:

      <textarea name="setting[ping_urls]" id="ping_urls" rows="5" cols="50"><%=h this_blog.ping_urls %></textarea>

<%= save("Save My Settings") %>

Text Filter

Typo supports a number of text filtering options.  To add new filters, see the "filters" tab on the toolbar above.

        <select name="setting[text_filter]" id="text_filter">
          <%= options_for_select text_filter_options, TextFilter.find_by_name(this_blog.text_filter) %>
        </select>
        Article filter

        <select name="setting[comment_text_filter]" id="comment_text_filter">
        <%= options_for_select text_filter_options, TextFilter.find_by_name(this_blog.comment_text_filter) %>
        </select>
        Comments filter

<%= save("Save My Settings") %>

Notification

Typo can notify you when new articles or comments are posted

      Email address to use in From: field when Typo sends mail:
      <input name="setting[email_from]" size="20" id="email_from" type="text" value="<%= this_blog.email_from %>" />

      Jabber account to use when sending Jabber notifications:
      <input name="setting[jabber_address]" size="20" id="jabber_address" type="text" value="<%= this_blog.jabber_address %>" />

      Password for Jabber account:
      <input name="setting[jabber_password]" size="20" id="jabber_password" type="password" value="<%= this_blog.jabber_password %>" />

<%= save("Save My Settings") %>

Spam Protection

Enabling spam protection will make typo compare the IP address of posters as well as the contents of their posts against local and remote blacklists. Good defense against spam bots.

          <input name="setting[sp_global]" id="sp_global" type="checkbox" value="1" <%= 'checked="checked"' if this_blog.sp_global%> /><input name="setting[sp_global]" type="hidden" value="0"/>
          Enable spam protection

Typo can (optionally) use the Akismet spam-filtering service.  You need to register with
           Akismet and receive an API key before you can use their service.  If you have an Akismet key, enter it here.

          Akismet Key
          <input name="setting[sp_akismet_key]" id="sp_akismet_key" type="text" value="<%=h this_blog.sp_akismet_key %>"/>

You can optionally disable non-Ajax comments.  Typo will always use Ajax for comment submission if Javascript is enabled,
           so non-Ajax comments are either from spammers or users without Javascript.

          <input name="setting[sp_allow_non_ajax_comments]" id="sp_allow_non_ajax_comments" type="checkbox" value="1" <%= 'checked="checked"' if this_blog.sp_allow_non_ajax_comments%> />
          <input name="setting[sp_allow_non_ajax_comments]" type="hidden" value="0" />
          Allow non-ajax comments

(Spam bots usually don't know anything about ajax comments)

          Disable comments after
          <input name="setting[sp_article_auto_close]" size="4" id="sp_article_auto_close" type="text" value="<%= this_blog.sp_article_auto_close %>" /> days

(Set to 0 to never disable comments)

Typo will automatically reject comments and trackbacks which contain over a certain amount of links in them.

          Max URLs:
          <input name="setting[sp_url_limit]" size="4" id="sp_url_limit" type="text" value="<%= this_blog.sp_url_limit %>" /> links

(Set to 0 to never reject comments)

<%= save("Save My Settings") %>

Resource Defaults

          The below settings act as defaults when you choose to publish an enclosure with iTunes metadata.

          Author:
          <input name="setting[itunes_author]" size="25" id="itunes_author" type="text" value="<%= this_blog.itunes_author %>" />

          Subtitle:
          <input name="setting[itunes_subtitle]" size="25" id="itunes_subtitle" type="text" value="<%= this_blog.itunes_subtitle %>" />(setting for channel)

        Summary:(setting for channel)

          <textarea name="setting[itunes_summary]" cols="40" rows="3"><%=h this_blog.itunes_summary %></textarea>

          Email:
          <input name="setting[itunes_email]" size="25" id="itunes_email" type="text" value="<%= this_blog.itunes_email %>" />  Not Published by Apple

          Optional Name:
          <input name="setting[itunes_name]" size="25" id="itunes_name" type="text" value="<%= this_blog.itunes_name %>" />  Not Published by Apple

          Copyright Information:
          <input name="setting[itunes_copyright]" size="25" id="itunes_copyright" type="text" value="<%= this_blog.itunes_copyright %>" />

          Explicit:
          <input name="setting[itunes_explicit]" id="itunes_explicit" type="checkbox"  value="1" <%= 'checked="checked"' if this_blog.itunes_explicit%> /><input name="setting[itunes_explicit]" type="hidden" value="0" />

<%= save("Save My Settings") %>

Cache

   <%= link_to 'Empty Fragment Cache', :controller => '/admin/cache', :action => 'sweep' %>

   <%= link_to 'Rebuild cached HTML', :controller => '/admin/cache', :action => 'sweep_html' %>

There are <%= @page_cache_size %> entries in the cache

    <%= save("Save My Settings") %>

  <% end %>


add link to new booking to top-navigation

<?xml version="1.0" encoding="iso-8859-15"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">

    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <meta name="author" content="Simon Huerlimann <simon.huerlimann@cyt.ch>" />
    <meta name="keywords" content="finance CyT Agrabah" />
    <meta name="description" content="Accounting for Agrabah GmbH" />
    <%= stylesheet_link_tag 'noprobs' %>
    <%= javascript_include_tag :defaults %>

    <title>Accounting for Agrabah GmbH - <%= controller.action_name %></title>

          <%= image_tag 'logo-left-small' %>
          <%= image_tag 'logo-right-small' %>

<%= link_to "Clients", :controller => "clients"%>

<%= link_to "Balance Sheet", :controller => "balance"%>

<%= link_to "Profit Sheet", :controller => "profit"%>

<%= link_to "Accounts", :controller => "accounts"%>

<%= link_to "Bookings", :controller => "bookings"%>

<%= link_to "New Booking", :controller => "bookings", :action => :new %>

            <%= @content_for_layout %>

<?xml version="1.0" encoding="iso-8859-15"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">

    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <meta name="author" content="Simon Huerlimann <simon.huerlimann@cyt.ch>" />
    <meta name="keywords" content="finance CyT Agrabah" />
    <meta name="description" content="Accounting for Agrabah GmbH" />
    <%= stylesheet_link_tag 'noprobs' %>
    <%= javascript_include_tag :defaults %>

    <title>Accounting for Agrabah GmbH - <%= controller.action_name %></title>

          <%= image_tag 'logo-left-small' %>
          <%= image_tag 'logo-right-small' %>

<%= link_to "Clients", :controller => "clients"%>

<%= link_to "Balance Sheet", :controller => "balance"%>

<%= link_to "Profit Sheet", :controller => "profit"%>

<%= link_to "Accounts", :controller => "accounts"%>

<%= link_to "Bookings", :controller => "bookings"%>

            <%= @content_for_layout %>


don't include hozr.js

don't include hozr.js

<?xml version="1.0" encoding="iso-8859-15"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">

    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <meta name="author" content="Simon Huerlimann <simon.huerlimann@cyt.ch>" />
    <meta name="keywords" content="finance CyT Agrabah" />
    <meta name="description" content="Accounting for Agrabah GmbH" />
    <%= stylesheet_link_tag 'noprobs' %>
    <%= javascript_include_tag :defaults %>

    <title>Accounting for Agrabah GmbH - <%= controller.action_name %></title>

          <%= image_tag 'logo-left-small' %>
          <%= image_tag 'logo-right-small' %>

<%= link_to "Clients", :controller => "clients"%>

<%= link_to "Balance Sheet", :controller => "balance"%>

<%= link_to "Profit Sheet", :controller => "profit"%>

<%= link_to "Accounts", :controller => "accounts"%>

<%= link_to "Bookings", :controller => "bookings"%>

            <%= @content_for_layout %>

<?xml version="1.0" encoding="iso-8859-15"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">

    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <meta name="author" content="Simon Huerlimann <simon.huerlimann@cyt.ch>" />
    <meta name="keywords" content="finance CyT Agrabah" />
    <meta name="description" content="Accounting for Agrabah GmbH" />
    <%= stylesheet_link_tag 'noprobs' %>
    <%= javascript_include_tag :defaults %>
    <%= javascript_include_tag "hozr" %>

    <title>Accounting for Agrabah GmbH - <%= controller.action_name %></title>

          <%= image_tag 'logo-left-small' %>
          <%= image_tag 'logo-right-small' %>

<%= link_to "Clients", :controller => "clients"%>

<%= link_to "Balance Sheet", :controller => "balance"%>

<%= link_to "Profit Sheet", :controller => "profit"%>

<%= link_to "Accounts", :controller => "accounts"%>

<%= link_to "Bookings", :controller => "bookings"%>

            <%= @content_for_layout %>


And if they do not have any logged actions, please do not blow up...

Former-commit-id: 5d023eb467d6f68153b03421aa5647ebfa6d0d3f

<% if @people.empty? %>

Sorry, but no one has registered!
        Send people <%= link_to "here", :controller => "account", :action => "new" %>!

<% else %>

            id
            first_name
            last_name
            email_address
            password
            administrator?
            Most recent action
            See actions

        <% @people.each do |person| %>

            <%= person.id %>
            <%= person.first_name %>
            <%= person.last_name %>
            <%= mail_to person.email_address %>
            <%= person.password %>
            <%= "yes" if person.administrator? %>

                <% if person.latest_action_time %>
                    <%= distance_of_time_in_words(Time.now, person.latest_action_time) -%> ago
                <% else %>
                    -
                <% end %>

            <%= link_to "See user's actions", :controller => "admin", :action => "view_person_actions", :id => person.id %>

        <% end %>

<% end %>

<% if @people.empty? %>

Sorry, but no one has registered!
        Send people <%= link_to "here", :controller => "account", :action => "new" %>!

<% else %>

            id
            first_name
            last_name
            email_address
            password
            administrator?
            Most recent action
            See actions

        <% @people.each do |person| %>

            <%= person.id %>
            <%= person.first_name %>
            <%= person.last_name %>
            <%= mail_to person.email_address %>
            <%= person.password %>
            <%= "yes" if person.administrator? %>
            <%= distance_of_time_in_words(Time.now, person.latest_action_time) -%> ago
            <%= link_to "See user's actions", :controller => "admin", :action => "view_person_actions", :id => person.id %>

        <% end %>

<% end %>


Wrong tag closing on search/_event partial

  <%= link_to(event.title, event.url, :class => "search-result-title") %>

    <%= render :partial => 'image', :object => event %>

    <% if event.start_date %>

        <%= _('Start date') %>
        <%= event.start_date %>

    <% end %>
    <% if event.end_date %>

        <%= _('End date') %>
        <%= event.end_date %>

    <% end %>

    <%= render :partial => 'article_common', :object => event %>


killed a rogue <p> tag which caused XHTML validation to fail

git-svn-id: 70ab0960c3db1cbf656efd6df54a8f3de72dc710@27 820eb932-12ee-0310-9ca8-eeb645f39767

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<link rel="stylesheet" href="/stylesheets/base.css" type="text/css" />
	<link rel="alternate" type="application/rss+xml"  title="Recent changes (RSS 2.0)"  href="/xml/rss" />
	<link rel="alternate" type="application/atom+xml"  title="Recent changes (ATOM 0.3)"  href="/xml/atom" />
	<title><%= CONFIG['blogname'] %></title>

<%= CONFIG['blogname'] %>

  <%= @content_for_layout %>

	<form action="/articles/search" method="get">
Search
<input type="text" name="q" value="" size="15" />
</form>

  	 <%= render_partial "shared/pages"  %>

     <%= render_partial "shared/projects"  %>

     <%= render_partial "shared/tools"  %>

	   <%= tadalist "http://tobi.tadalist.com/lists/feed_public/741" %>

	   <%= render_partial "shared/xml" %>

     Valid XHTML 1.0

     Valid CSS

Copyright  Tobias Luetke

    RSS and atom available


Move locale switcher to nav bar (saves space)

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

      <meta http-equiv="content-type" content="text/html;charset=UTF-8" >
      <title><%= site_name %> admin<%= @title ? ":" : "" %> <%=@title%></title>

      <%= javascript_include_tag '/javascripts/jquery-1.7.2.min.js', '/adminbootstraptheme/javascripts/jquery-ui.min.js', '/adminbootstraptheme/javascripts/bootstrap-collapse', '/adminbootstraptheme/javascripts/bootstrap-tab', '/adminbootstraptheme/javascripts/admin' %>
      <%= stylesheet_link_tag 'admin-theme/jquery-ui-1.8.15.custom.css', :rel => 'stylesheet'%>
      <%= stylesheet_link_tag "/adminbootstraptheme/stylesheets/admin", :title => "Main", :rel => "stylesheet" %>

                <%= link_to 'Alaveteli', main_url('/'), :class => "brand" %>

                      <%= link_to 'Summary', admin_general_index_path %>

                      <%= link_to 'Timeline', admin_timeline_path %>

                      <%= link_to 'Stats', admin_stats_path %>

                      <%= link_to 'Debug', admin_debug_path %>

                      <%= link_to 'Authorities', admin_body_list_path %>

                      <%= link_to 'Requests', admin_request_list_path %>

                      <%= link_to 'Users', admin_user_list_path %>

                      <%= link_to 'Tracks', admin_track_list_path %>

                <%= render :partial => 'general/locale_switcher' %>

        <% if flash[:error] %>

                <%= flash[:error] %>

        <% end %>

        <% if flash[:notice] %>

                <%= flash[:notice] %>

        <% end %>

        <%= yield  %>


Update contact page from AsktheEU

Update contact page from AsktheEU

<% @title = "Contáctanos" %>

<%= render :partial => 'sidebar' %>

Contáctanos

Nos encantaría hablar contigo. Por favor usa una de estos métodos para comunicarte con nosotros:

Correo electrónico (email)

Escribe al equipo de tuderechoasaber.es en: contacto@tuderechoasaber.es

Puedes escribirnos en ingles, francés, alemán o español. Intentamos responder a los mensajes en 24-48 horas.

Teléfono

Puedes llamar a la oficina de Access Info y hablar con nosotros en inglés, francés, alemán o español:

Oficina (10-19 hora de Madrid): +34 91 366 5344

Móvil (cualquier hora): + 34 667 685 319

Twitter

        Síguenos en Twitter:
        Sígue a @tuderechoasaber

Dirección postal

Access Info Europe

    Calle Príncipe de Anglona 5, 2c

    28005 Madrid

    España

<% @title = "Contáctanos" %>

<%= render :partial => 'sidebar' %>

Contáctanos

Nos encantaría hablar contigo. Por favor usa una de estos métodos para comunicarte con nosotros:

Correo electrónico (email)

Escribe al equipo de AsktheEU.org en: team@asktheeu.org

Puedes escribirnos en ingles, francés, alemán o español. Intentamos responder a los mensajes en 24-48 horas.

Teléfono

Puedes llamarnos y hablar con nosotros en inglés, francés, alemán o español:

Oficina (10-19 hora de Madrid): +34 91 366 5344

Móvil (cualquier hora): + 34 667 685 319

Twitter

        Síguenos en Twitter:
        Sígue a @AsktheEU

Dirección postal

Access Info Europe

    Calle Príncipe de Anglona 5, 2c

    28005 Madrid

    España


html updates in response to information gathered vs test projects

  Cuke Sniffer

    Score: <%= cuke_sniffer.summary[:total_score] %>

  Summary -

  <% data_symbols = [:features, :scenarios, :step_definitions, :hooks] %>

      Features
      Scenarios
      Step Definitions
      Hooks

      Total Score
      <% data_symbols.each do |symbol| %>
          <%= cuke_sniffer.summary[symbol][:total_score] %>
      <% end %>

      Count
      <% data_symbols.each do |symbol| %>
          <%= cuke_sniffer.summary[symbol][:total].inspect %>
      <% end %>

      Lowest Score
      <% data_symbols.each do |symbol| %>
          <%= cuke_sniffer.summary[symbol][:min] %>
      <% end %>

      Highest Score
      <% data_symbols.each do |symbol| %>
          <%= cuke_sniffer.summary[symbol][:max] %>
      <% end %>

      Average Score
      <% data_symbols.each do |symbol| %>
          <%= cuke_sniffer.summary[symbol][:average] %>
      <% end %>

      Threshold
      <% data_symbols.each do |symbol| %>
          <%= cuke_sniffer.summary[symbol][:threshold] %>
      <% end %>

      Good
      <% data_symbols.each do |symbol| %>
          <%= (cuke_sniffer.summary[symbol][:good].to_f/cuke_sniffer.summary[symbol][:total].to_f).round(2) * 100 %>
            %

      <% end %>

      Bad
      <% data_symbols.each do |symbol| %>
          <%= (cuke_sniffer.summary[symbol][:bad].to_f/cuke_sniffer.summary[symbol][:total].to_f).round(2) * 100 %>
            %

      <% end %>

  Improvement List +

  <% if cuke_sniffer.summary[:improvement_list].empty? %>

No Improvements to make!

  <% end %>

    <% cuke_sniffer.summary[:improvement_list].each do |improvement, count| %>

          <%= count %>
          <%= improvement %>

    <% end %>

  Dead Steps +

  <% dead_steps = cuke_sniffer.get_dead_steps %>
  <% dead_steps.delete(:total) %>
  <% if dead_steps.count == 0 %>

No dead steps found!

  <% elsif dead_steps.count == 1 %>

<%= dead_steps.count %> Dead Step found.

  <% else %>

<%= dead_steps.count %> Dead Steps found.

  <% end %>

    <% dead_steps.each_key do |file_name| %>

<%= file_name.gsub(cuke_sniffer.step_definitions_location, "") %>
              .rb

              <% dead_steps[file_name].each do |regex| %>

                    <%= regex.match(/(?<line>\d+):/)[:line] %>
                    <%= regex.match(/:(?<regex>.*)/)[:regex] %>

              <% end %>

    <% end %>

  Features +

  <% if cuke_sniffer.features.count == 0 %>

No Feature/Scenario smells!

  <% end %>
  <% index = 0 %>
  <% cuke_sniffer.features.each do |feature| %>
      <% next if feature.total_score <= 0 %>
      <div style="cursor: hand; padding-top: 3px" onclick="updateDisplayStatus(document.getElementById('feature_<%=index%>'))">

<%= feature.total_score + feature.scenarios_score %>

<%= feature.name %>

      <div id="feature_<%= index %>" class="sub_section">

          <% if feature.rules_hash.empty? %>

          <% end %>
          <% feature.rules_hash.each_key do |rule| %>

<%= rule %>

          <% end %>

          <%= feature.location.gsub(cuke_sniffer.features_location, "") %>

          <% unless feature.background.nil? or feature.background.score > 0 %>

<%= feature.background.score %>

<%= feature.background.type + ": " + feature.background.name %>

                <% feature.background.rules_hash.each_key do |rule| %>

<%= rule %>

                <% end %>

          <% end %>

          <% feature.scenarios.each do |scenario| %>

<%= scenario.score %>

<%= scenario.type + ": " + scenario.name %>

                <% scenario.rules_hash.each_key do |rule| %>

<%= rule %>

                <% end %>

          <% end %>

      <% index += 1 %>
  <% end %>

  Step Definitions +

  <% if cuke_sniffer.step_definitions.count == 0 %>

No Step Definition smells!

  <% end %>
  <% index = 0 %>
  <% cuke_sniffer.step_definitions.each do |step_definition| %>
      <% next if step_definition.score <= 0 %>
      <div style="cursor: hand; padding-top: 3px" onclick="updateDisplayStatus(document.getElementById('step_definition_<%=index%>'))">

<%= step_definition.score %>

        <% parameters = "" %>
        <% step_definition.parameters.each do |param| %>
            <% if param == step_definition.parameters.first %>
                <% parameters << "| " %>
            <% end %>
            <% parameters << param %>

            <% if param == step_definition.parameters.last %>
                <% parameters << " |" %>
            <% else %>
                <% parameters << ", " %>
            <% end %>
        <% end %>

<%= "/" + step_definition.regex.to_s.match(/\(\?\-mix\:(?<regex>.*)\)/)[:regex] + "/ do " + parameters %>

<%= step_definition.calls.keys.count %> Call(s)

      <div id="step_definition_<%= index %>" style="display:none;">

            <% step_definition.rules_hash.each_key do |rule| %>

<%= rule %>

            <% end %>

<%= step_definition.location.gsub(cuke_sniffer.step_definitions_location, "") %>

      <% index += 1 %>
  <% end %>

  Hooks +

  <% if cuke_sniffer.hooks.count == 0 %>

No Hook smells!

  <% end %>
  <% index = 0 %>
  <% cuke_sniffer.hooks.each do |hook| %>
      <% next if hook.score <= 0 %>
      <div style="cursor: hand; padding-top: 3px" onclick="updateDisplayStatus(document.getElementById('hook_<%=index%>'))">

<%= hook.score %>

        <% tags = "(" %>
        <% hook.tags.each do |tag| %>
            <% tags << tag %>
            <% tags << ", " unless tag == hook.tags.last %>
        <% end %>
        <% tags += ")" %>
        <% parameters = "| " %>
        <% hook.parameters.each do |parameter| %>
            <% parameters << parameter %>
            <% parameters << ", " unless parameter == hook.parameters.last %>
        <% end %>
        <% parameters += " |" %>
        <% name = hook.type %>
        <% name += tags unless tags == "()" %>
        <% name += " do " %>
        <% name += parameters unless parameters == "|  |" %>

<%= name %>

      <div id="hook_<%= index %>" style="display:none;">

            <% hook.rules_hash.each_key do |rule| %>

<%= rule %>

            <% end %>

            <%= hook.location.gsub(cuke_sniffer.hooks_location, "") %>

      <% index += 1 %>
  <% end %>

  Cuke Sniffer

    Score: <%= cuke_sniffer.summary[:total_score] %>

  Summary -

  <% data_symbols = [:features, :scenarios, :step_definitions, :hooks] %>

      Features
      Scenarios
      Step Definitions
      Hooks

      Total Score
      <% data_symbols.each do |symbol| %>
          <%= cuke_sniffer.summary[symbol][:total_score] %>
      <% end %>

      Count
      <% data_symbols.each do |symbol| %>
          <%= cuke_sniffer.summary[symbol][:total].inspect %>
      <% end %>

      Lowest Score
      <% data_symbols.each do |symbol| %>
          <%= cuke_sniffer.summary[symbol][:min] %>
      <% end %>

      Highest Score
      <% data_symbols.each do |symbol| %>
          <%= cuke_sniffer.summary[symbol][:max] %>
      <% end %>

      Average Score
      <% data_symbols.each do |symbol| %>
          <%= cuke_sniffer.summary[symbol][:average] %>
      <% end %>

      Threshold
      <% data_symbols.each do |symbol| %>
          <%= cuke_sniffer.summary[symbol][:threshold] %>
      <% end %>

      Good
      <% data_symbols.each do |symbol| %>
          <%= (cuke_sniffer.summary[symbol][:good].to_f/cuke_sniffer.summary[symbol][:total].to_f).round(2) * 100 %>
            %

      <% end %>

      Bad
      <% data_symbols.each do |symbol| %>
          <%= (cuke_sniffer.summary[symbol][:bad].to_f/cuke_sniffer.summary[symbol][:total].to_f).round(2) * 100 %>
            %

      <% end %>

  Improvement List +

  <% if cuke_sniffer.summary[:improvement_list].empty? %>

No Improvements to make!

  <% end %>

    <% cuke_sniffer.summary[:improvement_list].each do |improvement, count| %>

          <%= count %>
          <%= improvement %>

    <% end %>

  Dead Steps +

  <% dead_steps = cuke_sniffer.get_dead_steps %>
  <% dead_steps.delete(:total) %>
  <% if dead_steps.count == 0 %>

No dead steps found!

  <% elsif dead_steps.count == 1 %>

<%= dead_steps.count %> Dead Step found.

  <% else %>

<%= dead_steps.count %> Dead Steps found.

  <% end %>

    <% dead_steps.each_key do |file_name| %>

<%= file_name.gsub(cuke_sniffer.step_definitions_location, "") %>
              .rb

              <% dead_steps[file_name].each do |regex| %>

                    <%= regex.match(/(?<line>\d+):/)[:line] %>
                    <%= regex.match(/:(?<regex>.*)/)[:regex] %>

              <% end %>

    <% end %>

  Features +

  <% if cuke_sniffer.features.count == 0 %>

No Feature/Scenario smells!

  <% end %>

    <% index = 0 %>
    <% cuke_sniffer.features.each do |feature| %>
        <% next if feature.total_score <= 0 %>

        <div style="cursor: hand; padding-top: 3px" onclick="updateDisplayStatus(document.getElementById('feature_<%=index%>'))">

<%= feature.total_score + feature.scenarios_score %>

<%= feature.name %>

        <div id="feature_<%= index %>" class="sub_section">

            <% if feature.rules_hash.empty? %>

            <% end %>
            <% feature.rules_hash.each_key do |rule| %>

<%= rule %>

            <% end %>

            <%= feature.location.gsub(cuke_sniffer.features_location, "") %>

            <% unless feature.background.nil? %>

<%= feature.background.score %>

<%= feature.background.type + ": " + feature.background.name %>

                  <% feature.background.rules_hash.each_key do |rule| %>

<%= rule %>

                  <% end %>

            <% end %>

            <% feature.scenarios.each do |scenario| %>

<%= scenario.score %>

<%= scenario.type + ": " + scenario.name %>

                  <% scenario.rules_hash.each_key do |rule| %>

<%= rule %>

                  <% end %>

            <% end %>

        <% index += 1 %>
    <% end %>

  Step Definitions +

  <% if cuke_sniffer.step_definitions.count == 0 %>

No Step Definition smells!

  <% end %>

    <% index = 0 %>
    <% cuke_sniffer.step_definitions.each do |step_definition| %>
        <% next if step_definition.score <= 0 %>

          <div style="cursor: hand; padding-top: 3px" onclick="updateDisplayStatus(document.getElementById('step_definition_<%=index%>'))">

<%= step_definition.score %>

            <% parameters = "" %>
            <% step_definition.parameters.each do |param| %>
                <% if param == step_definition.parameters.first %>
                    <% parameters << "| " %>
                <% end %>
                <% parameters << param %>

                <% if param == step_definition.parameters.last %>
                    <% parameters << " |" %>
                <% else %>
                    <% parameters << ", " %>
                <% end %>
            <% end %>

<%= "/" + step_definition.regex.to_s.match(/\(\?\-mix\:(?<regex>.*)\)/)[:regex] + "/ do " + parameters %>

          <div id="step_definition_<%= index %>" class="sub_section">

              <% step_definition.rules_hash.each_key do |rule| %>

<%= rule %>

              <% end %>

              <%= step_definition.location.gsub(cuke_sniffer.step_definitions_location, "") %>

        <% index += 1 %>
    <% end %>

  Hooks +

  <% if cuke_sniffer.hooks.count == 0 %>

No Hook smells!

  <% end %>

    <% index = 0 %>
    <% cuke_sniffer.hooks.each do |hook| %>
        <% next if hook.score <= 0 %>

        <div style="cursor: hand; padding-top: 3px" onclick="updateDisplayStatus(document.getElementById('hook_<%=index%>'))">

<%= hook.score %>

          <% tags = "(" %>
          <% hook.tags.each do |tag| %>
              <% tags << tag %>
              <% tags << ", " unless tag == hook.tags.last %>
          <% end %>
          <% tags += ")" %>
          <% parameters = "| " %>
          <% hook.parameters.each do |parameter| %>
              <% parameters << parameter %>
              <% parameters << ", " unless parameter == hook.parameters.last %>
          <% end %>
          <% parameters += " |" %>
          <% name = hook.type %>
          <% name += tags unless tags == "()" %>
          <% name += " do " %>
          <% name += parameters unless parameters == "|  |" %>

<%= name %>

        <div id="hook_<%= index %>" class="sub_section">

            <% hook.rules_hash.each_key do |rule| %>

<%= rule %>

            <% end %>

            <%= hook.location.gsub(cuke_sniffer.hooks_location, "") %>

        <% index += 1 %>
    <% end %>


html tweak to display the actual number of dead steps instead of the number of files with dead steps in them. Moved the rounding call for the percentage dispaly methods so that we don't get something wtih 10.00000002%

  Cuke Sniffer

    Score: <%= cuke_sniffer.summary[:total_score] %>

  Summary -

  <% data_symbols = [:features, :scenarios, :step_definitions, :hooks] %>

      Features
      Scenarios
      Step Definitions
      Hooks

      Total Score
      <% data_symbols.each do |symbol| %>
          <%= cuke_sniffer.summary[symbol][:total_score] %>
      <% end %>

      Count
      <% data_symbols.each do |symbol| %>
          <%= cuke_sniffer.summary[symbol][:total].inspect %>
      <% end %>

      Lowest Score
      <% data_symbols.each do |symbol| %>
          <%= cuke_sniffer.summary[symbol][:min] %>
      <% end %>

      Highest Score
      <% data_symbols.each do |symbol| %>
          <%= cuke_sniffer.summary[symbol][:max] %>
      <% end %>

      Average Score
      <% data_symbols.each do |symbol| %>
          <%= cuke_sniffer.summary[symbol][:average] %>
      <% end %>

      Threshold
      <% data_symbols.each do |symbol| %>
          <%= cuke_sniffer.summary[symbol][:threshold] %>
      <% end %>

      Good
      <% data_symbols.each do |symbol| %>
          <%= ((cuke_sniffer.summary[symbol][:good].to_f/cuke_sniffer.summary[symbol][:total].to_f) * 100).round(2) %>
            %

      <% end %>

      Bad
      <% data_symbols.each do |symbol| %>
          <%= ((cuke_sniffer.summary[symbol][:bad].to_f/cuke_sniffer.summary[symbol][:total].to_f) * 100).round(2) %>
            %

      <% end %>

  Improvement List +

  <% if cuke_sniffer.summary[:improvement_list].empty? %>

No Improvements to make!

  <% end %>

    <% cuke_sniffer.summary[:improvement_list].each do |improvement, count| %>

          <%= count %>
          <%= improvement %>

    <% end %>

  Dead Steps +

  <% dead_steps = cuke_sniffer.get_dead_steps %>
  <% dead_steps.delete(:total) %>
  <% dead_step_count = dead_steps.values.flatten.count %>
  <% if dead_step_count == 0 %>

No dead steps found!

  <% elsif dead_step_count == 1 %>

<%= dead_step_count %> Dead Step found.

  <% else %>

<%= dead_steps_count %> Dead Steps found.

  <% end %>

    <% dead_steps.each_key do |file_name| %>

<%= file_name.gsub(cuke_sniffer.step_definitions_location, "") %>
              .rb

              <% dead_steps[file_name].each do |regex| %>

                    <%= regex.match(/(?<line>\d+):/)[:line] %>
                    <%= regex.match(/:(?<regex>.*)/)[:regex] %>

              <% end %>

    <% end %>

  Features +

  <% if cuke_sniffer.features.count == 0 %>

No Feature/Scenario smells!

  <% end %>
  <% index = 0 %>
  <% cuke_sniffer.features.each do |feature| %>
      <% next if feature.total_score <= 0 %>
      <div style="cursor: hand; padding-top: 3px" onclick="updateDisplayStatus(document.getElementById('feature_<%=index%>'))">

<%= feature.total_score + feature.scenarios_score %>

<%= feature.name %>

      <div id="feature_<%= index %>" class="sub_section">

          <% if feature.rules_hash.empty? %>

          <% end %>
          <% feature.rules_hash.each_key do |rule| %>

<%= rule %>

          <% end %>

          <%= feature.location.gsub(cuke_sniffer.features_location, "") %>

          <% unless feature.background.nil? or feature.background.score > 0 %>

<%= feature.background.score %>

<%= feature.background.type + ": " + feature.background.name %>

                <% feature.background.rules_hash.each_key do |rule| %>

<%= rule %>

                <% end %>

          <% end %>

          <% feature.scenarios.each do |scenario| %>
              <% next if scenario.score <= 0 %>

<%= scenario.score %>

<%= scenario.type + ": " + scenario.name %>

                <% scenario.rules_hash.each_key do |rule| %>

<%= rule %>

                <% end %>

          <% end %>

      <% index += 1 %>
  <% end %>

  Step Definitions +

  <% if cuke_sniffer.step_definitions.count == 0 %>

No Step Definition smells!

  <% end %>
  <% index = 0 %>
  <% cuke_sniffer.step_definitions.each do |step_definition| %>
      <% next if step_definition.score <= 0 %>
      <div style="cursor: hand; padding-top: 3px" onclick="updateDisplayStatus(document.getElementById('step_definition_<%=index%>'))">

<%= step_definition.score %>

        <% parameters = "" %>
        <% step_definition.parameters.each do |param| %>
            <% if param == step_definition.parameters.first %>
                <% parameters << "| " %>
            <% end %>
            <% parameters << param %>

            <% if param == step_definition.parameters.last %>
                <% parameters << " |" %>
            <% else %>
                <% parameters << ", " %>
            <% end %>
        <% end %>

<%= "/" + step_definition.regex.to_s.match(/\(\?\-mix\:(?<regex>.*)\)/)[:regex] + "/ do " + parameters %>

<%= step_definition.calls.keys.count %> Call(s)

      <div id="step_definition_<%= index %>" style="display:none;">

            <% step_definition.rules_hash.each_key do |rule| %>

<%= rule %>

            <% end %>

<%= step_definition.location.gsub(cuke_sniffer.step_definitions_location, "") %>

      <% index += 1 %>
  <% end %>

  Hooks +

  <% if cuke_sniffer.hooks.count == 0 %>

No Hook smells!

  <% end %>
  <% index = 0 %>
  <% cuke_sniffer.hooks.each do |hook| %>
      <% next if hook.score <= 0 %>
      <div style="cursor: hand; padding-top: 3px" onclick="updateDisplayStatus(document.getElementById('hook_<%=index%>'))">

<%= hook.score %>

        <% tags = "(" %>
        <% hook.tags.each do |tag| %>
            <% tags << tag %>
            <% tags << ", " unless tag == hook.tags.last %>
        <% end %>
        <% tags += ")" %>
        <% parameters = "| " %>
        <% hook.parameters.each do |parameter| %>
            <% parameters << parameter %>
            <% parameters << ", " unless parameter == hook.parameters.last %>
        <% end %>
        <% parameters += " |" %>
        <% name = hook.type %>
        <% name += tags unless tags == "()" %>
        <% name += " do " %>
        <% name += parameters unless parameters == "|  |" %>

<%= name %>

      <div id="hook_<%= index %>" style="display:none;">

            <% hook.rules_hash.each_key do |rule| %>

<%= rule %>

            <% end %>

            <%= hook.location.gsub(cuke_sniffer.hooks_location, "") %>

      <% index += 1 %>
  <% end %>

  Cuke Sniffer

    Score: <%= cuke_sniffer.summary[:total_score] %>

  Summary -

  <% data_symbols = [:features, :scenarios, :step_definitions, :hooks] %>

      Features
      Scenarios
      Step Definitions
      Hooks

      Total Score
      <% data_symbols.each do |symbol| %>
          <%= cuke_sniffer.summary[symbol][:total_score] %>
      <% end %>

      Count
      <% data_symbols.each do |symbol| %>
          <%= cuke_sniffer.summary[symbol][:total].inspect %>
      <% end %>

      Lowest Score
      <% data_symbols.each do |symbol| %>
          <%= cuke_sniffer.summary[symbol][:min] %>
      <% end %>

      Highest Score
      <% data_symbols.each do |symbol| %>
          <%= cuke_sniffer.summary[symbol][:max] %>
      <% end %>

      Average Score
      <% data_symbols.each do |symbol| %>
          <%= cuke_sniffer.summary[symbol][:average] %>
      <% end %>

      Threshold
      <% data_symbols.each do |symbol| %>
          <%= cuke_sniffer.summary[symbol][:threshold] %>
      <% end %>

      Good
      <% data_symbols.each do |symbol| %>
          <%= (cuke_sniffer.summary[symbol][:good].to_f/cuke_sniffer.summary[symbol][:total].to_f).round(2) * 100 %>
            %

      <% end %>

      Bad
      <% data_symbols.each do |symbol| %>
          <%= (cuke_sniffer.summary[symbol][:bad].to_f/cuke_sniffer.summary[symbol][:total].to_f).round(2) * 100 %>
            %

      <% end %>

  Improvement List +

  <% if cuke_sniffer.summary[:improvement_list].empty? %>

No Improvements to make!

  <% end %>

    <% cuke_sniffer.summary[:improvement_list].each do |improvement, count| %>

          <%= count %>
          <%= improvement %>

    <% end %>

  Dead Steps +

  <% dead_steps = cuke_sniffer.get_dead_steps %>
  <% dead_steps.delete(:total) %>
  <% if dead_steps.count == 0 %>

No dead steps found!

  <% elsif dead_steps.count == 1 %>

<%= dead_steps.count %> Dead Step found.

  <% else %>

<%= dead_steps.count %> Dead Steps found.

  <% end %>

    <% dead_steps.each_key do |file_name| %>

<%= file_name.gsub(cuke_sniffer.step_definitions_location, "") %>
              .rb

              <% dead_steps[file_name].each do |regex| %>

                    <%= regex.match(/(?<line>\d+):/)[:line] %>
                    <%= regex.match(/:(?<regex>.*)/)[:regex] %>

              <% end %>

    <% end %>

  Features +

  <% if cuke_sniffer.features.count == 0 %>

No Feature/Scenario smells!

  <% end %>
  <% index = 0 %>
  <% cuke_sniffer.features.each do |feature| %>
      <% next if feature.total_score <= 0 %>
      <div style="cursor: hand; padding-top: 3px" onclick="updateDisplayStatus(document.getElementById('feature_<%=index%>'))">

<%= feature.total_score + feature.scenarios_score %>

<%= feature.name %>

      <div id="feature_<%= index %>" class="sub_section">

          <% if feature.rules_hash.empty? %>

          <% end %>
          <% feature.rules_hash.each_key do |rule| %>

<%= rule %>

          <% end %>

          <%= feature.location.gsub(cuke_sniffer.features_location, "") %>

          <% unless feature.background.nil? or feature.background.score > 0 %>

<%= feature.background.score %>

<%= feature.background.type + ": " + feature.background.name %>

                <% feature.background.rules_hash.each_key do |rule| %>

<%= rule %>

                <% end %>

          <% end %>

          <% feature.scenarios.each do |scenario| %>
              <% next if scenario.score <= 0 %>

<%= scenario.score %>

<%= scenario.type + ": " + scenario.name %>

                <% scenario.rules_hash.each_key do |rule| %>

<%= rule %>

                <% end %>

          <% end %>

      <% index += 1 %>
  <% end %>

  Step Definitions +

  <% if cuke_sniffer.step_definitions.count == 0 %>

No Step Definition smells!

  <% end %>
  <% index = 0 %>
  <% cuke_sniffer.step_definitions.each do |step_definition| %>
      <% next if step_definition.score <= 0 %>
      <div style="cursor: hand; padding-top: 3px" onclick="updateDisplayStatus(document.getElementById('step_definition_<%=index%>'))">

<%= step_definition.score %>

        <% parameters = "" %>
        <% step_definition.parameters.each do |param| %>
            <% if param == step_definition.parameters.first %>
                <% parameters << "| " %>
            <% end %>
            <% parameters << param %>

            <% if param == step_definition.parameters.last %>
                <% parameters << " |" %>
            <% else %>
                <% parameters << ", " %>
            <% end %>
        <% end %>

<%= "/" + step_definition.regex.to_s.match(/\(\?\-mix\:(?<regex>.*)\)/)[:regex] + "/ do " + parameters %>

<%= step_definition.calls.keys.count %> Call(s)

      <div id="step_definition_<%= index %>" style="display:none;">

            <% step_definition.rules_hash.each_key do |rule| %>

<%= rule %>

            <% end %>

<%= step_definition.location.gsub(cuke_sniffer.step_definitions_location, "") %>

      <% index += 1 %>
  <% end %>

  Hooks +

  <% if cuke_sniffer.hooks.count == 0 %>

No Hook smells!

  <% end %>
  <% index = 0 %>
  <% cuke_sniffer.hooks.each do |hook| %>
      <% next if hook.score <= 0 %>
      <div style="cursor: hand; padding-top: 3px" onclick="updateDisplayStatus(document.getElementById('hook_<%=index%>'))">

<%= hook.score %>

        <% tags = "(" %>
        <% hook.tags.each do |tag| %>
            <% tags << tag %>
            <% tags << ", " unless tag == hook.tags.last %>
        <% end %>
        <% tags += ")" %>
        <% parameters = "| " %>
        <% hook.parameters.each do |parameter| %>
            <% parameters << parameter %>
            <% parameters << ", " unless parameter == hook.parameters.last %>
        <% end %>
        <% parameters += " |" %>
        <% name = hook.type %>
        <% name += tags unless tags == "()" %>
        <% name += " do " %>
        <% name += parameters unless parameters == "|  |" %>

<%= name %>

      <div id="hook_<%= index %>" style="display:none;">

            <% hook.rules_hash.each_key do |rule| %>

<%= rule %>

            <% end %>

            <%= hook.location.gsub(cuke_sniffer.hooks_location, "") %>

      <% index += 1 %>
  <% end %>