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