Skip to content

Commit

Permalink
Help sidebar.
Browse files Browse the repository at this point in the history
  • Loading branch information
crowbot committed Aug 29, 2014
1 parent 73b54d0 commit aa4059e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 21 deletions.
17 changes: 17 additions & 0 deletions lib/views/help/_sidebar.es.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<div id="right_column_flip">
<h2>Ayuda</h2>
<ul class="no_bullets">
<li><%= link_to_unless_current "Quienes somos", "/help/about" %></li>
<li><%= link_to_unless_current "Guía para solicitantes", "/help/requesting" %></li>
<li><%= link_to_unless_current "Tu Privacidad", "/help/privacy" %></li>
<li><%= link_to_unless_current "Información para Instituciones", "/help/officers" %></li>
<li><%= link_to_unless_current "Búsqueda avanzada", "/advancedsearch" %></li>
<li><%= link_to_unless_current "Condiciones de Uso", "/help/terms_of_use" %></li>
</ul>

<h2 id="contact">Contáctanos</h2>
<p>Si tu pregunta no está resuelta aquí, o quieres hacernos llegar algún comentario sobre la web, <a href="/help/contact">contáctanos</a>.
</p>
</div>


21 changes: 0 additions & 21 deletions lib/views/help/_sidebar.html.erb

This file was deleted.

5 comments on commit aa4059e

@garethrees
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some nav links link to the English version, and some to the Spanish:

    <h2>Ayuda</h2>
    <ul class="no_bullets">
        <li><a href="/help/about">Quienes somos</a></li>
        <li><a href="/help/requesting">Guía para solicitantes</a></li>
        <li>Tu Privacidad</li>
        <li><a href="/help/officers">Información para Instituciones</a></li>
        <li><a href="/advancedsearch">Búsqueda avanzada</a></li>
        <li><a href="/help/terms_of_use">Condiciones de Uso</a></li>
        <li><a href="/help/privacy_policy">Política de privacidad</a></li>
        <li><a href="/es/help/alaveteli">Basado en Alaveteli</a></li>
        <li><a href="/es/help/api">API para programadores</a></li>
    </ul>

Is this my general.yml setting, or can we pass the current locale to the link_to_unless_current helper?

@stevenday
Copy link

@stevenday stevenday commented on aa4059e Sep 2, 2014 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@garethrees
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stevenday actually, that is the correct way to make links, so that the router is responsible for controlling the actual path generated.

@garethrees
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This causes the problem mentioned here where you get a 500 if you click on a nav item that is in the other locale.

@crowbot
Copy link
Member Author

@crowbot crowbot commented on aa4059e Sep 2, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated the sidebar to use path_helpers, which is fine for this theme, which is intended to be monolingual in Spanish in production. There does seem to be a bug in using multiple locales with routing-filter and link_to_unless_current though. I've ticketed that in alaveteli mysociety/alaveteli#1832

Please sign in to comment.