Skip to content

Commit d1be7da

Browse files
authored
Merge pull request #92 from companieshouse/release/4.36.0
Release/4.36.0
2 parents 77b58ad + eb745e4 commit d1be7da

File tree

8 files changed

+111
-14
lines changed

8 files changed

+111
-14
lines changed

appconfig.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ elasticsearch:
9292
feature:
9393
mortgage: <MORTGAGE_FEATURE>
9494
psc: <PSC_FEATURE>
95+
company_report: <COMPANY_REPORT_FEATURE>
9596

9697
image_service_start_date: <IMAGE_SERVICE_START_DATE>
9798

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package ChGovUk::Controllers::Company::ViewAll;
2+
3+
use Mojo::Base 'Mojolicious::Controller';
4+
use CH::Perl;
5+
6+
#-------------------------------------------------------------------------------
7+
8+
# View All Tab
9+
sub view {
10+
my ($self) = @_;
11+
12+
return $self->render;
13+
}
14+
15+
#-------------------------------------------------------------------------------
16+
17+
1;

lib/ChGovUk/Plugins/Routes.pm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ sub register {
7070
$company_bridge->get('/charges')->name('company_charges')->to('company-mortgages#view');
7171
$company_bridge->get('/charges/:charge_id')->name('company_charge_with_id')->to('company-mortgages#view_details');
7272
$company_bridge->get('/ukestablishments')->name('company_branches')->to('company-branches#view');
73+
$company_bridge->get('/view-all')->name("company_view_all")->to('company-view_all#view');
7374

7475
# PSCs route
7576
$company_bridge->get('/persons-with-significant-control')->name('list_pscs')->to('company-pscs#list');

templates/base.tx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@
7878
<script>var global = global || {}; global.CDN_ROOT = '//<% $cdn_url %>'</script>
7979
<script src='//<% $cdn_url %>/javascripts/vendor/require.js'></script>
8080
<script src='//<% $cdn_url %>/javascripts/app/accounts-pdf.js'></script>
81+
<script src='//<% $cdn_url %>/javascripts/lib/details-polyfill.js'></script>
82+
<script src='//<% $cdn_url %>/javascripts/app/generate-document.js'></script>
8183
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
8284
<script>
8385
require(['//<% $cdn_url %>/javascripts/require-global-config.js'], function () {
@@ -91,6 +93,7 @@
9193
});
9294
});
9395
</script>
96+
<script src='//<% $cdn_url %>/javascripts/app/govuk-ganalytics.js'></script>
9497

9598
<!-- End of Companies House Styles and Scripts -->
9699

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
% cascade base { title=> $company.company_name ~" - View all (free company information from Companies House)", classes=>"profile" }
2+
3+
% around content -> {
4+
5+
% if $company.type != "assurance-company" && $company.type != "industrial-and-provident-society" && $company.type != "royal-charter" && $company.type != "investment-company-with-variable-capital" && $company.type != "charitable-incorporated-organisation" && $company.type != "scottish-charitable-incorporated-organisation" && $company.type != "uk-establishment" && $company.type != "registered-society-non-jurisdictional" && $company.type != "protected-cell-company" && $company.type != "eeig" && $company.type != "protected-cell-company" && $company.type != "further-education-or-sixth-form-college-corporation" && $company.type != "icvc-securities" && $company.type != "icvc-warrant" && $company.type != "icvc-umbrella" {
6+
7+
% include '/includes/company/page_header.tx'
8+
9+
% include '/includes/company/tabs.tx' { active => 'view-all-tab' };
10+
11+
<details class="govuk-details" role="group">
12+
<summary class="govuk-details__summary" role="button" aria-controls="details-content" aria-expanded="true">
13+
<span class="govuk-details__summary-text">
14+
What's included?
15+
</span>
16+
</summary>
17+
<div class="govuk-details__text" id="details-content" aria-hidden="false">
18+
<p>The latest 100 entries for:</p>
19+
<ul class="govuk-list govuk-list--bullet">
20+
<li>Filing history</li>
21+
<li>Officers</li>
22+
<li>Persons with significant control</li>
23+
<li>Charges</li>
24+
<li>Insolvency</li>
25+
<li>Registers</li>
26+
</ul>
27+
</div>
28+
</details>
29+
30+
31+
% if $c.is_signed_in {
32+
<div class="govuk-inset-text onlyJS">
33+
<div id="widget">
34+
<a class="render-document govuk-button secondary-button piwik-event" data-event-id="View company information snapshot" href="#">View company information snapshot
35+
<span class="govuk-visually-hidden">link opens in new tab/window</span></a>
36+
<div id="status-widget" class="widget-footer hidden">
37+
<div id="status">
38+
<div id="process-spinner" class="process-spinner"></div>
39+
<span id="process-status" class="process-status">Status: in-progress</span>
40+
</div>
41+
<input type="hidden" id="document-data"
42+
data-resource-url="/company-number/<%$company.company_number%>"
43+
data-content-type="text/html" data-document-type="text/html">
44+
</input>
45+
</div>
46+
</div>
47+
</div>
48+
<div id="download-button"></div>
49+
% } else {
50+
<a class="govuk-button secondary-button piwik-event" data-event-id="View company information snapshot" href="<% $c.url_for('user_sign_in') %>">View company information snapshot
51+
<span class="govuk-visually-hidden">link opens in new tab/window</span></a>
52+
% }
53+
54+
% } else {
55+
<article class="text">
56+
<header>
57+
<h1 id="page-not-found-header" class="heading-xlarge">
58+
This page cannot be found
59+
</h1>
60+
</header>
61+
<p>Check that you have entered the correct web address or try using the search.</p>
62+
<p>If you still can't find what you're looking for email <a href="mailto:[email protected]">[email protected]</a></p>
63+
</article>
64+
% }
65+
% }
66+
% }

templates/includes/company/tab.tx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
%# This include takes:
2-
%# $active - the ID of the tab to make active
3-
%# $tabid - the ID of _this_ tab
4-
%# $page - the URL relative to /company/{company_number} that this tab links to
5-
%# $title - the title heading of the tab (may contain HTML)
6-
%# $company - the company details needed for display (uses company.company_number)
1+
%# This include takes:
2+
%# $active - the ID of the tab to make active
3+
%# $tabid - the ID of _this_ tab
4+
%# $page - the URL relative to /company/{company_number} that this tab links to
5+
%# $title - the title heading of the tab (may contain HTML)
6+
%# $company - the company details needed for display (uses company.company_number)
77

8-
<li <% ($active == $tabid ? 'class="active"' : '') | raw %> >
8+
<li <% ($active == $tabid ? 'class="active"' : '') | raw %> >
99

10-
% if ( $active == $tabid ) { "<h1>" | raw }
11-
<a id="<% $tabid %>" href="<% $c.url_for('/company/' ~ $company.company_number ~ $page) %>"><% $title|raw %><span class="visuallyhidden"> for <% $company.company_name %> (<% $company.company_number %>)</span></a>
12-
% if ( $active == $tabid ) { "</h1>" | raw }
10+
% if ( $active == $tabid ) { "<h1>" | raw }
11+
<a id="<% $tabid %>" href="<% $c.url_for('/company/' ~ $company.company_number ~ $page) %>"><% $title|raw %><span class="visuallyhidden"> for <% $company.company_name %> (<% $company.company_number %>)</span></a>
12+
% if ( $active == $tabid ) { "</h1>" | raw }
1313

14-
</li>
14+
</li>

templates/includes/company/tabs.tx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,13 @@
1818
% include "/includes/company/tab.tx" { tabid => 'register-tab', page => '/registers', title => 'Registers' };
1919
% }
2020
% if $company.links.uk_establishments {
21-
% include "/includes/company/tab.tx" { tabid => 'ukestablishment-tab', page => '/ukestablishments', title => 'UK establishments' };
21+
% include "/includes/company/tab.tx" { tabid => 'ukestablishment-tab', page => '/ukestablishments', title => 'UK establishments' };
2222
% }
23+
24+
% if $c.config.feature.company_report {
25+
% if $company.type != "assurance-company" && $company.type != "industrial-and-provident-society" && $company.type != "royal-charter" && $company.type != "investment-company-with-variable-capital" && $company.type != "charitable-incorporated-organisation" && $company.type != "scottish-charitable-incorporated-organisation" && $company.type != "uk-establishment" && $company.type != "registered-society-non-jurisdictional" && $company.type != "protected-cell-company" && $company.type != "eeig" && $company.type != "protected-cell-company" && $company.type != "further-education-or-sixth-form-college-corporation" && $company.type != "icvc-securities" && $company.type != "icvc-warrant" && $company.type != "icvc-umbrella" {
26+
% include "/includes/company/tab.tx" { tabid => 'view-all-tab', page => '/view-all', title => 'View all'};
27+
% }
28+
% }
2329
</ul>
2430
</div>

templates/includes/piwik.tx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,25 @@
4343
else if (docTitle.match(/Mortgages \(free information from Companies House\)$/)){
4444
_paq.push(['setDocumentTitle','Charges ']);
4545
}
46+
else if (docTitle.match(/View all \(free company information from Companies House\)$/)) {
47+
_paq.push(['setDocumentTitle','View all']);
48+
}
4649

4750
_paq.push(['setCustomVariable', 1,'VisitorStatus',<% if $c.is_signed_in { %>'SignedIn'<% } else { %>'NotSignedIn'<% } %>,'visit']);
4851
_paq.push(['setCustomVariable', 2,'CompanyStatus',<% if $company.company_number == $c.authorised_company {%>'Authorised'<% } else { %>'NotAuthorised'<% } %>,'visit']);
4952
_paq.push(['setDownloadClasses', "download"]);
5053
_paq.push(['trackPageView']);
5154
_paq.push(['enableLinkTracking']);
5255
(function() {
53-
var u=(("https:" == document.location.protocol) ? "https" : "http") + ":<% $c.config.piwik.url %>/";
56+
var u="<% $c.config.piwik.url %>/";
5457
_paq.push(['setTrackerUrl', u+'piwik.php']);
5558
_paq.push(['setSiteId', <% $c.config.piwik.site_id %>]);
5659
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.type='text/javascript';
5760
g.defer=true; g.async=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
5861
})();
5962
</script>
6063

61-
<noscript><p><img src=("https:" == document.location.protocol) ? "https" : "http") + "<% $c.config.piwik.url %>/piwik.php?idsite=<% $c.config.piwik.site_id %>" style="border:0;" alt="" /></p></noscript>
64+
<noscript><p><img src="<% $c.config.piwik.url %>/piwik.php?idsite=<% $c.config.piwik.site_id %>" style="border:0;" alt="" /></p></noscript>
6265

6366
<script>
6467
var _paq = _paq || [];

0 commit comments

Comments
 (0)