-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Link to the Charity Commission for Northern Ireland database #1267
Comments
If I understand correctly, all we'd need is a minor change to the sidebar and to tag NI charities as diff --git a/lib/views/public_body/_more_info.html.erb b/lib/views/public_body/_more_info.html.erb
index 17a111c..8ee6c67 100644
--- a/lib/views/public_body/_more_info.html.erb
+++ b/lib/views/public_body/_more_info.html.erb
@@ -17,6 +17,9 @@
<% if tag_value.match(/^SC/) %>
<%= link_to _('Charity registration'),
"https://www.oscr.org.uk/about-charities/search-the-register/charity-details?number=#{ tag_value }" %><br>
+ <% elsif tag_value.match(/^NIC/) %>
+ <%= link_to _('Charity registration'),
+ "https://www.charitycommissionni.org.uk/charity-search/?searchText=#{ tag_value }" %><br>
<% else %>
<%= link_to _('Charity registration'),
"https://register-of-charities.charitycommission.gov.uk/charity-search/-/results/page/1/delta/20/keywords/#{ tag_value }" %><br> |
The NI Charity Commission site only accepts the numeric part of the ID (i.e. without the "NIC" prefix), so we need to strip that for the query param. Fixes #1267.
Oh, no, I don't understand correctly. Usually we tag Drafted this improvement at #1284 |
Sorry, that's my fault - I should have been clearer as to what I meant.
I haven't been able to test it, but this LGTM. 👍 |
From a recent discussion on Slack, it was noted by @RichardTaylor that:
We do this by handling the 'charity' tag through special functionality in /lib/views/public_body/_more_info.html.erb - however, this only works for charities that appear on the registers of the Charity Commission for England and Wales (CCEW), or the Office of the Scottish Charity Regulator (OSCR). We should add the Charity Commission for Northern Ireland (CCNI) to this.
The format for CCNI is broadly similar to CCEW (it appears to be the same software) - with a slight nuance. Charities in NI use an alphanumeric identifier (e.g. NIC102724), but the database only accepts the numeric identifier - so we will need to accommodate this.
https://www.charitycommissionni.org.uk/charity-search/?searchText=#{ tag_value } would seem to be a valid structure to use.
The text was updated successfully, but these errors were encountered: