Skip to content

Commit

Permalink
Add a little more polish into the canned search page and integrate so…
Browse files Browse the repository at this point in the history
…me of the Dave feedback.
  • Loading branch information
peregrinator committed Aug 29, 2011
1 parent d34801d commit 3bb7222
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 43 deletions.
104 changes: 61 additions & 43 deletions app/stylesheets/design/_canned_search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,13 @@ DESCRIPTION AREA
border-radius: 5px;
padding: 10px 20px 2px;
}
#search_description_box .line {
#search_description_box h1 {
font-size: 2.2em;
}
#search_description_box hr {
width: 100%;
border-bottom: 1px solid #DDD;
margin-bottom: 10px;
margin-bottom: 15px;
}
p#search-actions {
padding: 0px;
Expand Down Expand Up @@ -84,6 +87,46 @@ p#search-actions a.search_subscription:hover {
}


/******************************
FREQUENCY SPARKLINES
******************************/
#frequency-wrapper {
background: #FFF;
border: 1px solid #DDD;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
-o-border-radius: 5px;
-ms-border-radius: 5px;
-khtml-border-radius: 5px;
border-radius: 5px;
padding: 10px 15px 5px;
color: #000;
width: 760px;
margin: 5px auto 15px;
}
#frequency-header {
width:132px;
margin: 0 auto;
}
ul#frequency-spark-lines {
list-style: none;
width: 780px;
margin: 0 auto;
}
ul#frequency-spark-lines li {
display:inline;
margin-right: 15px;
}
ul#frequency-spark-lines li img {
top:5px;
position: relative;
}
li#five-years, li#all-years img {
top:13px;
}


/******************************
Expand Down Expand Up @@ -119,9 +162,16 @@ SUGGESTED SEARCH RESULTS
******************************/
#canned_searches .search_count {
margin: 30px 0 20px 0px;
margin: 30px 0 0 0;
padding: 0;
}
#canned_searches .section_link {
float: right;
position: relative;
top: -24px;
margin-bottom: -27px;
padding-bottom: 0px;
}
#suggested-search-list {
list-style: none;
margin-top: 5px;
Expand All @@ -136,12 +186,16 @@ SUGGESTED SEARCH RESULTS
#suggested-search-list h4 {
padding-left: 10px;
margin-bottom: 5px;
line-height: 1.3em;
}
#suggested-search-list .date {
padding-right: 15px;
}
#suggested-search-list span.pdf {
padding-left: 15px;
font-size: 13px;
top: -1px;
position: relative;
color: #7a838a;
}
p.result_info {
clear: both;
Expand All @@ -156,50 +210,14 @@ div.metadata {
font-size: 1.2em;
padding-left: 10px;
margin-bottom: 3px;
color: #7a838a;
}
.notice p {
margin-left: 0px;
}
#canned_searches .more_results {
margin-bottom: 20px;
}

/******************************
FREQUENCY SPARKLINES
******************************/
#frequency-wrapper {
background: #FFF;
border: 1px solid #DDD;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
-o-border-radius: 5px;
-ms-border-radius: 5px;
-khtml-border-radius: 5px;
border-radius: 5px;
padding: 10px 15px 5px;
color: #000;
width: 760px;
margin: 0 auto 10px;
hr.result_end {
margin-bottom: 0;
}
#frequency-header {
width:132px;
margin: 0 auto;
}
ul#frequency-spark-lines {
list-style: none;
width: 780px;
margin: 0 auto;
}
ul#frequency-spark-lines li {
display:inline;
}
ul#frequency-spark-lines li img {
top:5px;
position: relative;
}
li#five-years, li#all-years img {
top:13px;
}

3 changes: 3 additions & 0 deletions app/views/canned_searches/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@
</div>

<p class='search_count'>Showing 1-<%= @canned_search.search.results.count %> of <%= link_to "#{@canned_search.search.count} results", entries_search_path(:conditions => @canned_search.search_conditions, :order => "newest") %> since 1994</p>
<p class="section_link">View more <%= link_to @canned_search.section.title, section_path(@canned_search.section)%> searches</p>
<hr />
<ul id='suggested-search-list'>
<%= render :partial => 'result', :collection => @canned_search.search.results, :as => :entry, :locals => {:search => @canned_search.search} %>
</ul>
<hr class="result_end" />
<p class='more_results'> <%= link_to "See #{@canned_search.search.count - @canned_search.search.results.count} more results", entries_search_path(:conditions => @canned_search.search_conditions, :order => "newest", :page => 2) %> </p>

0 comments on commit 3bb7222

Please sign in to comment.