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

PublicBody FOIA Page & Woo Coordinator sidebar links #35

Open
garethrees opened this issue May 24, 2023 · 0 comments
Open

PublicBody FOIA Page & Woo Coordinator sidebar links #35

garethrees opened this issue May 24, 2023 · 0 comments

Comments

@garethrees
Copy link
Member

garethrees commented May 24, 2023

See https://groups.google.com/a/mysociety.org/g/alaveteli/c/XVHJyht0f30/m/2u1VBrYqAwAJ.

Essentially what's wanted is extra attributes to link to the body's FOI Page and FOI Coordinator (they're obliged to have one).

We could do this with tags, akin to how we use tags for custom external links on WDTK.

The code should be pretty simple. At the moment we don't have the theme on transifex so might have to just hard-code the Dutch in the view.

FOI Page

<% if public_body.has_tag?('foia_url') %>
  <% public_body.get_tag_values('foia_url').each do |tag_value| %>
    <%= link_to _('FOIA Page'), tag_value %><br>
  <% end %>
<% end %>

To add the URL to the page, they'd just tag the authority like foia_url:https://www.example.com, replacing the URL with the appropriate link.

FOI Coordinator

In this case we want a fallback if the authority doesn't have one.

<% if public_body.has_tag?('woo_coordinator') %>
  <span><%= _('This authority has a Woo Coordinator! ✅') %></span><br>
<% else %>
  <span><%= _('This authority does not have a Woo Coordinator yet! ❌') %></span><br>
<% end %>

I don't think there's a need for a tag value; it's just a case of marking that the authority has the coordinator by applying the woo_coordinator tag.

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

1 participant