##// END OF EJS Templates
Translations fixes for Data table
marcink -
r1780:b9539c4d beta
parent child Browse files
Show More
@@ -1,121 +1,124
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="/base/base.html"/>
3 3
4 4 <%def name="title()">
5 5 ${_('Repositories administration')} - ${c.rhodecode_name}
6 6 </%def>
7 7
8 8
9 9 <%def name="breadcrumbs_links()">
10 10 ${h.link_to(_('Admin'),h.url('admin_home'))} &raquo; ${_('Repositories')}
11 11 </%def>
12 12 <%def name="page_nav()">
13 13 ${self.menu('admin')}
14 14 </%def>
15 15 <%def name="main()">
16 16 <div class="box">
17 17
18 18 <div class="title">
19 19 ${self.breadcrumbs()}
20 20 <ul class="links">
21 21 <li>
22 22 <span>${h.link_to(_(u'ADD REPOSITORY'),h.url('new_repo'))}</span>
23 23 </li>
24 24 </ul>
25 25 </div>
26 26
27 27 <div class="table">
28 28 <div id='repos_list_wrap' class="yui-skin-sam">
29 29 <%cnt=0%>
30 30 <%namespace name="dt" file="/_data_table/_dt_elements.html"/>
31 31
32 32 <table id="repos_list">
33 33 <thead>
34 34 <tr>
35 35 <th class="left"></th>
36 36 <th class="left">${_('Name')}</th>
37 37 <th class="left">${_('Description')}</th>
38 38 <th class="left">${_('Last change')}</th>
39 39 <th class="left">${_('Tip')}</th>
40 40 <th class="left">${_('Contact')}</th>
41 41 <th class="left">${_('Action')}</th>
42 42 </tr>
43 43 </thead>
44 44
45 45 %for cnt,repo in enumerate(c.repos_list,1):
46 46 <tr class="parity${cnt%2}">
47 47 <td class="quick_repo_menu">
48 48 ${dt.quick_menu(repo['name'])}
49 49 </td>
50 50 <td class="reponame">
51 51 ${dt.repo_name(repo['name'],repo['dbrepo']['repo_type'],repo['dbrepo']['private'],repo['dbrepo_fork'].get('repo_name'))}
52 52 </td>
53 53 ##DESCRIPTION
54 54 <td><span class="tooltip" title="${h.tooltip(repo['description'])}">
55 55 ${h.truncate(repo['description'],60)}</span>
56 56 </td>
57 57 ##LAST CHANGE
58 58 <td>
59 59 <span class="tooltip" title="${repo['last_change']}">${h.age(repo['last_change'])}</span>
60 60 </td>
61 61 ##LAST REVISION
62 62 <td>
63 63 ${dt.revision(repo['name'],repo['rev'],repo['tip'],repo['author'],repo['last_msg'])}
64 64 </td>
65 65 <td title="${repo['contact']}">${h.person(repo['contact'])}</td>
66 66 <td>
67 67 ${h.form(url('repo', repo_name=repo['name']),method='delete')}
68 68 ${h.submit('remove_%s' % repo['name'],_('delete'),class_="delete_icon action_button",onclick="return confirm('"+_('Confirm to delete this repository')+"');")}
69 69 ${h.end_form()}
70 70 </td>
71 71 </tr>
72 72 %endfor
73 73 </table>
74 74 </div>
75 75 </div>
76 76 </div>
77 77 <script>
78 78
79 79 // main table sorting
80 80 var myColumnDefs = [
81 81 {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"},
82 82 {key:"name",label:"${_('Name')}",sortable:true,
83 83 sortOptions: { sortFunction: nameSort }},
84 84 {key:"desc",label:"${_('Description')}",sortable:true},
85 85 {key:"last_change",label:"${_('Last Change')}",sortable:true,
86 86 sortOptions: { sortFunction: ageSort }},
87 87 {key:"tip",label:"${_('Tip')}",sortable:true,
88 88 sortOptions: { sortFunction: revisionSort }},
89 89 {key:"owner",label:"${_('Owner')}",sortable:true},
90 90 {key:"action",label:"${_('Action')}",sortable:false},
91 91 ];
92 92
93 93 var myDataSource = new YAHOO.util.DataSource(YUD.get("repos_list"));
94 94
95 95 myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE;
96 96
97 97 myDataSource.responseSchema = {
98 98 fields: [
99 99 {key:"menu"},
100 100 {key:"name"},
101 101 {key:"desc"},
102 102 {key:"last_change"},
103 103 {key:"tip"},
104 104 {key:"owner"},
105 105 {key:"action"},
106 106 ]
107 107 };
108 108
109 109 var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource,
110 110 {
111 sortedBy:{key:"name",dir:"asc"},
112 MSG_SORTASC:"${_('Click to sort ascending')}",
113 MSG_SORTDESC:"${_('Click to sort descending')}"
111 sortedBy:{key:"name",dir:"asc"},
112 MSG_SORTASC:"${_('Click to sort ascending')}",
113 MSG_SORTDESC:"${_('Click to sort descending')}",
114 MSG_EMPTY:"${_('No records found.')}",
115 MSG_ERROR:"${_('Data error.')}",
116 MSG_LOADING:"${_('Loading...')}",
114 117 }
115 118 );
116 119 myDataTable.subscribe('postRenderEvent',function(oArgs) {
117 120 tooltip_activate();
118 121 quick_repo_menu();
119 122 });
120 123 </script>
121 124 </%def>
@@ -1,192 +1,195
1 1 <%page args="parent" />
2 2 <div class="box">
3 3 <!-- box / title -->
4 4 <div class="title">
5 5 <h5>
6 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 7 </h5>
8 8 %if c.rhodecode_user.username != 'default':
9 9 %if h.HasPermissionAny('hg.admin','hg.create.repository')():
10 10 <ul class="links">
11 11 <li>
12 12 <span>${h.link_to(_('ADD REPOSITORY'),h.url('admin_settings_create_repository'))}</span>
13 13 </li>
14 14 </ul>
15 15 %endif
16 16 %endif
17 17 </div>
18 18 <!-- end box / title -->
19 19 <div class="table">
20 20 % if c.groups:
21 21 <div id='groups_list_wrap' class="yui-skin-sam">
22 22 <table id="groups_list">
23 23 <thead>
24 24 <tr>
25 25 <th class="left"><a href="#">${_('Group name')}</a></th>
26 26 <th class="left"><a href="#">${_('Description')}</a></th>
27 27 ##<th class="left"><a href="#">${_('Number of repositories')}</a></th>
28 28 </tr>
29 29 </thead>
30 30
31 31 ## REPO GROUPS
32 32 % for gr in c.groups:
33 33 <tr>
34 34 <td>
35 35 <div style="white-space: nowrap">
36 36 <img class="icon" alt="${_('Repositories group')}" src="${h.url('/images/icons/database_link.png')}"/>
37 37 ${h.link_to(gr.name,url('repos_group_home',group_name=gr.group_name))}
38 38 </div>
39 39 </td>
40 40 <td>${gr.group_description}</td>
41 41 ##<td><b>${gr.repositories.count()}</b></td>
42 42 </tr>
43 43 % endfor
44 44
45 45 </table>
46 46 </div>
47 47 <div style="height: 20px"></div>
48 48 % endif
49 49 <div id="welcome" style="display:none;text-align:center">
50 50 <h1><a href="${h.url('home')}">${c.rhodecode_name} ${c.rhodecode_version}</a></h1>
51 51 </div>
52 52 <div id='repos_list_wrap' class="yui-skin-sam">
53 53 <%cnt=0%>
54 54 <%namespace name="dt" file="/_data_table/_dt_elements.html"/>
55 55
56 56 <table id="repos_list">
57 57 <thead>
58 58 <tr>
59 59 <th class="left"></th>
60 60 <th class="left">${_('Name')}</th>
61 61 <th class="left">${_('Description')}</th>
62 62 <th class="left">${_('Last change')}</th>
63 63 <th class="left">${_('Tip')}</th>
64 64 <th class="left">${_('Owner')}</th>
65 65 <th class="left">${_('RSS')}</th>
66 66 <th class="left">${_('Atom')}</th>
67 67 </tr>
68 68 </thead>
69 69 <tbody>
70 70 %for cnt,repo in enumerate(c.repos_list,1):
71 71 <tr class="parity${cnt%2}">
72 72 ##QUICK MENU
73 73 <td class="quick_repo_menu">
74 74 ${dt.quick_menu(repo['name'])}
75 75 </td>
76 76 ##REPO NAME AND ICONS
77 77 <td class="reponame">
78 78 ${dt.repo_name(repo['name'],repo['dbrepo']['repo_type'],repo['dbrepo']['private'],repo['dbrepo_fork'].get('repo_name'))}
79 79 </td>
80 80 ##DESCRIPTION
81 81 <td><span class="tooltip" title="${h.tooltip(repo['description'])}">
82 82 ${h.truncate(repo['description'],60)}</span>
83 83 </td>
84 84 ##LAST CHANGE DATE
85 85 <td>
86 86 <span class="tooltip" title="${repo['last_change']}">${h.age(repo['last_change'])}</span>
87 87 </td>
88 88 ##LAST REVISION
89 89 <td>
90 90 ${dt.revision(repo['name'],repo['rev'],repo['tip'],repo['author'],repo['last_msg'])}
91 91 </td>
92 92 ##
93 93 <td title="${repo['contact']}">${h.person(repo['contact'])}</td>
94 94 <td>
95 95 %if c.rhodecode_user.username != 'default':
96 96 <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>
97 97 %else:
98 98 <a title="${_('Subscribe to %s rss feed')%repo['name']}" class="rss_icon" href="${h.url('rss_feed_home',repo_name=repo['name'])}"></a>
99 99 %endif:
100 100 </td>
101 101 <td>
102 102 %if c.rhodecode_user.username != 'default':
103 103 <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>
104 104 %else:
105 105 <a title="${_('Subscribe to %s atom feed')%repo['name']}" class="atom_icon" href="${h.url('atom_feed_home',repo_name=repo['name'])}"></a>
106 106 %endif:
107 107 </td>
108 108 </tr>
109 109 %endfor
110 110 </tbody>
111 111 </table>
112 112 </div>
113 113 </div>
114 114 </div>
115 115 <script>
116 116 YUD.get('repo_count').innerHTML = ${cnt};
117 117 var func = function(node){
118 118 return node.parentNode.parentNode.parentNode.parentNode;
119 119 }
120 120
121 121
122 122 // groups table sorting
123 123 var myColumnDefs = [
124 124 {key:"name",label:"${_('Group Name')}",sortable:true,
125 125 sortOptions: { sortFunction: groupNameSort }},
126 126 {key:"desc",label:"${_('Description')}",sortable:true},
127 127 ];
128 128
129 129 var myDataSource = new YAHOO.util.DataSource(YUD.get("groups_list"));
130 130
131 131 myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE;
132 132 myDataSource.responseSchema = {
133 133 fields: [
134 134 {key:"name"},
135 135 {key:"desc"},
136 136 ]
137 137 };
138 138
139 139 var myDataTable = new YAHOO.widget.DataTable("groups_list_wrap", myColumnDefs, myDataSource,
140 140 {
141 141 sortedBy:{key:"name",dir:"asc"},
142 142 MSG_SORTASC:"${_('Click to sort ascending')}",
143 143 MSG_SORTDESC:"${_('Click to sort descending')}"
144 144 }
145 145 );
146 146
147 147 // main table sorting
148 148 var myColumnDefs = [
149 149 {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"},
150 150 {key:"name",label:"${_('Name')}",sortable:true,
151 151 sortOptions: { sortFunction: nameSort }},
152 152 {key:"desc",label:"${_('Description')}",sortable:true},
153 153 {key:"last_change",label:"${_('Last Change')}",sortable:true,
154 154 sortOptions: { sortFunction: ageSort }},
155 155 {key:"tip",label:"${_('Tip')}",sortable:true,
156 156 sortOptions: { sortFunction: revisionSort }},
157 157 {key:"owner",label:"${_('Owner')}",sortable:true},
158 158 {key:"rss",label:"",sortable:false},
159 159 {key:"atom",label:"",sortable:false},
160 160 ];
161 161
162 162 var myDataSource = new YAHOO.util.DataSource(YUD.get("repos_list"));
163 163
164 164 myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE;
165 165
166 166 myDataSource.responseSchema = {
167 167 fields: [
168 168 {key:"menu"},
169 169 {key:"name"},
170 170 {key:"desc"},
171 171 {key:"last_change"},
172 172 {key:"tip"},
173 173 {key:"owner"},
174 174 {key:"rss"},
175 175 {key:"atom"},
176 176 ]
177 177 };
178 178
179 179 var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource,
180 180 {
181 181 sortedBy:{key:"name",dir:"asc"},
182 182 MSG_SORTASC:"${_('Click to sort ascending')}",
183 MSG_SORTDESC:"${_('Click to sort descending')}"
183 MSG_SORTDESC:"${_('Click to sort descending')}",
184 MSG_EMPTY:"${_('No records found.')}",
185 MSG_ERROR:"${_('Data error.')}",
186 MSG_LOADING:"${_('Loading...')}",
184 187 }
185 188 );
186 189 myDataTable.subscribe('postRenderEvent',function(oArgs) {
187 190 tooltip_activate();
188 191 quick_repo_menu();
189 192 q_filter('q_filter',YUQ('div.table tr td a.repo_name'),func);
190 193 });
191 194
192 195 </script> No newline at end of file
@@ -1,217 +1,220
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="/base/base.html"/>
3 3 <%def name="title()">
4 4 ${_('Journal')} - ${c.rhodecode_name}
5 5 </%def>
6 6 <%def name="breadcrumbs()">
7 7 ${c.rhodecode_name}
8 8 </%def>
9 9 <%def name="page_nav()">
10 10 ${self.menu('home')}
11 11 </%def>
12 12 <%def name="main()">
13 13
14 14 <div class="box box-left">
15 15 <!-- box / title -->
16 16 <div class="title">
17 17 <h5>${_('Journal')}</h5>
18 18 <ul class="links">
19 19 <li>
20 20 <span><a id="refresh" href="${h.url('journal')}"><img class="icon" title="${_('Refresh')}" alt="${_('Refresh')}" src="${h.url('/images/icons/arrow_refresh.png')}"/>
21 21 </a></span>
22 22 </li>
23 23 </ul>
24 24 </div>
25 25 <div id="journal">${c.journal_data}</div>
26 26 </div>
27 27 <div class="box box-right">
28 28 <!-- box / title -->
29 29 <div class="title">
30 30 <h5>
31 31 <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}"/>
32 32 <a id="show_my" class="link-white" href="#my">${_('My repos')}</a> / <a id="show_watched" class="link-white" href="#watched">${_('Watched')}</a>
33 33 </h5>
34 34 %if h.HasPermissionAny('hg.admin','hg.create.repository')():
35 35 <ul class="links">
36 36 <li>
37 37 <span>${h.link_to(_('ADD'),h.url('admin_settings_create_repository'))}</span>
38 38 </li>
39 39 </ul>
40 40 %endif
41 41 </div>
42 42 <!-- end box / title -->
43 43 <div id="my" class="table">
44 44 %if c.user_repos:
45 45 <div id='repos_list_wrap' class="yui-skin-sam">
46 46 <table id="repos_list">
47 47 <thead>
48 48 <tr>
49 49 <th></th>
50 50 <th class="left">${_('Name')}</th>
51 51 <th class="left">${_('Tip')}</th>
52 52 <th class="left">${_('Action')}</th>
53 53 <th class="left">${_('Action')}</th>
54 54 </thead>
55 55 <tbody>
56 56 <%namespace name="dt" file="/_data_table/_dt_elements.html"/>
57 57 %for repo in c.user_repos:
58 58 <tr>
59 59 ##QUICK MENU
60 60 <td class="quick_repo_menu">
61 61 ${dt.quick_menu(repo['name'])}
62 62 </td>
63 63 ##REPO NAME AND ICONS
64 64 <td class="reponame">
65 65 ${dt.repo_name(repo['name'],repo['dbrepo']['repo_type'],repo['dbrepo']['private'],repo['dbrepo_fork'].get('repo_name'))}
66 66 </td>
67 67 ##LAST REVISION
68 68 <td>
69 69 ${dt.revision(repo['name'],repo['rev'],repo['tip'],repo['author'],repo['last_msg'])}
70 70 </td>
71 71 ##
72 72 <td><a href="${h.url('repo_settings_home',repo_name=repo['name'])}" title="${_('edit')}"><img class="icon" alt="${_('private')}" src="${h.url('/images/icons/application_form_edit.png')}"/></a></td>
73 73 <td>
74 74 ${h.form(url('repo_settings_delete', repo_name=repo['name']),method='delete')}
75 75 ${h.submit('remove_%s' % repo['name'],'',class_="delete_icon action_button",onclick="return confirm('Confirm to delete this repository');")}
76 76 ${h.end_form()}
77 77 </td>
78 78 </tr>
79 79 %endfor
80 80 </tbody>
81 81 </table>
82 82 </div>
83 83 %else:
84 84 <div style="padding:5px 0px 10px 0px;">
85 85 ${_('No repositories yet')}
86 86 %if h.HasPermissionAny('hg.admin','hg.create.repository')():
87 87 ${h.link_to(_('create one now'),h.url('admin_settings_create_repository'),class_="ui-btn")}
88 88 %endif
89 89 </div>
90 90 %endif
91 91 </div>
92 92
93 93 <div id="watched" class="table" style="display:none">
94 94 %if c.following:
95 95 <table>
96 96 <thead>
97 97 <tr>
98 98 <th class="left">${_('Name')}</th>
99 99 </thead>
100 100 <tbody>
101 101 %for entry in c.following:
102 102 <tr>
103 103 <td>
104 104 %if entry.follows_user_id:
105 105 <img title="${_('following user')}" alt="${_('user')}" src="${h.url('/images/icons/user.png')}"/>
106 106 ${entry.follows_user.full_contact}
107 107 %endif
108 108
109 109 %if entry.follows_repo_id:
110 110 <div style="float:right;padding-right:5px">
111 111 <span id="follow_toggle_${entry.follows_repository.repo_id}" class="following" title="${_('Stop following this repository')}"
112 112 onclick="javascript:toggleFollowingRepo(this,${entry.follows_repository.repo_id},'${str(h.get_token())}')">
113 113 </span>
114 114 </div>
115 115
116 116 %if entry.follows_repository.repo_type == 'hg':
117 117 <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/>
118 118 %elif entry.follows_repository.repo_type == 'git':
119 119 <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/>
120 120 %endif
121 121
122 122 %if entry.follows_repository.private:
123 123 <img class="icon" title="${_('private repository')}" alt="${_('private repository')}" src="${h.url('/images/icons/lock.png')}"/>
124 124 %else:
125 125 <img class="icon" title="${_('public repository')}" alt="${_('public repository')}" src="${h.url('/images/icons/lock_open.png')}"/>
126 126 %endif
127 127 <span class="watched_repo">
128 128 ${h.link_to(entry.follows_repository.repo_name,h.url('summary_home',repo_name=entry.follows_repository.repo_name))}
129 129 </span>
130 130 %endif
131 131 </td>
132 132 </tr>
133 133 %endfor
134 134 </tbody>
135 135 </table>
136 136 %else:
137 137 <div style="padding:5px 0px 10px 0px;">
138 138 ${_('You are not following any users or repositories')}
139 139 </div>
140 140 %endif
141 141 </div>
142 142 </div>
143 143
144 144 <script type="text/javascript">
145 145
146 146 YUE.on('show_my','click',function(e){
147 147 YUD.setStyle('watched','display','none');
148 148 YUD.setStyle('my','display','');
149 149 var nodes = YUQ('#my tr td a.repo_name');
150 150 var target = 'q_filter';
151 151 var func = function(node){
152 152 return node.parentNode.parentNode.parentNode.parentNode;
153 153 }
154 154 q_filter(target,nodes,func);
155 155 YUE.preventDefault(e);
156 156 })
157 157 YUE.on('show_watched','click',function(e){
158 158 YUD.setStyle('my','display','none');
159 159 YUD.setStyle('watched','display','');
160 160 var nodes = YUQ('#watched .watched_repo a');
161 161 var target = 'q_filter';
162 162 var func = function(node){
163 163 return node.parentNode.parentNode;
164 164 }
165 165 q_filter(target,nodes,func);
166 166 YUE.preventDefault(e);
167 167 })
168 168 YUE.on('refresh','click',function(e){
169 169 ypjax(e.currentTarget.href,"journal",function(){show_more_event();tooltip_activate();});
170 170 YUE.preventDefault(e);
171 171 });
172 172
173 173
174 174 // main table sorting
175 175 var myColumnDefs = [
176 176 {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"},
177 177 {key:"name",label:"${_('Name')}",sortable:true,
178 178 sortOptions: { sortFunction: nameSort }},
179 179 {key:"tip",label:"${_('Tip')}",sortable:true,
180 180 sortOptions: { sortFunction: revisionSort }},
181 181 {key:"action1",label:"",sortable:false},
182 182 {key:"action2",label:"",sortable:false},
183 183 ];
184 184
185 185 var myDataSource = new YAHOO.util.DataSource(YUD.get("repos_list"));
186 186
187 187 myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE;
188 188
189 189 myDataSource.responseSchema = {
190 190 fields: [
191 191 {key:"menu"},
192 192 {key:"name"},
193 193 {key:"tip"},
194 194 {key:"action1"},
195 195 {key:"action2"}
196 196 ]
197 197 };
198 198
199 199 var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource,
200 200 {
201 sortedBy:{key:"name",dir:"asc"},
202 MSG_SORTASC:"${_('Click to sort ascending')}",
203 MSG_SORTDESC:"${_('Click to sort descending')}"
201 sortedBy:{key:"name",dir:"asc"},
202 MSG_SORTASC:"${_('Click to sort ascending')}",
203 MSG_SORTDESC:"${_('Click to sort descending')}",
204 MSG_EMPTY:"${_('No records found.')}",
205 MSG_ERROR:"${_('Data error.')}",
206 MSG_LOADING:"${_('Loading...')}",
204 207 }
205 208 );
206 209 myDataTable.subscribe('postRenderEvent',function(oArgs) {
207 210 tooltip_activate();
208 211 quick_repo_menu();
209 212 var func = function(node){
210 213 return node.parentNode.parentNode.parentNode.parentNode;
211 214 }
212 215 q_filter('q_filter',YUQ('#my tr td a.repo_name'),func);
213 216 });
214 217
215 218
216 219 </script>
217 220 </%def>
General Comments 0
You need to be logged in to leave comments. Login now