Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Keeping tabs on the UK's parliaments and assemblies
Python PHP HTML C CSS Perl Other

hide show votes link if MP has never voted on a policy

The page it shows only says the MP has no votes on this policy so
there's no value in the user clicking on it. Also, it's a bit confusing
to say 'never voted' and then 'show votes'

Fixes #934
latest commit 616f2d4193
@struan struan authored
Failed to load latest commit information.
bin Use bundle to install/run compass instead of gem.
classes fix labour party special case policy generation SQL
commonlib @ 2082f99 update commonlib to latest version
conf Improve URL/search name lookup.
db Calculate, store and display Party/MP policy differences
flex Update build script with new URL for SDK
foundation @ a2a3901 Switch to using Foundation v4.2.3 via a submodule
googleappengine copy change/ change newsletter/mailing list/URL
puphpet Use a TLD other than .dev to avoid DNS headache.
scripts explicitly run party position script with php
search Add exemptions for special post-leaving answers.
tests Calculate, store and display Party/MP policy differences
uml-tests Remove most of uml-tests directory.
www hide show votes link if MP has never voted on a policy
.coveralls.yml Update Coveralls config with src directory.
.gitignore Use bundle to install/run compass instead of gem.
.gitmodules Switch to using Foundation v4.2.3 via a submodule
.scrutinizer.yml Increase code coverage timeout.
.travis.yml No longer allow test failures in PHP 5.6 to prevent regressions. Add contributing document.
Gemfile Use bundle to install/run compass instead of gem.
Gemfile.lock Use bundle to install/run compass instead of gem. Split out person loading to separate script. Fix incorrect name in Use a TLD other than .dev to avoid DNS headache.
Vagrantfile Improvements to the Vagrant box:
composer.json Update PHPUnit to 4.6 to prevent Gemnasium version warning.
composer.lock Update Composer and Composer requirements
composer.phar Update Composer and Composer requirements
phpdoc.dist.xml Add configuration for PHPDoc generation.
phpunit.xml Remove the suppression of errors causing PHPUnit hard failures.

Hello everyone,

If you're looking to set up a new Parliamentary monitoring site then you should look at our Pombola probject at which takes the lessons we've learned from writing and running TheyWorkForYou and uses them to create a modern, flexible and more easily adaptable platform for creating your own Parliamentary monitoring site. We strongly encourage people to use this rather than trying to adapt TheyWorkForYou to their own requirements.

If you want to dig in to the source of TheyWorkForYou then carry right on below.

We're pleased to release the source code. This is the code for the website itself. It's mainly written in PHP, although there are also some Perl scripts for database loading and indexing. The backend parser code is separate and available on GitHub. You can read more about this on TheyWorkForYou's parser info page

The source code in this distribution is released under a BSD style license. Roughly, this means you are free to copy, use, modify and redistribute the code or binaries made from the code. Commercial or non- commercial use is allowed. However, we disclaim warranty, and expect you not to use our name without our permission.

See the file LICENSE.txt for exact legal information.

What is anyway?

Everything MPs say in the UK's House of Commons is recorded in a document called Hansard. helps make sense of this vital democratic resource and, crucially, allows you to add your own annotations and links to the official transcripts of Parliament.

How on earth do I use this code?

See for installation questions.

If you have questions, the best place to ask is the mySociety TheyWorkForYou email list at!forum/theyworkforyou

Developing with Vagrant

You will need the latest versions of VirtualBox and Vagrant, then:

  • Stick an entry in your hosts file to point twfy.mysociety at (Apache doesn't like IP addresses).
  • Run vagrant up.
  • Go make a cup of tea. It may take a while whilst Vagrant and Puppet do their thing.
  • Point your web browser at http://twfy.mysociety and marvel at modern technology.

Compiling Static Assets

If you're working on a page which uses the redesign, you will need to compile static assets after changes:

  • vagrant ssh
  • cd /data/twfy/www/docs/style
  • compass compile for a one-off compilation or compass watch to recompile on changes


TheyWorkForYou includes a (currently very limited) test suite, using PHPunit. To run tests, ensure that the environment variables TWFY_TEST_DB_HOST, TWFY_TEST_DB_NAME, TWFY_TEST_DB_USER and TWFY_TEST_DB_PASS are set and contain relevant information for your testing database. The database will be stripped down and rebuilt during testing, so make sure it's not an important copy.

You may find that in some versions of PHPUnit errors are thrown regarding code coverage reports. If this is the case, the version installed by Composer and located at /vendor/bin/phpunit should run correctly.

Build Status

Build Status

Code Coverage

Scrutinizer Quality Score

mySociety Installability

Something went wrong with that request. Please try again.