Mercurial > kallithea
annotate rhodecode/templates/search/search.html @ 3527:87c97fcea029 beta
Adding the context bar too all pages related to a Repository.
Deleted top menu items that are on the context bar already.
author | Leonardo <leo@unity3d.com> |
---|---|
date | Mon, 04 Mar 2013 12:15:34 +0100 |
parents | f74be3359044 |
children | 9e677f6d34cb |
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"/> |
3289
666fc6ac9ce5
search: repo search is a repo thing - show it that way in ui and url
Mads Kiilerich <madski@unity3d.com>
parents:
3208
diff
changeset
|
3 |
406
b153a51b1d3b
Implemented search using whoosh. Still as experimental option.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
4 <%def name="title()"> |
3289
666fc6ac9ce5
search: repo search is a repo thing - show it that way in ui and url
Mads Kiilerich <madski@unity3d.com>
parents:
3208
diff
changeset
|
5 %if c.repo_name: |
666fc6ac9ce5
search: repo search is a repo thing - show it that way in ui and url
Mads Kiilerich <madski@unity3d.com>
parents:
3208
diff
changeset
|
6 ${_('Search repository')} ${c.repo_name} - ${c.rhodecode_name} |
666fc6ac9ce5
search: repo search is a repo thing - show it that way in ui and url
Mads Kiilerich <madski@unity3d.com>
parents:
3208
diff
changeset
|
7 %else: |
666fc6ac9ce5
search: repo search is a repo thing - show it that way in ui and url
Mads Kiilerich <madski@unity3d.com>
parents:
3208
diff
changeset
|
8 ${_('Search in all repositories')} |
666fc6ac9ce5
search: repo search is a repo thing - show it that way in ui and url
Mads Kiilerich <madski@unity3d.com>
parents:
3208
diff
changeset
|
9 %endif |
666fc6ac9ce5
search: repo search is a repo thing - show it that way in ui and url
Mads Kiilerich <madski@unity3d.com>
parents:
3208
diff
changeset
|
10 </%def> |
666fc6ac9ce5
search: repo search is a repo thing - show it that way in ui and url
Mads Kiilerich <madski@unity3d.com>
parents:
3208
diff
changeset
|
11 |
666fc6ac9ce5
search: repo search is a repo thing - show it that way in ui and url
Mads Kiilerich <madski@unity3d.com>
parents:
3208
diff
changeset
|
12 <%def name="breadcrumbs_links()"> |
666fc6ac9ce5
search: repo search is a repo thing - show it that way in ui and url
Mads Kiilerich <madski@unity3d.com>
parents:
3208
diff
changeset
|
13 %if c.repo_name: |
666fc6ac9ce5
search: repo search is a repo thing - show it that way in ui and url
Mads Kiilerich <madski@unity3d.com>
parents:
3208
diff
changeset
|
14 ${h.link_to(_(u'Home'),h.url('/'))} |
666fc6ac9ce5
search: repo search is a repo thing - show it that way in ui and url
Mads Kiilerich <madski@unity3d.com>
parents:
3208
diff
changeset
|
15 » |
3392
f74be3359044
unified breadcrumbs display
Marcin Kuzminski <marcin@python-works.com>
parents:
3289
diff
changeset
|
16 ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} |
3289
666fc6ac9ce5
search: repo search is a repo thing - show it that way in ui and url
Mads Kiilerich <madski@unity3d.com>
parents:
3208
diff
changeset
|
17 » |
3392
f74be3359044
unified breadcrumbs display
Marcin Kuzminski <marcin@python-works.com>
parents:
3289
diff
changeset
|
18 ${_('search')} |
3289
666fc6ac9ce5
search: repo search is a repo thing - show it that way in ui and url
Mads Kiilerich <madski@unity3d.com>
parents:
3208
diff
changeset
|
19 %else: |
3392
f74be3359044
unified breadcrumbs display
Marcin Kuzminski <marcin@python-works.com>
parents:
3289
diff
changeset
|
20 ${_('search in all repositories')} |
3289
666fc6ac9ce5
search: repo search is a repo thing - show it that way in ui and url
Mads Kiilerich <madski@unity3d.com>
parents:
3208
diff
changeset
|
21 %endif |
666fc6ac9ce5
search: repo search is a repo thing - show it that way in ui and url
Mads Kiilerich <madski@unity3d.com>
parents:
3208
diff
changeset
|
22 %if c.cur_query: |
666fc6ac9ce5
search: repo search is a repo thing - show it that way in ui and url
Mads Kiilerich <madski@unity3d.com>
parents:
3208
diff
changeset
|
23 » |
666fc6ac9ce5
search: repo search is a repo thing - show it that way in ui and url
Mads Kiilerich <madski@unity3d.com>
parents:
3208
diff
changeset
|
24 ${c.cur_query} |
666fc6ac9ce5
search: repo search is a repo thing - show it that way in ui and url
Mads Kiilerich <madski@unity3d.com>
parents:
3208
diff
changeset
|
25 %endif |
666fc6ac9ce5
search: repo search is a repo thing - show it that way in ui and url
Mads Kiilerich <madski@unity3d.com>
parents:
3208
diff
changeset
|
26 </%def> |
666fc6ac9ce5
search: repo search is a repo thing - show it that way in ui and url
Mads Kiilerich <madski@unity3d.com>
parents:
3208
diff
changeset
|
27 |
666fc6ac9ce5
search: repo search is a repo thing - show it that way in ui and url
Mads Kiilerich <madski@unity3d.com>
parents:
3208
diff
changeset
|
28 <%def name="page_nav()"> |
3197 | 29 %if c.repo_name: |
3289
666fc6ac9ce5
search: repo search is a repo thing - show it that way in ui and url
Mads Kiilerich <madski@unity3d.com>
parents:
3208
diff
changeset
|
30 ${self.menu('options')} |
3197 | 31 %else: |
3289
666fc6ac9ce5
search: repo search is a repo thing - show it that way in ui and url
Mads Kiilerich <madski@unity3d.com>
parents:
3208
diff
changeset
|
32 ${self.menu('search')} |
3197 | 33 %endif |
406
b153a51b1d3b
Implemented search using whoosh. Still as experimental option.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
34 </%def> |
b153a51b1d3b
Implemented search using whoosh. Still as experimental option.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
35 <%def name="main()"> |
3527
87c97fcea029
Adding the context bar too all pages related to a Repository.
Leonardo <leo@unity3d.com>
parents:
3392
diff
changeset
|
36 ${self.context_bar('options')} |
406
b153a51b1d3b
Implemented search using whoosh. Still as experimental option.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
37 <div class="box"> |
3197 | 38 <!-- box / title --> |
39 <div class="title"> | |
3289
666fc6ac9ce5
search: repo search is a repo thing - show it that way in ui and url
Mads Kiilerich <madski@unity3d.com>
parents:
3208
diff
changeset
|
40 ${self.breadcrumbs()} |
3197 | 41 </div> |
42 <!-- end box / title --> | |
43 %if c.repo_name: | |
3289
666fc6ac9ce5
search: repo search is a repo thing - show it that way in ui and url
Mads Kiilerich <madski@unity3d.com>
parents:
3208
diff
changeset
|
44 ${h.form(h.url('search_repo',repo_name=c.repo_name),method='get')} |
3197 | 45 %else: |
46 ${h.form(h.url('search'),method='get')} | |
47 %endif | |
48 <div class="form"> | |
49 <div class="fields"> | |
50 <div class="field field-first field-noborder"> | |
556
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="q">${_('Search term')}</label> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1242
diff
changeset
|
53 </div> |
3197 | 54 <div class="input">${h.text('q',c.cur_query,class_="small")} |
55 <div class="button highlight"> | |
56 <input type="submit" value="${_('Search')}" class="ui-button"/> | |
57 </div> | |
58 </div> | |
59 <div style="font-weight: bold;clear:Both;margin-left:200px">${c.runtime}</div> | |
60 </div> | |
556
65b2f150beb7
Added searching for file names within the repository in rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
548
diff
changeset
|
61 |
3197 | 62 <div class="field"> |
63 <div class="label"> | |
64 <label for="type">${_('Search in')}</label> | |
65 </div> | |
556
65b2f150beb7
Added searching for file names within the repository in rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
548
diff
changeset
|
66 <div class="select"> |
1242 | 67 ${h.select('type',c.cur_type,[('content',_('File contents')), |
2640
5f21a9dcb09d
create an index for commit messages and the ability to search them and see results
Indra Talip <indra.talip@gmail.com>
parents:
2493
diff
changeset
|
68 ('commit',_('Commit messages')), |
556
65b2f150beb7
Added searching for file names within the repository in rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
548
diff
changeset
|
69 ('path',_('File names')), |
65b2f150beb7
Added searching for file names within the repository in rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
548
diff
changeset
|
70 ##('repository',_('Repository names')), |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1242
diff
changeset
|
71 ])} |
556
65b2f150beb7
Added searching for file names within the repository in rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
548
diff
changeset
|
72 </div> |
65b2f150beb7
Added searching for file names within the repository in rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
548
diff
changeset
|
73 </div> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1242
diff
changeset
|
74 |
3197 | 75 </div> |
76 </div> | |
77 ${h.end_form()} | |
2389
324b838250c9
UI fixes for searching
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
78 <div class="search"> |
2640
5f21a9dcb09d
create an index for commit messages and the ability to search them and see results
Indra Talip <indra.talip@gmail.com>
parents:
2493
diff
changeset
|
79 %if c.cur_type == 'content': |
556
65b2f150beb7
Added searching for file names within the repository in rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
548
diff
changeset
|
80 <%include file='search_content.html'/> |
2640
5f21a9dcb09d
create an index for commit messages and the ability to search them and see results
Indra Talip <indra.talip@gmail.com>
parents:
2493
diff
changeset
|
81 %elif c.cur_type == 'path': |
556
65b2f150beb7
Added searching for file names within the repository in rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
548
diff
changeset
|
82 <%include file='search_path.html'/> |
2640
5f21a9dcb09d
create an index for commit messages and the ability to search them and see results
Indra Talip <indra.talip@gmail.com>
parents:
2493
diff
changeset
|
83 %elif c.cur_type == 'commit': |
556
65b2f150beb7
Added searching for file names within the repository in rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
548
diff
changeset
|
84 <%include file='search_commit.html'/> |
2640
5f21a9dcb09d
create an index for commit messages and the ability to search them and see results
Indra Talip <indra.talip@gmail.com>
parents:
2493
diff
changeset
|
85 %elif c.cur_type == 'repository': |
556
65b2f150beb7
Added searching for file names within the repository in rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
548
diff
changeset
|
86 <%include file='search_repository.html'/> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1242
diff
changeset
|
87 %endif |
2389
324b838250c9
UI fixes for searching
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
88 </div> |
406
b153a51b1d3b
Implemented search using whoosh. Still as experimental option.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
89 </div> |
b153a51b1d3b
Implemented search using whoosh. Still as experimental option.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
90 |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1242
diff
changeset
|
91 </%def> |