Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "Search inside" link above global search form #327

Merged
merged 5 commits into from
Oct 3, 2016
Merged

Conversation

bfalling
Copy link
Collaborator

@bfalling bfalling commented Oct 3, 2016

Moving "Search inside" link to above search form instead of below

Copy link
Member

@mekarpeles mekarpeles left a comment

Choose a reason for hiding this comment

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

Although it shouldn't block, I'd change the list variable to seed_list to avoid clobbering builtins, there's one area of whitespace on search_foot line 49, and I'm curious whether doc can ever be None in home.py 149

@@ -43,7 +46,7 @@
</div>
</fieldset>
</div>

Copy link
Member

Choose a reason for hiding this comment

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

this may be removed in a later commit, looks like whitespace was added

# cache the results of get_returncart in memcache for 60 sec
get_returncart = cache.memcache_memoize(get_returncart, "home.get_returncart", timeout=60)

@public
def readonline_carousel(id="read-carousel"):
"""Return template code for books pulled from search engine. TODO: If probs, use stock list."""
Copy link
Member

Choose a reason for hiding this comment

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

syntactic qualm; suspected 80 line length violation

@@ -151,15 +152,15 @@ def format_list_editions(key):
"""
if 'env' not in web.ctx:
delegate.fakeload()

list = web.ctx.site.get(key)
Copy link
Member

Choose a reason for hiding this comment

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

Not a critique of this CR, but we should not be overriding the list function. Consider lst instead or seed_list.

@@ -131,16 +132,16 @@ def process_doc(doc):

d['url'] = key
d['title'] = doc.get('title', '')

if 'author_key' in doc and 'author_name' in doc:
Copy link
Member

Choose a reason for hiding this comment

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

This isn't a critique of your changes, rather a general question -- is there any case where doc could be None?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants