Mercurial > kallithea
annotate rhodecode/templates/bookmarks/bookmarks.html @ 3665:690a955ba785 beta
use placeholders in qfilter, not the ugly JS logic
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Thu, 04 Apr 2013 13:18:24 +0200 |
parents | eacd33e0c5b3 |
children | 93de03499097 |
rev | line source |
---|---|
1748
a3ee2611e6e8
implements #135 bookmark support for UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
1 ## -*- coding: utf-8 -*- |
a3ee2611e6e8
implements #135 bookmark support for UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
2 <%inherit file="/base/base.html"/> |
a3ee2611e6e8
implements #135 bookmark support for UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
3 |
a3ee2611e6e8
implements #135 bookmark support for UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
4 <%def name="title()"> |
3582
1f334a68d057
improved title consistency
Marcin Kuzminski <marcin@python-works.com>
parents:
3532
diff
changeset
|
5 ${_('%s Bookmarks') % c.repo_name} · ${c.rhodecode_name} |
1748
a3ee2611e6e8
implements #135 bookmark support for UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
6 </%def> |
a3ee2611e6e8
implements #135 bookmark support for UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
7 |
a3ee2611e6e8
implements #135 bookmark support for UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
8 <%def name="breadcrumbs_links()"> |
3665
690a955ba785
use placeholders in qfilter, not the ugly JS logic
Marcin Kuzminski <marcin@python-works.com>
parents:
3603
diff
changeset
|
9 <input class="q_filter_box" id="q_filter_bookmarks" size="15" type="text" name="filter" placeholder="${_('quick filter...')}" value=""/> |
3532 | 10 ${_('Bookmarks')} |
1748
a3ee2611e6e8
implements #135 bookmark support for UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
11 </%def> |
a3ee2611e6e8
implements #135 bookmark support for UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
12 |
a3ee2611e6e8
implements #135 bookmark support for UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
13 <%def name="page_nav()"> |
3603
eacd33e0c5b3
use valid options for the top menu: repositories, journal, search and admin
Mads Kiilerich <madski@unity3d.com>
parents:
3601
diff
changeset
|
14 ${self.menu('repositories')} |
1748
a3ee2611e6e8
implements #135 bookmark support for UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
15 </%def> |
3601
51da0e019248
repository pages: cleanup of use of repository context menu
Mads Kiilerich <madski@unity3d.com>
parents:
3582
diff
changeset
|
16 |
1748
a3ee2611e6e8
implements #135 bookmark support for UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
17 <%def name="main()"> |
3601
51da0e019248
repository pages: cleanup of use of repository context menu
Mads Kiilerich <madski@unity3d.com>
parents:
3582
diff
changeset
|
18 ${self.context_bar('switch-to')} |
1748
a3ee2611e6e8
implements #135 bookmark support for UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
19 <div class="box"> |
a3ee2611e6e8
implements #135 bookmark support for UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
20 <!-- box / title --> |
a3ee2611e6e8
implements #135 bookmark support for UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
21 <div class="title"> |
a3ee2611e6e8
implements #135 bookmark support for UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
22 ${self.breadcrumbs()} |
a3ee2611e6e8
implements #135 bookmark support for UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
23 </div> |
a3ee2611e6e8
implements #135 bookmark support for UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
24 <!-- end box / title --> |
a3ee2611e6e8
implements #135 bookmark support for UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
25 <div class="table"> |
a3ee2611e6e8
implements #135 bookmark support for UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
26 <%include file='bookmarks_data.html'/> |
a3ee2611e6e8
implements #135 bookmark support for UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
27 </div> |
a3ee2611e6e8
implements #135 bookmark support for UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
28 </div> |
3601
51da0e019248
repository pages: cleanup of use of repository context menu
Mads Kiilerich <madski@unity3d.com>
parents:
3582
diff
changeset
|
29 |
1748
a3ee2611e6e8
implements #135 bookmark support for UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
30 <script type="text/javascript"> |
1782
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
31 |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
32 // main table sorting |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
33 var myColumnDefs = [ |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
34 {key:"name",label:"${_('Name')}",sortable:true}, |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
35 {key:"date",label:"${_('Date')}",sortable:true, |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
36 sortOptions: { sortFunction: dateSort }}, |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
37 {key:"author",label:"${_('Author')}",sortable:true}, |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
38 {key:"revision",label:"${_('Revision')}",sortable:true, |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
39 sortOptions: { sortFunction: revisionSort }}, |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
40 ]; |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
41 |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
42 var myDataSource = new YAHOO.util.DataSource(YUD.get("bookmarks_data")); |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
43 |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
44 myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
45 |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
46 myDataSource.responseSchema = { |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
47 fields: [ |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
48 {key:"name"}, |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
49 {key:"date"}, |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
50 {key:"author"}, |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
51 {key:"revision"}, |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
52 ] |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
53 }; |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
54 |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
55 var myDataTable = new YAHOO.widget.DataTable("table_wrap", myColumnDefs, myDataSource, |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
56 { |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
57 sortedBy:{key:"name",dir:"asc"}, |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
58 MSG_SORTASC:"${_('Click to sort ascending')}", |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
59 MSG_SORTDESC:"${_('Click to sort descending')}", |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
60 MSG_EMPTY:"${_('No records found.')}", |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
61 MSG_ERROR:"${_('Data error.')}", |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1782
diff
changeset
|
62 MSG_LOADING:"${_('Loading...')}", |
1782
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
63 } |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
64 ); |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
65 myDataTable.subscribe('postRenderEvent',function(oArgs) { |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
66 tooltip_activate(); |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
67 var func = function(node){ |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
68 return node.parentNode.parentNode.parentNode.parentNode.parentNode; |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
69 } |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1782
diff
changeset
|
70 q_filter('q_filter_bookmarks',YUQ('div.table tr td .logbooks .bookbook a'),func); |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1782
diff
changeset
|
71 }); |
1782
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
72 |
1748
a3ee2611e6e8
implements #135 bookmark support for UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
73 </script> |
1782
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
74 |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
75 |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1782
diff
changeset
|
76 </%def> |