Navigation Menu

Skip to content

Commit

Permalink
Use camelCase
Browse files Browse the repository at this point in the history
  • Loading branch information
darashi committed Aug 21, 2012
1 parent 9f2edde commit 38fba4f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
7 changes: 4 additions & 3 deletions lib/server.js
Expand Up @@ -77,16 +77,17 @@ app.get('/search', function(request, response, next) {
if (error) {
return next(error);
}

var locals = {
querystring: querystring,
titleToId: titleToId,
query: query,
records: results.hits.hit,
num_found: results.hits.found,
path_facets: results.facets.path.constraints,
numFound: results.hits.found,
pathFacets: results.facets.path.constraints,
from: results.hits.start + 1,
to: results.hits.start + results.hits.hit.length,
num_showing: results.hits.hit.length
numShowing: results.hits.hit.length
};

return response.render('search.jade', locals);
Expand Down
8 changes: 4 additions & 4 deletions views/search.jade
Expand Up @@ -9,8 +9,8 @@ block content
.span12
if records.length > 0
.alert.alert-info
| Found #{num_found} entries.
| Showing #{from} - #{to} (#{num_showing} entries).
| Found #{numFound} entries.
| Showing #{from} - #{to} (#{numShowing} entries).
else
.alert.alert-info
| No entry found.
Expand All @@ -32,10 +32,10 @@ block content
!{record.data.desc}

.span3
if path_facets.length > 0
if pathFacets.length > 0
.well(style="padding: 8px 0;")
ul.nav.nav-list
each facet, index in path_facets
each facet, index in pathFacets
li
a
= facet.value
Expand Down

0 comments on commit 38fba4f

Please sign in to comment.