Show More
@@ -0,0 +1,89 b'' | |||||
|
1 | ## DATA TABLE RE USABLE ELEMENTS | |||
|
2 | ## usage: | |||
|
3 | ## <%namespace name="dt" file="/data_table/_dt_elements.html"/> | |||
|
4 | ||||
|
5 | <%def name="quick_menu(repo_name)"> | |||
|
6 | <ul class="menu_items hidden"> | |||
|
7 | <li style="border-top:1px solid #003367;margin-left:18px;padding-left:-99px"></li> | |||
|
8 | <li> | |||
|
9 | <a title="${_('Summary')}" href="${h.url('summary_home',repo_name=repo_name)}"> | |||
|
10 | <span class="icon"> | |||
|
11 | <img src="${h.url('/images/icons/clipboard_16.png')}" alt="${_('Summary')}" /> | |||
|
12 | </span> | |||
|
13 | <span>${_('Summary')}</span> | |||
|
14 | </a> | |||
|
15 | </li> | |||
|
16 | <li> | |||
|
17 | <a title="${_('Changelog')}" href="${h.url('changelog_home',repo_name=repo_name)}"> | |||
|
18 | <span class="icon"> | |||
|
19 | <img src="${h.url('/images/icons/time.png')}" alt="${_('Changelog')}" /> | |||
|
20 | </span> | |||
|
21 | <span>${_('Changelog')}</span> | |||
|
22 | </a> | |||
|
23 | </li> | |||
|
24 | <li> | |||
|
25 | <a title="${_('Files')}" href="${h.url('files_home',repo_name=repo_name)}"> | |||
|
26 | <span class="icon"> | |||
|
27 | <img src="${h.url('/images/icons/file.png')}" alt="${_('Files')}" /> | |||
|
28 | </span> | |||
|
29 | <span>${_('Files')}</span> | |||
|
30 | </a> | |||
|
31 | </li> | |||
|
32 | <li> | |||
|
33 | <a title="${_('Fork')}" href="${h.url('repo_fork_home',repo_name=repo_name)}"> | |||
|
34 | <span class="icon"> | |||
|
35 | <img src="${h.url('/images/icons/arrow_divide.png')}" alt="${_('Fork')}" /> | |||
|
36 | </span> | |||
|
37 | <span>${_('Fork')}</span> | |||
|
38 | </a> | |||
|
39 | </li> | |||
|
40 | </ul> | |||
|
41 | </%def> | |||
|
42 | ||||
|
43 | <%def name="repo_name(name,rtype,private,fork_of,short_name=False, admin=False)"> | |||
|
44 | <% | |||
|
45 | def get_name(name,short_name=short_name): | |||
|
46 | if short_name: | |||
|
47 | return name.split('/')[-1] | |||
|
48 | else: | |||
|
49 | return name | |||
|
50 | %> | |||
|
51 | <div style="white-space: nowrap"> | |||
|
52 | ##TYPE OF REPO | |||
|
53 | %if h.is_hg(rtype): | |||
|
54 | <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/> | |||
|
55 | %elif h.is_git(rtype): | |||
|
56 | <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/> | |||
|
57 | %endif | |||
|
58 | ||||
|
59 | ##PRIVATE/PUBLIC | |||
|
60 | %if private: | |||
|
61 | <img class="icon" title="${_('private repository')}" alt="${_('private repository')}" src="${h.url('/images/icons/lock.png')}"/> | |||
|
62 | %else: | |||
|
63 | <img class="icon" title="${_('public repository')}" alt="${_('public repository')}" src="${h.url('/images/icons/lock_open.png')}"/> | |||
|
64 | %endif | |||
|
65 | ||||
|
66 | ##NAME | |||
|
67 | %if admin: | |||
|
68 | ${h.link_to(get_name(name),h.url('edit_repo',repo_name=name),class_="repo_name")} | |||
|
69 | %else: | |||
|
70 | ${h.link_to(get_name(name),h.url('summary_home',repo_name=name),class_="repo_name")} | |||
|
71 | %endif | |||
|
72 | %if fork_of: | |||
|
73 | <a href="${h.url('summary_home',repo_name=fork_of)}"> | |||
|
74 | <img class="icon" alt="${_('fork')}" title="${_('Fork of')} ${fork_of}" src="${h.url('/images/icons/arrow_divide.png')}"/></a> | |||
|
75 | %endif | |||
|
76 | </div> | |||
|
77 | </%def> | |||
|
78 | ||||
|
79 | ||||
|
80 | ||||
|
81 | <%def name="revision(name,rev,tip,author,last_msg)"> | |||
|
82 | <div> | |||
|
83 | %if rev >= 0: | |||
|
84 | <pre><a title="${h.tooltip('%s:\n\n%s' % (author,last_msg))}" class="tooltip" href="${h.url('changeset_home',repo_name=name,revision=tip)}">${'r%s:%s' % (rev,h.short_id(tip))}</a></pre> | |||
|
85 | %else: | |||
|
86 | ${_('No changesets yet')} | |||
|
87 | %endif | |||
|
88 | </div> | |||
|
89 | </%def> |
@@ -1,124 +1,124 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 |
|
17 | |||
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 REPOSITORY'),h.url('new_repo'))}</span> |
|
22 | <span>${h.link_to(_(u'ADD REPOSITORY'),h.url('new_repo'))}</span> | |
23 | </li> |
|
23 | </li> | |
24 | </ul> |
|
24 | </ul> | |
25 | </div> |
|
25 | </div> | |
26 |
|
26 | |||
27 | <div class="table"> |
|
27 | <div class="table"> | |
28 | <div id='repos_list_wrap' class="yui-skin-sam"> |
|
28 | <div id='repos_list_wrap' class="yui-skin-sam"> | |
29 | <%cnt=0%> |
|
29 | <%cnt=0%> | |
30 |
<%namespace name="dt" file="/ |
|
30 | <%namespace name="dt" file="/data_table/_dt_elements.html"/> | |
31 |
|
31 | |||
32 | <table id="repos_list"> |
|
32 | <table id="repos_list"> | |
33 | <thead> |
|
33 | <thead> | |
34 | <tr> |
|
34 | <tr> | |
35 | <th class="left"></th> |
|
35 | <th class="left"></th> | |
36 | <th class="left">${_('Name')}</th> |
|
36 | <th class="left">${_('Name')}</th> | |
37 | <th class="left">${_('Description')}</th> |
|
37 | <th class="left">${_('Description')}</th> | |
38 | <th class="left">${_('Last change')}</th> |
|
38 | <th class="left">${_('Last change')}</th> | |
39 | <th class="left">${_('Tip')}</th> |
|
39 | <th class="left">${_('Tip')}</th> | |
40 | <th class="left">${_('Contact')}</th> |
|
40 | <th class="left">${_('Contact')}</th> | |
41 | <th class="left">${_('Action')}</th> |
|
41 | <th class="left">${_('Action')}</th> | |
42 | </tr> |
|
42 | </tr> | |
43 | </thead> |
|
43 | </thead> | |
44 |
|
44 | |||
45 | %for cnt,repo in enumerate(c.repos_list): |
|
45 | %for cnt,repo in enumerate(c.repos_list): | |
46 | <tr class="parity${(cnt+1)%2}"> |
|
46 | <tr class="parity${(cnt+1)%2}"> | |
47 | <td class="quick_repo_menu"> |
|
47 | <td class="quick_repo_menu"> | |
48 | ${dt.quick_menu(repo['name'])} |
|
48 | ${dt.quick_menu(repo['name'])} | |
49 | </td> |
|
49 | </td> | |
50 | <td class="reponame"> |
|
50 | <td class="reponame"> | |
51 | ${dt.repo_name(repo['name'],repo['dbrepo']['repo_type'],repo['dbrepo']['private'],repo['dbrepo_fork'].get('repo_name'), admin=True)} |
|
51 | ${dt.repo_name(repo['name'],repo['dbrepo']['repo_type'],repo['dbrepo']['private'],repo['dbrepo_fork'].get('repo_name'), admin=True)} | |
52 | </td> |
|
52 | </td> | |
53 | ##DESCRIPTION |
|
53 | ##DESCRIPTION | |
54 | <td><span class="tooltip" title="${h.tooltip(repo['description'])}"> |
|
54 | <td><span class="tooltip" title="${h.tooltip(repo['description'])}"> | |
55 | ${h.truncate(repo['description'],60)}</span> |
|
55 | ${h.truncate(repo['description'],60)}</span> | |
56 | </td> |
|
56 | </td> | |
57 | ##LAST CHANGE |
|
57 | ##LAST CHANGE | |
58 | <td> |
|
58 | <td> | |
59 | <span class="tooltip" title="${repo['last_change']}">${h.age(repo['last_change'])}</span> |
|
59 | <span class="tooltip" title="${repo['last_change']}">${h.age(repo['last_change'])}</span> | |
60 | </td> |
|
60 | </td> | |
61 | ##LAST REVISION |
|
61 | ##LAST REVISION | |
62 | <td> |
|
62 | <td> | |
63 | ${dt.revision(repo['name'],repo['rev'],repo['tip'],repo['author'],repo['last_msg'])} |
|
63 | ${dt.revision(repo['name'],repo['rev'],repo['tip'],repo['author'],repo['last_msg'])} | |
64 | </td> |
|
64 | </td> | |
65 | <td title="${repo['contact']}">${h.person(repo['contact'])}</td> |
|
65 | <td title="${repo['contact']}">${h.person(repo['contact'])}</td> | |
66 | <td> |
|
66 | <td> | |
67 | ${h.form(url('repo', repo_name=repo['name']),method='delete')} |
|
67 | ${h.form(url('repo', repo_name=repo['name']),method='delete')} | |
68 | ${h.submit('remove_%s' % repo['name'],_('delete'),class_="delete_icon action_button",onclick="return confirm('"+_('Confirm to delete this repository: %s') % repo['name']+"');")} |
|
68 | ${h.submit('remove_%s' % repo['name'],_('delete'),class_="delete_icon action_button",onclick="return confirm('"+_('Confirm to delete this repository: %s') % repo['name']+"');")} | |
69 | ${h.end_form()} |
|
69 | ${h.end_form()} | |
70 | </td> |
|
70 | </td> | |
71 | </tr> |
|
71 | </tr> | |
72 | %endfor |
|
72 | %endfor | |
73 | </table> |
|
73 | </table> | |
74 | </div> |
|
74 | </div> | |
75 | </div> |
|
75 | </div> | |
76 | </div> |
|
76 | </div> | |
77 | <script> |
|
77 | <script> | |
78 |
|
78 | |||
79 | // main table sorting |
|
79 | // main table sorting | |
80 | var myColumnDefs = [ |
|
80 | var myColumnDefs = [ | |
81 | {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"}, |
|
81 | {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"}, | |
82 | {key:"name",label:"${_('Name')}",sortable:true, |
|
82 | {key:"name",label:"${_('Name')}",sortable:true, | |
83 | sortOptions: { sortFunction: nameSort }}, |
|
83 | sortOptions: { sortFunction: nameSort }}, | |
84 | {key:"desc",label:"${_('Description')}",sortable:true}, |
|
84 | {key:"desc",label:"${_('Description')}",sortable:true}, | |
85 | {key:"last_change",label:"${_('Last Change')}",sortable:true, |
|
85 | {key:"last_change",label:"${_('Last Change')}",sortable:true, | |
86 | sortOptions: { sortFunction: ageSort }}, |
|
86 | sortOptions: { sortFunction: ageSort }}, | |
87 | {key:"tip",label:"${_('Tip')}",sortable:true, |
|
87 | {key:"tip",label:"${_('Tip')}",sortable:true, | |
88 | sortOptions: { sortFunction: revisionSort }}, |
|
88 | sortOptions: { sortFunction: revisionSort }}, | |
89 | {key:"owner",label:"${_('Owner')}",sortable:true}, |
|
89 | {key:"owner",label:"${_('Owner')}",sortable:true}, | |
90 | {key:"action",label:"${_('Action')}",sortable:false}, |
|
90 | {key:"action",label:"${_('Action')}",sortable:false}, | |
91 | ]; |
|
91 | ]; | |
92 |
|
92 | |||
93 | var myDataSource = new YAHOO.util.DataSource(YUD.get("repos_list")); |
|
93 | var myDataSource = new YAHOO.util.DataSource(YUD.get("repos_list")); | |
94 |
|
94 | |||
95 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; |
|
95 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; | |
96 |
|
96 | |||
97 | myDataSource.responseSchema = { |
|
97 | myDataSource.responseSchema = { | |
98 | fields: [ |
|
98 | fields: [ | |
99 | {key:"menu"}, |
|
99 | {key:"menu"}, | |
100 | {key:"name"}, |
|
100 | {key:"name"}, | |
101 | {key:"desc"}, |
|
101 | {key:"desc"}, | |
102 | {key:"last_change"}, |
|
102 | {key:"last_change"}, | |
103 | {key:"tip"}, |
|
103 | {key:"tip"}, | |
104 | {key:"owner"}, |
|
104 | {key:"owner"}, | |
105 | {key:"action"}, |
|
105 | {key:"action"}, | |
106 | ] |
|
106 | ] | |
107 | }; |
|
107 | }; | |
108 |
|
108 | |||
109 | var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource, |
|
109 | var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource, | |
110 | { |
|
110 | { | |
111 | sortedBy:{key:"name",dir:"asc"}, |
|
111 | sortedBy:{key:"name",dir:"asc"}, | |
112 | MSG_SORTASC:"${_('Click to sort ascending')}", |
|
112 | MSG_SORTASC:"${_('Click to sort ascending')}", | |
113 | MSG_SORTDESC:"${_('Click to sort descending')}", |
|
113 | MSG_SORTDESC:"${_('Click to sort descending')}", | |
114 | MSG_EMPTY:"${_('No records found.')}", |
|
114 | MSG_EMPTY:"${_('No records found.')}", | |
115 | MSG_ERROR:"${_('Data error.')}", |
|
115 | MSG_ERROR:"${_('Data error.')}", | |
116 | MSG_LOADING:"${_('Loading...')}", |
|
116 | MSG_LOADING:"${_('Loading...')}", | |
117 | } |
|
117 | } | |
118 | ); |
|
118 | ); | |
119 | myDataTable.subscribe('postRenderEvent',function(oArgs) { |
|
119 | myDataTable.subscribe('postRenderEvent',function(oArgs) { | |
120 | tooltip_activate(); |
|
120 | tooltip_activate(); | |
121 | quick_repo_menu(); |
|
121 | quick_repo_menu(); | |
122 | }); |
|
122 | }); | |
123 | </script> |
|
123 | </script> | |
124 | </%def> |
|
124 | </%def> |
@@ -1,313 +1,313 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 | %if c.use_gravatar: |
|
32 | %if c.use_gravatar: | |
33 | <strong>${_('Change your avatar at')} <a href="http://gravatar.com">gravatar.com</a></strong> |
|
33 | <strong>${_('Change your avatar at')} <a href="http://gravatar.com">gravatar.com</a></strong> | |
34 | <br/>${_('Using')} ${c.user.email} |
|
34 | <br/>${_('Using')} ${c.user.email} | |
35 | %else: |
|
35 | %else: | |
36 | <br/>${c.user.email} |
|
36 | <br/>${c.user.email} | |
37 | %endif |
|
37 | %endif | |
38 | </p> |
|
38 | </p> | |
39 | </div> |
|
39 | </div> | |
40 | </div> |
|
40 | </div> | |
41 | <div class="field"> |
|
41 | <div class="field"> | |
42 | <div class="label"> |
|
42 | <div class="label"> | |
43 | <label>${_('API key')}</label> ${c.user.api_key} |
|
43 | <label>${_('API key')}</label> ${c.user.api_key} | |
44 | </div> |
|
44 | </div> | |
45 | </div> |
|
45 | </div> | |
46 | <div class="fields"> |
|
46 | <div class="fields"> | |
47 | <div class="field"> |
|
47 | <div class="field"> | |
48 | <div class="label"> |
|
48 | <div class="label"> | |
49 | <label for="username">${_('Username')}:</label> |
|
49 | <label for="username">${_('Username')}:</label> | |
50 | </div> |
|
50 | </div> | |
51 | <div class="input"> |
|
51 | <div class="input"> | |
52 | ${h.text('username',class_="medium")} |
|
52 | ${h.text('username',class_="medium")} | |
53 | </div> |
|
53 | </div> | |
54 | </div> |
|
54 | </div> | |
55 |
|
55 | |||
56 | <div class="field"> |
|
56 | <div class="field"> | |
57 | <div class="label"> |
|
57 | <div class="label"> | |
58 | <label for="new_password">${_('New password')}:</label> |
|
58 | <label for="new_password">${_('New password')}:</label> | |
59 | </div> |
|
59 | </div> | |
60 | <div class="input"> |
|
60 | <div class="input"> | |
61 | ${h.password('new_password',class_="medium",autocomplete="off")} |
|
61 | ${h.password('new_password',class_="medium",autocomplete="off")} | |
62 | </div> |
|
62 | </div> | |
63 | </div> |
|
63 | </div> | |
64 |
|
64 | |||
65 | <div class="field"> |
|
65 | <div class="field"> | |
66 | <div class="label"> |
|
66 | <div class="label"> | |
67 | <label for="password_confirmation">${_('New password confirmation')}:</label> |
|
67 | <label for="password_confirmation">${_('New password confirmation')}:</label> | |
68 | </div> |
|
68 | </div> | |
69 | <div class="input"> |
|
69 | <div class="input"> | |
70 | ${h.password('password_confirmation',class_="medium",autocomplete="off")} |
|
70 | ${h.password('password_confirmation',class_="medium",autocomplete="off")} | |
71 | </div> |
|
71 | </div> | |
72 | </div> |
|
72 | </div> | |
73 |
|
73 | |||
74 | <div class="field"> |
|
74 | <div class="field"> | |
75 | <div class="label"> |
|
75 | <div class="label"> | |
76 | <label for="name">${_('First Name')}:</label> |
|
76 | <label for="name">${_('First Name')}:</label> | |
77 | </div> |
|
77 | </div> | |
78 | <div class="input"> |
|
78 | <div class="input"> | |
79 | ${h.text('name',class_="medium")} |
|
79 | ${h.text('name',class_="medium")} | |
80 | </div> |
|
80 | </div> | |
81 | </div> |
|
81 | </div> | |
82 |
|
82 | |||
83 | <div class="field"> |
|
83 | <div class="field"> | |
84 | <div class="label"> |
|
84 | <div class="label"> | |
85 | <label for="lastname">${_('Last Name')}:</label> |
|
85 | <label for="lastname">${_('Last Name')}:</label> | |
86 | </div> |
|
86 | </div> | |
87 | <div class="input"> |
|
87 | <div class="input"> | |
88 | ${h.text('lastname',class_="medium")} |
|
88 | ${h.text('lastname',class_="medium")} | |
89 | </div> |
|
89 | </div> | |
90 | </div> |
|
90 | </div> | |
91 |
|
91 | |||
92 | <div class="field"> |
|
92 | <div class="field"> | |
93 | <div class="label"> |
|
93 | <div class="label"> | |
94 | <label for="email">${_('Email')}:</label> |
|
94 | <label for="email">${_('Email')}:</label> | |
95 | </div> |
|
95 | </div> | |
96 | <div class="input"> |
|
96 | <div class="input"> | |
97 | ${h.text('email',class_="medium")} |
|
97 | ${h.text('email',class_="medium")} | |
98 | </div> |
|
98 | </div> | |
99 | </div> |
|
99 | </div> | |
100 |
|
100 | |||
101 | <div class="buttons"> |
|
101 | <div class="buttons"> | |
102 | ${h.submit('save',_('Save'),class_="ui-button")} |
|
102 | ${h.submit('save',_('Save'),class_="ui-button")} | |
103 | ${h.reset('reset',_('Reset'),class_="ui-button")} |
|
103 | ${h.reset('reset',_('Reset'),class_="ui-button")} | |
104 | </div> |
|
104 | </div> | |
105 | </div> |
|
105 | </div> | |
106 | </div> |
|
106 | </div> | |
107 | ${h.end_form()} |
|
107 | ${h.end_form()} | |
108 | </div> |
|
108 | </div> | |
109 | </div> |
|
109 | </div> | |
110 |
|
110 | |||
111 | <div class="box box-right"> |
|
111 | <div class="box box-right"> | |
112 | <!-- box / title --> |
|
112 | <!-- box / title --> | |
113 | <div class="title"> |
|
113 | <div class="title"> | |
114 | <h5> |
|
114 | <h5> | |
115 | <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}"/> |
|
115 | <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}"/> | |
116 | <a id="show_my" class="link-white" href="#my">${_('My repos')}</a> / <a id="show_perms" class="link-white" href="#perms">${_('My permissions')}</a> |
|
116 | <a id="show_my" class="link-white" href="#my">${_('My repos')}</a> / <a id="show_perms" class="link-white" href="#perms">${_('My permissions')}</a> | |
117 | </h5> |
|
117 | </h5> | |
118 | %if h.HasPermissionAny('hg.admin','hg.create.repository')(): |
|
118 | %if h.HasPermissionAny('hg.admin','hg.create.repository')(): | |
119 | <ul class="links"> |
|
119 | <ul class="links"> | |
120 | <li> |
|
120 | <li> | |
121 | <span>${h.link_to(_('ADD'),h.url('admin_settings_create_repository'))}</span> |
|
121 | <span>${h.link_to(_('ADD'),h.url('admin_settings_create_repository'))}</span> | |
122 | </li> |
|
122 | </li> | |
123 | </ul> |
|
123 | </ul> | |
124 | %endif |
|
124 | %endif | |
125 | </div> |
|
125 | </div> | |
126 | <!-- end box / title --> |
|
126 | <!-- end box / title --> | |
127 | <div id="my" class="table"> |
|
127 | <div id="my" class="table"> | |
128 | <div id='repos_list_wrap' class="yui-skin-sam"> |
|
128 | <div id='repos_list_wrap' class="yui-skin-sam"> | |
129 | <table id="repos_list"> |
|
129 | <table id="repos_list"> | |
130 | <thead> |
|
130 | <thead> | |
131 | <tr> |
|
131 | <tr> | |
132 | <th></th> |
|
132 | <th></th> | |
133 | <th class="left">${_('Name')}</th> |
|
133 | <th class="left">${_('Name')}</th> | |
134 | <th class="left">${_('Revision')}</th> |
|
134 | <th class="left">${_('Revision')}</th> | |
135 | <th class="left">${_('Action')}</th> |
|
135 | <th class="left">${_('Action')}</th> | |
136 | <th class="left">${_('Action')}</th> |
|
136 | <th class="left">${_('Action')}</th> | |
137 | </thead> |
|
137 | </thead> | |
138 | <tbody> |
|
138 | <tbody> | |
139 |
<%namespace name="dt" file="/ |
|
139 | <%namespace name="dt" file="/data_table/_dt_elements.html"/> | |
140 | %if c.user_repos: |
|
140 | %if c.user_repos: | |
141 | %for repo in c.user_repos: |
|
141 | %for repo in c.user_repos: | |
142 | <tr> |
|
142 | <tr> | |
143 | ##QUICK MENU |
|
143 | ##QUICK MENU | |
144 | <td class="quick_repo_menu"> |
|
144 | <td class="quick_repo_menu"> | |
145 | ${dt.quick_menu(repo['name'])} |
|
145 | ${dt.quick_menu(repo['name'])} | |
146 | </td> |
|
146 | </td> | |
147 | ##REPO NAME AND ICONS |
|
147 | ##REPO NAME AND ICONS | |
148 | <td class="reponame"> |
|
148 | <td class="reponame"> | |
149 | ${dt.repo_name(repo['name'],repo['dbrepo']['repo_type'],repo['dbrepo']['private'],repo['dbrepo_fork'].get('repo_name'))} |
|
149 | ${dt.repo_name(repo['name'],repo['dbrepo']['repo_type'],repo['dbrepo']['private'],repo['dbrepo_fork'].get('repo_name'))} | |
150 | </td> |
|
150 | </td> | |
151 | ##LAST REVISION |
|
151 | ##LAST REVISION | |
152 | <td> |
|
152 | <td> | |
153 | ${dt.revision(repo['name'],repo['rev'],repo['tip'],repo['author'],repo['last_msg'])} |
|
153 | ${dt.revision(repo['name'],repo['rev'],repo['tip'],repo['author'],repo['last_msg'])} | |
154 | </td> |
|
154 | </td> | |
155 | <td><a href="${h.url('repo_settings_home',repo_name=repo['name'])}" title="${_('edit')}"><img class="icon" alt="${_('private')}" src="${h.url('/images/icons/application_form_edit.png')}"/></a></td> |
|
155 | <td><a href="${h.url('repo_settings_home',repo_name=repo['name'])}" title="${_('edit')}"><img class="icon" alt="${_('private')}" src="${h.url('/images/icons/application_form_edit.png')}"/></a></td> | |
156 | <td> |
|
156 | <td> | |
157 | ${h.form(url('repo_settings_delete', repo_name=repo['name']),method='delete')} |
|
157 | ${h.form(url('repo_settings_delete', repo_name=repo['name']),method='delete')} | |
158 | ${h.submit('remove_%s' % repo['name'],'',class_="delete_icon action_button",onclick="return confirm('"+_('Confirm to delete this repository: %s') % repo['name']+"');")} |
|
158 | ${h.submit('remove_%s' % repo['name'],'',class_="delete_icon action_button",onclick="return confirm('"+_('Confirm to delete this repository: %s') % repo['name']+"');")} | |
159 | ${h.end_form()} |
|
159 | ${h.end_form()} | |
160 | </td> |
|
160 | </td> | |
161 | </tr> |
|
161 | </tr> | |
162 | %endfor |
|
162 | %endfor | |
163 | %else: |
|
163 | %else: | |
164 | <div style="padding:5px 0px 10px 0px;"> |
|
164 | <div style="padding:5px 0px 10px 0px;"> | |
165 | ${_('No repositories yet')} |
|
165 | ${_('No repositories yet')} | |
166 | %if h.HasPermissionAny('hg.admin','hg.create.repository')(): |
|
166 | %if h.HasPermissionAny('hg.admin','hg.create.repository')(): | |
167 | ${h.link_to(_('create one now'),h.url('admin_settings_create_repository'),class_="ui-btn")} |
|
167 | ${h.link_to(_('create one now'),h.url('admin_settings_create_repository'),class_="ui-btn")} | |
168 | %endif |
|
168 | %endif | |
169 | </div> |
|
169 | </div> | |
170 | %endif |
|
170 | %endif | |
171 | </tbody> |
|
171 | </tbody> | |
172 | </table> |
|
172 | </table> | |
173 | </div> |
|
173 | </div> | |
174 | </div> |
|
174 | </div> | |
175 | <div id="perms" class="table" style="display:none"> |
|
175 | <div id="perms" class="table" style="display:none"> | |
176 | %for section in sorted(c.rhodecode_user.permissions.keys()): |
|
176 | %for section in sorted(c.rhodecode_user.permissions.keys()): | |
177 | <div class="perms_section_head">${section.replace("_"," ").capitalize()}</div> |
|
177 | <div class="perms_section_head">${section.replace("_"," ").capitalize()}</div> | |
178 |
|
178 | |||
179 | <div id='tbl_list_wrap_${section}' class="yui-skin-sam"> |
|
179 | <div id='tbl_list_wrap_${section}' class="yui-skin-sam"> | |
180 | <table id="tbl_list_${section}"> |
|
180 | <table id="tbl_list_${section}"> | |
181 | <thead> |
|
181 | <thead> | |
182 | <tr> |
|
182 | <tr> | |
183 | <th class="left">${_('Name')}</th> |
|
183 | <th class="left">${_('Name')}</th> | |
184 | <th class="left">${_('Permission')}</th> |
|
184 | <th class="left">${_('Permission')}</th> | |
185 | </thead> |
|
185 | </thead> | |
186 | <tbody> |
|
186 | <tbody> | |
187 | %for k in c.rhodecode_user.permissions[section]: |
|
187 | %for k in c.rhodecode_user.permissions[section]: | |
188 | <% |
|
188 | <% | |
189 | if section != 'global': |
|
189 | if section != 'global': | |
190 | section_perm = c.rhodecode_user.permissions[section].get(k) |
|
190 | section_perm = c.rhodecode_user.permissions[section].get(k) | |
191 | _perm = section_perm.split('.')[-1] |
|
191 | _perm = section_perm.split('.')[-1] | |
192 | else: |
|
192 | else: | |
193 | _perm = section_perm = None |
|
193 | _perm = section_perm = None | |
194 | %> |
|
194 | %> | |
195 | %if _perm not in ['none']: |
|
195 | %if _perm not in ['none']: | |
196 | <tr> |
|
196 | <tr> | |
197 | <td> |
|
197 | <td> | |
198 | %if section == 'repositories': |
|
198 | %if section == 'repositories': | |
199 | <a href="${h.url('summary_home',repo_name=k)}">${k}</a> |
|
199 | <a href="${h.url('summary_home',repo_name=k)}">${k}</a> | |
200 | %elif section == 'repositories_groups': |
|
200 | %elif section == 'repositories_groups': | |
201 | <a href="${h.url('repos_group_home',group_name=k)}">${k}</a> |
|
201 | <a href="${h.url('repos_group_home',group_name=k)}">${k}</a> | |
202 | %else: |
|
202 | %else: | |
203 | ${k} |
|
203 | ${k} | |
204 | %endif |
|
204 | %endif | |
205 | </td> |
|
205 | </td> | |
206 | <td> |
|
206 | <td> | |
207 | %if section == 'global': |
|
207 | %if section == 'global': | |
208 | ${h.bool2icon(True)} |
|
208 | ${h.bool2icon(True)} | |
209 | %else: |
|
209 | %else: | |
210 | <span class="perm_tag ${_perm}">${section_perm}</span> |
|
210 | <span class="perm_tag ${_perm}">${section_perm}</span> | |
211 | %endif |
|
211 | %endif | |
212 | </td> |
|
212 | </td> | |
213 | </tr> |
|
213 | </tr> | |
214 | %endif |
|
214 | %endif | |
215 | %endfor |
|
215 | %endfor | |
216 | </tbody> |
|
216 | </tbody> | |
217 | </table> |
|
217 | </table> | |
218 | </div> |
|
218 | </div> | |
219 | %endfor |
|
219 | %endfor | |
220 | </div> |
|
220 | </div> | |
221 | </div> |
|
221 | </div> | |
222 | <script type="text/javascript"> |
|
222 | <script type="text/javascript"> | |
223 | var filter_activate = function(){ |
|
223 | var filter_activate = function(){ | |
224 | var nodes = YUQ('#my tr td a.repo_name'); |
|
224 | var nodes = YUQ('#my tr td a.repo_name'); | |
225 | var func = function(node){ |
|
225 | var func = function(node){ | |
226 | return node.parentNode.parentNode.parentNode.parentNode; |
|
226 | return node.parentNode.parentNode.parentNode.parentNode; | |
227 | } |
|
227 | } | |
228 | q_filter('q_filter',YUQ('#my tr td a.repo_name'),func); |
|
228 | q_filter('q_filter',YUQ('#my tr td a.repo_name'),func); | |
229 | } |
|
229 | } | |
230 |
|
230 | |||
231 | YUE.on('show_my','click',function(e){ |
|
231 | YUE.on('show_my','click',function(e){ | |
232 | YUD.setStyle('perms','display','none'); |
|
232 | YUD.setStyle('perms','display','none'); | |
233 | YUD.setStyle('my','display',''); |
|
233 | YUD.setStyle('my','display',''); | |
234 | YUD.get('q_filter').removeAttribute('disabled'); |
|
234 | YUD.get('q_filter').removeAttribute('disabled'); | |
235 | filter_activate(); |
|
235 | filter_activate(); | |
236 | YUE.preventDefault(e); |
|
236 | YUE.preventDefault(e); | |
237 | }) |
|
237 | }) | |
238 | YUE.on('show_perms','click',function(e){ |
|
238 | YUE.on('show_perms','click',function(e){ | |
239 | YUD.setStyle('my','display','none'); |
|
239 | YUD.setStyle('my','display','none'); | |
240 | YUD.setStyle('perms','display',''); |
|
240 | YUD.setStyle('perms','display',''); | |
241 | YUD.setAttribute('q_filter','disabled','disabled'); |
|
241 | YUD.setAttribute('q_filter','disabled','disabled'); | |
242 | YUE.preventDefault(e); |
|
242 | YUE.preventDefault(e); | |
243 | }) |
|
243 | }) | |
244 |
|
244 | |||
245 |
|
245 | |||
246 | // main table sorting |
|
246 | // main table sorting | |
247 | var myColumnDefs = [ |
|
247 | var myColumnDefs = [ | |
248 | {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"}, |
|
248 | {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"}, | |
249 | {key:"name",label:"${_('Name')}",sortable:true, |
|
249 | {key:"name",label:"${_('Name')}",sortable:true, | |
250 | sortOptions: { sortFunction: nameSort }}, |
|
250 | sortOptions: { sortFunction: nameSort }}, | |
251 | {key:"tip",label:"${_('Tip')}",sortable:true, |
|
251 | {key:"tip",label:"${_('Tip')}",sortable:true, | |
252 | sortOptions: { sortFunction: revisionSort }}, |
|
252 | sortOptions: { sortFunction: revisionSort }}, | |
253 | {key:"action1",label:"",sortable:false}, |
|
253 | {key:"action1",label:"",sortable:false}, | |
254 | {key:"action2",label:"",sortable:false}, |
|
254 | {key:"action2",label:"",sortable:false}, | |
255 | ]; |
|
255 | ]; | |
256 |
|
256 | |||
257 | var myDataSource = new YAHOO.util.DataSource(YUD.get("repos_list")); |
|
257 | var myDataSource = new YAHOO.util.DataSource(YUD.get("repos_list")); | |
258 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; |
|
258 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; | |
259 | myDataSource.responseSchema = { |
|
259 | myDataSource.responseSchema = { | |
260 | fields: [ |
|
260 | fields: [ | |
261 | {key:"menu"}, |
|
261 | {key:"menu"}, | |
262 | {key:"name"}, |
|
262 | {key:"name"}, | |
263 | {key:"tip"}, |
|
263 | {key:"tip"}, | |
264 | {key:"action1"}, |
|
264 | {key:"action1"}, | |
265 | {key:"action2"}, |
|
265 | {key:"action2"}, | |
266 | ] |
|
266 | ] | |
267 | }; |
|
267 | }; | |
268 | var trans_defs = { |
|
268 | var trans_defs = { | |
269 | sortedBy:{key:"name",dir:"asc"}, |
|
269 | sortedBy:{key:"name",dir:"asc"}, | |
270 | MSG_SORTASC:"${_('Click to sort ascending')}", |
|
270 | MSG_SORTASC:"${_('Click to sort ascending')}", | |
271 | MSG_SORTDESC:"${_('Click to sort descending')}", |
|
271 | MSG_SORTDESC:"${_('Click to sort descending')}", | |
272 | MSG_EMPTY:"${_('No records found.')}", |
|
272 | MSG_EMPTY:"${_('No records found.')}", | |
273 | MSG_ERROR:"${_('Data error.')}", |
|
273 | MSG_ERROR:"${_('Data error.')}", | |
274 | MSG_LOADING:"${_('Loading...')}", |
|
274 | MSG_LOADING:"${_('Loading...')}", | |
275 | } |
|
275 | } | |
276 | var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource,trans_defs); |
|
276 | var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource,trans_defs); | |
277 | myDataTable.subscribe('postRenderEvent',function(oArgs) { |
|
277 | myDataTable.subscribe('postRenderEvent',function(oArgs) { | |
278 | tooltip_activate(); |
|
278 | tooltip_activate(); | |
279 | quick_repo_menu(); |
|
279 | quick_repo_menu(); | |
280 | filter_activate(); |
|
280 | filter_activate(); | |
281 | }); |
|
281 | }); | |
282 |
|
282 | |||
283 | var permsColumnDefs = [ |
|
283 | var permsColumnDefs = [ | |
284 | {key:"name",label:"${_('Name')}",sortable:true, sortOptions: { sortFunction: permNameSort }}, |
|
284 | {key:"name",label:"${_('Name')}",sortable:true, sortOptions: { sortFunction: permNameSort }}, | |
285 | {key:"perm",label:"${_('Permission')}",sortable:false,}, |
|
285 | {key:"perm",label:"${_('Permission')}",sortable:false,}, | |
286 | ]; |
|
286 | ]; | |
287 |
|
287 | |||
288 | // perms repos table |
|
288 | // perms repos table | |
289 | var myDataSource2 = new YAHOO.util.DataSource(YUD.get("tbl_list_repositories")); |
|
289 | var myDataSource2 = new YAHOO.util.DataSource(YUD.get("tbl_list_repositories")); | |
290 | myDataSource2.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; |
|
290 | myDataSource2.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; | |
291 | myDataSource2.responseSchema = { |
|
291 | myDataSource2.responseSchema = { | |
292 | fields: [ |
|
292 | fields: [ | |
293 | {key:"name"}, |
|
293 | {key:"name"}, | |
294 | {key:"perm"}, |
|
294 | {key:"perm"}, | |
295 | ] |
|
295 | ] | |
296 | }; |
|
296 | }; | |
297 |
|
297 | |||
298 | new YAHOO.widget.DataTable("tbl_list_wrap_repositories", permsColumnDefs, myDataSource2, trans_defs); |
|
298 | new YAHOO.widget.DataTable("tbl_list_wrap_repositories", permsColumnDefs, myDataSource2, trans_defs); | |
299 |
|
299 | |||
300 | //perms groups table |
|
300 | //perms groups table | |
301 | var myDataSource3 = new YAHOO.util.DataSource(YUD.get("tbl_list_repositories_groups")); |
|
301 | var myDataSource3 = new YAHOO.util.DataSource(YUD.get("tbl_list_repositories_groups")); | |
302 | myDataSource3.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; |
|
302 | myDataSource3.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; | |
303 | myDataSource3.responseSchema = { |
|
303 | myDataSource3.responseSchema = { | |
304 | fields: [ |
|
304 | fields: [ | |
305 | {key:"name"}, |
|
305 | {key:"name"}, | |
306 | {key:"perm"}, |
|
306 | {key:"perm"}, | |
307 | ] |
|
307 | ] | |
308 | }; |
|
308 | }; | |
309 |
|
309 | |||
310 | new YAHOO.widget.DataTable("tbl_list_wrap_repositories_groups", permsColumnDefs, myDataSource3, trans_defs); |
|
310 | new YAHOO.widget.DataTable("tbl_list_wrap_repositories_groups", permsColumnDefs, myDataSource3, trans_defs); | |
311 |
|
311 | |||
312 | </script> |
|
312 | </script> | |
313 | </%def> |
|
313 | </%def> |
@@ -1,201 +1,201 b'' | |||||
1 | <%page args="parent" /> |
|
1 | <%page args="parent" /> | |
2 | <div class="box"> |
|
2 | <div class="box"> | |
3 | <!-- box / title --> |
|
3 | <!-- box / title --> | |
4 | <div class="title"> |
|
4 | <div class="title"> | |
5 | <h5> |
|
5 | <h5> | |
6 | <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}"/> ${parent.breadcrumbs()} <span id="repo_count">0</span> ${_('repositories')} |
|
6 | <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}"/> ${parent.breadcrumbs()} <span id="repo_count">0</span> ${_('repositories')} | |
7 | </h5> |
|
7 | </h5> | |
8 | %if c.rhodecode_user.username != 'default': |
|
8 | %if c.rhodecode_user.username != 'default': | |
9 | %if h.HasPermissionAny('hg.admin','hg.create.repository')(): |
|
9 | %if h.HasPermissionAny('hg.admin','hg.create.repository')(): | |
10 | <ul class="links"> |
|
10 | <ul class="links"> | |
11 | <li> |
|
11 | <li> | |
12 | %if c.group: |
|
12 | %if c.group: | |
13 | <span>${h.link_to(_('ADD REPOSITORY'),h.url('admin_settings_create_repository',parent_group=c.group.group_id))}</span> |
|
13 | <span>${h.link_to(_('ADD REPOSITORY'),h.url('admin_settings_create_repository',parent_group=c.group.group_id))}</span> | |
14 | %else: |
|
14 | %else: | |
15 | <span>${h.link_to(_('ADD REPOSITORY'),h.url('admin_settings_create_repository'))}</span> |
|
15 | <span>${h.link_to(_('ADD REPOSITORY'),h.url('admin_settings_create_repository'))}</span> | |
16 | %endif |
|
16 | %endif | |
17 | </li> |
|
17 | </li> | |
18 | </ul> |
|
18 | </ul> | |
19 | %endif |
|
19 | %endif | |
20 | %endif |
|
20 | %endif | |
21 | </div> |
|
21 | </div> | |
22 | <!-- end box / title --> |
|
22 | <!-- end box / title --> | |
23 | <div class="table"> |
|
23 | <div class="table"> | |
24 | % if c.groups: |
|
24 | % if c.groups: | |
25 | <div id='groups_list_wrap' class="yui-skin-sam"> |
|
25 | <div id='groups_list_wrap' class="yui-skin-sam"> | |
26 | <table id="groups_list"> |
|
26 | <table id="groups_list"> | |
27 | <thead> |
|
27 | <thead> | |
28 | <tr> |
|
28 | <tr> | |
29 | <th class="left"><a href="#">${_('Group name')}</a></th> |
|
29 | <th class="left"><a href="#">${_('Group name')}</a></th> | |
30 | <th class="left"><a href="#">${_('Description')}</a></th> |
|
30 | <th class="left"><a href="#">${_('Description')}</a></th> | |
31 | ##<th class="left"><a href="#">${_('Number of repositories')}</a></th> |
|
31 | ##<th class="left"><a href="#">${_('Number of repositories')}</a></th> | |
32 | </tr> |
|
32 | </tr> | |
33 | </thead> |
|
33 | </thead> | |
34 |
|
34 | |||
35 | ## REPO GROUPS |
|
35 | ## REPO GROUPS | |
36 | % for gr in c.groups: |
|
36 | % for gr in c.groups: | |
37 | <tr> |
|
37 | <tr> | |
38 | <td> |
|
38 | <td> | |
39 | <div style="white-space: nowrap"> |
|
39 | <div style="white-space: nowrap"> | |
40 | <img class="icon" alt="${_('Repositories group')}" src="${h.url('/images/icons/database_link.png')}"/> |
|
40 | <img class="icon" alt="${_('Repositories group')}" src="${h.url('/images/icons/database_link.png')}"/> | |
41 | ${h.link_to(gr.name,url('repos_group_home',group_name=gr.group_name))} |
|
41 | ${h.link_to(gr.name,url('repos_group_home',group_name=gr.group_name))} | |
42 | </div> |
|
42 | </div> | |
43 | </td> |
|
43 | </td> | |
44 | <td>${gr.group_description}</td> |
|
44 | <td>${gr.group_description}</td> | |
45 | ## this is commented out since for multi nested repos can be HEAVY! |
|
45 | ## this is commented out since for multi nested repos can be HEAVY! | |
46 | ## in number of executed queries during traversing uncomment at will |
|
46 | ## in number of executed queries during traversing uncomment at will | |
47 | ##<td><b>${gr.repositories_recursive_count}</b></td> |
|
47 | ##<td><b>${gr.repositories_recursive_count}</b></td> | |
48 | </tr> |
|
48 | </tr> | |
49 | % endfor |
|
49 | % endfor | |
50 |
|
50 | |||
51 | </table> |
|
51 | </table> | |
52 | </div> |
|
52 | </div> | |
53 | <div style="height: 20px"></div> |
|
53 | <div style="height: 20px"></div> | |
54 | % endif |
|
54 | % endif | |
55 | <div id="welcome" style="display:none;text-align:center"> |
|
55 | <div id="welcome" style="display:none;text-align:center"> | |
56 | <h1><a href="${h.url('home')}">${c.rhodecode_name} ${c.rhodecode_version}</a></h1> |
|
56 | <h1><a href="${h.url('home')}">${c.rhodecode_name} ${c.rhodecode_version}</a></h1> | |
57 | </div> |
|
57 | </div> | |
58 | <div id='repos_list_wrap' class="yui-skin-sam"> |
|
58 | <div id='repos_list_wrap' class="yui-skin-sam"> | |
59 | <%cnt=0%> |
|
59 | <%cnt=0%> | |
60 |
<%namespace name="dt" file="/ |
|
60 | <%namespace name="dt" file="/data_table/_dt_elements.html"/> | |
61 |
|
61 | |||
62 | <table id="repos_list"> |
|
62 | <table id="repos_list"> | |
63 | <thead> |
|
63 | <thead> | |
64 | <tr> |
|
64 | <tr> | |
65 | <th class="left"></th> |
|
65 | <th class="left"></th> | |
66 | <th class="left">${_('Name')}</th> |
|
66 | <th class="left">${_('Name')}</th> | |
67 | <th class="left">${_('Description')}</th> |
|
67 | <th class="left">${_('Description')}</th> | |
68 | <th class="left">${_('Last change')}</th> |
|
68 | <th class="left">${_('Last change')}</th> | |
69 | <th class="left">${_('Tip')}</th> |
|
69 | <th class="left">${_('Tip')}</th> | |
70 | <th class="left">${_('Owner')}</th> |
|
70 | <th class="left">${_('Owner')}</th> | |
71 | <th class="left">${_('RSS')}</th> |
|
71 | <th class="left">${_('RSS')}</th> | |
72 | <th class="left">${_('Atom')}</th> |
|
72 | <th class="left">${_('Atom')}</th> | |
73 | </tr> |
|
73 | </tr> | |
74 | </thead> |
|
74 | </thead> | |
75 | <tbody> |
|
75 | <tbody> | |
76 | %for cnt,repo in enumerate(c.repos_list): |
|
76 | %for cnt,repo in enumerate(c.repos_list): | |
77 | <tr class="parity${(cnt+1)%2}"> |
|
77 | <tr class="parity${(cnt+1)%2}"> | |
78 | ##QUICK MENU |
|
78 | ##QUICK MENU | |
79 | <td class="quick_repo_menu"> |
|
79 | <td class="quick_repo_menu"> | |
80 | ${dt.quick_menu(repo['name'])} |
|
80 | ${dt.quick_menu(repo['name'])} | |
81 | </td> |
|
81 | </td> | |
82 | ##REPO NAME AND ICONS |
|
82 | ##REPO NAME AND ICONS | |
83 | <td class="reponame"> |
|
83 | <td class="reponame"> | |
84 | ${dt.repo_name(repo['name'],repo['dbrepo']['repo_type'],repo['dbrepo']['private'],repo['dbrepo_fork'].get('repo_name'),pageargs.get('short_repo_names'))} |
|
84 | ${dt.repo_name(repo['name'],repo['dbrepo']['repo_type'],repo['dbrepo']['private'],repo['dbrepo_fork'].get('repo_name'),pageargs.get('short_repo_names'))} | |
85 | </td> |
|
85 | </td> | |
86 | ##DESCRIPTION |
|
86 | ##DESCRIPTION | |
87 | <td><span class="tooltip" title="${h.tooltip(repo['description'])}"> |
|
87 | <td><span class="tooltip" title="${h.tooltip(repo['description'])}"> | |
88 | ${h.truncate(repo['description'],60)}</span> |
|
88 | ${h.truncate(repo['description'],60)}</span> | |
89 | </td> |
|
89 | </td> | |
90 | ##LAST CHANGE DATE |
|
90 | ##LAST CHANGE DATE | |
91 | <td> |
|
91 | <td> | |
92 | <span class="tooltip" title="${repo['last_change']}">${h.age(repo['last_change'])}</span> |
|
92 | <span class="tooltip" title="${repo['last_change']}">${h.age(repo['last_change'])}</span> | |
93 | </td> |
|
93 | </td> | |
94 | ##LAST REVISION |
|
94 | ##LAST REVISION | |
95 | <td> |
|
95 | <td> | |
96 | ${dt.revision(repo['name'],repo['rev'],repo['tip'],repo['author'],repo['last_msg'])} |
|
96 | ${dt.revision(repo['name'],repo['rev'],repo['tip'],repo['author'],repo['last_msg'])} | |
97 | </td> |
|
97 | </td> | |
98 | ## |
|
98 | ## | |
99 | <td title="${repo['contact']}">${h.person(repo['contact'])}</td> |
|
99 | <td title="${repo['contact']}">${h.person(repo['contact'])}</td> | |
100 | <td> |
|
100 | <td> | |
101 | %if c.rhodecode_user.username != 'default': |
|
101 | %if c.rhodecode_user.username != 'default': | |
102 | <a title="${_('Subscribe to %s rss feed')%repo['name']}" class="rss_icon" href="${h.url('rss_feed_home',repo_name=repo['name'],api_key=c.rhodecode_user.api_key)}"></a> |
|
102 | <a title="${_('Subscribe to %s rss feed')%repo['name']}" class="rss_icon" href="${h.url('rss_feed_home',repo_name=repo['name'],api_key=c.rhodecode_user.api_key)}"></a> | |
103 | %else: |
|
103 | %else: | |
104 | <a title="${_('Subscribe to %s rss feed')%repo['name']}" class="rss_icon" href="${h.url('rss_feed_home',repo_name=repo['name'])}"></a> |
|
104 | <a title="${_('Subscribe to %s rss feed')%repo['name']}" class="rss_icon" href="${h.url('rss_feed_home',repo_name=repo['name'])}"></a> | |
105 | %endif: |
|
105 | %endif: | |
106 | </td> |
|
106 | </td> | |
107 | <td> |
|
107 | <td> | |
108 | %if c.rhodecode_user.username != 'default': |
|
108 | %if c.rhodecode_user.username != 'default': | |
109 | <a title="${_('Subscribe to %s atom feed')%repo['name']}" class="atom_icon" href="${h.url('atom_feed_home',repo_name=repo['name'],api_key=c.rhodecode_user.api_key)}"></a> |
|
109 | <a title="${_('Subscribe to %s atom feed')%repo['name']}" class="atom_icon" href="${h.url('atom_feed_home',repo_name=repo['name'],api_key=c.rhodecode_user.api_key)}"></a> | |
110 | %else: |
|
110 | %else: | |
111 | <a title="${_('Subscribe to %s atom feed')%repo['name']}" class="atom_icon" href="${h.url('atom_feed_home',repo_name=repo['name'])}"></a> |
|
111 | <a title="${_('Subscribe to %s atom feed')%repo['name']}" class="atom_icon" href="${h.url('atom_feed_home',repo_name=repo['name'])}"></a> | |
112 | %endif: |
|
112 | %endif: | |
113 | </td> |
|
113 | </td> | |
114 | </tr> |
|
114 | </tr> | |
115 | %endfor |
|
115 | %endfor | |
116 | </tbody> |
|
116 | </tbody> | |
117 | </table> |
|
117 | </table> | |
118 | </div> |
|
118 | </div> | |
119 | </div> |
|
119 | </div> | |
120 | </div> |
|
120 | </div> | |
121 | <script> |
|
121 | <script> | |
122 | YUD.get('repo_count').innerHTML = ${cnt+1}; |
|
122 | YUD.get('repo_count').innerHTML = ${cnt+1}; | |
123 | var func = function(node){ |
|
123 | var func = function(node){ | |
124 | return node.parentNode.parentNode.parentNode.parentNode; |
|
124 | return node.parentNode.parentNode.parentNode.parentNode; | |
125 | } |
|
125 | } | |
126 |
|
126 | |||
127 |
|
127 | |||
128 | // groups table sorting |
|
128 | // groups table sorting | |
129 | var myColumnDefs = [ |
|
129 | var myColumnDefs = [ | |
130 | {key:"name",label:"${_('Group Name')}",sortable:true, |
|
130 | {key:"name",label:"${_('Group Name')}",sortable:true, | |
131 | sortOptions: { sortFunction: groupNameSort }}, |
|
131 | sortOptions: { sortFunction: groupNameSort }}, | |
132 | {key:"desc",label:"${_('Description')}",sortable:true}, |
|
132 | {key:"desc",label:"${_('Description')}",sortable:true}, | |
133 | ]; |
|
133 | ]; | |
134 |
|
134 | |||
135 | var myDataSource = new YAHOO.util.DataSource(YUD.get("groups_list")); |
|
135 | var myDataSource = new YAHOO.util.DataSource(YUD.get("groups_list")); | |
136 |
|
136 | |||
137 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; |
|
137 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; | |
138 | myDataSource.responseSchema = { |
|
138 | myDataSource.responseSchema = { | |
139 | fields: [ |
|
139 | fields: [ | |
140 | {key:"name"}, |
|
140 | {key:"name"}, | |
141 | {key:"desc"}, |
|
141 | {key:"desc"}, | |
142 | ] |
|
142 | ] | |
143 | }; |
|
143 | }; | |
144 |
|
144 | |||
145 | var myDataTable = new YAHOO.widget.DataTable("groups_list_wrap", myColumnDefs, myDataSource, |
|
145 | var myDataTable = new YAHOO.widget.DataTable("groups_list_wrap", myColumnDefs, myDataSource, | |
146 | { |
|
146 | { | |
147 | sortedBy:{key:"name",dir:"asc"}, |
|
147 | sortedBy:{key:"name",dir:"asc"}, | |
148 | MSG_SORTASC:"${_('Click to sort ascending')}", |
|
148 | MSG_SORTASC:"${_('Click to sort ascending')}", | |
149 | MSG_SORTDESC:"${_('Click to sort descending')}" |
|
149 | MSG_SORTDESC:"${_('Click to sort descending')}" | |
150 | } |
|
150 | } | |
151 | ); |
|
151 | ); | |
152 |
|
152 | |||
153 | // main table sorting |
|
153 | // main table sorting | |
154 | var myColumnDefs = [ |
|
154 | var myColumnDefs = [ | |
155 | {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"}, |
|
155 | {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"}, | |
156 | {key:"name",label:"${_('Name')}",sortable:true, |
|
156 | {key:"name",label:"${_('Name')}",sortable:true, | |
157 | sortOptions: { sortFunction: nameSort }}, |
|
157 | sortOptions: { sortFunction: nameSort }}, | |
158 | {key:"desc",label:"${_('Description')}",sortable:true}, |
|
158 | {key:"desc",label:"${_('Description')}",sortable:true}, | |
159 | {key:"last_change",label:"${_('Last Change')}",sortable:true, |
|
159 | {key:"last_change",label:"${_('Last Change')}",sortable:true, | |
160 | sortOptions: { sortFunction: ageSort }}, |
|
160 | sortOptions: { sortFunction: ageSort }}, | |
161 | {key:"tip",label:"${_('Tip')}",sortable:true, |
|
161 | {key:"tip",label:"${_('Tip')}",sortable:true, | |
162 | sortOptions: { sortFunction: revisionSort }}, |
|
162 | sortOptions: { sortFunction: revisionSort }}, | |
163 | {key:"owner",label:"${_('Owner')}",sortable:true}, |
|
163 | {key:"owner",label:"${_('Owner')}",sortable:true}, | |
164 | {key:"rss",label:"",sortable:false}, |
|
164 | {key:"rss",label:"",sortable:false}, | |
165 | {key:"atom",label:"",sortable:false}, |
|
165 | {key:"atom",label:"",sortable:false}, | |
166 | ]; |
|
166 | ]; | |
167 |
|
167 | |||
168 | var myDataSource = new YAHOO.util.DataSource(YUD.get("repos_list")); |
|
168 | var myDataSource = new YAHOO.util.DataSource(YUD.get("repos_list")); | |
169 |
|
169 | |||
170 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; |
|
170 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; | |
171 |
|
171 | |||
172 | myDataSource.responseSchema = { |
|
172 | myDataSource.responseSchema = { | |
173 | fields: [ |
|
173 | fields: [ | |
174 | {key:"menu"}, |
|
174 | {key:"menu"}, | |
175 | {key:"name"}, |
|
175 | {key:"name"}, | |
176 | {key:"desc"}, |
|
176 | {key:"desc"}, | |
177 | {key:"last_change"}, |
|
177 | {key:"last_change"}, | |
178 | {key:"tip"}, |
|
178 | {key:"tip"}, | |
179 | {key:"owner"}, |
|
179 | {key:"owner"}, | |
180 | {key:"rss"}, |
|
180 | {key:"rss"}, | |
181 | {key:"atom"}, |
|
181 | {key:"atom"}, | |
182 | ] |
|
182 | ] | |
183 | }; |
|
183 | }; | |
184 |
|
184 | |||
185 | var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource, |
|
185 | var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource, | |
186 | { |
|
186 | { | |
187 | sortedBy:{key:"name",dir:"asc"}, |
|
187 | sortedBy:{key:"name",dir:"asc"}, | |
188 | MSG_SORTASC:"${_('Click to sort ascending')}", |
|
188 | MSG_SORTASC:"${_('Click to sort ascending')}", | |
189 | MSG_SORTDESC:"${_('Click to sort descending')}", |
|
189 | MSG_SORTDESC:"${_('Click to sort descending')}", | |
190 | MSG_EMPTY:"${_('No records found.')}", |
|
190 | MSG_EMPTY:"${_('No records found.')}", | |
191 | MSG_ERROR:"${_('Data error.')}", |
|
191 | MSG_ERROR:"${_('Data error.')}", | |
192 | MSG_LOADING:"${_('Loading...')}", |
|
192 | MSG_LOADING:"${_('Loading...')}", | |
193 | } |
|
193 | } | |
194 | ); |
|
194 | ); | |
195 | myDataTable.subscribe('postRenderEvent',function(oArgs) { |
|
195 | myDataTable.subscribe('postRenderEvent',function(oArgs) { | |
196 | tooltip_activate(); |
|
196 | tooltip_activate(); | |
197 | quick_repo_menu(); |
|
197 | quick_repo_menu(); | |
198 | q_filter('q_filter',YUQ('div.table tr td a.repo_name'),func); |
|
198 | q_filter('q_filter',YUQ('div.table tr td a.repo_name'),func); | |
199 | }); |
|
199 | }); | |
200 |
|
200 | |||
201 | </script> |
|
201 | </script> |
@@ -1,220 +1,220 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 | <ul class="links"> |
|
18 | <ul class="links"> | |
19 | <li> |
|
19 | <li> | |
20 | <span><a id="refresh" href="${h.url('journal')}"><img class="icon" title="${_('Refresh')}" alt="${_('Refresh')}" src="${h.url('/images/icons/arrow_refresh.png')}"/> |
|
20 | <span><a id="refresh" href="${h.url('journal')}"><img class="icon" title="${_('Refresh')}" alt="${_('Refresh')}" src="${h.url('/images/icons/arrow_refresh.png')}"/> | |
21 | </a></span> |
|
21 | </a></span> | |
22 | </li> |
|
22 | </li> | |
23 | </ul> |
|
23 | </ul> | |
24 | </div> |
|
24 | </div> | |
25 | <div id="journal">${c.journal_data}</div> |
|
25 | <div id="journal">${c.journal_data}</div> | |
26 | </div> |
|
26 | </div> | |
27 | <div class="box box-right"> |
|
27 | <div class="box box-right"> | |
28 | <!-- box / title --> |
|
28 | <!-- box / title --> | |
29 | <div class="title"> |
|
29 | <div class="title"> | |
30 | <h5> |
|
30 | <h5> | |
31 | <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}"/> |
|
31 | <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}"/> | |
32 | <a id="show_my" class="link-white" href="#my">${_('My repos')}</a> / <a id="show_watched" class="link-white" href="#watched">${_('Watched')}</a> |
|
32 | <a id="show_my" class="link-white" href="#my">${_('My repos')}</a> / <a id="show_watched" class="link-white" href="#watched">${_('Watched')}</a> | |
33 | </h5> |
|
33 | </h5> | |
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'),h.url('admin_settings_create_repository'))}</span> |
|
37 | <span>${h.link_to(_('ADD'),h.url('admin_settings_create_repository'))}</span> | |
38 | </li> |
|
38 | </li> | |
39 | </ul> |
|
39 | </ul> | |
40 | %endif |
|
40 | %endif | |
41 | </div> |
|
41 | </div> | |
42 | <!-- end box / title --> |
|
42 | <!-- end box / title --> | |
43 | <div id="my" class="table"> |
|
43 | <div id="my" class="table"> | |
44 | %if c.user_repos: |
|
44 | %if c.user_repos: | |
45 | <div id='repos_list_wrap' class="yui-skin-sam"> |
|
45 | <div id='repos_list_wrap' class="yui-skin-sam"> | |
46 | <table id="repos_list"> |
|
46 | <table id="repos_list"> | |
47 | <thead> |
|
47 | <thead> | |
48 | <tr> |
|
48 | <tr> | |
49 | <th></th> |
|
49 | <th></th> | |
50 | <th class="left">${_('Name')}</th> |
|
50 | <th class="left">${_('Name')}</th> | |
51 | <th class="left">${_('Revision')}</th> |
|
51 | <th class="left">${_('Revision')}</th> | |
52 | <th class="left">${_('Action')}</th> |
|
52 | <th class="left">${_('Action')}</th> | |
53 | <th class="left">${_('Action')}</th> |
|
53 | <th class="left">${_('Action')}</th> | |
54 | </thead> |
|
54 | </thead> | |
55 | <tbody> |
|
55 | <tbody> | |
56 |
<%namespace name="dt" file="/ |
|
56 | <%namespace name="dt" file="/data_table/_dt_elements.html"/> | |
57 | %for repo in c.user_repos: |
|
57 | %for repo in c.user_repos: | |
58 | <tr> |
|
58 | <tr> | |
59 | ##QUICK MENU |
|
59 | ##QUICK MENU | |
60 | <td class="quick_repo_menu"> |
|
60 | <td class="quick_repo_menu"> | |
61 | ${dt.quick_menu(repo['name'])} |
|
61 | ${dt.quick_menu(repo['name'])} | |
62 | </td> |
|
62 | </td> | |
63 | ##REPO NAME AND ICONS |
|
63 | ##REPO NAME AND ICONS | |
64 | <td class="reponame"> |
|
64 | <td class="reponame"> | |
65 | ${dt.repo_name(repo['name'],repo['dbrepo']['repo_type'],repo['dbrepo']['private'],repo['dbrepo_fork'].get('repo_name'))} |
|
65 | ${dt.repo_name(repo['name'],repo['dbrepo']['repo_type'],repo['dbrepo']['private'],repo['dbrepo_fork'].get('repo_name'))} | |
66 | </td> |
|
66 | </td> | |
67 | ##LAST REVISION |
|
67 | ##LAST REVISION | |
68 | <td> |
|
68 | <td> | |
69 | ${dt.revision(repo['name'],repo['rev'],repo['tip'],repo['author'],repo['last_msg'])} |
|
69 | ${dt.revision(repo['name'],repo['rev'],repo['tip'],repo['author'],repo['last_msg'])} | |
70 | </td> |
|
70 | </td> | |
71 | ## |
|
71 | ## | |
72 | <td><a href="${h.url('repo_settings_home',repo_name=repo['name'])}" title="${_('edit')}"><img class="icon" alt="${_('private')}" src="${h.url('/images/icons/application_form_edit.png')}"/></a></td> |
|
72 | <td><a href="${h.url('repo_settings_home',repo_name=repo['name'])}" title="${_('edit')}"><img class="icon" alt="${_('private')}" src="${h.url('/images/icons/application_form_edit.png')}"/></a></td> | |
73 | <td> |
|
73 | <td> | |
74 | ${h.form(url('repo_settings_delete', repo_name=repo['name']),method='delete')} |
|
74 | ${h.form(url('repo_settings_delete', repo_name=repo['name']),method='delete')} | |
75 | ${h.submit('remove_%s' % repo['name'],'',class_="delete_icon action_button",onclick="return confirm('Confirm to delete this repository');")} |
|
75 | ${h.submit('remove_%s' % repo['name'],'',class_="delete_icon action_button",onclick="return confirm('Confirm to delete this repository');")} | |
76 | ${h.end_form()} |
|
76 | ${h.end_form()} | |
77 | </td> |
|
77 | </td> | |
78 | </tr> |
|
78 | </tr> | |
79 | %endfor |
|
79 | %endfor | |
80 | </tbody> |
|
80 | </tbody> | |
81 | </table> |
|
81 | </table> | |
82 | </div> |
|
82 | </div> | |
83 | %else: |
|
83 | %else: | |
84 | <div style="padding:5px 0px 10px 0px;"> |
|
84 | <div style="padding:5px 0px 10px 0px;"> | |
85 | ${_('No repositories yet')} |
|
85 | ${_('No repositories yet')} | |
86 | %if h.HasPermissionAny('hg.admin','hg.create.repository')(): |
|
86 | %if h.HasPermissionAny('hg.admin','hg.create.repository')(): | |
87 | ${h.link_to(_('create one now'),h.url('admin_settings_create_repository'),class_="ui-btn")} |
|
87 | ${h.link_to(_('create one now'),h.url('admin_settings_create_repository'),class_="ui-btn")} | |
88 | %endif |
|
88 | %endif | |
89 | </div> |
|
89 | </div> | |
90 | %endif |
|
90 | %endif | |
91 | </div> |
|
91 | </div> | |
92 |
|
92 | |||
93 | <div id="watched" class="table" style="display:none"> |
|
93 | <div id="watched" class="table" style="display:none"> | |
94 | %if c.following: |
|
94 | %if c.following: | |
95 | <table> |
|
95 | <table> | |
96 | <thead> |
|
96 | <thead> | |
97 | <tr> |
|
97 | <tr> | |
98 | <th class="left">${_('Name')}</th> |
|
98 | <th class="left">${_('Name')}</th> | |
99 | </thead> |
|
99 | </thead> | |
100 | <tbody> |
|
100 | <tbody> | |
101 | %for entry in c.following: |
|
101 | %for entry in c.following: | |
102 | <tr> |
|
102 | <tr> | |
103 | <td> |
|
103 | <td> | |
104 | %if entry.follows_user_id: |
|
104 | %if entry.follows_user_id: | |
105 | <img title="${_('following user')}" alt="${_('user')}" src="${h.url('/images/icons/user.png')}"/> |
|
105 | <img title="${_('following user')}" alt="${_('user')}" src="${h.url('/images/icons/user.png')}"/> | |
106 | ${entry.follows_user.full_contact} |
|
106 | ${entry.follows_user.full_contact} | |
107 | %endif |
|
107 | %endif | |
108 |
|
108 | |||
109 | %if entry.follows_repo_id: |
|
109 | %if entry.follows_repo_id: | |
110 | <div style="float:right;padding-right:5px"> |
|
110 | <div style="float:right;padding-right:5px"> | |
111 | <span id="follow_toggle_${entry.follows_repository.repo_id}" class="following" title="${_('Stop following this repository')}" |
|
111 | <span id="follow_toggle_${entry.follows_repository.repo_id}" class="following" title="${_('Stop following this repository')}" | |
112 | onclick="javascript:toggleFollowingRepo(this,${entry.follows_repository.repo_id},'${str(h.get_token())}')"> |
|
112 | onclick="javascript:toggleFollowingRepo(this,${entry.follows_repository.repo_id},'${str(h.get_token())}')"> | |
113 | </span> |
|
113 | </span> | |
114 | </div> |
|
114 | </div> | |
115 |
|
115 | |||
116 | %if h.is_hg(entry.follows_repository): |
|
116 | %if h.is_hg(entry.follows_repository): | |
117 | <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/> |
|
117 | <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/> | |
118 | %elif h.is_git(entry.follows_repository): |
|
118 | %elif h.is_git(entry.follows_repository): | |
119 | <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/> |
|
119 | <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/> | |
120 | %endif |
|
120 | %endif | |
121 |
|
121 | |||
122 | %if entry.follows_repository.private: |
|
122 | %if entry.follows_repository.private: | |
123 | <img class="icon" title="${_('private repository')}" alt="${_('private repository')}" src="${h.url('/images/icons/lock.png')}"/> |
|
123 | <img class="icon" title="${_('private repository')}" alt="${_('private repository')}" src="${h.url('/images/icons/lock.png')}"/> | |
124 | %else: |
|
124 | %else: | |
125 | <img class="icon" title="${_('public repository')}" alt="${_('public repository')}" src="${h.url('/images/icons/lock_open.png')}"/> |
|
125 | <img class="icon" title="${_('public repository')}" alt="${_('public repository')}" src="${h.url('/images/icons/lock_open.png')}"/> | |
126 | %endif |
|
126 | %endif | |
127 | <span class="watched_repo"> |
|
127 | <span class="watched_repo"> | |
128 | ${h.link_to(entry.follows_repository.repo_name,h.url('summary_home',repo_name=entry.follows_repository.repo_name))} |
|
128 | ${h.link_to(entry.follows_repository.repo_name,h.url('summary_home',repo_name=entry.follows_repository.repo_name))} | |
129 | </span> |
|
129 | </span> | |
130 | %endif |
|
130 | %endif | |
131 | </td> |
|
131 | </td> | |
132 | </tr> |
|
132 | </tr> | |
133 | %endfor |
|
133 | %endfor | |
134 | </tbody> |
|
134 | </tbody> | |
135 | </table> |
|
135 | </table> | |
136 | %else: |
|
136 | %else: | |
137 | <div style="padding:5px 0px 10px 0px;"> |
|
137 | <div style="padding:5px 0px 10px 0px;"> | |
138 | ${_('You are not following any users or repositories')} |
|
138 | ${_('You are not following any users or repositories')} | |
139 | </div> |
|
139 | </div> | |
140 | %endif |
|
140 | %endif | |
141 | </div> |
|
141 | </div> | |
142 | </div> |
|
142 | </div> | |
143 |
|
143 | |||
144 | <script type="text/javascript"> |
|
144 | <script type="text/javascript"> | |
145 |
|
145 | |||
146 | YUE.on('show_my','click',function(e){ |
|
146 | YUE.on('show_my','click',function(e){ | |
147 | YUD.setStyle('watched','display','none'); |
|
147 | YUD.setStyle('watched','display','none'); | |
148 | YUD.setStyle('my','display',''); |
|
148 | YUD.setStyle('my','display',''); | |
149 | var nodes = YUQ('#my tr td a.repo_name'); |
|
149 | var nodes = YUQ('#my tr td a.repo_name'); | |
150 | var target = 'q_filter'; |
|
150 | var target = 'q_filter'; | |
151 | var func = function(node){ |
|
151 | var func = function(node){ | |
152 | return node.parentNode.parentNode.parentNode.parentNode; |
|
152 | return node.parentNode.parentNode.parentNode.parentNode; | |
153 | } |
|
153 | } | |
154 | q_filter(target,nodes,func); |
|
154 | q_filter(target,nodes,func); | |
155 | YUE.preventDefault(e); |
|
155 | YUE.preventDefault(e); | |
156 | }) |
|
156 | }) | |
157 | YUE.on('show_watched','click',function(e){ |
|
157 | YUE.on('show_watched','click',function(e){ | |
158 | YUD.setStyle('my','display','none'); |
|
158 | YUD.setStyle('my','display','none'); | |
159 | YUD.setStyle('watched','display',''); |
|
159 | YUD.setStyle('watched','display',''); | |
160 | var nodes = YUQ('#watched .watched_repo a'); |
|
160 | var nodes = YUQ('#watched .watched_repo a'); | |
161 | var target = 'q_filter'; |
|
161 | var target = 'q_filter'; | |
162 | var func = function(node){ |
|
162 | var func = function(node){ | |
163 | return node.parentNode.parentNode; |
|
163 | return node.parentNode.parentNode; | |
164 | } |
|
164 | } | |
165 | q_filter(target,nodes,func); |
|
165 | q_filter(target,nodes,func); | |
166 | YUE.preventDefault(e); |
|
166 | YUE.preventDefault(e); | |
167 | }) |
|
167 | }) | |
168 | YUE.on('refresh','click',function(e){ |
|
168 | YUE.on('refresh','click',function(e){ | |
169 | ypjax(e.currentTarget.href,"journal",function(){show_more_event();tooltip_activate();}); |
|
169 | ypjax(e.currentTarget.href,"journal",function(){show_more_event();tooltip_activate();}); | |
170 | YUE.preventDefault(e); |
|
170 | YUE.preventDefault(e); | |
171 | }); |
|
171 | }); | |
172 |
|
172 | |||
173 |
|
173 | |||
174 | // main table sorting |
|
174 | // main table sorting | |
175 | var myColumnDefs = [ |
|
175 | var myColumnDefs = [ | |
176 | {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"}, |
|
176 | {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"}, | |
177 | {key:"name",label:"${_('Name')}",sortable:true, |
|
177 | {key:"name",label:"${_('Name')}",sortable:true, | |
178 | sortOptions: { sortFunction: nameSort }}, |
|
178 | sortOptions: { sortFunction: nameSort }}, | |
179 | {key:"tip",label:"${_('Tip')}",sortable:true, |
|
179 | {key:"tip",label:"${_('Tip')}",sortable:true, | |
180 | sortOptions: { sortFunction: revisionSort }}, |
|
180 | sortOptions: { sortFunction: revisionSort }}, | |
181 | {key:"action1",label:"",sortable:false}, |
|
181 | {key:"action1",label:"",sortable:false}, | |
182 | {key:"action2",label:"",sortable:false}, |
|
182 | {key:"action2",label:"",sortable:false}, | |
183 | ]; |
|
183 | ]; | |
184 |
|
184 | |||
185 | var myDataSource = new YAHOO.util.DataSource(YUD.get("repos_list")); |
|
185 | var myDataSource = new YAHOO.util.DataSource(YUD.get("repos_list")); | |
186 |
|
186 | |||
187 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; |
|
187 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; | |
188 |
|
188 | |||
189 | myDataSource.responseSchema = { |
|
189 | myDataSource.responseSchema = { | |
190 | fields: [ |
|
190 | fields: [ | |
191 | {key:"menu"}, |
|
191 | {key:"menu"}, | |
192 | {key:"name"}, |
|
192 | {key:"name"}, | |
193 | {key:"tip"}, |
|
193 | {key:"tip"}, | |
194 | {key:"action1"}, |
|
194 | {key:"action1"}, | |
195 | {key:"action2"} |
|
195 | {key:"action2"} | |
196 | ] |
|
196 | ] | |
197 | }; |
|
197 | }; | |
198 |
|
198 | |||
199 | var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource, |
|
199 | var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource, | |
200 | { |
|
200 | { | |
201 | sortedBy:{key:"name",dir:"asc"}, |
|
201 | sortedBy:{key:"name",dir:"asc"}, | |
202 | MSG_SORTASC:"${_('Click to sort ascending')}", |
|
202 | MSG_SORTASC:"${_('Click to sort ascending')}", | |
203 | MSG_SORTDESC:"${_('Click to sort descending')}", |
|
203 | MSG_SORTDESC:"${_('Click to sort descending')}", | |
204 | MSG_EMPTY:"${_('No records found.')}", |
|
204 | MSG_EMPTY:"${_('No records found.')}", | |
205 | MSG_ERROR:"${_('Data error.')}", |
|
205 | MSG_ERROR:"${_('Data error.')}", | |
206 | MSG_LOADING:"${_('Loading...')}", |
|
206 | MSG_LOADING:"${_('Loading...')}", | |
207 | } |
|
207 | } | |
208 | ); |
|
208 | ); | |
209 | myDataTable.subscribe('postRenderEvent',function(oArgs) { |
|
209 | myDataTable.subscribe('postRenderEvent',function(oArgs) { | |
210 | tooltip_activate(); |
|
210 | tooltip_activate(); | |
211 | quick_repo_menu(); |
|
211 | quick_repo_menu(); | |
212 | var func = function(node){ |
|
212 | var func = function(node){ | |
213 | return node.parentNode.parentNode.parentNode.parentNode; |
|
213 | return node.parentNode.parentNode.parentNode.parentNode; | |
214 | } |
|
214 | } | |
215 | q_filter('q_filter',YUQ('#my tr td a.repo_name'),func); |
|
215 | q_filter('q_filter',YUQ('#my tr td a.repo_name'),func); | |
216 | }); |
|
216 | }); | |
217 |
|
217 | |||
218 |
|
218 | |||
219 | </script> |
|
219 | </script> | |
220 | </%def> |
|
220 | </%def> |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now