Mercurial > kallithea
annotate rhodecode/templates/search/search.html @ 556:65b2f150beb7
Added searching for file names within the repository in rhodecode
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Thu, 07 Oct 2010 17:32:24 +0200 |
parents | b75b77ef649d |
children | ff15232ce9d2 |
rev | line source |
---|---|
406
b153a51b1d3b
Implemented search using whoosh. Still as experimental option.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
1 ## -*- coding: utf-8 -*- |
b153a51b1d3b
Implemented search using whoosh. Still as experimental option.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
2 <%inherit file="/base/base.html"/> |
b153a51b1d3b
Implemented search using whoosh. Still as experimental option.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
3 <%def name="title()"> |
525
87d80c84df09
added search in specific repository
Marcin Kuzminski <marcin@python-works.com>
parents:
478
diff
changeset
|
4 ${_('Search')} |
87d80c84df09
added search in specific repository
Marcin Kuzminski <marcin@python-works.com>
parents:
478
diff
changeset
|
5 %if c.repo_name: |
87d80c84df09
added search in specific repository
Marcin Kuzminski <marcin@python-works.com>
parents:
478
diff
changeset
|
6 ${_('in repository: ') + c.repo_name} |
87d80c84df09
added search in specific repository
Marcin Kuzminski <marcin@python-works.com>
parents:
478
diff
changeset
|
7 %else: |
87d80c84df09
added search in specific repository
Marcin Kuzminski <marcin@python-works.com>
parents:
478
diff
changeset
|
8 ${_('in all repositories')} |
87d80c84df09
added search in specific repository
Marcin Kuzminski <marcin@python-works.com>
parents:
478
diff
changeset
|
9 %endif |
87d80c84df09
added search in specific repository
Marcin Kuzminski <marcin@python-works.com>
parents:
478
diff
changeset
|
10 :${c.cur_query} |
406
b153a51b1d3b
Implemented search using whoosh. Still as experimental option.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
11 </%def> |
b153a51b1d3b
Implemented search using whoosh. Still as experimental option.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
12 <%def name="breadcrumbs()"> |
548
b75b77ef649d
renamed hg_app to rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
13 ${c.rhodecode_name} |
406
b153a51b1d3b
Implemented search using whoosh. Still as experimental option.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
14 </%def> |
b153a51b1d3b
Implemented search using whoosh. Still as experimental option.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
15 <%def name="page_nav()"> |
b153a51b1d3b
Implemented search using whoosh. Still as experimental option.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
16 ${self.menu('home')} |
b153a51b1d3b
Implemented search using whoosh. Still as experimental option.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
17 </%def> |
b153a51b1d3b
Implemented search using whoosh. Still as experimental option.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
18 <%def name="main()"> |
b153a51b1d3b
Implemented search using whoosh. Still as experimental option.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
19 |
b153a51b1d3b
Implemented search using whoosh. Still as experimental option.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
20 <div class="box"> |
b153a51b1d3b
Implemented search using whoosh. Still as experimental option.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
21 <!-- box / title --> |
b153a51b1d3b
Implemented search using whoosh. Still as experimental option.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
22 <div class="title"> |
525
87d80c84df09
added search in specific repository
Marcin Kuzminski <marcin@python-works.com>
parents:
478
diff
changeset
|
23 <h5>${_('Search')} |
87d80c84df09
added search in specific repository
Marcin Kuzminski <marcin@python-works.com>
parents:
478
diff
changeset
|
24 %if c.repo_name: |
87d80c84df09
added search in specific repository
Marcin Kuzminski <marcin@python-works.com>
parents:
478
diff
changeset
|
25 ${_('in repository: ') + c.repo_name} |
87d80c84df09
added search in specific repository
Marcin Kuzminski <marcin@python-works.com>
parents:
478
diff
changeset
|
26 %else: |
87d80c84df09
added search in specific repository
Marcin Kuzminski <marcin@python-works.com>
parents:
478
diff
changeset
|
27 ${_('in all repositories')} |
87d80c84df09
added search in specific repository
Marcin Kuzminski <marcin@python-works.com>
parents:
478
diff
changeset
|
28 %endif |
87d80c84df09
added search in specific repository
Marcin Kuzminski <marcin@python-works.com>
parents:
478
diff
changeset
|
29 </h5> |
406
b153a51b1d3b
Implemented search using whoosh. Still as experimental option.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
30 </div> |
b153a51b1d3b
Implemented search using whoosh. Still as experimental option.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
31 <!-- end box / title --> |
525
87d80c84df09
added search in specific repository
Marcin Kuzminski <marcin@python-works.com>
parents:
478
diff
changeset
|
32 %if c.repo_name: |
87d80c84df09
added search in specific repository
Marcin Kuzminski <marcin@python-works.com>
parents:
478
diff
changeset
|
33 ${h.form(h.url('search_repo',search_repo=c.repo_name),method='get')} |
87d80c84df09
added search in specific repository
Marcin Kuzminski <marcin@python-works.com>
parents:
478
diff
changeset
|
34 %else: |
87d80c84df09
added search in specific repository
Marcin Kuzminski <marcin@python-works.com>
parents:
478
diff
changeset
|
35 ${h.form(h.url('search'),method='get')} |
87d80c84df09
added search in specific repository
Marcin Kuzminski <marcin@python-works.com>
parents:
478
diff
changeset
|
36 %endif |
406
b153a51b1d3b
Implemented search using whoosh. Still as experimental option.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
37 <div class="form"> |
b153a51b1d3b
Implemented search using whoosh. Still as experimental option.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
38 <div class="fields"> |
556
65b2f150beb7
Added searching for file names within the repository in rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
548
diff
changeset
|
39 <div class="field field-first field-noborder"> |
65b2f150beb7
Added searching for file names within the repository in rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
548
diff
changeset
|
40 <div class="label"> |
65b2f150beb7
Added searching for file names within the repository in rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
548
diff
changeset
|
41 <label for="q">${_('Search term')}</label> |
65b2f150beb7
Added searching for file names within the repository in rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
548
diff
changeset
|
42 </div> |
65b2f150beb7
Added searching for file names within the repository in rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
548
diff
changeset
|
43 <div class="input">${h.text('q',c.cur_query,class_="small")}</div> |
65b2f150beb7
Added searching for file names within the repository in rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
548
diff
changeset
|
44 <div class="button highlight"> |
65b2f150beb7
Added searching for file names within the repository in rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
548
diff
changeset
|
45 <input type="submit" value="${_('Search')}" class="ui-button ui-widget ui-state-default ui-corner-all"/> |
406
b153a51b1d3b
Implemented search using whoosh. Still as experimental option.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
46 </div> |
556
65b2f150beb7
Added searching for file names within the repository in rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
548
diff
changeset
|
47 <div style="font-weight: bold;clear:Both;margin-left:200px">${c.runtime}</div> |
406
b153a51b1d3b
Implemented search using whoosh. Still as experimental option.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
48 </div> |
556
65b2f150beb7
Added searching for file names within the repository in rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
548
diff
changeset
|
49 |
65b2f150beb7
Added searching for file names within the repository in rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
548
diff
changeset
|
50 <div class="field"> |
65b2f150beb7
Added searching for file names within the repository in rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
548
diff
changeset
|
51 <div class="label"> |
65b2f150beb7
Added searching for file names within the repository in rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
548
diff
changeset
|
52 <label for="type">${_('Search in')}</label> |
65b2f150beb7
Added searching for file names within the repository in rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
548
diff
changeset
|
53 </div> |
65b2f150beb7
Added searching for file names within the repository in rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
548
diff
changeset
|
54 <div class="select"> |
65b2f150beb7
Added searching for file names within the repository in rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
548
diff
changeset
|
55 ${h.select('type',c.cur_type,[('content',_('Source codes')), |
65b2f150beb7
Added searching for file names within the repository in rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
548
diff
changeset
|
56 ##('commit',_('Commit messages')), |
65b2f150beb7
Added searching for file names within the repository in rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
548
diff
changeset
|
57 ('path',_('File names')), |
65b2f150beb7
Added searching for file names within the repository in rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
548
diff
changeset
|
58 ##('repository',_('Repository names')), |
65b2f150beb7
Added searching for file names within the repository in rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
548
diff
changeset
|
59 ])} |
65b2f150beb7
Added searching for file names within the repository in rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
548
diff
changeset
|
60 </div> |
65b2f150beb7
Added searching for file names within the repository in rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
548
diff
changeset
|
61 </div> |
65b2f150beb7
Added searching for file names within the repository in rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
548
diff
changeset
|
62 |
406
b153a51b1d3b
Implemented search using whoosh. Still as experimental option.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
63 </div> |
b153a51b1d3b
Implemented search using whoosh. Still as experimental option.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
64 </div> |
b153a51b1d3b
Implemented search using whoosh. Still as experimental option.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
65 ${h.end_form()} |
b153a51b1d3b
Implemented search using whoosh. Still as experimental option.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
66 |
556
65b2f150beb7
Added searching for file names within the repository in rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
548
diff
changeset
|
67 %if c.cur_search == 'content': |
65b2f150beb7
Added searching for file names within the repository in rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
548
diff
changeset
|
68 <%include file='search_content.html'/> |
65b2f150beb7
Added searching for file names within the repository in rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
548
diff
changeset
|
69 %elif c.cur_search == 'path': |
65b2f150beb7
Added searching for file names within the repository in rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
548
diff
changeset
|
70 <%include file='search_path.html'/> |
65b2f150beb7
Added searching for file names within the repository in rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
548
diff
changeset
|
71 %elif c.cur_search == 'commit': |
65b2f150beb7
Added searching for file names within the repository in rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
548
diff
changeset
|
72 <%include file='search_commit.html'/> |
65b2f150beb7
Added searching for file names within the repository in rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
548
diff
changeset
|
73 %elif c.cur_search == 'repository': |
65b2f150beb7
Added searching for file names within the repository in rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
548
diff
changeset
|
74 <%include file='search_repository.html'/> |
65b2f150beb7
Added searching for file names within the repository in rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
548
diff
changeset
|
75 %endif |
406
b153a51b1d3b
Implemented search using whoosh. Still as experimental option.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
76 </div> |
b153a51b1d3b
Implemented search using whoosh. Still as experimental option.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
77 |
b153a51b1d3b
Implemented search using whoosh. Still as experimental option.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
78 </%def> |