~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/controllers/search_ui.py

  • Committer: Matt Nordhoff
  • Date: 2009-06-26 18:34:57 UTC
  • mfrom: (369.1.14 370155-version-info)
  • Revision ID: mnordhoff@mattnordhoff.com-20090626183457-c1omsgphyg4kmmge
Include version number of Loggerhead and dependencies in pages (bug #370155)

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
 
29
29
    template_path = 'loggerhead.templates.search'
30
30
 
31
 
    def get_values(self, h, args, kwargs, response):
 
31
    def get_values(self, path, kwargs, response):
32
32
        """
33
33
        Default method called from the search box as /search URL
34
34
 
38
38
        terms = []
39
39
        query = kwargs['query']
40
40
        if len(query) > 0:
41
 
            terms = search.search_revisions(h._branch, query, True)
 
41
            terms = search.search_revisions(self._branch.branch, query, True)
42
42
            if terms is not None:
43
43
                terms = [term[0] for term in terms]
44
44
            else:
45
45
                # Should show a 'search is not available' etc box.
46
46
                terms = []
47
47
 
48
 
        return {'terms':terms}
 
48
        return {'terms': terms}