Show More
@@ -1,197 +1,197 b'' | |||||
1 | <%page args="parent" /> |
|
1 | <%page args="parent" /> | |
2 | <div class="box"> |
|
2 | <div class="box"> | |
3 | <!-- box / title --> |
|
3 | <!-- box / title --> | |
4 | <div class="title"> |
|
4 | <div class="title"> | |
5 | <h5> |
|
5 | <h5> | |
6 | <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}"/> ${parent.breadcrumbs()} <span id="repo_count">0</span> ${_('repositories')} |
|
6 | <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}"/> ${parent.breadcrumbs()} <span id="repo_count">0</span> ${_('repositories')} | |
7 | </h5> |
|
7 | </h5> | |
8 | %if c.rhodecode_user.username != 'default': |
|
8 | %if c.rhodecode_user.username != 'default': | |
9 | %if h.HasPermissionAny('hg.admin','hg.create.repository')(): |
|
9 | %if h.HasPermissionAny('hg.admin','hg.create.repository')(): | |
10 | <ul class="links"> |
|
10 | <ul class="links"> | |
11 | <li> |
|
11 | <li> | |
12 | <span>${h.link_to(_('ADD REPOSITORY'),h.url('admin_settings_create_repository'))}</span> |
|
12 | <span>${h.link_to(_('ADD REPOSITORY'),h.url('admin_settings_create_repository'))}</span> | |
13 | </li> |
|
13 | </li> | |
14 | </ul> |
|
14 | </ul> | |
15 | %endif |
|
15 | %endif | |
16 | %endif |
|
16 | %endif | |
17 | </div> |
|
17 | </div> | |
18 | <!-- end box / title --> |
|
18 | <!-- end box / title --> | |
19 | <div class="table"> |
|
19 | <div class="table"> | |
20 | % if c.groups: |
|
20 | % if c.groups: | |
21 | <div id='groups_list_wrap' class="yui-skin-sam"> |
|
21 | <div id='groups_list_wrap' class="yui-skin-sam"> | |
22 | <table id="groups_list"> |
|
22 | <table id="groups_list"> | |
23 | <thead> |
|
23 | <thead> | |
24 | <tr> |
|
24 | <tr> | |
25 | <th class="left"><a href="#">${_('Group name')}</a></th> |
|
25 | <th class="left"><a href="#">${_('Group name')}</a></th> | |
26 | <th class="left"><a href="#">${_('Description')}</a></th> |
|
26 | <th class="left"><a href="#">${_('Description')}</a></th> | |
27 | ##<th class="left"><a href="#">${_('Number of repositories')}</a></th> |
|
27 | ##<th class="left"><a href="#">${_('Number of repositories')}</a></th> | |
28 | </tr> |
|
28 | </tr> | |
29 | </thead> |
|
29 | </thead> | |
30 |
|
30 | |||
31 | ## REPO GROUPS |
|
31 | ## REPO GROUPS | |
32 | % for gr in c.groups: |
|
32 | % for gr in c.groups: | |
33 | <tr> |
|
33 | <tr> | |
34 | <td> |
|
34 | <td> | |
35 | <div style="white-space: nowrap"> |
|
35 | <div style="white-space: nowrap"> | |
36 | <img class="icon" alt="${_('Repositories group')}" src="${h.url('/images/icons/database_link.png')}"/> |
|
36 | <img class="icon" alt="${_('Repositories group')}" src="${h.url('/images/icons/database_link.png')}"/> | |
37 | ${h.link_to(gr.name,url('repos_group_home',group_name=gr.group_name))} |
|
37 | ${h.link_to(gr.name,url('repos_group_home',group_name=gr.group_name))} | |
38 | </div> |
|
38 | </div> | |
39 | </td> |
|
39 | </td> | |
40 | <td>${gr.group_description}</td> |
|
40 | <td>${gr.group_description}</td> | |
41 | ## this is commented out since for multi nested repos can be HEAVY! |
|
41 | ## this is commented out since for multi nested repos can be HEAVY! | |
42 | ## in number of executed queries during traversing uncomment at will |
|
42 | ## in number of executed queries during traversing uncomment at will | |
43 | ##<td><b>${gr.repositories_recursive_count}</b></td> |
|
43 | ##<td><b>${gr.repositories_recursive_count}</b></td> | |
44 | </tr> |
|
44 | </tr> | |
45 | % endfor |
|
45 | % endfor | |
46 |
|
46 | |||
47 | </table> |
|
47 | </table> | |
48 | </div> |
|
48 | </div> | |
49 | <div style="height: 20px"></div> |
|
49 | <div style="height: 20px"></div> | |
50 | % endif |
|
50 | % endif | |
51 | <div id="welcome" style="display:none;text-align:center"> |
|
51 | <div id="welcome" style="display:none;text-align:center"> | |
52 | <h1><a href="${h.url('home')}">${c.rhodecode_name} ${c.rhodecode_version}</a></h1> |
|
52 | <h1><a href="${h.url('home')}">${c.rhodecode_name} ${c.rhodecode_version}</a></h1> | |
53 | </div> |
|
53 | </div> | |
54 | <div id='repos_list_wrap' class="yui-skin-sam"> |
|
54 | <div id='repos_list_wrap' class="yui-skin-sam"> | |
55 | <%cnt=0%> |
|
55 | <%cnt=0%> | |
56 | <%namespace name="dt" file="/_data_table/_dt_elements.html"/> |
|
56 | <%namespace name="dt" file="/_data_table/_dt_elements.html"/> | |
57 |
|
57 | |||
58 | <table id="repos_list"> |
|
58 | <table id="repos_list"> | |
59 | <thead> |
|
59 | <thead> | |
60 | <tr> |
|
60 | <tr> | |
61 | <th class="left"></th> |
|
61 | <th class="left"></th> | |
62 | <th class="left">${_('Name')}</th> |
|
62 | <th class="left">${_('Name')}</th> | |
63 | <th class="left">${_('Description')}</th> |
|
63 | <th class="left">${_('Description')}</th> | |
64 | <th class="left">${_('Last change')}</th> |
|
64 | <th class="left">${_('Last change')}</th> | |
65 | <th class="left">${_('Tip')}</th> |
|
65 | <th class="left">${_('Tip')}</th> | |
66 | <th class="left">${_('Owner')}</th> |
|
66 | <th class="left">${_('Owner')}</th> | |
67 | <th class="left">${_('RSS')}</th> |
|
67 | <th class="left">${_('RSS')}</th> | |
68 | <th class="left">${_('Atom')}</th> |
|
68 | <th class="left">${_('Atom')}</th> | |
69 | </tr> |
|
69 | </tr> | |
70 | </thead> |
|
70 | </thead> | |
71 | <tbody> |
|
71 | <tbody> | |
72 | %for cnt,repo in enumerate(c.repos_list): |
|
72 | %for cnt,repo in enumerate(c.repos_list): | |
73 | <tr class="parity${(cnt+1)%2}"> |
|
73 | <tr class="parity${(cnt+1)%2}"> | |
74 | ##QUICK MENU |
|
74 | ##QUICK MENU | |
75 | <td class="quick_repo_menu"> |
|
75 | <td class="quick_repo_menu"> | |
76 | ${dt.quick_menu(repo['name'])} |
|
76 | ${dt.quick_menu(repo['name'])} | |
77 | </td> |
|
77 | </td> | |
78 | ##REPO NAME AND ICONS |
|
78 | ##REPO NAME AND ICONS | |
79 | <td class="reponame"> |
|
79 | <td class="reponame"> | |
80 | ${dt.repo_name(repo['name'],repo['dbrepo']['repo_type'],repo['dbrepo']['private'],repo['dbrepo_fork'].get('repo_name'))} |
|
80 | ${dt.repo_name(repo['name'],repo['dbrepo']['repo_type'],repo['dbrepo']['private'],repo['dbrepo_fork'].get('repo_name'))} | |
81 | </td> |
|
81 | </td> | |
82 | ##DESCRIPTION |
|
82 | ##DESCRIPTION | |
83 | <td><span class="tooltip" title="${h.tooltip(repo['description'])}"> |
|
83 | <td><span class="tooltip" title="${h.tooltip(repo['description'])}"> | |
84 | ${h.truncate(repo['description'],60)}</span> |
|
84 | ${h.truncate(repo['description'],60)}</span> | |
85 | </td> |
|
85 | </td> | |
86 | ##LAST CHANGE DATE |
|
86 | ##LAST CHANGE DATE | |
87 | <td> |
|
87 | <td> | |
88 | <span class="tooltip" title="${repo['last_change']}">${h.age(repo['last_change'])}</span> |
|
88 | <span class="tooltip" title="${repo['last_change']}">${h.age(repo['last_change'])}</span> | |
89 | </td> |
|
89 | </td> | |
90 | ##LAST REVISION |
|
90 | ##LAST REVISION | |
91 | <td> |
|
91 | <td> | |
92 | ${dt.revision(repo['name'],repo['rev'],repo['tip'],repo['author'],repo['last_msg'])} |
|
92 | ${dt.revision(repo['name'],repo['rev'],repo['tip'],repo['author'],repo['last_msg'])} | |
93 | </td> |
|
93 | </td> | |
94 | ## |
|
94 | ## | |
95 | <td title="${repo['contact']}">${h.person(repo['contact'])}</td> |
|
95 | <td title="${repo['contact']}">${h.person(repo['contact'])}</td> | |
96 | <td> |
|
96 | <td> | |
97 | %if c.rhodecode_user.username != 'default': |
|
97 | %if c.rhodecode_user.username != 'default': | |
98 | <a title="${_('Subscribe to %s rss feed')%repo['name']}" class="rss_icon" href="${h.url('rss_feed_home',repo_name=repo['name'],api_key=c.rhodecode_user.api_key)}"></a> |
|
98 | <a title="${_('Subscribe to %s rss feed')%repo['name']}" class="rss_icon" href="${h.url('rss_feed_home',repo_name=repo['name'],api_key=c.rhodecode_user.api_key)}"></a> | |
99 | %else: |
|
99 | %else: | |
100 | <a title="${_('Subscribe to %s rss feed')%repo['name']}" class="rss_icon" href="${h.url('rss_feed_home',repo_name=repo['name'])}"></a> |
|
100 | <a title="${_('Subscribe to %s rss feed')%repo['name']}" class="rss_icon" href="${h.url('rss_feed_home',repo_name=repo['name'])}"></a> | |
101 | %endif: |
|
101 | %endif: | |
102 | </td> |
|
102 | </td> | |
103 | <td> |
|
103 | <td> | |
104 | %if c.rhodecode_user.username != 'default': |
|
104 | %if c.rhodecode_user.username != 'default': | |
105 | <a title="${_('Subscribe to %s atom feed')%repo['name']}" class="atom_icon" href="${h.url('atom_feed_home',repo_name=repo['name'],api_key=c.rhodecode_user.api_key)}"></a> |
|
105 | <a title="${_('Subscribe to %s atom feed')%repo['name']}" class="atom_icon" href="${h.url('atom_feed_home',repo_name=repo['name'],api_key=c.rhodecode_user.api_key)}"></a> | |
106 | %else: |
|
106 | %else: | |
107 | <a title="${_('Subscribe to %s atom feed')%repo['name']}" class="atom_icon" href="${h.url('atom_feed_home',repo_name=repo['name'])}"></a> |
|
107 | <a title="${_('Subscribe to %s atom feed')%repo['name']}" class="atom_icon" href="${h.url('atom_feed_home',repo_name=repo['name'])}"></a> | |
108 | %endif: |
|
108 | %endif: | |
109 | </td> |
|
109 | </td> | |
110 | </tr> |
|
110 | </tr> | |
111 | %endfor |
|
111 | %endfor | |
112 | </tbody> |
|
112 | </tbody> | |
113 | </table> |
|
113 | </table> | |
114 | </div> |
|
114 | </div> | |
115 | </div> |
|
115 | </div> | |
116 | </div> |
|
116 | </div> | |
117 | <script> |
|
117 | <script> | |
118 |
YUD.get('repo_count').innerHTML = ${cnt |
|
118 | YUD.get('repo_count').innerHTML = ${cnt}; | |
119 | var func = function(node){ |
|
119 | var func = function(node){ | |
120 | return node.parentNode.parentNode.parentNode.parentNode; |
|
120 | return node.parentNode.parentNode.parentNode.parentNode; | |
121 | } |
|
121 | } | |
122 |
|
122 | |||
123 |
|
123 | |||
124 | // groups table sorting |
|
124 | // groups table sorting | |
125 | var myColumnDefs = [ |
|
125 | var myColumnDefs = [ | |
126 | {key:"name",label:"${_('Group Name')}",sortable:true, |
|
126 | {key:"name",label:"${_('Group Name')}",sortable:true, | |
127 | sortOptions: { sortFunction: groupNameSort }}, |
|
127 | sortOptions: { sortFunction: groupNameSort }}, | |
128 | {key:"desc",label:"${_('Description')}",sortable:true}, |
|
128 | {key:"desc",label:"${_('Description')}",sortable:true}, | |
129 | ]; |
|
129 | ]; | |
130 |
|
130 | |||
131 | var myDataSource = new YAHOO.util.DataSource(YUD.get("groups_list")); |
|
131 | var myDataSource = new YAHOO.util.DataSource(YUD.get("groups_list")); | |
132 |
|
132 | |||
133 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; |
|
133 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; | |
134 | myDataSource.responseSchema = { |
|
134 | myDataSource.responseSchema = { | |
135 | fields: [ |
|
135 | fields: [ | |
136 | {key:"name"}, |
|
136 | {key:"name"}, | |
137 | {key:"desc"}, |
|
137 | {key:"desc"}, | |
138 | ] |
|
138 | ] | |
139 | }; |
|
139 | }; | |
140 |
|
140 | |||
141 | var myDataTable = new YAHOO.widget.DataTable("groups_list_wrap", myColumnDefs, myDataSource, |
|
141 | var myDataTable = new YAHOO.widget.DataTable("groups_list_wrap", myColumnDefs, myDataSource, | |
142 | { |
|
142 | { | |
143 | sortedBy:{key:"name",dir:"asc"}, |
|
143 | sortedBy:{key:"name",dir:"asc"}, | |
144 | MSG_SORTASC:"${_('Click to sort ascending')}", |
|
144 | MSG_SORTASC:"${_('Click to sort ascending')}", | |
145 | MSG_SORTDESC:"${_('Click to sort descending')}" |
|
145 | MSG_SORTDESC:"${_('Click to sort descending')}" | |
146 | } |
|
146 | } | |
147 | ); |
|
147 | ); | |
148 |
|
148 | |||
149 | // main table sorting |
|
149 | // main table sorting | |
150 | var myColumnDefs = [ |
|
150 | var myColumnDefs = [ | |
151 | {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"}, |
|
151 | {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"}, | |
152 | {key:"name",label:"${_('Name')}",sortable:true, |
|
152 | {key:"name",label:"${_('Name')}",sortable:true, | |
153 | sortOptions: { sortFunction: nameSort }}, |
|
153 | sortOptions: { sortFunction: nameSort }}, | |
154 | {key:"desc",label:"${_('Description')}",sortable:true}, |
|
154 | {key:"desc",label:"${_('Description')}",sortable:true}, | |
155 | {key:"last_change",label:"${_('Last Change')}",sortable:true, |
|
155 | {key:"last_change",label:"${_('Last Change')}",sortable:true, | |
156 | sortOptions: { sortFunction: ageSort }}, |
|
156 | sortOptions: { sortFunction: ageSort }}, | |
157 | {key:"tip",label:"${_('Tip')}",sortable:true, |
|
157 | {key:"tip",label:"${_('Tip')}",sortable:true, | |
158 | sortOptions: { sortFunction: revisionSort }}, |
|
158 | sortOptions: { sortFunction: revisionSort }}, | |
159 | {key:"owner",label:"${_('Owner')}",sortable:true}, |
|
159 | {key:"owner",label:"${_('Owner')}",sortable:true}, | |
160 | {key:"rss",label:"",sortable:false}, |
|
160 | {key:"rss",label:"",sortable:false}, | |
161 | {key:"atom",label:"",sortable:false}, |
|
161 | {key:"atom",label:"",sortable:false}, | |
162 | ]; |
|
162 | ]; | |
163 |
|
163 | |||
164 | var myDataSource = new YAHOO.util.DataSource(YUD.get("repos_list")); |
|
164 | var myDataSource = new YAHOO.util.DataSource(YUD.get("repos_list")); | |
165 |
|
165 | |||
166 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; |
|
166 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; | |
167 |
|
167 | |||
168 | myDataSource.responseSchema = { |
|
168 | myDataSource.responseSchema = { | |
169 | fields: [ |
|
169 | fields: [ | |
170 | {key:"menu"}, |
|
170 | {key:"menu"}, | |
171 | {key:"name"}, |
|
171 | {key:"name"}, | |
172 | {key:"desc"}, |
|
172 | {key:"desc"}, | |
173 | {key:"last_change"}, |
|
173 | {key:"last_change"}, | |
174 | {key:"tip"}, |
|
174 | {key:"tip"}, | |
175 | {key:"owner"}, |
|
175 | {key:"owner"}, | |
176 | {key:"rss"}, |
|
176 | {key:"rss"}, | |
177 | {key:"atom"}, |
|
177 | {key:"atom"}, | |
178 | ] |
|
178 | ] | |
179 | }; |
|
179 | }; | |
180 |
|
180 | |||
181 | var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource, |
|
181 | var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource, | |
182 | { |
|
182 | { | |
183 | sortedBy:{key:"name",dir:"asc"}, |
|
183 | sortedBy:{key:"name",dir:"asc"}, | |
184 | MSG_SORTASC:"${_('Click to sort ascending')}", |
|
184 | MSG_SORTASC:"${_('Click to sort ascending')}", | |
185 | MSG_SORTDESC:"${_('Click to sort descending')}", |
|
185 | MSG_SORTDESC:"${_('Click to sort descending')}", | |
186 | MSG_EMPTY:"${_('No records found.')}", |
|
186 | MSG_EMPTY:"${_('No records found.')}", | |
187 | MSG_ERROR:"${_('Data error.')}", |
|
187 | MSG_ERROR:"${_('Data error.')}", | |
188 | MSG_LOADING:"${_('Loading...')}", |
|
188 | MSG_LOADING:"${_('Loading...')}", | |
189 | } |
|
189 | } | |
190 | ); |
|
190 | ); | |
191 | myDataTable.subscribe('postRenderEvent',function(oArgs) { |
|
191 | myDataTable.subscribe('postRenderEvent',function(oArgs) { | |
192 | tooltip_activate(); |
|
192 | tooltip_activate(); | |
193 | quick_repo_menu(); |
|
193 | quick_repo_menu(); | |
194 | q_filter('q_filter',YUQ('div.table tr td a.repo_name'),func); |
|
194 | q_filter('q_filter',YUQ('div.table tr td a.repo_name'),func); | |
195 | }); |
|
195 | }); | |
196 |
|
196 | |||
197 | </script> |
|
197 | </script> |
General Comments 0
You need to be logged in to leave comments.
Login now