Mercurial > kallithea
annotate rhodecode/templates/branches/branches.html @ 3782:c7c4855517c4 beta
summary: don't link from 'Fork of' text - only repo name should link
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Wed, 10 Apr 2013 03:00:38 +0200 |
parents | 690a955ba785 |
children | 072a37c44f58 |
rev | line source |
---|---|
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
1 ## -*- coding: utf-8 -*- |
127
20dc7a5eb748
Html changes and cleanups, made folders for html templates, implemented tags and branches pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
2 <%inherit file="/base/base.html"/> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
3 |
127
20dc7a5eb748
Html changes and cleanups, made folders for html templates, implemented tags and branches pages
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 Branches') % c.repo_name} · ${c.rhodecode_name} |
127
20dc7a5eb748
Html changes and cleanups, made folders for html templates, implemented tags and branches pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
6 </%def> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
7 |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
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_branches" size="15" type="text" name="filter" placeholder="${_('quick filter...')}" value=""/> |
3532 | 10 ${_('Branches')} |
127
20dc7a5eb748
Html changes and cleanups, made folders for html templates, implemented tags and branches pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
11 </%def> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
12 |
127
20dc7a5eb748
Html changes and cleanups, made folders for html templates, implemented tags and branches pages
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:
3582
diff
changeset
|
14 ${self.menu('repositories')} |
127
20dc7a5eb748
Html changes and cleanups, made folders for html templates, implemented tags and branches pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
15 </%def> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
16 |
127
20dc7a5eb748
Html changes and cleanups, made folders for html templates, implemented tags and branches pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
17 <%def name="main()"> |
3529 | 18 ${self.context_bar('switch-to')} |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
19 <div class="box"> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
20 <!-- box / title --> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
21 <div class="title"> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
22 ${self.breadcrumbs()} |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
23 </div> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
24 <!-- end box / title --> |
2362
3c4afb8894bd
Improved cross repos diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
2243
diff
changeset
|
25 %if c.repo_branches: |
3434
488bbf5e3f59
css: there is no such thing as vertical-align: right
Mads Kiilerich <madski@unity3d.com>
parents:
3392
diff
changeset
|
26 <div class="info_box" id="compare_branches" style="clear: both;padding: 10px 19px;text-align: right;"><a href="#" class="ui-btn small">${_('Compare branches')}</a></div> |
2362
3c4afb8894bd
Improved cross repos diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
2243
diff
changeset
|
27 %endif |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
28 <div class="table"> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
29 <%include file='branches_data.html'/> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
30 </div> |
1654
713315371e03
added quick filters into branches and tags
Marcin Kuzminski <marcin@python-works.com>
parents:
619
diff
changeset
|
31 </div> |
713315371e03
added quick filters into branches and tags
Marcin Kuzminski <marcin@python-works.com>
parents:
619
diff
changeset
|
32 <script type="text/javascript"> |
2243
f6cdfc730831
Added compare buttons into branch views
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
33 YUE.on('compare_branches','click',function(e){ |
3197 | 34 YUE.preventDefault(e); |
35 var org = YUQ('input[name=compare_org]:checked')[0]; | |
36 var other = YUQ('input[name=compare_other]:checked')[0]; | |
1782
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1654
diff
changeset
|
37 |
3197 | 38 if(org && other){ |
39 var compare_url = "${h.url('compare_url',repo_name=c.repo_name,org_ref_type='branch',org_ref='__ORG__',other_ref_type='branch',other_ref='__OTHER__')}"; | |
40 var u = compare_url.replace('__ORG__',org.value) | |
41 .replace('__OTHER__',other.value); | |
42 window.location=u; | |
43 } | |
3010
bf96fd1920c1
Enabled compare engine for tags
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
44 }); |
1782
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1654
diff
changeset
|
45 // main table sorting |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1654
diff
changeset
|
46 var myColumnDefs = [ |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1654
diff
changeset
|
47 {key:"name",label:"${_('Name')}",sortable:true}, |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1654
diff
changeset
|
48 {key:"date",label:"${_('Date')}",sortable:true, |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1654
diff
changeset
|
49 sortOptions: { sortFunction: dateSort }}, |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1654
diff
changeset
|
50 {key:"author",label:"${_('Author')}",sortable:true}, |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1654
diff
changeset
|
51 {key:"revision",label:"${_('Revision')}",sortable:true, |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1654
diff
changeset
|
52 sortOptions: { sortFunction: revisionSort }}, |
2243
f6cdfc730831
Added compare buttons into branch views
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
53 {key:"compare",label:"${_('Compare')}",sortable:false,}, |
1782
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1654
diff
changeset
|
54 ]; |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1654
diff
changeset
|
55 |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1654
diff
changeset
|
56 var myDataSource = new YAHOO.util.DataSource(YUD.get("branches_data")); |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1654
diff
changeset
|
57 |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1654
diff
changeset
|
58 myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1654
diff
changeset
|
59 |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1654
diff
changeset
|
60 myDataSource.responseSchema = { |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1654
diff
changeset
|
61 fields: [ |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1654
diff
changeset
|
62 {key:"name"}, |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1654
diff
changeset
|
63 {key:"date"}, |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1654
diff
changeset
|
64 {key:"author"}, |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1654
diff
changeset
|
65 {key:"revision"}, |
2243
f6cdfc730831
Added compare buttons into branch views
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
66 {key:"compare"}, |
1782
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1654
diff
changeset
|
67 ] |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1654
diff
changeset
|
68 }; |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1654
diff
changeset
|
69 |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1654
diff
changeset
|
70 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:
1654
diff
changeset
|
71 { |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1654
diff
changeset
|
72 sortedBy:{key:"name",dir:"asc"}, |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1654
diff
changeset
|
73 MSG_SORTASC:"${_('Click to sort ascending')}", |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1654
diff
changeset
|
74 MSG_SORTDESC:"${_('Click to sort descending')}", |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1654
diff
changeset
|
75 MSG_EMPTY:"${_('No records found.')}", |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1654
diff
changeset
|
76 MSG_ERROR:"${_('Data error.')}", |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1782
diff
changeset
|
77 MSG_LOADING:"${_('Loading...')}", |
1782
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1654
diff
changeset
|
78 } |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1654
diff
changeset
|
79 ); |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1654
diff
changeset
|
80 myDataTable.subscribe('postRenderEvent',function(oArgs) { |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1654
diff
changeset
|
81 tooltip_activate(); |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1654
diff
changeset
|
82 var func = function(node){ |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1654
diff
changeset
|
83 return node.parentNode.parentNode.parentNode.parentNode.parentNode; |
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1654
diff
changeset
|
84 } |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1782
diff
changeset
|
85 q_filter('q_filter_branches',YUQ('div.table tr td .logtags .branchtag a'),func); |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1782
diff
changeset
|
86 }); |
1782
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1654
diff
changeset
|
87 |
1654
713315371e03
added quick filters into branches and tags
Marcin Kuzminski <marcin@python-works.com>
parents:
619
diff
changeset
|
88 </script> |
1782
eaf09acf6872
added sorting to bookmarks tags and branches
Marcin Kuzminski <marcin@python-works.com>
parents:
1654
diff
changeset
|
89 |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1782
diff
changeset
|
90 </%def> |