##// END OF EJS Templates
changed all urls for IMAGES files to use pylons url function
marcink -
r1051:90eadff2 beta
parent child Browse files
Show More
@@ -1,95 +1,95 b''
1 1 <table id="permissions_manage">
2 2 <tr>
3 3 <td>${_('none')}</td>
4 4 <td>${_('read')}</td>
5 5 <td>${_('write')}</td>
6 6 <td>${_('admin')}</td>
7 7 <td>${_('member')}</td>
8 8 <td></td>
9 9 </tr>
10 10 ## USERS
11 11 <script type="text/javascript">
12 12 function ajaxActionUser(user_id,field_id){
13 13 var sUrl = "${h.url('delete_repo_user',repo_name=c.repo_name)}";
14 14 var callback = { success:function(o){
15 15 var tr = YUD.get(String(field_id));
16 16 tr.parentNode.removeChild(tr);},
17 17 failure:function(o){
18 18 alert("${_('Failed to remove user')}");},};
19 19 var postData = '_method=delete&user_id='+user_id;
20 20 var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData);};
21 21 </script>
22 22 %for r2p in c.repo_info.repo_to_perm:
23 23 %if r2p.user.username =='default' and c.repo_info.private:
24 24 <tr>
25 25 <td colspan="4">
26 26 <span class="private_repo_msg">
27 27 ${_('private repository')}
28 28 </span>
29 29 </td>
30 <td class="private_repo_msg"><img style="vertical-align:bottom" src="/images/icons/user.png"/>${r2p.user.username}</td>
30 <td class="private_repo_msg"><img style="vertical-align:bottom" src="${h.url("/images/icons/user.png")}"/>${r2p.user.username}</td>
31 31 </tr>
32 32 %else:
33 33 <tr id="id${id(r2p.user.username)}">
34 34 <td>${h.radio('u_perm_%s' % r2p.user.username,'repository.none')}</td>
35 35 <td>${h.radio('u_perm_%s' % r2p.user.username,'repository.read')}</td>
36 36 <td>${h.radio('u_perm_%s' % r2p.user.username,'repository.write')}</td>
37 37 <td>${h.radio('u_perm_%s' % r2p.user.username,'repository.admin')}</td>
38 <td style="white-space: nowrap;"><img style="vertical-align:bottom" src="/images/icons/user.png"/>${r2p.user.username}</td>
38 <td style="white-space: nowrap;"><img style="vertical-align:bottom" src="${h.url("/images/icons/user.png")}"/>${r2p.user.username}</td>
39 39 <td>
40 40 %if r2p.user.username !='default':
41 41 <span class="delete_icon action_button" onclick="ajaxActionUser(${r2p.user.user_id},'${'id%s'%id(r2p.user.username)}')">
42 42 </span>
43 43 %endif
44 44 </td>
45 45 </tr>
46 46 %endif
47 47 %endfor
48 48
49 49 ## USERS GROUPS
50 50 <script type="text/javascript">
51 51 function ajaxActionUsersGroup(users_group_id,field_id){
52 52 var sUrl = "${h.url('delete_repo_users_group',repo_name=c.repo_name)}";
53 53 var callback = { success:function(o){
54 54 var tr = YUD.get(String(field_id));
55 55 tr.parentNode.removeChild(tr);},
56 56 failure:function(o){
57 57 alert("${_('Failed to remove users group')}");},};
58 58 var postData = '_method=delete&users_group_id='+users_group_id;
59 59 var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData);};
60 60 </script>
61 61 %for g2p in c.repo_info.users_group_to_perm:
62 62 <tr id="id${id(g2p.users_group.users_group_name)}">
63 63 <td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'repository.none')}</td>
64 64 <td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'repository.read')}</td>
65 65 <td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'repository.write')}</td>
66 66 <td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'repository.admin')}</td>
67 <td><img style="vertical-align:bottom" src="/images/icons/group.png"/>${g2p.users_group.users_group_name}</td>
67 <td><img style="vertical-align:bottom" src="${h.url("/images/icons/group.png")}"/>${g2p.users_group.users_group_name}</td>
68 68 <td>
69 69 <span class="delete_icon action_button" onclick="ajaxActionUsersGroup(${g2p.users_group.users_group_id},'${'id%s'%id(g2p.users_group.users_group_name)}')">
70 70 </span>
71 71 </td>
72 72 </tr>
73 73 %endfor
74 74 <tr id="add_perm_input">
75 75 <td>${h.radio('perm_new_member','repository.none')}</td>
76 76 <td>${h.radio('perm_new_member','repository.read')}</td>
77 77 <td>${h.radio('perm_new_member','repository.write')}</td>
78 78 <td>${h.radio('perm_new_member','repository.admin')}</td>
79 79 <td class='ac'>
80 80 <div class="perm_ac" id="perm_ac">
81 81 ${h.text('perm_new_member_name',class_='yui-ac-input')}
82 82 ${h.hidden('perm_new_member_type')}
83 83 <div id="perm_container"></div>
84 84 </div>
85 85 </td>
86 86 <td></td>
87 87 </tr>
88 88 <tr>
89 89 <td colspan="6">
90 90 <span id="add_perm" class="add_icon" style="cursor: pointer;">
91 91 ${_('Add another member')}
92 92 </span>
93 93 </td>
94 94 </tr>
95 95 </table> No newline at end of file
@@ -1,88 +1,88 b''
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 <!-- box / title -->
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 NEW REPOSITORY',h.url('new_repo'))}</span>
23 23 </li>
24 24 </ul>
25 25 </div>
26 26 <!-- end box / title -->
27 27 <div class="table">
28 28 <table class="table_disp">
29 29 <tr class="header">
30 30 <th class="left">${_('Name')}</th>
31 31 <th class="left">${_('Description')}</th>
32 32 <th class="left">${_('Last change')}</th>
33 33 <th class="left">${_('Tip')}</th>
34 34 <th class="left">${_('Contact')}</th>
35 35 <th class="left">${_('action')}</th>
36 36 </tr>
37 37 %for cnt,repo in enumerate(c.repos_list):
38 38 <tr class="parity${cnt%2}">
39 39 <td>
40 40 ## TYPE OF REPO
41 41 %if repo['dbrepo']['repo_type'] =='hg':
42 <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="/images/icons/hgicon.png"/>
42 <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url("/images/icons/hgicon.png")}"/>
43 43 %elif repo['dbrepo']['repo_type'] =='git':
44 <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="/images/icons/giticon.png"/>
44 <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url("/images/icons/giticon.png")}"/>
45 45 %else:
46 46
47 47 %endif
48 48
49 49 ## PRIVATE/PUBLIC REPO
50 50 %if repo['dbrepo']['private']:
51 <img alt="${_('private')}" src="/images/icons/lock.png"/>
51 <img alt="${_('private')}" src="${h.url("/images/icons/lock.png")}"/>
52 52 %else:
53 <img alt="${_('public')}" src="/images/icons/lock_open.png"/>
53 <img alt="${_('public')}" src="${h.url("/images/icons/lock_open.png")}"/>
54 54 %endif
55 55 ${h.link_to(repo['name'],h.url('edit_repo',repo_name=repo['name']))}
56 56
57 57 %if repo['dbrepo_fork']:
58 58 <a href="${h.url('summary_home',repo_name=repo['dbrepo_fork']['repo_name'])}">
59 59 <img class="icon" alt="${_('public')}"
60 60 title="${_('Fork of')} ${repo['dbrepo_fork']['repo_name']}"
61 src="/images/icons/arrow_divide.png"/></a>
61 src="${h.url("/images/icons/arrow_divide.png")}"/></a>
62 62 %endif
63 63 </td>
64 64 <td title="${repo['description']}">${h.truncate(repo['description'],60)}</td>
65 65 <td>${h.age(repo['last_change'])}</td>
66 66 <td>
67 67 %if repo['rev']>=0:
68 68 ${h.link_to('r%s:%s' % (repo['rev'],h.short_id(repo['tip'])),
69 69 h.url('changeset_home',repo_name=repo['name'],revision=repo['tip']),
70 70 class_="tooltip",
71 71 title=h.tooltip(repo['last_msg']))}
72 72 %else:
73 73 ${_('No changesets yet')}
74 74 %endif
75 75 </td>
76 76 <td title="${repo['contact']}">${h.person(repo['contact'])}</td>
77 77 <td>
78 78 ${h.form(url('repo', repo_name=repo['name']),method='delete')}
79 79 ${h.submit('remove_%s' % repo['name'],'delete',class_="delete_icon action_button",onclick="return confirm('Confirm to delete this repository');")}
80 80 ${h.end_form()}
81 81 </td>
82 82 </tr>
83 83 %endfor
84 84 </table>
85 85 </div>
86 86 </div>
87 87
88 88 </%def>
@@ -1,243 +1,243 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="/base/base.html"/>
3 3
4 4 <%def name="title()">
5 5 ${_('Edit user')} ${c.user.username} - ${c.rhodecode_name}
6 6 </%def>
7 7
8 8 <%def name="breadcrumbs_links()">
9 9 ${h.link_to(_('Admin'),h.url('admin_home'))}
10 10 &raquo;
11 11 ${h.link_to(_('Users'),h.url('users'))}
12 12 &raquo;
13 13 ${_('edit')} "${c.user.username}"
14 14 </%def>
15 15
16 16 <%def name="page_nav()">
17 17 ${self.menu('admin')}
18 18 </%def>
19 19
20 20 <%def name="main()">
21 21 <div class="box box-left">
22 22 <!-- box / title -->
23 23 <div class="title">
24 24 ${self.breadcrumbs()}
25 25 </div>
26 26 <!-- end box / title -->
27 27 ${h.form(url('user', id=c.user.user_id),method='put')}
28 28 <div class="form">
29 29 <!-- fields -->
30 30 <div class="fields">
31 31 <div class="field">
32 32 <div class="gravatar_box">
33 33 <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(c.user.email)}"/></div>
34 34 <p>
35 35 <strong>Change your avatar at <a href="http://gravatar.com">gravatar.com</a></strong><br/>
36 36 ${_('Using')} ${c.user.email}
37 37 </p>
38 38 </div>
39 39 </div>
40 40
41 41 <div class="field">
42 42 <div class="label">
43 43 <label for="username">${_('Username')}:</label>
44 44 </div>
45 45 <div class="input">
46 46 ${h.text('username',class_='medium')}
47 47 </div>
48 48 </div>
49 49
50 50 <div class="field">
51 51 <div class="label">
52 52 <label for="ldap_dn">${_('LDAP DN')}:</label>
53 53 </div>
54 54 <div class="input">
55 55 ${h.text('ldap_dn',class_='small')}
56 56 </div>
57 57 </div>
58 58
59 59 <div class="field">
60 60 <div class="label">
61 61 <label for="new_password">${_('New password')}:</label>
62 62 </div>
63 63 <div class="input">
64 64 ${h.password('new_password',class_='medium')}
65 65 </div>
66 66 </div>
67 67
68 68 <div class="field">
69 69 <div class="label">
70 70 <label for="name">${_('First Name')}:</label>
71 71 </div>
72 72 <div class="input">
73 73 ${h.text('name',class_='medium')}
74 74 </div>
75 75 </div>
76 76
77 77 <div class="field">
78 78 <div class="label">
79 79 <label for="lastname">${_('Last Name')}:</label>
80 80 </div>
81 81 <div class="input">
82 82 ${h.text('lastname',class_='medium')}
83 83 </div>
84 84 </div>
85 85
86 86 <div class="field">
87 87 <div class="label">
88 88 <label for="email">${_('Email')}:</label>
89 89 </div>
90 90 <div class="input">
91 91 ${h.text('email',class_='medium')}
92 92 </div>
93 93 </div>
94 94
95 95 <div class="field">
96 96 <div class="label label-checkbox">
97 97 <label for="active">${_('Active')}:</label>
98 98 </div>
99 99 <div class="checkboxes">
100 100 ${h.checkbox('active',value=True)}
101 101 </div>
102 102 </div>
103 103
104 104 <div class="field">
105 105 <div class="label label-checkbox">
106 106 <label for="admin">${_('Admin')}:</label>
107 107 </div>
108 108 <div class="checkboxes">
109 109 ${h.checkbox('admin',value=True)}
110 110 </div>
111 111 </div>
112 112 <div class="buttons">
113 113 ${h.submit('save','Save',class_="ui-button")}
114 114 ${h.reset('reset','Reset',class_="ui-button")}
115 115 </div>
116 116 </div>
117 117 </div>
118 118 ${h.end_form()}
119 119 </div>
120 120 <div class="box box-right">
121 121 <!-- box / title -->
122 122 <div class="title">
123 123 <h5>${_('Permissions')}</h5>
124 124 </div>
125 125 <form id="map_form" method="post" action="{%url update_permissions %}">
126 126 <div class="form">
127 127 <div class="fields">
128 128
129 129
130 130
131 131 <table>
132 132 <tr>
133 133 <td class="label">${_('Permissions')}:</td>
134 134 <td>
135 135 <div>
136 136 <div style="float:left">
137 137 <div class="text">${_('Granted permissions')}</div>
138 138 ${h.select('granted_permissions',[],c.granted_permissions,multiple=True,size=8,style="min-width:210px")}
139 139 </div>
140 140 <div style="float:left;width:20px;padding-top:50px">
141 141 <img alt="add" id="add_element"
142 142 style="padding:2px;cursor:pointer"
143 src="/images/icons/arrow_left.png">
143 src="${h.url("/images/icons/arrow_left.png")}">
144 144 <br />
145 145 <img alt="remove" id="remove_element"
146 146 style="padding:2px;cursor:pointer"
147 src="/images/icons/arrow_right.png">
147 src="${h.url("/images/icons/arrow_right.png")}">
148 148 </div>
149 149 <div style="float:left">
150 150 <div class="text">${_('Available permissions')}</div>
151 151 ${h.select('available_permissions',[],c.available_permissions,multiple=True,size=8,style="min-width:210px")}
152 152 </div>
153 153 </div>
154 154 </td>
155 155 </tr>
156 156
157 157 </table>
158 158 <div class="buttons">
159 159 ${h.submit('Save','Save',class_="ui-button")}
160 160 </div>
161 161 </div>
162 162 </div>
163 163 </form>
164 164
165 165
166 166 <script type="text/javascript">
167 167 YAHOO.util.Event.onDOMReady(function(){
168 168
169 169 var D = YAHOO.util.Dom;
170 170 var E = YAHOO.util.Event;
171 171
172 172 //temp container for storage.
173 173 var cache = new Array();
174 174 var c = D.get('id_granted_permissions');
175 175
176 176 //get only selected options for further fullfilment
177 177 for(var i = 0;node =c.options[i];i++){
178 178 if(node.selected){
179 179 //push selected to my temp storage left overs :)
180 180 cache.push(node);
181 181 }
182 182 }
183 183
184 184 //clear select
185 185 c.options.length = 0;
186 186
187 187 //fill it with remembered options
188 188 for(var i = 0;node = cache[i];i++){
189 189 c.options[i]=new Option(node.text, node.value, false, false);
190 190 }
191 191
192 192 function target_callback(e){
193 193 window.location='/admin/t4?g='+e.target.value;
194 194 }
195 195
196 196 function prompts_action_callback(e){
197 197
198 198 var choosen = D.get('id_granted_permissions');
199 199 var availible = D.get('id_available_permissions');
200 200
201 201 if (this.id=='add_element'){
202 202 for(var i=0; node = availible.options[i];i++){
203 203 if(node.selected){
204 204 choosen.appendChild(new Option(node.text, node.value, false, false));
205 205 }
206 206 }
207 207 }
208 208 else if (this.id=='remove_element'){
209 209
210 210 //temp container for storage.
211 211 cache = new Array();
212 212
213 213 for(var i = 0;node = choosen.options[i];i++){
214 214 if(!node.selected){
215 215 //push left overs :)
216 216 cache.push(node);
217 217 }
218 218 }
219 219 //clear select
220 220 choosen.options.length = 0;
221 221 for(var i = 0;node = cache[i];i++){
222 222 choosen.options[i]=new Option(node.text, node.value, false, false);
223 223 }
224 224 }
225 225 else{
226 226
227 227 }
228 228 }
229 229
230 230 E.addListener('id_groups','change',target_callback);
231 231
232 232 E.addListener(['add_element','remove_element'],'click',prompts_action_callback)
233 233
234 234 E.addListener('map_form','submit',function(){
235 235 var choosen = D.get('id_granted_permissions');
236 236 for (var i = 0; i < choosen.options.length; i++) {
237 237 choosen.options[i].selected = 'selected';
238 238 }
239 239 })
240 240 });
241 241 </script>
242 242 </div>
243 243 </%def>
@@ -1,207 +1,207 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="/base/base.html"/>
3 3
4 4 <%def name="title()">
5 5 ${_('My account')} ${c.rhodecode_user.username} - ${c.rhodecode_name}
6 6 </%def>
7 7
8 8 <%def name="breadcrumbs_links()">
9 9 ${_('My Account')}
10 10 </%def>
11 11
12 12 <%def name="page_nav()">
13 13 ${self.menu('admin')}
14 14 </%def>
15 15
16 16 <%def name="main()">
17 17
18 18 <div class="box box-left">
19 19 <!-- box / title -->
20 20 <div class="title">
21 21 ${self.breadcrumbs()}
22 22 </div>
23 23 <!-- end box / title -->
24 24 <div>
25 25 ${h.form(url('admin_settings_my_account_update'),method='put')}
26 26 <div class="form">
27 27
28 28 <div class="field">
29 29 <div class="gravatar_box">
30 30 <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(c.user.email)}"/></div>
31 31 <p>
32 32 <strong>Change your avatar at <a href="http://gravatar.com">gravatar.com</a></strong><br/>
33 33 ${_('Using')} ${c.user.email}
34 34 </p>
35 35 </div>
36 36 </div>
37 37
38 38 <div class="fields">
39 39 <div class="field">
40 40 <div class="label">
41 41 <label for="username">${_('Username')}:</label>
42 42 </div>
43 43 <div class="input">
44 44 ${h.text('username',class_="medium")}
45 45 </div>
46 46 </div>
47 47
48 48 <div class="field">
49 49 <div class="label">
50 50 <label for="new_password">${_('New password')}:</label>
51 51 </div>
52 52 <div class="input">
53 53 ${h.password('new_password',class_="medium")}
54 54 </div>
55 55 </div>
56 56
57 57 <div class="field">
58 58 <div class="label">
59 59 <label for="name">${_('First Name')}:</label>
60 60 </div>
61 61 <div class="input">
62 62 ${h.text('name',class_="medium")}
63 63 </div>
64 64 </div>
65 65
66 66 <div class="field">
67 67 <div class="label">
68 68 <label for="lastname">${_('Last Name')}:</label>
69 69 </div>
70 70 <div class="input">
71 71 ${h.text('lastname',class_="medium")}
72 72 </div>
73 73 </div>
74 74
75 75 <div class="field">
76 76 <div class="label">
77 77 <label for="email">${_('Email')}:</label>
78 78 </div>
79 79 <div class="input">
80 80 ${h.text('email',class_="medium")}
81 81 </div>
82 82 </div>
83 83
84 84 <div class="buttons">
85 85 ${h.submit('save','Save',class_="ui-button")}
86 86 ${h.reset('reset','Reset',class_="ui-button")}
87 87 </div>
88 88 </div>
89 89 </div>
90 90 ${h.end_form()}
91 91 </div>
92 92 </div>
93 93
94 94 <div class="box box-right">
95 95 <!-- box / title -->
96 96 <div class="title">
97 97 <h5>${_('My repositories')}
98 98 <input class="top-right-rounded-corner top-left-rounded-corner bottom-left-rounded-corner bottom-right-rounded-corner" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}"/>
99 99 </h5>
100 100 %if h.HasPermissionAny('hg.admin','hg.create.repository')():
101 101 <ul class="links">
102 102 <li>
103 103 <span>${h.link_to(_('ADD REPOSITORY'),h.url('admin_settings_create_repository'))}</span>
104 104 </li>
105 105 </ul>
106 106 %endif
107 107 </div>
108 108 <!-- end box / title -->
109 109 <div class="table">
110 110 <table>
111 111 <thead>
112 112 <tr>
113 113 <th class="left">${_('Name')}</th>
114 114 <th class="left">${_('revision')}</th>
115 115 <th colspan="2" class="left">${_('action')}</th>
116 116 </thead>
117 117 <tbody>
118 118 %if c.user_repos:
119 119 %for repo in c.user_repos:
120 120 <tr>
121 121 <td>
122 122 %if repo['dbrepo']['repo_type'] =='hg':
123 <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="/images/icons/hgicon.png"/>
123 <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url("/images/icons/hgicon.png")}"/>
124 124 %elif repo['dbrepo']['repo_type'] =='git':
125 <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="/images/icons/giticon.png"/>
125 <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url("/images/icons/giticon.png")}"/>
126 126 %else:
127 127
128 128 %endif
129 129 %if repo['dbrepo']['private']:
130 <img class="icon" alt="${_('private')}" src="/images/icons/lock.png"/>
130 <img class="icon" alt="${_('private')}" src="${h.url("/images/icons/lock.png")}"/>
131 131 %else:
132 <img class="icon" alt="${_('public')}" src="/images/icons/lock_open.png"/>
132 <img class="icon" alt="${_('public')}" src="${h.url("/images/icons/lock_open.png")}"/>
133 133 %endif
134 134
135 135 ${h.link_to(repo['repo'].name, h.url('summary_home',repo_name=repo['repo'].name),class_="repo_name")}
136 136 %if repo['dbrepo_fork']:
137 137 <a href="${h.url('summary_home',repo_name=repo['dbrepo_fork']['repo_name'])}">
138 138 <img class="icon" alt="${_('public')}"
139 139 title="${_('Fork of')} ${repo['dbrepo_fork']['repo_name']}"
140 src="/images/icons/arrow_divide.png"/></a>
140 src="${h.url("/images/icons/arrow_divide.png")}"/></a>
141 141 %endif
142 142 </td>
143 143 <td><span class="tooltip" title="${repo['repo'].last_change}">${("r%s:%s") % (h.get_changeset_safe(repo['repo'],'tip').revision,h.short_id(h.get_changeset_safe(repo['repo'],'tip').raw_id))}</span></td>
144 <td><a href="${h.url('repo_settings_home',repo_name=repo['repo'].name)}" title="${_('edit')}"><img class="icon" alt="${_('private')}" src="/images/icons/application_form_edit.png"/></a></td>
144 <td><a href="${h.url('repo_settings_home',repo_name=repo['repo'].name)}" title="${_('edit')}"><img class="icon" alt="${_('private')}" src="${h.url("/images/icons/application_form_edit.png")}"/></a></td>
145 145 <td>
146 146 ${h.form(url('repo_settings_delete', repo_name=repo['repo'].name),method='delete')}
147 147 ${h.submit('remove_%s' % repo['repo'].name,'',class_="delete_icon action_button",onclick="return confirm('Confirm to delete this repository');")}
148 148 ${h.end_form()}
149 149 </td>
150 150 </tr>
151 151 %endfor
152 152 %else:
153 153 ${_('No repositories yet')}
154 154 %if h.HasPermissionAny('hg.admin','hg.create.repository')():
155 155 ${h.link_to(_('create one now'),h.url('admin_settings_create_repository'))}
156 156 %endif
157 157 %endif
158 158 </tbody>
159 159 </table>
160 160 </div>
161 161
162 162 </div>
163 163 <script type="text/javascript">
164 164 var D = YAHOO.util.Dom;
165 165 var E = YAHOO.util.Event;
166 166 var S = YAHOO.util.Selector;
167 167
168 168 var q_filter = D.get('q_filter');
169 169 var F = YAHOO.namespace('q_filter');
170 170
171 171 E.on(q_filter,'click',function(){
172 172 q_filter.value = '';
173 173 });
174 174
175 175 F.filterTimeout = null;
176 176
177 177 F.updateFilter = function() {
178 178 // Reset timeout
179 179 F.filterTimeout = null;
180 180
181 181 var obsolete = [];
182 182 var nodes = S.query('div.table tr td a.repo_name');
183 183 var req = D.get('q_filter').value;
184 184 for (n in nodes){
185 185 D.setStyle(nodes[n].parentNode.parentNode,'display','')
186 186 }
187 187 if (req){
188 188 for (n in nodes){
189 189 if (nodes[n].innerHTML.toLowerCase().indexOf(req) == -1) {
190 190 obsolete.push(nodes[n]);
191 191 }
192 192 }
193 193 if(obsolete){
194 194 for (n in obsolete){
195 195 D.setStyle(obsolete[n].parentNode.parentNode,'display','none');
196 196 }
197 197 }
198 198 }
199 199 }
200 200
201 201 E.on(q_filter,'keyup',function(e){
202 202 clearTimeout(F.filterTimeout);
203 203 setTimeout(F.updateFilter,600);
204 204 });
205 205
206 206 </script>
207 207 </%def> No newline at end of file
@@ -1,246 +1,246 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="/base/base.html"/>
3 3
4 4 <%def name="title()">
5 5 ${_('Edit users group')} ${c.users_group.users_group_name} - ${c.rhodecode_name}
6 6 </%def>
7 7
8 8 <%def name="breadcrumbs_links()">
9 9 ${h.link_to(_('Admin'),h.url('admin_home'))}
10 10 &raquo;
11 11 ${h.link_to(_('UsersGroups'),h.url('users_groups'))}
12 12 &raquo;
13 13 ${_('edit')} "${c.users_group.users_group_name}"
14 14 </%def>
15 15
16 16 <%def name="page_nav()">
17 17 ${self.menu('admin')}
18 18 </%def>
19 19
20 20 <%def name="main()">
21 21 <div class="box">
22 22 <!-- box / title -->
23 23 <div class="title">
24 24 ${self.breadcrumbs()}
25 25 </div>
26 26 <!-- end box / title -->
27 27 ${h.form(url('users_group', id=c.users_group.users_group_id),method='put', id='edit_users_group')}
28 28 <div class="form">
29 29 <!-- fields -->
30 30 <div class="fields">
31 31 <div class="field">
32 32 <div class="label">
33 33 <label for="users_group_name">${_('Group name')}:</label>
34 34 </div>
35 35 <div class="input">
36 36 ${h.text('users_group_name',class_='small')}
37 37 </div>
38 38 </div>
39 39
40 40 <div class="field">
41 41 <div class="label label-checkbox">
42 42 <label for="users_group_active">${_('Active')}:</label>
43 43 </div>
44 44 <div class="checkboxes">
45 45 ${h.checkbox('users_group_active',value=True)}
46 46 </div>
47 47 </div>
48 48 <div class="field">
49 49 <div class="label">
50 50 <label for="users_group_active">${_('Members')}:</label>
51 51 </div>
52 52 <div class="select">
53 53 <table>
54 54 <tr>
55 55 <td>
56 56 <div>
57 57 <div style="float:left">
58 58 <div class="text" style="padding: 0px 0px 6px;">${_('Choosen group members')}</div>
59 59 ${h.select('users_group_members',[x[0] for x in c.group_members],c.group_members,multiple=True,size=8,style="min-width:210px")}
60 60 <div id="remove_all_elements" style="cursor:pointer;text-align:center">
61 61 ${_('Remove all elements')}
62 <img alt="remove" style="vertical-align:text-bottom" src="/images/icons/arrow_right.png"/>
62 <img alt="remove" style="vertical-align:text-bottom" src="${h.url("/images/icons/arrow_right.png")}"/>
63 63 </div>
64 64 </div>
65 65 <div style="float:left;width:20px;padding-top:50px">
66 66 <img alt="add" id="add_element"
67 67 style="padding:2px;cursor:pointer"
68 src="/images/icons/arrow_left.png"/>
68 src="${h.url("/images/icons/arrow_left.png")}"/>
69 69 <br />
70 70 <img alt="remove" id="remove_element"
71 71 style="padding:2px;cursor:pointer"
72 src="/images/icons/arrow_right.png"/>
72 src="${h.url("/images/icons/arrow_right.png")}"/>
73 73 </div>
74 74 <div style="float:left">
75 75 <div class="text" style="padding: 0px 0px 6px;">${_('Available members')}</div>
76 76 ${h.select('available_members',[],c.available_members,multiple=True,size=8,style="min-width:210px")}
77 77 <div id="add_all_elements" style="cursor:pointer;text-align:center">
78 <img alt="add" style="vertical-align:text-bottom" src="/images/icons/arrow_left.png"/>
78 <img alt="add" style="vertical-align:text-bottom" src="${h.url("/images/icons/arrow_left.png")}"/>
79 79 ${_('Add all elements')}
80 80 </div>
81 81 </div>
82 82 </div>
83 83 </td>
84 84 </tr>
85 85 </table>
86 86 </div>
87 87
88 88 </div>
89 89 <div class="buttons">
90 90 ${h.submit('save','save',class_="ui-button")}
91 91 </div>
92 92 </div>
93 93 </div>
94 94 ${h.end_form()}
95 95 </div>
96 96
97 97 <script type="text/javascript">
98 98 YAHOO.util.Event.onDOMReady(function(){
99 99 var D = YAHOO.util.Dom;
100 100 var E = YAHOO.util.Event;
101 101
102 102 //definition of containers ID's
103 103 var available_container = 'available_members';
104 104 var selected_container = 'users_group_members';
105 105
106 106 //form containing containers id
107 107 var form_id = 'edit_users_group';
108 108
109 109 //temp container for selected storage.
110 110 var cache = new Array();
111 111 var av_cache = new Array();
112 112 var c = D.get(selected_container);
113 113 var ac = D.get(available_container);
114 114
115 115 //get only selected options for further fullfilment
116 116 for(var i = 0;node =c.options[i];i++){
117 117 if(node.selected){
118 118 //push selected to my temp storage left overs :)
119 119 cache.push(node);
120 120 }
121 121 }
122 122
123 123 //clear 'selected' select
124 124 //c.options.length = 0;
125 125
126 126 //fill it with remembered options
127 127 //for(var i = 0;node = cache[i];i++){
128 128 // c.options[i]=new Option(node.text, node.value, false, false);
129 129 //}
130 130
131 131
132 132 //get all available options to cache
133 133 for(var i = 0;node =ac.options[i];i++){
134 134 //push selected to my temp storage left overs :)
135 135 av_cache.push(node);
136 136 }
137 137
138 138 //fill available only with those not in choosen
139 139 ac.options.length=0;
140 140 tmp_cache = new Array();
141 141
142 142 for(var i = 0;node = av_cache[i];i++){
143 143 var add = true;
144 144 for(var i2 = 0;node_2 = cache[i2];i2++){
145 145 if(node.value == node_2.value){
146 146 add=false;
147 147 break;
148 148 }
149 149 }
150 150 if(add){
151 151 tmp_cache.push(new Option(node.text, node.value, false, false));
152 152 }
153 153 }
154 154
155 155 for(var i = 0;node = tmp_cache[i];i++){
156 156 ac.options[i] = node;
157 157 }
158 158
159 159 function prompts_action_callback(e){
160 160
161 161 var choosen = D.get(selected_container);
162 162 var available = D.get(available_container);
163 163
164 164 //get checked and unchecked options from field
165 165 function get_checked(from_field){
166 166 //temp container for storage.
167 167 var sel_cache = new Array();
168 168 var oth_cache = new Array();
169 169
170 170 for(var i = 0;node = from_field.options[i];i++){
171 171 if(node.selected){
172 172 //push selected fields :)
173 173 sel_cache.push(node);
174 174 }
175 175 else{
176 176 oth_cache.push(node)
177 177 }
178 178 }
179 179
180 180 return [sel_cache,oth_cache]
181 181 }
182 182
183 183 //fill the field with given options
184 184 function fill_with(field,options){
185 185 //clear firtst
186 186 field.options.length=0;
187 187 for(var i = 0;node = options[i];i++){
188 188 field.options[i]=new Option(node.text, node.value,
189 189 false, false);
190 190 }
191 191
192 192 }
193 193 //adds to current field
194 194 function add_to(field,options){
195 195 for(var i = 0;node = options[i];i++){
196 196 field.appendChild(new Option(node.text, node.value,
197 197 false, false));
198 198 }
199 199 }
200 200
201 201 // add action
202 202 if (this.id=='add_element'){
203 203 var c = get_checked(available);
204 204 add_to(choosen,c[0]);
205 205 fill_with(available,c[1]);
206 206 }
207 207 // remove action
208 208 if (this.id=='remove_element'){
209 209 var c = get_checked(choosen);
210 210 add_to(available,c[0]);
211 211 fill_with(choosen,c[1]);
212 212 }
213 213 // add all elements
214 214 if(this.id=='add_all_elements'){
215 215 for(var i=0; node = available.options[i];i++){
216 216 choosen.appendChild(new Option(node.text,
217 217 node.value, false, false));
218 218 }
219 219 available.options.length = 0;
220 220 }
221 221 //remove all elements
222 222 if(this.id=='remove_all_elements'){
223 223 for(var i=0; node = choosen.options[i];i++){
224 224 available.appendChild(new Option(node.text,
225 225 node.value, false, false));
226 226 }
227 227 choosen.options.length = 0;
228 228 }
229 229
230 230 }
231 231
232 232
233 233 E.addListener(['add_element','remove_element',
234 234 'add_all_elements','remove_all_elements'],'click',
235 235 prompts_action_callback)
236 236
237 237 E.addListener(form_id,'submit',function(){
238 238 var choosen = D.get(selected_container);
239 239 for (var i = 0; i < choosen.options.length; i++) {
240 240 choosen.options[i].selected = 'selected';
241 241 }
242 242 })
243 243 });
244 244 </script>
245 245
246 246 </%def> No newline at end of file
@@ -1,392 +1,392 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 3 <html xmlns="http://www.w3.org/1999/xhtml" id="mainhtml">
4 4 <head>
5 5 <title>${next.title()}</title>
6 6 <link rel="icon" href="${h.url('/images/icons/database_gear.png')}" type="image/png" />
7 7 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
8 8 <meta name="robots" content="index, nofollow"/>
9 9 <!-- stylesheets -->
10 10 ${self.css()}
11 11 <!-- scripts -->
12 12 ${self.js()}
13 13 %if c.ga_code:
14 14 <script type="text/javascript">
15 15
16 16 var _gaq = _gaq || [];
17 17 _gaq.push(['_setAccount', '${c.ga_code}']);
18 18 _gaq.push(['_trackPageview']);
19 19
20 20 (function() {
21 21 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
22 22 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
23 23 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
24 24 })();
25 25
26 26
27 27 </script>
28 28 %endif
29 29 </head>
30 30 <body>
31 31 <!-- header -->
32 32 <div id="header">
33 33 <!-- user -->
34 34 <ul id="logged-user">
35 35 <li class="first">
36 36 <div class="gravatar">
37 37 <img alt="gravatar" src="${h.gravatar_url(c.rhodecode_user.email,20)}" />
38 38 </div>
39 39 <div class="account">
40 40 %if c.rhodecode_user.username == 'default':
41 41 %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')():
42 42 ${h.link_to('anonymous',h.url('register'),title='%s %s'%(c.rhodecode_user.name,c.rhodecode_user.lastname))}
43 43 %else:
44 44 ${h.link_to('anonymous',h.url('#'),title='%s %s'%(c.rhodecode_user.name,c.rhodecode_user.lastname))}
45 45 %endif
46 46
47 47 %else:
48 48 ${h.link_to(c.rhodecode_user.username,h.url('admin_settings_my_account'),title='%s %s'%(c.rhodecode_user.name,c.rhodecode_user.lastname))}
49 49 %endif
50 50 </div>
51 51 </li>
52 52 <li>
53 53 <a href="${h.url('home')}">${_('Home')}</a>
54 54 </li>
55 55 %if c.rhodecode_user.username != 'default':
56 56 <li>
57 57 <a href="${h.url('journal')}">${_('Journal')}</a>
58 58 ##(${c.unread_journal})</a>
59 59 </li>
60 60 %endif
61 61 %if c.rhodecode_user.username == 'default':
62 62 <li class="last highlight">${h.link_to(u'Login',h.url('login_home'))}</li>
63 63 %else:
64 64 <li class="last highlight">${h.link_to(u'Log Out',h.url('logout_home'))}</li>
65 65 %endif
66 66 </ul>
67 67 <!-- end user -->
68 68 <div id="header-inner" class="title top-left-rounded-corner top-right-rounded-corner">
69 69 <!-- logo -->
70 70 <div id="logo">
71 71 <h1><a href="${h.url('home')}">${c.rhodecode_name}</a></h1>
72 72 </div>
73 73 <!-- end logo -->
74 74 <!-- menu -->
75 75 ${self.page_nav()}
76 76 <!-- quick -->
77 77 </div>
78 78 </div>
79 79 <!-- end header -->
80 80
81 81 <!-- CONTENT -->
82 82 <div id="content">
83 83 <div class="flash_msg">
84 84 <% messages = h.flash.pop_messages() %>
85 85 % if messages:
86 86 <ul id="flash-messages">
87 87 % for message in messages:
88 88 <li class="${message.category}_msg">${message}</li>
89 89 % endfor
90 90 </ul>
91 91 % endif
92 92 </div>
93 93 <div id="main">
94 94 ${next.main()}
95 95 </div>
96 96 </div>
97 97 <!-- END CONTENT -->
98 98
99 99 <!-- footer -->
100 100 <div id="footer">
101 101 <div id="footer-inner" class="title bottom-left-rounded-corner bottom-right-rounded-corner">
102 102 <div>
103 103 <p class="footer-link">${h.link_to(_('Submit a bug'),h.url('bugtracker'))}</p>
104 104 <p class="footer-link">${h.link_to(_('GPL license'),h.url('gpl_license'))}</p>
105 105 <p>RhodeCode ${c.rhodecode_version} &copy; 2010-2011 by Marcin Kuzminski</p>
106 106 </div>
107 107 </div>
108 108 <script type="text/javascript">
109 109 function tooltip_activate(){
110 110 ${h.tooltip.activate()}
111 111 }
112 112 tooltip_activate();
113 113 </script>
114 114 </div>
115 115 <!-- end footer -->
116 116 </body>
117 117
118 118 </html>
119 119
120 120 ### MAKO DEFS ###
121 121 <%def name="page_nav()">
122 122 ${self.menu()}
123 123 </%def>
124 124
125 125 <%def name="menu(current=None)">
126 126 <%
127 127 def is_current(selected):
128 128 if selected == current:
129 129 return h.literal('class="current"')
130 130 %>
131 131 %if current not in ['home','admin']:
132 132 ##REGULAR MENU
133 133 <ul id="quick">
134 134 <!-- repo switcher -->
135 135 <li>
136 136 <a id="repo_switcher" title="${_('Switch repository')}" href="#">
137 137 <span class="icon">
138 <img src="/images/icons/database.png" alt="${_('Products')}" />
138 <img src="${h.url("/images/icons/database.png")}" alt="${_('Products')}" />
139 139 </span>
140 140 <span>&darr;</span>
141 141 </a>
142 142 <ul class="repo_switcher">
143 143 %for repo in c.cached_repo_list:
144 144
145 145 %if repo['dbrepo']['private']:
146 <li><img src="/images/icons/lock.png" alt="${_('Private repository')}" class="repo_switcher_type"/>${h.link_to(repo['repo'].name,h.url('summary_home',repo_name=repo['repo'].name),class_="%s" % repo['dbrepo']['repo_type'])}</li>
146 <li><img src="${h.url("/images/icons/lock.png")}" alt="${_('Private repository')}" class="repo_switcher_type"/>${h.link_to(repo['repo'].name,h.url('summary_home',repo_name=repo['repo'].name),class_="%s" % repo['dbrepo']['repo_type'])}</li>
147 147 %else:
148 <li><img src="/images/icons/lock_open.png" alt="${_('Public repository')}" class="repo_switcher_type" />${h.link_to(repo['repo'].name,h.url('summary_home',repo_name=repo['repo'].name),class_="%s" % repo['dbrepo']['repo_type'])}</li>
148 <li><img src="${h.url("/images/icons/lock_open.png")}" alt="${_('Public repository')}" class="repo_switcher_type" />${h.link_to(repo['repo'].name,h.url('summary_home',repo_name=repo['repo'].name),class_="%s" % repo['dbrepo']['repo_type'])}</li>
149 149 %endif
150 150 %endfor
151 151 </ul>
152 152 </li>
153 153
154 154 <li ${is_current('summary')}>
155 155 <a title="${_('Summary')}" href="${h.url('summary_home',repo_name=c.repo_name)}">
156 156 <span class="icon">
157 <img src="/images/icons/clipboard_16.png" alt="${_('Summary')}" />
157 <img src="${h.url("/images/icons/clipboard_16.png")}" alt="${_('Summary')}" />
158 158 </span>
159 159 <span>${_('Summary')}</span>
160 160 </a>
161 161 </li>
162 162 ##<li ${is_current('shortlog')}>
163 163 ## <a title="${_('Shortlog')}" href="${h.url('shortlog_home',repo_name=c.repo_name)}">
164 164 ## <span class="icon">
165 ## <img src="/images/icons/application_view_list.png" alt="${_('Shortlog')}" />
165 ## <img src="${h.url("/images/icons/application_view_list.png")}" alt="${_('Shortlog')}" />
166 166 ## </span>
167 167 ## <span>${_('Shortlog')}</span>
168 168 ## </a>
169 169 ##</li>
170 170 <li ${is_current('changelog')}>
171 171 <a title="${_('Changelog')}" href="${h.url('changelog_home',repo_name=c.repo_name)}">
172 172 <span class="icon">
173 <img src="/images/icons/time.png" alt="${_('Changelog')}" />
173 <img src="${h.url("/images/icons/time.png")}" alt="${_('Changelog')}" />
174 174 </span>
175 175 <span>${_('Changelog')}</span>
176 176 </a>
177 177 </li>
178 178
179 179 <li ${is_current('switch_to')}>
180 180 <a title="${_('Switch to')}" href="#">
181 181 <span class="icon">
182 <img src="/images/icons/arrow_switch.png" alt="${_('Switch to')}" />
182 <img src="${h.url("/images/icons/arrow_switch.png")}" alt="${_('Switch to')}" />
183 183 </span>
184 184 <span>${_('Switch to')}</span>
185 185 </a>
186 186 <ul>
187 187 <li>
188 188 ${h.link_to('%s (%s)' % (_('branches'),len(c.rhodecode_repo.branches.values()),),h.url('branches_home',repo_name=c.repo_name),class_='branches childs')}
189 189 <ul>
190 190 %if c.rhodecode_repo.branches.values():
191 191 %for cnt,branch in enumerate(c.rhodecode_repo.branches.items()):
192 192 <li>${h.link_to('%s - %s' % (branch[0],h.short_id(branch[1])),h.url('files_home',repo_name=c.repo_name,revision=branch[1]))}</li>
193 193 %endfor
194 194 %else:
195 195 <li>${h.link_to(_('There are no branches yet'),'#')}</li>
196 196 %endif
197 197 </ul>
198 198 </li>
199 199 <li>
200 200 ${h.link_to('%s (%s)' % (_('tags'),len(c.rhodecode_repo.tags.values()),),h.url('tags_home',repo_name=c.repo_name),class_='tags childs')}
201 201 <ul>
202 202 %if c.rhodecode_repo.tags.values():
203 203 %for cnt,tag in enumerate(c.rhodecode_repo.tags.items()):
204 204 <li>${h.link_to('%s - %s' % (tag[0],h.short_id(tag[1])),h.url('files_home',repo_name=c.repo_name,revision=tag[1]))}</li>
205 205 %endfor
206 206 %else:
207 207 <li>${h.link_to(_('There are no tags yet'),'#')}</li>
208 208 %endif
209 209 </ul>
210 210 </li>
211 211 </ul>
212 212 </li>
213 213 <li ${is_current('files')}>
214 214 <a title="${_('Files')}" href="${h.url('files_home',repo_name=c.repo_name)}">
215 215 <span class="icon">
216 <img src="/images/icons/file.png" alt="${_('Files')}" />
216 <img src="${h.url("/images/icons/file.png")}" alt="${_('Files')}" />
217 217 </span>
218 218 <span>${_('Files')}</span>
219 219 </a>
220 220 </li>
221 221
222 222 <li ${is_current('options')}>
223 223 <a title="${_('Options')}" href="#">
224 224 <span class="icon">
225 <img src="/images/icons/table_gear.png" alt="${_('Admin')}" />
225 <img src="${h.url("/images/icons/table_gear.png")}" alt="${_('Admin')}" />
226 226 </span>
227 227 <span>${_('Options')}</span>
228 228 </a>
229 229 <ul>
230 230 %if h.HasRepoPermissionAll('repository.admin')(c.repo_name):
231 231 %if h.HasPermissionAll('hg.admin')('access settings on repository'):
232 232 <li>${h.link_to(_('settings'),h.url('edit_repo',repo_name=c.repo_name),class_='settings')}</li>
233 233 %else:
234 234 <li>${h.link_to(_('settings'),h.url('repo_settings_home',repo_name=c.repo_name),class_='settings')}</li>
235 235 %endif
236 236 <li>${h.link_to(_('fork'),h.url('repo_fork_home',repo_name=c.repo_name),class_='fork')}</li>
237 237 %endif
238 238 <li>${h.link_to(_('search'),h.url('search_repo',search_repo=c.repo_name),class_='search')}</li>
239 239
240 240 %if h.HasPermissionAll('hg.admin')('access admin main page'):
241 241 <li>
242 242 ${h.link_to(_('admin'),h.url('admin_home'),class_='admin')}
243 243 <%def name="admin_menu()">
244 244 <ul>
245 245 <li>${h.link_to(_('journal'),h.url('admin_home'),class_='journal')}</li>
246 246 <li>${h.link_to(_('repositories'),h.url('repos'),class_='repos')}</li>
247 247 <li>${h.link_to(_('users'),h.url('users'),class_='users')}</li>
248 248 <li>${h.link_to(_('users groups'),h.url('users_groups'),class_='groups')}</li>
249 249 <li>${h.link_to(_('permissions'),h.url('edit_permission',id='default'),class_='permissions')}</li>
250 250 <li>${h.link_to(_('ldap'),h.url('ldap_home'),class_='ldap')}</li>
251 251 <li class="last">${h.link_to(_('settings'),h.url('admin_settings'),class_='settings')}</li>
252 252 </ul>
253 253 </%def>
254 254
255 255 ${admin_menu()}
256 256 </li>
257 257 %endif
258 258
259 259 </ul>
260 260 </li>
261 261
262 262 <li>
263 263 <a title="${_('Followers')}" href="#">
264 264 <span class="icon_short">
265 <img src="/images/icons/heart.png" alt="${_('Followers')}" />
265 <img src="${h.url("/images/icons/heart.png")}" alt="${_('Followers')}" />
266 266 </span>
267 267 <span class="short">${c.repository_followers}</span>
268 268 </a>
269 269 </li>
270 270 <li>
271 271 <a title="${_('Forks')}" href="#">
272 272 <span class="icon_short">
273 <img src="/images/icons/arrow_divide.png" alt="${_('Forks')}" />
273 <img src="${h.url("/images/icons/arrow_divide.png")}" alt="${_('Forks')}" />
274 274 </span>
275 275 <span class="short">${c.repository_forks}</span>
276 276 </a>
277 277 </li>
278 278
279 279
280 280
281 281 </ul>
282 282 %else:
283 283 ##ROOT MENU
284 284 <ul id="quick">
285 285 <li>
286 286 <a title="${_('Home')}" href="${h.url('home')}">
287 287 <span class="icon">
288 <img src="/images/icons/home_16.png" alt="${_('Home')}" />
288 <img src="${h.url("/images/icons/home_16.png")}" alt="${_('Home')}" />
289 289 </span>
290 290 <span>${_('Home')}</span>
291 291 </a>
292 292 </li>
293 293 %if c.rhodecode_user.username != 'default':
294 294 <li>
295 295 <a title="${_('Journal')}" href="${h.url('journal')}">
296 296 <span class="icon">
297 <img src="/images/icons/book.png" alt="${_('Journal')}" />
297 <img src="${h.url("/images/icons/book.png")}" alt="${_('Journal')}" />
298 298 </span>
299 299 <span>${_('Journal')}</span>
300 300 </a>
301 301 </li>
302 302 %endif
303 303 <li>
304 304 <a title="${_('Search')}" href="${h.url('search')}">
305 305 <span class="icon">
306 <img src="/images/icons/search_16.png" alt="${_('Search')}" />
306 <img src="${h.url("/images/icons/search_16.png")}" alt="${_('Search')}" />
307 307 </span>
308 308 <span>${_('Search')}</span>
309 309 </a>
310 310 </li>
311 311
312 312 %if h.HasPermissionAll('hg.admin')('access admin main page'):
313 313 <li ${is_current('admin')}>
314 314 <a title="${_('Admin')}" href="${h.url('admin_home')}">
315 315 <span class="icon">
316 <img src="/images/icons/cog_edit.png" alt="${_('Admin')}" />
316 <img src="${h.url("/images/icons/cog_edit.png")}" alt="${_('Admin')}" />
317 317 </span>
318 318 <span>${_('Admin')}</span>
319 319 </a>
320 320 ${admin_menu()}
321 321 </li>
322 322 %endif
323 323 </ul>
324 324 %endif
325 325 </%def>
326 326
327 327
328 328 <%def name="css()">
329 329 <link rel="stylesheet" type="text/css" href="${h.url('/css/style.css')}" media="screen" />
330 330 <link rel="stylesheet" type="text/css" href="${h.url('/css/pygments.css')}" />
331 331 <link rel="stylesheet" type="text/css" href="${h.url('/css/diff.css')}" />
332 332 </%def>
333 333
334 334 <%def name="js()">
335 335 ##<script type="text/javascript" src="${h.url('/js/yui/utilities/utilities.js')}"></script>
336 336 ##<script type="text/javascript" src="${h.url('/js/yui/container/container.js')}"></script>
337 337 ##<script type="text/javascript" src="${h.url('/js/yui/datasource/datasource.js')}"></script>
338 338 ##<script type="text/javascript" src="${h.url('/js/yui/autocomplete/autocomplete.js')}"></script>
339 339 ##<script type="text/javascript" src="${h.url('/js/yui/selector/selector-min.js')}"></script>
340 340
341 341 <script type="text/javascript" src="${h.url('/js/yui2a.js')}"></script>
342 342 <!--[if IE]><script language="javascript" type="text/javascript" src="${h.url('/js/excanvas.min.js')}"></script><![endif]-->
343 343 <script type="text/javascript" src="${h.url('/js/yui.flot.js')}"></script>
344 344
345 345 <script type="text/javascript">
346 346 var base_url = "${h.url('toggle_following')}";
347 347 var YUC = YAHOO.util.Connect;
348 348 var YUD = YAHOO.util.Dom;
349 349 var YUE = YAHOO.util.Event;
350 350
351 351 function onSuccess(target){
352 352
353 353 var f = YUD.get(target.id);
354 354 if(f.getAttribute('class')=='follow'){
355 355 f.setAttribute('class','following');
356 356 f.setAttribute('title',"${_('Stop following this repository')}");
357 357 }
358 358 else{
359 359 f.setAttribute('class','follow');
360 360 f.setAttribute('title',"${_('Start following this repository')}");
361 361 }
362 362 }
363 363
364 364 function toggleFollowingUser(fallows_user_id,token){
365 365 args = 'follows_user_id='+fallows_user_id;
366 366 args+= '&amp;auth_token='+token;
367 367 YUC.asyncRequest('POST',base_url,{
368 368 success:function(o){
369 369 onSuccess();
370 370 }
371 371 },args); return false;
372 372 }
373 373
374 374 function toggleFollowingRepo(target,fallows_repo_id,token){
375 375
376 376 args = 'follows_repo_id='+fallows_repo_id;
377 377 args+= '&amp;auth_token='+token;
378 378 YUC.asyncRequest('POST',base_url,{
379 379 success:function(o){
380 380 onSuccess(target);
381 381 }
382 382 },args); return false;
383 383 }
384 384 </script>
385 385
386 386 </%def>
387 387
388 388 <%def name="breadcrumbs()">
389 389 <div class="breadcrumbs">
390 390 ${self.breadcrumbs_links()}
391 391 </div>
392 392 </%def> No newline at end of file
@@ -1,161 +1,161 b''
1 1 ## -*- coding: utf-8 -*-
2 2
3 3 <%inherit file="/base/base.html"/>
4 4
5 5 <%def name="title()">
6 6 ${c.repo_name} ${_('Changelog')} - ${c.rhodecode_name}
7 7 </%def>
8 8
9 9 <%def name="breadcrumbs_links()">
10 10 ${h.link_to(u'Home',h.url('/'))}
11 11 &raquo;
12 12 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
13 13 &raquo;
14 14 ${_('Changelog')} - ${_('showing ')} ${c.size if c.size <= c.total_cs else c.total_cs} ${_('out of')} ${c.total_cs} ${_('revisions')}
15 15 </%def>
16 16
17 17 <%def name="page_nav()">
18 18 ${self.menu('changelog')}
19 19 </%def>
20 20
21 21 <%def name="main()">
22 22 <div class="box">
23 23 <!-- box / title -->
24 24 <div class="title">
25 25 ${self.breadcrumbs()}
26 26 </div>
27 27 <div class="table">
28 28 % if c.pagination:
29 29 <div id="graph">
30 30 <div id="graph_nodes">
31 31 <canvas id="graph_canvas"></canvas>
32 32 </div>
33 33 <div id="graph_content">
34 34 <div class="container_header">
35 35 ${h.form(h.url.current(),method='get')}
36 36 <div class="info_box">
37 37 <span>${_('Show')}:</span>
38 38 ${h.text('size',size=1,value=c.size)}
39 39 <span>${_('revisions')}</span>
40 40 ${h.submit('set',_('set'))}
41 41
42 42 </div>
43 43 ${h.end_form()}
44 44 <div id="rev_range_container" style="display:none"></div>
45 45 </div>
46 46
47 47 %for cnt,cs in enumerate(c.pagination):
48 48 <div id="chg_${cnt+1}" class="container">
49 49 <div class="left">
50 50 <div class="date">
51 51 ${h.checkbox(cs.short_id,class_="changeset_range")}
52 52 <span>${_('commit')} ${cs.revision}: ${h.short_id(cs.raw_id)}@${cs.date}</span>
53 53 </div>
54 54 <div class="author">
55 55 <div class="gravatar">
56 56 <img alt="gravatar" src="${h.gravatar_url(h.email(cs.author),20)}"/>
57 57 </div>
58 58 <span>${h.person(cs.author)}</span><br/>
59 59 <span><a href="mailto:${h.email_or_none(cs.author)}">${h.email_or_none(cs.author)}</a></span><br/>
60 60 </div>
61 61 <div class="message">${h.link_to(h.wrap_paragraphs(cs.message),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div>
62 62 </div>
63 63 <div class="right">
64 64 <div class="changes">
65 65 <span class="removed tooltip" title="<b>${_('removed')}</b>${h.changed_tooltip(cs.removed)}">${len(cs.removed)}</span>
66 66 <span class="changed tooltip" title="<b>${_('changed')}</b>${h.changed_tooltip(cs.changed)}">${len(cs.changed)}</span>
67 67 <span class="added tooltip" title="<b>${_('added')}</b>${h.changed_tooltip(cs.added)}">${len(cs.added)}</span>
68 68 </div>
69 69 %if len(cs.parents)>1:
70 70 <div class="merge">
71 ${_('merge')}<img alt="merge" src="/images/icons/arrow_join.png"/>
71 ${_('merge')}<img alt="merge" src="${h.url("/images/icons/arrow_join.png")}"/>
72 72 </div>
73 73 %endif
74 74 %if cs.parents:
75 75 %for p_cs in reversed(cs.parents):
76 76 <div class="parent">${_('Parent')} ${p_cs.revision}: ${h.link_to(h.short_id(p_cs.raw_id),
77 77 h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}
78 78 </div>
79 79 %endfor
80 80 %else:
81 81 <div class="parent">${_('No parents')}</div>
82 82 %endif
83 83
84 84 <span class="logtags">
85 85 %if cs.branch:
86 86 <span class="branchtag" title="${'%s %s' % (_('branch'),cs.branch)}">
87 87 ${h.link_to(cs.branch,h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}</span>
88 88 %endif
89 89 %for tag in cs.tags:
90 90 <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}">
91 91 ${h.link_to(tag,h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}</span>
92 92 %endfor
93 93 </span>
94 94 </div>
95 95 </div>
96 96
97 97 %endfor
98 98 <div class="pagination-wh pagination-left">
99 99 ${c.pagination.pager('$link_previous ~2~ $link_next')}
100 100 </div>
101 101 </div>
102 102 </div>
103 103
104 104 <script type="text/javascript" src="${h.url('/js/graph.js')}"></script>
105 105 <script type="text/javascript">
106 106 YAHOO.util.Event.onDOMReady(function(){
107 107
108 108 //Monitor range checkboxes and build a link to changesets
109 109 //ranges
110 110 var checkboxes = YUD.getElementsByClassName('changeset_range');
111 111 var url_tmpl = "${h.url('changeset_home',repo_name=c.repo_name,revision='__REVRANGE__')}";
112 112 YUE.on(checkboxes,'click',function(e){
113 113 var checked_checkboxes = [];
114 114 for (pos in checkboxes){
115 115 if(checkboxes[pos].checked){
116 116 checked_checkboxes.push(checkboxes[pos]);
117 117 }
118 118 }
119 119 if(checked_checkboxes.length>1){
120 120 var rev_end = checked_checkboxes[0].name;
121 121 var rev_start = checked_checkboxes[checked_checkboxes.length-1].name;
122 122
123 123 var url = url_tmpl.replace('__REVRANGE__',
124 124 rev_start+'...'+rev_end);
125 125
126 126 var link = "<a href="+url+">${_('Show selected changes __S -> __E')}</a>"
127 127 link = link.replace('__S',rev_start);
128 128 link = link.replace('__E',rev_end);
129 129 YUD.get('rev_range_container').innerHTML = link;
130 130 YUD.setStyle('rev_range_container','display','');
131 131 }
132 132 else{
133 133 YUD.setStyle('rev_range_container','display','none');
134 134
135 135 }
136 136 });
137 137
138 138 function set_canvas() {
139 139 var c = document.getElementById('graph_nodes');
140 140 var t = document.getElementById('graph_content');
141 141 canvas = document.getElementById('graph_canvas');
142 142 var div_h = t.clientHeight;
143 143 c.style.height=div_h+'px';
144 144 canvas.setAttribute('height',div_h);
145 145 canvas.setAttribute('width',160);
146 146 };
147 147 set_canvas();
148 148 var jsdata = ${c.jsdata|n};
149 149 var r = new BranchRenderer();
150 150 r.render(jsdata);
151 151
152 152
153 153
154 154 });
155 155 </script>
156 156 %else:
157 157 ${_('There are no changes yet')}
158 158 %endif
159 159 </div>
160 160 </div>
161 161 </%def> No newline at end of file
@@ -1,122 +1,122 b''
1 1 <%inherit file="/base/base.html"/>
2 2
3 3 <%def name="title()">
4 4 ${c.repo_name} ${_('Changeset')} - r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)} - ${c.rhodecode_name}
5 5 </%def>
6 6
7 7 <%def name="breadcrumbs_links()">
8 8 ${h.link_to(u'Home',h.url('/'))}
9 9 &raquo;
10 10 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
11 11 &raquo;
12 12 ${_('Changeset')} - r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)}
13 13 </%def>
14 14
15 15 <%def name="page_nav()">
16 16 ${self.menu('changelog')}
17 17 </%def>
18 18
19 19 <%def name="main()">
20 20 <div class="box">
21 21 <!-- box / title -->
22 22 <div class="title">
23 23 ${self.breadcrumbs()}
24 24 </div>
25 25 <div class="table">
26 26 <div class="diffblock">
27 27 <div class="code-header">
28 28 <div>
29 29 ${_('Changeset')} - r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)}
30 30 &raquo; <span>${h.link_to(_('raw diff'),
31 31 h.url('raw_changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='show'))}</span>
32 32 &raquo; <span>${h.link_to(_('download diff'),
33 33 h.url('raw_changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='download'))}</span>
34 34 </div>
35 35 </div>
36 36 </div>
37 37 <div id="changeset_content">
38 38 <div class="container">
39 39 <div class="left">
40 40 <div class="date">${_('commit')} ${c.changeset.revision}: ${h.short_id(c.changeset.raw_id)}@${c.changeset.date}</div>
41 41 <div class="author">
42 42 <div class="gravatar">
43 43 <img alt="gravatar" src="${h.gravatar_url(h.email(c.changeset.author),20)}"/>
44 44 </div>
45 45 <span>${h.person(c.changeset.author)}</span><br/>
46 46 <span><a href="mailto:${h.email_or_none(c.changeset.author)}">${h.email_or_none(c.changeset.author)}</a></span><br/>
47 47 </div>
48 48 <div class="message">${h.link_to(h.wrap_paragraphs(c.changeset.message),h.url('changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}</div>
49 49 </div>
50 50 <div class="right">
51 51 <div class="changes">
52 52 <span class="removed" title="${_('removed')}">${len(c.changeset.removed)}</span>
53 53 <span class="changed" title="${_('changed')}">${len(c.changeset.changed)}</span>
54 54 <span class="added" title="${_('added')}">${len(c.changeset.added)}</span>
55 55 </div>
56 56 %if len(c.changeset.parents)>1:
57 57 <div class="merge">
58 ${_('merge')}<img alt="merge" src="/images/icons/arrow_join.png"/>
58 ${_('merge')}<img alt="merge" src="${h.url("/images/icons/arrow_join.png")}"/>
59 59 </div>
60 60 %endif
61 61
62 62 %if c.changeset.parents:
63 63 %for p_cs in reversed(c.changeset.parents):
64 64 <div class="parent">${_('Parent')} ${p_cs.revision}: ${h.link_to(h.short_id(p_cs.raw_id),
65 65 h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}
66 66 </div>
67 67 %endfor
68 68 %else:
69 69 <div class="parent">${_('No parents')}</div>
70 70 %endif
71 71 <span class="logtags">
72 72 <span class="branchtag" title="${'%s %s' % (_('branch'),c.changeset.branch)}">
73 73 ${h.link_to(c.changeset.branch,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}</span>
74 74 %for tag in c.changeset.tags:
75 75 <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}">
76 76 ${h.link_to(tag,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}</span>
77 77 %endfor
78 78 </span>
79 79 </div>
80 80 </div>
81 81 <span style="font-size:1.1em;font-weight: bold">${_('Files affected')}</span>
82 82 <div class="cs_files">
83 83 %for change,filenode,diff,cs1,cs2 in c.changes:
84 84 <div class="cs_${change}">${h.link_to(filenode.path,h.url.current(anchor=h.repo_name_slug('C%s' % filenode.path)))}</div>
85 85 %endfor
86 86 </div>
87 87 </div>
88 88
89 89 </div>
90 90
91 91 %for change,filenode,diff,cs1,cs2 in c.changes:
92 92 %if change !='removed':
93 93 <div style="clear:both;height:10px"></div>
94 94 <div class="diffblock">
95 95 <div id="${h.repo_name_slug('C%s' % filenode.path)}" class="code-header">
96 96 <div class="changeset_header">
97 97 <span class="changeset_file">
98 98 ${h.link_to_if(change!='removed',filenode.path,h.url('files_home',repo_name=c.repo_name,
99 99 revision=filenode.changeset.raw_id,f_path=filenode.path))}
100 100 </span>
101 101 %if 1:
102 102 &raquo; <span>${h.link_to(_('diff'),
103 103 h.url('files_diff_home',repo_name=c.repo_name,f_path=filenode.path,diff2=cs2,diff1=cs1,diff='diff'))}</span>
104 104 &raquo; <span>${h.link_to(_('raw diff'),
105 105 h.url('files_diff_home',repo_name=c.repo_name,f_path=filenode.path,diff2=cs2,diff1=cs1,diff='raw'))}</span>
106 106 &raquo; <span>${h.link_to(_('download diff'),
107 107 h.url('files_diff_home',repo_name=c.repo_name,f_path=filenode.path,diff2=cs2,diff1=cs1,diff='download'))}</span>
108 108 %endif
109 109 </div>
110 110 </div>
111 111 <div class="code-body">
112 112 %if diff:
113 113 ${diff|n}
114 114 %else:
115 115 ${_('No changes in this file')}
116 116 %endif
117 117 </div>
118 118 </div>
119 119 %endif
120 120 %endfor
121 121 </div>
122 122 </%def> No newline at end of file
@@ -1,54 +1,54 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 3 <html xmlns="http://www.w3.org/1999/xhtml" id="mainhtml">
4 4 <head>
5 5 <title>Error - ${c.error_message}</title>
6 6 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
7 7 %if c.redirect_time:
8 8 <meta http-equiv="refresh" content="${c.redirect_time}; url=${c.url_redirect}"/>
9 9 %endif
10 <link rel="icon" href="/images/hgicon.png" type="image/png" />
10 <link rel="icon" href="${h.url("/images/hgicon.png")}" type="image/png" />
11 11 <meta name="robots" content="index, nofollow"/>
12 12
13 13 <!-- stylesheets -->
14 14 <link rel="stylesheet" type="text/css" href="${h.url('/css/style.css')}" media="screen" />
15 15 <style type="text/css">
16 16 #main_div{
17 17 border: 0px solid #000;
18 18 width: 500px;
19 19 margin: auto;
20 20 text-align: center;
21 21 margin-top: 200px;
22 22 font-size: 1.6em;
23 23 }
24 24 .error_message{
25 25 text-align: center;
26 26 color:#003367;
27 27 font-size: 1.6em;
28 28 margin:10px;
29 29 }
30 30 </style>
31 31
32 32 </head>
33 33 <body>
34 34
35 35 <div id="login">
36 36 <div class="table">
37 37 <div id="main_div">
38 38 <div style="font-size:2.0em;margin: 10px">${c.rhodecode_name}</div>
39 39 <h1 class="error_message">${c.error_message}</h1>
40 40
41 41 <p>${c.error_explanation}</p>
42 42
43 43 %if c.redirect_time:
44 44 <p>${_('You will be redirected to %s in %s seconds') % (c.redirect_module,c.redirect_time)}</p>
45 45 %endif
46 46
47 47 </div>
48 48 </div>
49 49 <!-- end login -->
50 50 </div>
51 51 </body>
52 52
53 53 </html>
54 54
@@ -1,168 +1,168 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="base/base.html"/>
3 3 <%def name="title()">
4 4 ${_('Dashboard')} - ${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 <%def name="get_sort(name)">
14 14 <%name_slug = name.lower().replace(' ','_') %>
15 15
16 16 %if name_slug == c.sort_slug:
17 17 %if c.sort_by.startswith('-'):
18 18 <a href="?sort=${name_slug}">${name}&uarr;</a>
19 19 %else:
20 20 <a href="?sort=-${name_slug}">${name}&darr;</a>
21 21 %endif:
22 22 %else:
23 23 <a href="?sort=${name_slug}">${name}</a>
24 24 %endif
25 25 </%def>
26 26
27 27 <div class="box">
28 28 <!-- box / title -->
29 29 <div class="title">
30 30 <h5>${_('Dashboard')}
31 31 <input class="top-right-rounded-corner top-left-rounded-corner bottom-left-rounded-corner bottom-right-rounded-corner" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}"/>
32 32 </h5>
33 33 %if c.rhodecode_user.username != 'default':
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 NEW REPOSITORY'),h.url('admin_settings_create_repository'))}</span>
38 38 </li>
39 39 </ul>
40 40 %endif
41 41 %endif
42 42 </div>
43 43 <!-- end box / title -->
44 44 <div class="table">
45 45 <table>
46 46 <thead>
47 47 <tr>
48 48 <th class="left">${get_sort(_('Name'))}</th>
49 49 <th class="left">${get_sort(_('Description'))}</th>
50 50 <th class="left">${get_sort(_('Last change'))}</th>
51 51 <th class="left">${get_sort(_('Tip'))}</th>
52 52 <th class="left">${get_sort(_('Owner'))}</th>
53 53 <th class="left">${_('RSS')}</th>
54 54 <th class="left">${_('Atom')}</th>
55 55 </tr>
56 56 </thead>
57 57 <tbody>
58 58 %for cnt,repo in enumerate(c.repos_list):
59 59 <tr class="parity${cnt%2}">
60 60 <td>
61 61 <div style="white-space: nowrap">
62 62 ## TYPE OF REPO
63 63 %if repo['dbrepo']['repo_type'] =='hg':
64 <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="/images/icons/hgicon.png"/>
64 <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url("/images/icons/hgicon.png")}"/>
65 65 %elif repo['dbrepo']['repo_type'] =='git':
66 <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="/images/icons/giticon.png"/>
66 <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url("/images/icons/giticon.png")}"/>
67 67 %else:
68 68
69 69 %endif
70 70
71 71 ##PRIVATE/PUBLIC
72 72 %if repo['dbrepo']['private']:
73 <img class="icon" title="${_('private repository')}" alt="${_('private repository')}" src="/images/icons/lock.png"/>
73 <img class="icon" title="${_('private repository')}" alt="${_('private repository')}" src="${h.url("/images/icons/lock.png")}"/>
74 74 %else:
75 <img class="icon" title="${_('public repository')}" alt="${_('public repository')}" src="/images/icons/lock_open.png"/>
75 <img class="icon" title="${_('public repository')}" alt="${_('public repository')}" src="${h.url("/images/icons/lock_open.png")}"/>
76 76 %endif
77 77
78 78 ##NAME
79 79 ${h.link_to(repo['name'],
80 80 h.url('summary_home',repo_name=repo['name']),class_="repo_name")}
81 81 %if repo['dbrepo_fork']:
82 82 <a href="${h.url('summary_home',repo_name=repo['dbrepo_fork']['repo_name'])}">
83 83 <img class="icon" alt="${_('fork')}"
84 84 title="${_('Fork of')} ${repo['dbrepo_fork']['repo_name']}"
85 src="/images/icons/arrow_divide.png"/></a>
85 src="${h.url("/images/icons/arrow_divide.png")}"/></a>
86 86 %endif
87 87 </div>
88 88 </td>
89 89 ##DESCRIPTION
90 90 <td><span class="tooltip" title="${h.tooltip(repo['description'])}">
91 91 ${h.truncate(repo['description'],60)}</span>
92 92 </td>
93 93 ##LAST CHANGE
94 94 <td>
95 95 <span class="tooltip" title="${repo['last_change']}">
96 96 ${h.age(repo['last_change'])}</span>
97 97 </td>
98 98 <td>
99 99 %if repo['rev']>=0:
100 100 ${h.link_to('r%s:%s' % (repo['rev'],h.short_id(repo['tip'])),
101 101 h.url('changeset_home',repo_name=repo['name'],revision=repo['tip']),
102 102 class_="tooltip",
103 103 title=h.tooltip(repo['last_msg']))}
104 104 %else:
105 105 ${_('No changesets yet')}
106 106 %endif
107 107 </td>
108 108 <td title="${repo['contact']}">${h.person(repo['contact'])}</td>
109 109 <td>
110 110 <a title="${_('Subscribe to %s rss feed')%repo['name']}" class="rss_icon" href="${h.url('rss_feed_home',repo_name=repo['name'])}"></a>
111 111 </td>
112 112 <td>
113 113 <a title="${_('Subscribe to %s atom feed')%repo['name']}" class="atom_icon" href="${h.url('atom_feed_home',repo_name=repo['name'])}"></a>
114 114 </td>
115 115 </tr>
116 116 %endfor
117 117 </tbody>
118 118 </table>
119 119 </div>
120 120 </div>
121 121
122 122
123 123 <script type="text/javascript">
124 124 var D = YAHOO.util.Dom;
125 125 var E = YAHOO.util.Event;
126 126 var S = YAHOO.util.Selector;
127 127
128 128 var q_filter = D.get('q_filter');
129 129 var F = YAHOO.namespace('q_filter');
130 130
131 131 E.on(q_filter,'click',function(){
132 132 q_filter.value = '';
133 133 });
134 134
135 135 F.filterTimeout = null;
136 136
137 137 F.updateFilter = function() {
138 138 // Reset timeout
139 139 F.filterTimeout = null;
140 140
141 141 var obsolete = [];
142 142 var nodes = S.query('div.table tr td div a.repo_name');
143 143 var req = D.get('q_filter').value;
144 144 for (n in nodes){
145 145 D.setStyle(nodes[n].parentNode.parentNode.parentNode,'display','')
146 146 }
147 147 if (req){
148 148 for (n in nodes){
149 149 if (nodes[n].innerHTML.toLowerCase().indexOf(req) == -1) {
150 150 obsolete.push(nodes[n]);
151 151 }
152 152 }
153 153 if(obsolete){
154 154 for (n in obsolete){
155 155 D.setStyle(obsolete[n].parentNode.parentNode.parentNode,'display','none');
156 156 }
157 157 }
158 158 }
159 159 }
160 160
161 161 E.on(q_filter,'keyup',function(e){
162 162 clearTimeout(F.filterTimeout);
163 163 setTimeout(F.updateFilter,600);
164 164 });
165 165
166 166 </script>
167 167
168 168 </%def>
@@ -1,69 +1,69 b''
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 </div>
19 19 <script type="text/javascript">
20 20 function show_more_event(){
21 21 YUE.on(YUD.getElementsByClassName('show_more'),'click',function(e){
22 22 var el = e.target;
23 23 YUD.setStyle(YUD.get(el.id.substring(1)),'display','');
24 24 YUD.setStyle(el.parentNode,'display','none');
25 25 });
26 26 }
27 27 </script>
28 28 <div id="journal">${c.journal_data}</div>
29 29 </div>
30 30
31 31 <div class="box box-right">
32 32 <!-- box / title -->
33 33 <div class="title">
34 34 <h5>${_('Following')}</h5>
35 35 </div>
36 36 <div>
37 37 %if c.following:
38 38 %for entry in c.following:
39 39 <div class="currently_following">
40 40 %if entry.follows_user_id:
41 <img title="${_('following user')}" alt="${_('user')}" src="/images/icons/user.png"/>
41 <img title="${_('following user')}" alt="${_('user')}" src="${h.url("/images/icons/user.png")}"/>
42 42 ${entry.follows_user.full_contact}
43 43 %endif
44 44
45 45 %if entry.follows_repo_id:
46 46
47 47 <div style="float:left;padding-right:5px">
48 48 <span id="follow_toggle_${entry.follows_repository.repo_id}" class="following" title="${_('Stop following this repository')}"
49 49 onclick="javascript:toggleFollowingRepo(this,${entry.follows_repository.repo_id},'${str(h.get_token())}')">
50 50 </span>
51 51 </div>
52 52 %if entry.follows_repository.private:
53 <img class="icon" title="${_('private repository')}" alt="${_('private repository')}" src="/images/icons/lock.png"/>
53 <img class="icon" title="${_('private repository')}" alt="${_('private repository')}" src="${h.url("/images/icons/lock.png")}"/>
54 54 %else:
55 <img class="icon" title="${_('public repository')}" alt="${_('public repository')}" src="/images/icons/lock_open.png"/>
55 <img class="icon" title="${_('public repository')}" alt="${_('public repository')}" src="${h.url("/images/icons/lock_open.png")}"/>
56 56 %endif
57 57
58 58 ${h.link_to(entry.follows_repository.repo_name,h.url('summary_home',
59 59 repo_name=entry.follows_repository.repo_name))}
60 60
61 61 %endif
62 62 </div>
63 63 %endfor
64 64 %else:
65 65 ${_('You are not following any users or repositories')}
66 66 %endif
67 67 </div>
68 68 </div>
69 69 </%def>
@@ -1,72 +1,72 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 3 <html xmlns="http://www.w3.org/1999/xhtml" id="mainhtml">
4 4 <head>
5 5 <title>${_('Sign In')} - ${c.rhodecode_name}</title>
6 6 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
7 <link rel="icon" href="/images/icons/database_gear.png" type="image/png" />
7 <link rel="icon" href="${h.url("/images/icons/database_gear.png")}" type="image/png" />
8 8 <meta name="robots" content="index, nofollow"/>
9 9
10 10 <!-- stylesheets -->
11 11 <link rel="stylesheet" type="text/css" href="${h.url('/css/style.css')}" media="screen" />
12 12
13 13 </head>
14 14 <body>
15 15 <div id="login">
16 16 <!-- login -->
17 17 <div class="title top-left-rounded-corner top-right-rounded-corner">
18 18 <h5>${_('Sign In to')} ${c.rhodecode_name}</h5>
19 19 </div>
20 20 <div class="inner">
21 21 ${h.form(h.url.current(came_from=c.came_from))}
22 22 <div class="form">
23 23 <!-- fields -->
24 24
25 25 <div class="fields">
26 26 <div class="field">
27 27 <div class="label">
28 28 <label for="username">${_('Username')}:</label>
29 29 </div>
30 30 <div class="input">
31 31 ${h.text('username',class_='focus',size=40)}
32 32 </div>
33 33
34 34 </div>
35 35 <div class="field">
36 36 <div class="label">
37 37 <label for="password">${_('Password')}:</label>
38 38 </div>
39 39 <div class="input">
40 40 ${h.password('password',class_='focus',size=40)}
41 41 </div>
42 42
43 43 </div>
44 44 ##<div class="field">
45 45 ## <div class="checkbox">
46 46 ## <input type="checkbox" id="remember" name="remember" />
47 47 ## <label for="remember">Remember me</label>
48 48 ## </div>
49 49 ##</div>
50 50 <div class="buttons">
51 51 ${h.submit('sign_in','Sign In',class_="ui-button")}
52 52 </div>
53 53 </div>
54 54 <!-- end fields -->
55 55 <!-- links -->
56 56 <div class="links">
57 57 ${h.link_to(_('Forgot your password ?'),h.url('reset_password'))}
58 58 %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')():
59 59 /
60 60 ${h.link_to(_("Don't have an account ?"),h.url('register'))}
61 61 %endif
62 62 </div>
63 63
64 64 <!-- end links -->
65 65 </div>
66 66 ${h.end_form()}
67 67 </div>
68 68 <!-- end login -->
69 69 </div>
70 70 </body>
71 71 </html>
72 72
@@ -1,48 +1,48 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 3 <html xmlns="http://www.w3.org/1999/xhtml" id="mainhtml">
4 4 <head>
5 5 <title>${_('Reset You password')} - ${c.rhodecode_name}</title>
6 6 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
7 <link rel="icon" href="/images/hgicon.png" type="image/png" />
7 <link rel="icon" href="${h.url("/images/hgicon.png")}" type="image/png" />
8 8 <meta name="robots" content="index, nofollow"/>
9 9
10 10 <!-- stylesheets -->
11 11 <link rel="stylesheet" type="text/css" href="${h.url('/css/style.css')}" media="screen" />
12 12
13 13 </head>
14 14 <body>
15 15 <div id="register">
16 16
17 17 <div class="title top-left-rounded-corner top-right-rounded-corner">
18 18 <h5>${_('Reset You password to')} ${c.rhodecode_name}</h5>
19 19 </div>
20 20 <div class="inner">
21 21 ${h.form(url('password_reset'))}
22 22 <div class="form">
23 23 <!-- fields -->
24 24 <div class="fields">
25 25
26 26 <div class="field">
27 27 <div class="label">
28 28 <label for="email">${_('Email address')}:</label>
29 29 </div>
30 30 <div class="input">
31 31 ${h.text('email')}
32 32 </div>
33 33 </div>
34 34
35 35 <div class="buttons">
36 36 <div class="nohighlight">
37 37 ${h.submit('send','Reset my password',class_="ui-button")}
38 38 <div class="activation_msg">${_('Your new password will be send to matching email address')}</div>
39 39 </div>
40 40 </div>
41 41 </div>
42 42 </div>
43 43 ${h.end_form()}
44 44 </div>
45 45 </div>
46 46 </body>
47 47 </html>
48 48
@@ -1,96 +1,96 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 3 <html xmlns="http://www.w3.org/1999/xhtml" id="mainhtml">
4 4 <head>
5 5 <title>${_('Sign Up')} - ${c.rhodecode_name}</title>
6 6 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
7 <link rel="icon" href="/images/hgicon.png" type="image/png" />
7 <link rel="icon" href="${h.url("/images/hgicon.png")}" type="image/png" />
8 8 <meta name="robots" content="index, nofollow"/>
9 9
10 10 <!-- stylesheets -->
11 11 <link rel="stylesheet" type="text/css" href="${h.url('/css/style.css')}" media="screen" />
12 12
13 13 </head>
14 14 <body>
15 15 <div id="register">
16 16
17 17 <div class="title top-left-rounded-corner top-right-rounded-corner">
18 18 <h5>${_('Sign Up to')} ${c.rhodecode_name}</h5>
19 19 </div>
20 20 <div class="inner">
21 21 ${h.form(url('register'))}
22 22 <div class="form">
23 23 <!-- fields -->
24 24 <div class="fields">
25 25 <div class="field">
26 26 <div class="label">
27 27 <label for="username">${_('Username')}:</label>
28 28 </div>
29 29 <div class="input">
30 30 ${h.text('username',class_="medium")}
31 31 </div>
32 32 </div>
33 33
34 34 <div class="field">
35 35 <div class="label">
36 36 <label for="password">${_('Password')}:</label>
37 37 </div>
38 38 <div class="input">
39 39 ${h.password('password',class_="medium")}
40 40 </div>
41 41 </div>
42 42
43 43 <div class="field">
44 44 <div class="label">
45 45 <label for="password">${_('Re-enter password')}:</label>
46 46 </div>
47 47 <div class="input">
48 48 ${h.password('password_confirmation',class_="medium")}
49 49 </div>
50 50 </div>
51 51
52 52 <div class="field">
53 53 <div class="label">
54 54 <label for="name">${_('First Name')}:</label>
55 55 </div>
56 56 <div class="input">
57 57 ${h.text('name',class_="medium")}
58 58 </div>
59 59 </div>
60 60
61 61 <div class="field">
62 62 <div class="label">
63 63 <label for="lastname">${_('Last Name')}:</label>
64 64 </div>
65 65 <div class="input">
66 66 ${h.text('lastname',class_="medium")}
67 67 </div>
68 68 </div>
69 69
70 70 <div class="field">
71 71 <div class="label">
72 72 <label for="email">${_('Email')}:</label>
73 73 </div>
74 74 <div class="input">
75 75 ${h.text('email',class_="medium")}
76 76 </div>
77 77 </div>
78 78
79 79 <div class="buttons">
80 80 <div class="nohighlight">
81 81 ${h.submit('sign_up','Sign Up',class_="ui-button")}
82 82 %if c.auto_active:
83 83 <div class="activation_msg">${_('Your account will be activated right after registration')}</div>
84 84 %else:
85 85 <div class="activation_msg">${_('Your account must wait for activation by administrator')}</div>
86 86 %endif
87 87 </div>
88 88 </div>
89 89 </div>
90 90 </div>
91 91 ${h.end_form()}
92 92 </div>
93 93 </div>
94 94 </body>
95 95 </html>
96 96
@@ -1,674 +1,674 b''
1 1 <%inherit file="/base/base.html"/>
2 2
3 3 <%def name="title()">
4 4 ${c.repo_name} ${_('Summary')} - ${c.rhodecode_name}
5 5 </%def>
6 6
7 7 <%def name="breadcrumbs_links()">
8 8 ${h.link_to(u'Home',h.url('/'))}
9 9 &raquo;
10 10 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
11 11 &raquo;
12 12 ${_('summary')}
13 13 </%def>
14 14
15 15 <%def name="page_nav()">
16 16 ${self.menu('summary')}
17 17 </%def>
18 18
19 19 <%def name="main()">
20 20 <div class="box box-left">
21 21 <!-- box / title -->
22 22 <div class="title">
23 23 ${self.breadcrumbs()}
24 24 </div>
25 25 <!-- end box / title -->
26 26 <div class="form">
27 27 <div class="fields">
28 28
29 29 <div class="field">
30 30 <div class="label">
31 31 <label>${_('Name')}:</label>
32 32 </div>
33 33 <div class="input-short">
34 34 %if c.dbrepo.repo_type =='hg':
35 <img style="margin-bottom:2px" class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="/images/icons/hgicon.png"/>
35 <img style="margin-bottom:2px" class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url("/images/icons/hgicon.png")}"/>
36 36 %endif
37 37 %if c.dbrepo.repo_type =='git':
38 <img style="margin-bottom:2px" class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="/images/icons/giticon.png"/>
38 <img style="margin-bottom:2px" class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url("/images/icons/giticon.png")}"/>
39 39 %endif
40 40
41 41 %if c.dbrepo.private:
42 <img style="margin-bottom:2px" class="icon" title="${_('private repository')}" alt="${_('private repository')}" src="/images/icons/lock.png"/>
42 <img style="margin-bottom:2px" class="icon" title="${_('private repository')}" alt="${_('private repository')}" src="${h.url("/images/icons/lock.png")}"/>
43 43 %else:
44 <img style="margin-bottom:2px" class="icon" title="${_('public repository')}" alt="${_('public repository')}" src="/images/icons/lock_open.png"/>
44 <img style="margin-bottom:2px" class="icon" title="${_('public repository')}" alt="${_('public repository')}" src="${h.url("/images/icons/lock_open.png")}"/>
45 45 %endif
46 46 <span style="font-size: 1.6em;font-weight: bold;vertical-align: baseline;">${c.repo.name}</span>
47 47 %if c.rhodecode_user.username != 'default':
48 48 %if c.following:
49 49 <span id="follow_toggle" class="following" title="${_('Stop following this repository')}"
50 50 onclick="javascript:toggleFollowingRepo(this,${c.dbrepo.repo_id},'${str(h.get_token())}')">
51 51 </span>
52 52 %else:
53 53 <span id="follow_toggle" class="follow" title="${_('Start following this repository')}"
54 54 onclick="javascript:toggleFollowingRepo(this,${c.dbrepo.repo_id},'${str(h.get_token())}')">
55 55 </span>
56 56 %endif
57 57 %endif:
58 58 <br/>
59 59 %if c.dbrepo.fork:
60 60 <span style="margin-top:5px">
61 61 <a href="${h.url('summary_home',repo_name=c.dbrepo.fork.repo_name)}">
62 62 <img class="icon" alt="${_('public')}"
63 63 title="${_('Fork of')} ${c.dbrepo.fork.repo_name}"
64 src="/images/icons/arrow_divide.png"/>
64 src="${h.url("/images/icons/arrow_divide.png")}"/>
65 65 ${_('Fork of')} ${c.dbrepo.fork.repo_name}
66 66 </a>
67 67 </span>
68 68 %endif
69 69 </div>
70 70 </div>
71 71
72 72
73 73 <div class="field">
74 74 <div class="label">
75 75 <label>${_('Description')}:</label>
76 76 </div>
77 77 <div class="input-short">
78 78 ${c.dbrepo.description}
79 79 </div>
80 80 </div>
81 81
82 82
83 83 <div class="field">
84 84 <div class="label">
85 85 <label>${_('Contact')}:</label>
86 86 </div>
87 87 <div class="input-short">
88 88 <div class="gravatar">
89 89 <img alt="gravatar" src="${h.gravatar_url(c.dbrepo.user.email)}"/>
90 90 </div>
91 91 ${_('Username')}: ${c.dbrepo.user.username}<br/>
92 92 ${_('Name')}: ${c.dbrepo.user.name} ${c.dbrepo.user.lastname}<br/>
93 93 ${_('Email')}: <a href="mailto:${c.dbrepo.user.email}">${c.dbrepo.user.email}</a>
94 94 </div>
95 95 </div>
96 96
97 97 <div class="field">
98 98 <div class="label">
99 99 <label>${_('Last change')}:</label>
100 100 </div>
101 101 <div class="input-short">
102 102 ${h.age(c.repo.last_change)} - ${c.repo.last_change}
103 103 ${_('by')} ${h.get_changeset_safe(c.repo,'tip').author}
104 104
105 105 </div>
106 106 </div>
107 107
108 108 <div class="field">
109 109 <div class="label">
110 110 <label>${_('Clone url')}:</label>
111 111 </div>
112 112 <div class="input-short">
113 113 <input type="text" id="clone_url" readonly="readonly" value="hg clone ${c.clone_repo_url}" size="70"/>
114 114 </div>
115 115 </div>
116 116
117 117 <div class="field">
118 118 <div class="label">
119 119 <label>${_('Trending source files')}:</label>
120 120 </div>
121 121 <div class="input-short">
122 122 <div id="lang_stats"></div>
123 123 </div>
124 124 </div>
125 125
126 126 <div class="field">
127 127 <div class="label">
128 128 <label>${_('Download')}:</label>
129 129 </div>
130 130 <div class="input-short">
131 131 %if len(c.repo.revisions) == 0:
132 132 ${_('There are no downloads yet')}
133 133 %elif c.enable_downloads is False:
134 134 ${_('Downloads are disabled for this repository')}
135 135 %if h.HasPermissionAll('hg.admin')('enable stats on from summary'):
136 136 [${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name))}]
137 137 %endif
138 138 %else:
139 139 ${h.select('download_options',c.repo.get_changeset().raw_id,c.download_options)}
140 140 %for cnt,archive in enumerate(c.repo._get_archives()):
141 141 %if cnt >=1:
142 142 |
143 143 %endif
144 144 <span class="tooltip" title="${_('Download %s as %s') %('tip',archive['type'])}"
145 145 id="${archive['type']+'_link'}">${h.link_to(archive['type'],
146 146 h.url('files_archive_home',repo_name=c.repo.name,
147 147 fname='tip'+archive['extension']),class_="archive_icon")}</span>
148 148 %endfor
149 149 %endif
150 150 </div>
151 151 </div>
152 152
153 153 <div class="field">
154 154 <div class="label">
155 155 <label>${_('Feeds')}:</label>
156 156 </div>
157 157 <div class="input-short">
158 158 ${h.link_to(_('RSS'),h.url('rss_feed_home',repo_name=c.repo.name),class_='rss_icon')}
159 159 ${h.link_to(_('Atom'),h.url('atom_feed_home',repo_name=c.repo.name),class_='atom_icon')}
160 160 </div>
161 161 </div>
162 162 </div>
163 163 </div>
164 164 <script type="text/javascript">
165 165 YUE.onDOMReady(function(e){
166 166 id = 'clone_url';
167 167 YUE.on(id,'click',function(e){
168 168 YUD.get('clone_url').select();
169 169 })
170 170 })
171 171 var data = ${c.trending_languages|n};
172 172 var total = 0;
173 173 var no_data = true;
174 174 for (k in data){
175 175 total += data[k];
176 176 no_data = false;
177 177 }
178 178 var tbl = document.createElement('table');
179 179 tbl.setAttribute('class','trending_language_tbl');
180 180 var cnt =0;
181 181 for (k in data){
182 182 cnt+=1;
183 183 var hide = cnt>2;
184 184 var tr = document.createElement('tr');
185 185 if (hide){
186 186 tr.setAttribute('style','display:none');
187 187 tr.setAttribute('class','stats_hidden');
188 188 }
189 189 var percentage = Math.round((data[k]/total*100),2);
190 190 var value = data[k];
191 191 var td1 = document.createElement('td');
192 192 td1.width=150;
193 193 var trending_language_label = document.createElement('div');
194 194 trending_language_label.innerHTML = k;
195 195 td1.appendChild(trending_language_label);
196 196
197 197 var td2 = document.createElement('td');
198 198 td2.setAttribute('style','padding-right:14px !important');
199 199 var trending_language = document.createElement('div');
200 200 var nr_files = value+" ${_('files')}";
201 201
202 202 trending_language.title = k+" "+nr_files;
203 203
204 204 if (percentage>20){
205 205 trending_language.innerHTML = "<b style='font-size:0.8em'>"+percentage+"% "+nr_files+ "</b>";
206 206 }
207 207 else{
208 208 trending_language.innerHTML = "<b style='font-size:0.8em'>"+percentage+"%</b>";
209 209 }
210 210
211 211 trending_language.setAttribute("class", 'trending_language top-right-rounded-corner bottom-right-rounded-corner');
212 212 trending_language.style.width=percentage+"%";
213 213 td2.appendChild(trending_language);
214 214
215 215 tr.appendChild(td1);
216 216 tr.appendChild(td2);
217 217 tbl.appendChild(tr);
218 218 if(cnt == 2){
219 219 var show_more = document.createElement('tr');
220 220 var td=document.createElement('td');
221 221 lnk = document.createElement('a');
222 222 lnk.href='#';
223 223 lnk.innerHTML = "${_("show more")}";
224 224 lnk.id='code_stats_show_more';
225 225 td.appendChild(lnk);
226 226 show_more.appendChild(td);
227 227 show_more.appendChild(document.createElement('td'));
228 228 tbl.appendChild(show_more);
229 229 }
230 230
231 231 }
232 232 if(no_data){
233 233 var tr = document.createElement('tr');
234 234 var td1 = document.createElement('td');
235 235 td1.innerHTML = "${c.no_data_msg}";
236 236 tr.appendChild(td1);
237 237 tbl.appendChild(tr);
238 238 }
239 239 YUD.get('lang_stats').appendChild(tbl);
240 240 YUE.on('code_stats_show_more','click',function(){
241 241 l = YUD.getElementsByClassName('stats_hidden')
242 242 for (e in l){
243 243 YUD.setStyle(l[e],'display','');
244 244 };
245 245 YUD.setStyle(YUD.get('code_stats_show_more'),
246 246 'display','none');
247 247 })
248 248
249 249
250 250 YUE.on('download_options','change',function(e){
251 251 var new_cs = e.target.options[e.target.selectedIndex];
252 252 var tmpl_links = {}
253 253 %for cnt,archive in enumerate(c.repo._get_archives()):
254 254 tmpl_links['${archive['type']}'] = '${h.link_to(archive['type'],
255 255 h.url('files_archive_home',repo_name=c.repo.name,
256 256 fname='__CS__'+archive['extension']),class_="archive_icon")}';
257 257 %endfor
258 258
259 259
260 260 for(k in tmpl_links){
261 261 var s = YUD.get(k+'_link')
262 262 title_tmpl = "${_('Download %s as %s') % ('__CS_NAME__',archive['type'])}";
263 263 s.title = title_tmpl.replace('__CS_NAME__',new_cs.text)
264 264 s.innerHTML = tmpl_links[k].replace('__CS__',new_cs.value);
265 265 }
266 266
267 267 })
268 268
269 269 </script>
270 270 </div>
271 271
272 272 <div class="box box-right" style="min-height:455px">
273 273 <!-- box / title -->
274 274 <div class="title">
275 275 <h5>${_('Commit activity by day / author')}</h5>
276 276 </div>
277 277
278 278 <div class="table">
279 279 %if c.no_data:
280 280 <div style="padding:0 10px 10px 15px;font-size: 1.2em;">${c.no_data_msg}
281 281 %if h.HasPermissionAll('hg.admin')('enable stats on from summary'):
282 282 [${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name))}]
283 283 %endif
284 284 </div>
285 285 %endif:
286 286 <div id="commit_history" style="width:460px;height:300px;float:left"></div>
287 287 <div style="clear: both;height: 10px"></div>
288 288 <div id="overview" style="width:460px;height:100px;float:left"></div>
289 289
290 290 <div id="legend_data" style="clear:both;margin-top:10px;">
291 291 <div id="legend_container"></div>
292 292 <div id="legend_choices">
293 293 <table id="legend_choices_tables" style="font-size:smaller;color:#545454"></table>
294 294 </div>
295 295 </div>
296 296 <script type="text/javascript">
297 297 /**
298 298 * Plots summary graph
299 299 *
300 300 * @class SummaryPlot
301 301 * @param {from} initial from for detailed graph
302 302 * @param {to} initial to for detailed graph
303 303 * @param {dataset}
304 304 * @param {overview_dataset}
305 305 */
306 306 function SummaryPlot(from,to,dataset,overview_dataset) {
307 307 var initial_ranges = {
308 308 "xaxis":{
309 309 "from":from,
310 310 "to":to,
311 311 },
312 312 };
313 313 var dataset = dataset;
314 314 var overview_dataset = [overview_dataset];
315 315 var choiceContainer = YUD.get("legend_choices");
316 316 var choiceContainerTable = YUD.get("legend_choices_tables");
317 317 var plotContainer = YUD.get('commit_history');
318 318 var overviewContainer = YUD.get('overview');
319 319
320 320 var plot_options = {
321 321 bars: {show:true,align:'center',lineWidth:4},
322 322 legend: {show:true, container:"legend_container"},
323 323 points: {show:true,radius:0,fill:false},
324 324 yaxis: {tickDecimals:0,},
325 325 xaxis: {
326 326 mode: "time",
327 327 timeformat: "%d/%m",
328 328 min:from,
329 329 max:to,
330 330 },
331 331 grid: {
332 332 hoverable: true,
333 333 clickable: true,
334 334 autoHighlight:true,
335 335 color: "#999"
336 336 },
337 337 //selection: {mode: "x"}
338 338 };
339 339 var overview_options = {
340 340 legend:{show:false},
341 341 bars: {show:true,barWidth: 2,},
342 342 shadowSize: 0,
343 343 xaxis: {mode: "time", timeformat: "%d/%m/%y",},
344 344 yaxis: {ticks: 3, min: 0,tickDecimals:0,},
345 345 grid: {color: "#999",},
346 346 selection: {mode: "x"}
347 347 };
348 348
349 349 /**
350 350 *get dummy data needed in few places
351 351 */
352 352 function getDummyData(label){
353 353 return {"label":label,
354 354 "data":[{"time":0,
355 355 "commits":0,
356 356 "added":0,
357 357 "changed":0,
358 358 "removed":0,
359 359 }],
360 360 "schema":["commits"],
361 361 "color":'#ffffff',
362 362 }
363 363 }
364 364
365 365 /**
366 366 * generate checkboxes accordindly to data
367 367 * @param keys
368 368 * @returns
369 369 */
370 370 function generateCheckboxes(data) {
371 371 //append checkboxes
372 372 var i = 0;
373 373 choiceContainerTable.innerHTML = '';
374 374 for(var pos in data) {
375 375
376 376 data[pos].color = i;
377 377 i++;
378 378 if(data[pos].label != ''){
379 379 choiceContainerTable.innerHTML += '<tr><td>'+
380 380 '<input type="checkbox" name="' + data[pos].label +'" checked="checked" />'
381 381 +data[pos].label+
382 382 '</td></tr>';
383 383 }
384 384 }
385 385 }
386 386
387 387 /**
388 388 * ToolTip show
389 389 */
390 390 function showTooltip(x, y, contents) {
391 391 var div=document.getElementById('tooltip');
392 392 if(!div) {
393 393 div = document.createElement('div');
394 394 div.id="tooltip";
395 395 div.style.position="absolute";
396 396 div.style.border='1px solid #fdd';
397 397 div.style.padding='2px';
398 398 div.style.backgroundColor='#fee';
399 399 document.body.appendChild(div);
400 400 }
401 401 YUD.setStyle(div, 'opacity', 0);
402 402 div.innerHTML = contents;
403 403 div.style.top=(y + 5) + "px";
404 404 div.style.left=(x + 5) + "px";
405 405
406 406 var anim = new YAHOO.util.Anim(div, {opacity: {to: 0.8}}, 0.2);
407 407 anim.animate();
408 408 }
409 409
410 410 /**
411 411 * This function will detect if selected period has some changesets
412 412 for this user if it does this data is then pushed for displaying
413 413 Additionally it will only display users that are selected by the checkbox
414 414 */
415 415 function getDataAccordingToRanges(ranges) {
416 416
417 417 var data = [];
418 418 var keys = [];
419 419 for(var key in dataset){
420 420 var push = false;
421 421
422 422 //method1 slow !!
423 423 //*
424 424 for(var ds in dataset[key].data){
425 425 commit_data = dataset[key].data[ds];
426 426 if (commit_data.time >= ranges.xaxis.from && commit_data.time <= ranges.xaxis.to){
427 427 push = true;
428 428 break;
429 429 }
430 430 }
431 431 //*/
432 432
433 433 /*//method2 sorted commit data !!!
434 434
435 435 var first_commit = dataset[key].data[0].time;
436 436 var last_commit = dataset[key].data[dataset[key].data.length-1].time;
437 437
438 438 if (first_commit >= ranges.xaxis.from && last_commit <= ranges.xaxis.to){
439 439 push = true;
440 440 }
441 441 //*/
442 442
443 443 if(push){
444 444 data.push(dataset[key]);
445 445 }
446 446 }
447 447 if(data.length >= 1){
448 448 return data;
449 449 }
450 450 else{
451 451 //just return dummy data for graph to plot itself
452 452 return [getDummyData('')];
453 453 }
454 454
455 455 }
456 456
457 457 /**
458 458 * redraw using new checkbox data
459 459 */
460 460 function plotchoiced(e,args){
461 461 var cur_data = args[0];
462 462 var cur_ranges = args[1];
463 463
464 464 var new_data = [];
465 465 var inputs = choiceContainer.getElementsByTagName("input");
466 466
467 467 //show only checked labels
468 468 for(var i=0; i<inputs.length; i++) {
469 469 var checkbox_key = inputs[i].name;
470 470
471 471 if(inputs[i].checked){
472 472 for(var d in cur_data){
473 473 if(cur_data[d].label == checkbox_key){
474 474 new_data.push(cur_data[d]);
475 475 }
476 476 }
477 477 }
478 478 else{
479 479 //push dummy data to not hide the label
480 480 new_data.push(getDummyData(checkbox_key));
481 481 }
482 482 }
483 483
484 484 var new_options = YAHOO.lang.merge(plot_options, {
485 485 xaxis: {
486 486 min: cur_ranges.xaxis.from,
487 487 max: cur_ranges.xaxis.to,
488 488 mode:"time",
489 489 timeformat: "%d/%m",
490 490 },
491 491 });
492 492 if (!new_data){
493 493 new_data = [[0,1]];
494 494 }
495 495 // do the zooming
496 496 plot = YAHOO.widget.Flot(plotContainer, new_data, new_options);
497 497
498 498 plot.subscribe("plotselected", plotselected);
499 499
500 500 //resubscribe plothover
501 501 plot.subscribe("plothover", plothover);
502 502
503 503 // don't fire event on the overview to prevent eternal loop
504 504 overview.setSelection(cur_ranges, true);
505 505
506 506 }
507 507
508 508 /**
509 509 * plot only selected items from overview
510 510 * @param ranges
511 511 * @returns
512 512 */
513 513 function plotselected(ranges,cur_data) {
514 514 //updates the data for new plot
515 515 data = getDataAccordingToRanges(ranges);
516 516 generateCheckboxes(data);
517 517
518 518 var new_options = YAHOO.lang.merge(plot_options, {
519 519 xaxis: {
520 520 min: ranges.xaxis.from,
521 521 max: ranges.xaxis.to,
522 522 mode:"time",
523 523 timeformat: "%d/%m",
524 524 },
525 525 yaxis: {
526 526 min: ranges.yaxis.from,
527 527 max: ranges.yaxis.to,
528 528 },
529 529
530 530 });
531 531 // do the zooming
532 532 plot = YAHOO.widget.Flot(plotContainer, data, new_options);
533 533
534 534 plot.subscribe("plotselected", plotselected);
535 535
536 536 //resubscribe plothover
537 537 plot.subscribe("plothover", plothover);
538 538
539 539 // don't fire event on the overview to prevent eternal loop
540 540 overview.setSelection(ranges, true);
541 541
542 542 //resubscribe choiced
543 543 YUE.on(choiceContainer.getElementsByTagName("input"), "click", plotchoiced, [data, ranges]);
544 544 }
545 545
546 546 var previousPoint = null;
547 547
548 548 function plothover(o) {
549 549 var pos = o.pos;
550 550 var item = o.item;
551 551
552 552 //YUD.get("x").innerHTML = pos.x.toFixed(2);
553 553 //YUD.get("y").innerHTML = pos.y.toFixed(2);
554 554 if (item) {
555 555 if (previousPoint != item.datapoint) {
556 556 previousPoint = item.datapoint;
557 557
558 558 var tooltip = YUD.get("tooltip");
559 559 if(tooltip) {
560 560 tooltip.parentNode.removeChild(tooltip);
561 561 }
562 562 var x = item.datapoint.x.toFixed(2);
563 563 var y = item.datapoint.y.toFixed(2);
564 564
565 565 if (!item.series.label){
566 566 item.series.label = 'commits';
567 567 }
568 568 var d = new Date(x*1000);
569 569 var fd = d.toDateString()
570 570 var nr_commits = parseInt(y);
571 571
572 572 var cur_data = dataset[item.series.label].data[item.dataIndex];
573 573 var added = cur_data.added;
574 574 var changed = cur_data.changed;
575 575 var removed = cur_data.removed;
576 576
577 577 var nr_commits_suffix = " ${_('commits')} ";
578 578 var added_suffix = " ${_('files added')} ";
579 579 var changed_suffix = " ${_('files changed')} ";
580 580 var removed_suffix = " ${_('files removed')} ";
581 581
582 582
583 583 if(nr_commits == 1){nr_commits_suffix = " ${_('commit')} ";}
584 584 if(added==1){added_suffix=" ${_('file added')} ";}
585 585 if(changed==1){changed_suffix=" ${_('file changed')} ";}
586 586 if(removed==1){removed_suffix=" ${_('file removed')} ";}
587 587
588 588 showTooltip(item.pageX, item.pageY, item.series.label + " on " + fd
589 589 +'<br/>'+
590 590 nr_commits + nr_commits_suffix+'<br/>'+
591 591 added + added_suffix +'<br/>'+
592 592 changed + changed_suffix + '<br/>'+
593 593 removed + removed_suffix + '<br/>');
594 594 }
595 595 }
596 596 else {
597 597 var tooltip = YUD.get("tooltip");
598 598
599 599 if(tooltip) {
600 600 tooltip.parentNode.removeChild(tooltip);
601 601 }
602 602 previousPoint = null;
603 603 }
604 604 }
605 605
606 606 /**
607 607 * MAIN EXECUTION
608 608 */
609 609
610 610 var data = getDataAccordingToRanges(initial_ranges);
611 611 generateCheckboxes(data);
612 612
613 613 //main plot
614 614 var plot = YAHOO.widget.Flot(plotContainer,data,plot_options);
615 615
616 616 //overview
617 617 var overview = YAHOO.widget.Flot(overviewContainer, overview_dataset, overview_options);
618 618
619 619 //show initial selection on overview
620 620 overview.setSelection(initial_ranges);
621 621
622 622 plot.subscribe("plotselected", plotselected);
623 623
624 624 overview.subscribe("plotselected", function (ranges) {
625 625 plot.setSelection(ranges);
626 626 });
627 627
628 628 plot.subscribe("plothover", plothover);
629 629
630 630 YUE.on(choiceContainer.getElementsByTagName("input"), "click", plotchoiced, [data, initial_ranges]);
631 631 }
632 632 SummaryPlot(${c.ts_min},${c.ts_max},${c.commit_data|n},${c.overview_data|n});
633 633 </script>
634 634
635 635 </div>
636 636 </div>
637 637
638 638 <div class="box">
639 639 <div class="title">
640 640 <div class="breadcrumbs">${h.link_to(_('Shortlog'),h.url('shortlog_home',repo_name=c.repo_name))}</div>
641 641 </div>
642 642 <div class="table">
643 643 <div id="shortlog_data">
644 644 <%include file='../shortlog/shortlog_data.html'/>
645 645 </div>
646 646 ##%if c.repo_changesets:
647 647 ## ${h.link_to(_('show more'),h.url('changelog_home',repo_name=c.repo_name))}
648 648 ##%endif
649 649 </div>
650 650 </div>
651 651 <div class="box">
652 652 <div class="title">
653 653 <div class="breadcrumbs">${h.link_to(_('Tags'),h.url('tags_home',repo_name=c.repo_name))}</div>
654 654 </div>
655 655 <div class="table">
656 656 <%include file='../tags/tags_data.html'/>
657 657 %if c.repo_changesets:
658 658 ${h.link_to(_('show more'),h.url('tags_home',repo_name=c.repo_name))}
659 659 %endif
660 660 </div>
661 661 </div>
662 662 <div class="box">
663 663 <div class="title">
664 664 <div class="breadcrumbs">${h.link_to(_('Branches'),h.url('branches_home',repo_name=c.repo_name))}</div>
665 665 </div>
666 666 <div class="table">
667 667 <%include file='../branches/branches_data.html'/>
668 668 %if c.repo_changesets:
669 669 ${h.link_to(_('show more'),h.url('branches_home',repo_name=c.repo_name))}
670 670 %endif
671 671 </div>
672 672 </div>
673 673
674 674 </%def>
General Comments 0
You need to be logged in to leave comments. Login now