Permalink
Browse files

changing the way facets work in episode 278

  • Loading branch information...
1 parent f73fe0e commit 5a2cbdd2028314b9f208a7ff2c086f9282355567 @ryanb ryanb committed Aug 8, 2011
@@ -7,20 +7,20 @@
</p>
<% end %>
-<% if params[:month].present? %>
- <p><strong>Published: <%= params[:month] %></strong> (<%= link_to "remove", :month => nil %>)</p>
-<% end %>
-
-<% if @search.facet(:publish_month).rows.size > 1 %>
<div id="facets">
<h3>Published</h3>
<ul>
<% for row in @search.facet(:publish_month).rows %>
- <li><%= link_to row.value, :month => row.value %> (<%= row.count %>)</li>
+ <li>
+ <% if params[:month].blank? %>
+ <%= link_to row.value, :month => row.value %> (<%= row.count %>)
+ <% else %>
+ <strong><%= row.value %></strong> (<%= link_to "remove", :month => nil %>)
+ <% end %>
+ </li>
<% end %>
</ul>
</div>
-<% end %>
<div id="articles">
<% for article in @articles %>
@@ -122,5 +122,5 @@ a {
margin: 0;
margin-top: 10px;
list-style: none;
- color: #555;
+ color: #000;
}
@@ -122,5 +122,5 @@ a {
margin: 0;
margin-top: 10px;
list-style: none;
- color: #555;
+ color: #000;
}

0 comments on commit 5a2cbdd

Please sign in to comment.