opengovernment/askthem

View on GitHub
app/views/questions/index.html.erb

Summary

Maintainability
Test Coverage
<%= render 'shared/navigation' if !@is_unaffiliated && !@is_national %>

<section class="questions listings <%= 'unaffiliated' if @is_unaffiliated || @is_national -%>">
    <div class="filters">
      <span class="info">Show:</span><%# @todo DM are these really the filters we're using? %>

      <%= link_to raw('<span class="use"></span>Need Signatures'),
        need_signatures_questions_path(gov: @gov, person: @person),
        filter_options("need_signatures") %>
      <%= link_to raw('<span class="use"></span>Have Answers'),
        have_answers_questions_path(gov: @gov, person: @person),
        filter_options("have_answers") %>
      <%= link_to raw('<span class="use"></span>Need Answers'),
        need_answers_questions_path(gov: @gov, person: @person),
        filter_options("need_answers") %>
      <%= link_to raw('<span class="use"></span>Recent'),
        recent_questions_path(gov: @gov, person: @person),
        filter_options("recent") %>

      <%- if @person %>
        <span class="filtered-by-person">for <%= link_to(@person.name, person_path(@person.state, @person)) -%></span>
      <%- end %>

      <!--
      <div class="search"><%# @todo DM full-text search within state? %>
      <input type="text" name="" id="" placeholder="Search state">
      <input type="submit" value="">
      </div>
      -->
    </div>

  <%= render partial: "page" %>
</section>