Skip to content
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

Allow overriding / removal of OGL logo #188

Closed
andymantell opened this issue Jan 25, 2016 · 6 comments
Closed

Allow overriding / removal of OGL logo #188

andymantell opened this issue Jan 25, 2016 · 6 comments

Comments

@andymantell
Copy link
Contributor

I am working on a service for which I have been asked to remove the OGL logo and message from the footer. The reason being that some of the information contains personal information such as names and addresses and is not "open". In addition, users are required to purchase the information - it is not freely available.

The way the footer template is structured allows you to override the licence message, but not the OGL logo itself since it is outside the if statement:

<div class="open-government-licence">
  <p class="logo"><a href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Open Government Licence</a></p>
  <% if content_for?(:licence_message) %>
    <%= yield :licence_message %>
  <% else %>
    <p>All content is available under the <a href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Open Government Licence v3.0</a>, except where otherwise stated</p>
  <% end %>
</div>

Would it be reasonable to consider moving the logo inside the default message in the else block so that it can be removed / overriden? (Or some other way of disabling it). Or is the OGL logo intentionally baked in like this to discourage people from removing it?

@fofr
Copy link
Contributor

fofr commented Jan 25, 2016

It looks like the custom licence message was part of a move to allow all strings to be customisable: dfcc0a3

The default text says, "except where otherwise stated”, a message to state what’s copyright/protected might work in conjunction with that?

Probably worth raising a PR to add a feature that allows the OGL logo to be removed, as it appears there's a clear need. Putting the logo within the if statement probably doesn't fix it – that would hide the logo for all custom licence messages, some of which could be OGL related.

@andymantell
Copy link
Contributor Author

Quite new to these gov uk templates. I was going to do something like this...

<% unless @omit_ogl_logo %>
  <p class="logo"><a href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Open Government Licence</a></p>
<% end %>

...following the pattern of <% unless @omit_header %> on line 79 but of course many of the templating languages don't have this kind of logic built in. So, I'm wondering whether this might be more suitable?

<% if content_for?(:licence_logo) %>
  <%= yield :licence_logo %>
<% else %>
  <p class="logo"><a href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Open Government Licence</a></p>
<% end %>

And then corresponding entries in the build_tools/compiler directory.

Is that everything that I would need to do?

@andymantell
Copy link
Contributor Author

Adding this to the govuk_template.html.erb file:

<% if content_for?(:licence_logo) %>
  <%= yield :licence_logo %>
<% else %>
  <p class="logo"><a href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Open Government Licence</a></p>
<% end %>

and this in mustache_processor.rb:

licence_logo:         unescaped_html_tag_for(:licence_logo),

And then running the build, results in the following mustache:

{{{ licence_logo }}}

Would I be right in saying that I need to add the corresponding default value over here in this repository: https://github.com/alphagov/govuk_elements/blob/master/lib/template-config.js

@gemmaleigh
Copy link
Contributor

Hi @andymantell, once this change has been merged the version will need to be bumped for the GOV.UK template.

This will create a new version of the mustache version of the govuk template, which GOV.UK elements uses - I'll then update the default config value.

@andymantell
Copy link
Contributor Author

@gemmaleigh Ah ok thanks.

@timpaul
Copy link
Contributor

timpaul commented Aug 30, 2018

Following the launch of the GOV.UK Design System, GOV.UK Template will now only get major bug fixes and security patches, so I'm going to close this.

We have captured this issue in GOV.UK Frontend here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants