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

Authority performance link seems to be split in half #1765

Open
WilliamWDTK opened this issue Aug 4, 2023 · 1 comment
Open

Authority performance link seems to be split in half #1765

WilliamWDTK opened this issue Aug 4, 2023 · 1 comment
Labels
bug dev help-pages stale Issues with no activity in over a year t:design

Comments

@WilliamWDTK
Copy link
Collaborator

<td><b><a href="/body/list/response_link"><%= pluralize(PublicBody.visible.with_tag('response_link').size, 'Authority') %></b> tagged <code>response_link</code></td>

Screencast.from.04-08-23.15.56.12.webm

(Firefox 116.0 (64-bit) Snap for Ubuntu)

@garethrees
Copy link
Member

Ah, looks like the markup is slightly wrong (tags not closed in quite the right order) and is being fixed by the browser:

- <b><a>…</b></a>
+ <a><b>…</b></a>

To reduce some duplication and needing to fix this for every table cell, I think we could improve the generation of this page using some ruby to map the problem to tag, and then iterate through it. Here's a sketch:

<%
  table_data = {
    response_link: 'Authority releases material via a link',
    implies_webform_required: 'Authority sends a …'
    # …
  }
%>

<table>
  <thead></thead>
  <tbody>
    <% table_data.each do |tag, problem| %>
      <tr>
        <td>
          <%= problem %>
        </td>

        <td>
          <!-- TODO: haven't checked the actual path that's needed here -->
          <%= link_to list_public_body_path(tag) do %>
            <b><%= pluralize(PublicBody.visible.with_tag('response_link').size, 'Authority') %></b> tagged <code>response_link</code>
          <% end %>
        </td>
        
        <td>
          <!-- TODO: haven't checked the actual path that's needed here -->
          <%= link_to search_requests_path(tag: tag) do %>
            <b><%= pluralize(InfoRequest.is_public.with_tag('response_link').size, 'Request') %></b> tagged <code>response_link</code>
          <% end %>
        </td>
      </tr>
    <% end %>
  </tbody>
 </table>

@HelenWDTK HelenWDTK added the stale Issues with no activity in over a year label Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug dev help-pages stale Issues with no activity in over a year t:design
Projects
None yet
Development

No branches or pull requests

3 participants