Permalink
Browse files

Merge branch 'master' of github.com:tuimedia/whorunsit

  • Loading branch information...
2 parents 20f944f + 1cccd25 commit 2772302880229a8f75c9b1f2e673175e5b204d1b @inanimatt inanimatt committed Oct 24, 2011
View
1 src/Tui/DirectorsBundle/Controller/CompanyController.php
@@ -108,6 +108,7 @@ public function showCompanyAction(Company $company, $_format)
// References
$output['urls'] = array();
$output['urls']['opencorporates'] = $this->jsonUrl('http://opencorporates.com/companies/gb/'.$company->getId().'.json', 'OpenCorporates', 'application/json');
+ $output['urls']['companieshouse'] = $this->jsonUrl('http://data.companieshouse.gov.uk/doc/company/'.$company->getId().'.json', 'Companies House', 'application/json');
if ($output['appointment_page_count'] > 1)
{
if ($page < $output['appointment_page_count'])
View
5 src/Tui/DirectorsBundle/Resources/views/Company/showCompany.html.twig
@@ -23,6 +23,11 @@
</div>
<div class="item">
+ <span class="key">Companies House:</span>
+ <span class="value"><a href="http://data.companieshouse.gov.uk/doc/company/{{ company.id }}">View official record</a></span>
+ </div>
+
+ <div class="item">
<span class="key">Level Business:</span>
<span class="value"><a href="http://www.levelbusiness.com/doc/company/uk/{{ company.id }}">Accounts and updated information</a></span>
</div>
View
49 src/Tui/DirectorsBundle/Resources/views/Company/showCompany.rdf.twig
@@ -7,36 +7,39 @@
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:vcard="http://www.w3.org/2006/vcard/ns#"
-
+ xmlns:cs="http://www.companieshouse.gov.uk/terms/"
>
<rdf:Description rdf:about="{{ url('company_show', { 'id': company.id, '_format': 'rdf' }) }}">
-<rdfs:label>Description of the company {{ company.name }}</rdfs:label>
-<foaf:primaryTopic rdf:resource="{{ url('company_show', { 'id': company.id }) }}#company"/>
+ <rdfs:label>Description of the company {{ company.name }}</rdfs:label>
+ <foaf:primaryTopic rdf:resource="{{ url('company_show', { 'id': company.id }) }}#company"/>
</rdf:Description>
<fc:Company rdf:about="{{ url('company_show', { 'id': company.id }) }}#company">
-<ch:name>{{ company.name }}</ch:name>
-<ch:status>{{ company.status }}</ch:status>
-<ch:currentOfficers>{{ company.officers }}</ch:currentOfficers>
-<ch:chCompanyID>{{ company.id }}</ch:chCompanyID>
-<rdfs:seeAlso rdf:resource="http://opencorporates.com/companies/gb/{{ company.id }}"/>
-<rdfs:seeAlso rdf:resource="http://www.levelbusiness.com/doc/company/uk/{{ company.id }}"/>
-
+ <cs:CompanyName>{{ company.name }}</cs:CompanyName>
+ <ch:name>{{ company.name }}</ch:name>
+ <ch:status>{{ company.status }}</ch:status>
+ <ch:currentOfficers>{{ company.officers }}</ch:currentOfficers>
+ <ch:chCompanyID>{{ company.id }}</ch:chCompanyID>
+ <cs:CompanyNumber>{{ company.id }}</cs:CompanyNumber>
+ <rdfs:seeAlso rdf:resource="http://opencorporates.com/companies/gb/{{ company.id }}"/>
+ <rdfs:seeAlso rdf:resource="http://www.levelbusiness.com/doc/company/uk/{{ company.id }}"/>
+ <rdfs:seeAlso rdf:resource="http://data.companieshouse.gov.uk/doc/company/{{ company.id }}.rdf"/>
-{% for appointment in company.companyAppointments %}
- <ch:appointment>
- <foaf:Person rdf:about="{{ url('appointee_show', { 'id': appointment.appointee.id, '_format' : 'rdf' }) }}#person">
- <foaf:name>{{ appointment.appointee.forenames|title }} {{ appointment.appointee.surname|title }}</foaf:name>
- <vcard:adr>
- <vcard:Address>
- <vcard:postal-code>{{ '%.4s' | format(appointment.appointee.postcode)}}</vcard:postal-code>
- </vcard:Address>
- </vcard:adr>
- <vcard:bday>{% if not appointment.appointee.dateOfBirth is empty %}{{ appointment.appointee.dateOfBirth|date("Y") }}{% endif %}</vcard:bday>
- </foaf:Person>
- </ch:appointment>
-{% endfor %}
+ {% for appointment in company.companyAppointments %}
+ <ch:appointment>
+ <foaf:Person rdf:about="{{ url('appointee_show', { 'id': appointment.appointee.id, '_format' : 'rdf' }) }}#person">
+ <foaf:name>{{ appointment.appointee.forenames|title }} {{ appointment.appointee.surname|title }}</foaf:name>
+ <vcard:adr>
+ <vcard:Address>
+ <vcard:postal-code>{{ '%.4s' | format(appointment.appointee.postcode)}}</vcard:postal-code>
+ </vcard:Address>
+ </vcard:adr>
+ <vcard:bday>{% if not appointment.appointee.dateOfBirth is empty %}{{ appointment.appointee.dateOfBirth|date("Y") }}{% endif %}</vcard:bday>
+ </foaf:Person>
+ </ch:appointment>
+ {% endfor %}
+
</fc:Company>
</rdf:RDF>
View
1 src/Tui/DirectorsBundle/Resources/views/Default/aboutUs.html.twig
@@ -9,4 +9,5 @@
<h2>About Us</h2>
<p>We're; Matt, Jake, Sam, Neil, Graeme, and Russ. We've worked on a number of projects that focus on the conjunction of business and politics, most notably <a href="http://whoknowswho.channel4.com/">a project</a> we pitched to Channel 4 in 2009 and subsequently <a href="http://whoknowswho.googlecode.com/">open-sourced</a>. We also worked on a UK release of <a href="http://littlesis.org/local/uk">LittleSis</a>. You may also be interested in our <a href="http://guardian.mapofpower.com/">Guardian/Calais news mashup</a>.</p>
+ <p>Thanks also to <a href="http://www.levelbusiness.com/">LevelBusiness</a> for their kind and generous support.</p>
{% endblock %}
View
9 src/Tui/DirectorsBundle/Resources/views/Default/index.html.twig
@@ -14,20 +14,21 @@
{% block leftcol %}
<h2>What's this?</h2>
- <p>These are the names and connected companies of every company directory and secretary in the UK. Companies House will show you the directors of a specific company, but we think it's important and helpful to be able to make the reverse search: <strong>which companies are connected to a given person?</strong> This is useful, for example, for checking the validity of the UK Parliament's Register of Members' Interests. It's also a useful tool for investigative journalism, and many other public interest exercises.</p>
+ <p>These are the names and connected companies of every company director and secretary in the UK. Companies House will show you the directors of a specific company, but we think it's important and helpful to be able to make the reverse search: <strong>which companies are connected to a given person?</strong> This is useful, for example, for checking the validity of the UK Parliament's Register of Members' Interests. It's also a useful tool for investigative journalism, and many other public interest exercises.</p>
<p>So we bought the data from Companies House and turned it loose in a linked, annotated, searchable form. Free for non-commercial use*.</p>
- <p>Soon we'll be inviting you to help add another big piece of missing data: <b>non-executive directors</b>. Everything you add will be published under an open database licence and be accessible through a simple API.</p>
<small>* Unfortunately the Companies House data itself is Crown copyright for now, used under license.</small>
{% endblock %}
{% block rightcol %}
<div class="success">
<h2>New data!</h2>
- <p>Thanks to the kindness and generosity of our friends at <a href="http://www.levelbusiness.com/">LevelBusiness</a>, WhoRunsIt is now running from an updated dataset!</p>
+ <p>WhoRunsIt is now running from an updated dataset from April this year.</p>
</div>
<h2>Get involved</h2>
<p>We need donations to update the companies house data we have. Even £1 will help!</p>
- <!-- <p>Join our (very) low volume mailing list and we'll tell you what's new:</p> -->
+
+ <p><a href="http://flattr.com/thing/418586/Who-Runs-It" target="_blank"><img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0"></a></p>
+
<p>Follow us on Twitter: <a href="http://www.twitter.com/whorunsit">@WhoRunsIt</a></p>
{% endblock %}
View
4 src/Tui/DirectorsBundle/Resources/views/base.html.twig
@@ -44,7 +44,9 @@
<div class="span-4 last prepend-7 prepend-top">
<span id="internal-links">
- <a href="{{ url('aboutus') }}">About Us</a> | <a href="{{ url('faq') }}">FAQ</a> | <a href="{{ url('api') }}">API</a></span>
+ <a href="{{ url('aboutus') }}">About Us</a> | <a href="{{ url('faq') }}">FAQ</a> | <a href="{{ url('api') }}">API</a>
+ | <a href="http://flattr.com/thing/418586/Who-Runs-It" target="_blank"><img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" /></a>
+ </span>
</div>
<br class="clear" />

0 comments on commit 2772302

Please sign in to comment.