Show More
@@ -0,0 +1,22 b'' | |||
|
1 | ||
|
2 | <div class="pullrequests_section_head">${_('Opened by me')}</div> | |
|
3 | <ul> | |
|
4 | %for pull_request in c.my_pull_requests: | |
|
5 | <li> | |
|
6 | <a href="${h.url('pullrequest_show',repo_name=pull_request.org_repo.repo_name,pull_request_id=pull_request.pull_request_id)}"> | |
|
7 | ${_('Pull request #%s opened on %s') % (pull_request.pull_request_id, h.fmt_date(pull_request.created_on))} | |
|
8 | </a> | |
|
9 | </li> | |
|
10 | %endfor | |
|
11 | </ul> | |
|
12 | ||
|
13 | <div class="pullrequests_section_head">${_('I participate in')}</div> | |
|
14 | <ul> | |
|
15 | %for pull_request in c.participate_in_pull_requests: | |
|
16 | <li> | |
|
17 | <a href="${h.url('pullrequest_show',repo_name=pull_request.org_repo.repo_name,pull_request_id=pull_request.pull_request_id)}"> | |
|
18 | ${_('Pull request #%s opened by %s on %s') % (pull_request.pull_request_id, pull_request.author.full_name, h.fmt_date(pull_request.created_on))} | |
|
19 | </a> | |
|
20 | </li> | |
|
21 | %endfor | |
|
22 | </ul> |
@@ -0,0 +1,46 b'' | |||
|
1 | <div id='repos_list_wrap' class="yui-skin-sam"> | |
|
2 | <table id="repos_list"> | |
|
3 | <thead> | |
|
4 | <tr> | |
|
5 | <th></th> | |
|
6 | <th class="left">${_('Name')}</th> | |
|
7 | <th class="left">${_('Revision')}</th> | |
|
8 | <th class="left">${_('Action')}</th> | |
|
9 | <th class="left">${_('Action')}</th> | |
|
10 | </thead> | |
|
11 | <tbody> | |
|
12 | <%namespace name="dt" file="/data_table/_dt_elements.html"/> | |
|
13 | %if c.user_repos: | |
|
14 | %for repo in c.user_repos: | |
|
15 | <tr> | |
|
16 | ##QUICK MENU | |
|
17 | <td class="quick_repo_menu"> | |
|
18 | ${dt.quick_menu(repo['name'])} | |
|
19 | </td> | |
|
20 | ##REPO NAME AND ICONS | |
|
21 | <td class="reponame"> | |
|
22 | ${dt.repo_name(repo['name'],repo['dbrepo']['repo_type'],repo['dbrepo']['private'],repo['dbrepo_fork'].get('repo_name'))} | |
|
23 | </td> | |
|
24 | ##LAST REVISION | |
|
25 | <td> | |
|
26 | ${dt.revision(repo['name'],repo['rev'],repo['tip'],repo['author'],repo['last_msg'])} | |
|
27 | </td> | |
|
28 | <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> | |
|
29 | <td> | |
|
30 | ${h.form(url('repo_settings_delete', repo_name=repo['name']),method='delete')} | |
|
31 | ${h.submit('remove_%s' % repo['name'],'',class_="delete_icon action_button",onclick="return confirm('"+_('Confirm to delete this repository: %s') % repo['name']+"');")} | |
|
32 | ${h.end_form()} | |
|
33 | </td> | |
|
34 | </tr> | |
|
35 | %endfor | |
|
36 | %else: | |
|
37 | <div style="padding:5px 0px 10px 0px;"> | |
|
38 | ${_('No repositories yet')} | |
|
39 | %if h.HasPermissionAny('hg.admin','hg.create.repository')(): | |
|
40 | ${h.link_to(_('create one now'),h.url('admin_settings_create_repository'),class_="ui-btn")} | |
|
41 | %endif | |
|
42 | </div> | |
|
43 | %endif | |
|
44 | </tbody> | |
|
45 | </table> | |
|
46 | </div> No newline at end of file |
@@ -296,6 +296,11 b' def make_map(config):' | |||
|
296 | 296 | action="my_account_update", conditions=dict(method=["PUT"])) |
|
297 | 297 | m.connect("admin_settings_create_repository", "/create_repository", |
|
298 | 298 | action="create_repository", conditions=dict(method=["GET"])) |
|
299 | m.connect("admin_settings_my_repos", "/my_account/repos", | |
|
300 | action="my_account_my_repos", conditions=dict(method=["GET"])) | |
|
301 | m.connect("admin_settings_my_pullrequests", "/my_account/pull_requests", | |
|
302 | action="my_account_my_pullrequests", conditions=dict(method=["GET"])) | |
|
303 | ||
|
299 | 304 | |
|
300 | 305 | #NOTIFICATION REST ROUTES |
|
301 | 306 | with rmap.submapper(path_prefix=ADMIN_PREFIX, |
@@ -1096,6 +1096,10 b' tbody .yui-dt-editable { cursor: pointer' | |||
|
1096 | 1096 | color: #FFFFFF; |
|
1097 | 1097 | } |
|
1098 | 1098 | |
|
1099 | #content div.box div.title .link-white.current{ | |
|
1100 | color: #BFE3FF; | |
|
1101 | } | |
|
1102 | ||
|
1099 | 1103 | #content div.box div.title ul.links li { |
|
1100 | 1104 | list-style: none; |
|
1101 | 1105 | float: left; |
@@ -4336,6 +4340,15 b' form.comment-inline-form {' | |||
|
4336 | 4340 | } |
|
4337 | 4341 | |
|
4338 | 4342 | /**** |
|
4343 | PULL REQUESTS | |
|
4344 | *****/ | |
|
4345 | .pullrequests_section_head { | |
|
4346 | padding:10px 10px 10px 0px; | |
|
4347 | font-size:16px; | |
|
4348 | font-weight: bold; | |
|
4349 | } | |
|
4350 | ||
|
4351 | /**** | |
|
4339 | 4352 | PERMS |
|
4340 | 4353 | *****/ |
|
4341 | 4354 | #perms .perms_section_head { |
@@ -28,67 +28,27 b'' | |||
|
28 | 28 | <!-- box / title --> |
|
29 | 29 | <div class="title"> |
|
30 | 30 | <h5> |
|
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_perms" class="link-white" href="#perms">${_('My permissions')}</a> | |
|
31 | <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}" style="display: none"/> | |
|
33 | 32 | </h5> |
|
33 | <ul class="links" style="color:#DADADA"> | |
|
34 | <li> | |
|
35 | <span><a id="show_perms" class="link-white current" href="#perms">${_('My permissions')}</a> </span> | |
|
36 | </li> | |
|
37 | <li> | |
|
38 | <span><a id="show_my" class="link-white" href="#my">${_('My repos')}</a> </span> | |
|
39 | </li> | |
|
40 | <li> | |
|
41 | <span><a id="show_pullrequests" class="link-white" href="#perms">${_('My pull requests')}</a> </span> | |
|
42 | </li> | |
|
34 | 43 | %if h.HasPermissionAny('hg.admin','hg.create.repository')(): |
|
35 | <ul class="links"> | |
|
36 | 44 | <li> |
|
37 |
<span>${h.link_to(_('A |
|
|
45 | <span>${h.link_to(_('Add repo'),h.url('admin_settings_create_repository'))}</span> | |
|
38 | 46 | </li> |
|
47 | %endif | |
|
39 | 48 | </ul> |
|
40 | %endif | |
|
41 | 49 | </div> |
|
42 | 50 | <!-- end box / title --> |
|
43 |
<div id=" |
|
|
44 | <div id='repos_list_wrap' class="yui-skin-sam"> | |
|
45 | <table id="repos_list"> | |
|
46 | <thead> | |
|
47 | <tr> | |
|
48 | <th></th> | |
|
49 | <th class="left">${_('Name')}</th> | |
|
50 | <th class="left">${_('Revision')}</th> | |
|
51 | <th class="left">${_('Action')}</th> | |
|
52 | <th class="left">${_('Action')}</th> | |
|
53 | </thead> | |
|
54 | <tbody> | |
|
55 | <%namespace name="dt" file="/data_table/_dt_elements.html"/> | |
|
56 | %if c.user_repos: | |
|
57 | %for repo in c.user_repos: | |
|
58 | <tr> | |
|
59 | ##QUICK MENU | |
|
60 | <td class="quick_repo_menu"> | |
|
61 | ${dt.quick_menu(repo['name'])} | |
|
62 | </td> | |
|
63 | ##REPO NAME AND ICONS | |
|
64 | <td class="reponame"> | |
|
65 | ${dt.repo_name(repo['name'],repo['dbrepo']['repo_type'],repo['dbrepo']['private'],repo['dbrepo_fork'].get('repo_name'))} | |
|
66 | </td> | |
|
67 | ##LAST REVISION | |
|
68 | <td> | |
|
69 | ${dt.revision(repo['name'],repo['rev'],repo['tip'],repo['author'],repo['last_msg'])} | |
|
70 | </td> | |
|
71 | <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> | |
|
73 | ${h.form(url('repo_settings_delete', repo_name=repo['name']),method='delete')} | |
|
74 | ${h.submit('remove_%s' % repo['name'],'',class_="delete_icon action_button",onclick="return confirm('"+_('Confirm to delete this repository: %s') % repo['name']+"');")} | |
|
75 | ${h.end_form()} | |
|
76 | </td> | |
|
77 | </tr> | |
|
78 | %endfor | |
|
79 | %else: | |
|
80 | <div style="padding:5px 0px 10px 0px;"> | |
|
81 | ${_('No repositories yet')} | |
|
82 | %if h.HasPermissionAny('hg.admin','hg.create.repository')(): | |
|
83 | ${h.link_to(_('create one now'),h.url('admin_settings_create_repository'),class_="ui-btn")} | |
|
84 | %endif | |
|
85 | </div> | |
|
86 | %endif | |
|
87 | </tbody> | |
|
88 | </table> | |
|
89 | </div> | |
|
90 | </div> | |
|
91 | <div id="perms" class="table" style="display:none"> | |
|
51 | <div id="perms" class="table"> | |
|
92 | 52 | %for section in sorted(c.rhodecode_user.permissions.keys()): |
|
93 | 53 | <div class="perms_section_head">${section.replace("_"," ").capitalize()}</div> |
|
94 | 54 | |
@@ -134,6 +94,9 b'' | |||
|
134 | 94 | </div> |
|
135 | 95 | %endfor |
|
136 | 96 | </div> |
|
97 | <div id="my" class="table" style="display:none"> | |
|
98 | </div> | |
|
99 | <div id="pullrequests" class="table" style="display:none"> | |
|
137 | 100 | </div> |
|
138 | 101 | <script type="text/javascript"> |
|
139 | 102 | var filter_activate = function(){ |
@@ -143,22 +106,48 b' var filter_activate = function(){' | |||
|
143 | 106 | } |
|
144 | 107 | q_filter('q_filter',YUQ('#my tr td a.repo_name'),func); |
|
145 | 108 | } |
|
109 | YUE.on('show_perms','click',function(e){ | |
|
110 | YUD.addClass('show_perms', 'current'); | |
|
111 | YUD.removeClass('show_my','current'); | |
|
112 | YUD.removeClass('show_pullrequests','current'); | |
|
146 | 113 | |
|
147 | YUE.on('show_my','click',function(e){ | |
|
148 |
YUD.setStyle('p |
|
|
149 |
YUD.setStyle(' |
|
|
150 |
YUD. |
|
|
151 | filter_activate(); | |
|
114 | YUD.setStyle('my','display','none'); | |
|
115 | YUD.setStyle('pullrequests','display','none'); | |
|
116 | YUD.setStyle('perms','display',''); | |
|
117 | YUD.setStyle('q_filter','display','none'); | |
|
152 | 118 | YUE.preventDefault(e); |
|
153 | 119 | }) |
|
154 |
YUE.on('show_ |
|
|
120 | YUE.on('show_my','click',function(e){ | |
|
121 | YUD.addClass('show_my', 'current'); | |
|
122 | YUD.removeClass('show_perms','current'); | |
|
123 | YUD.removeClass('show_pullrequests','current'); | |
|
124 | ||
|
125 | YUD.setStyle('perms','display','none'); | |
|
126 | YUD.setStyle('pullrequests','display','none'); | |
|
127 | YUD.setStyle('my','display',''); | |
|
128 | YUD.setStyle('q_filter','display',''); | |
|
129 | ||
|
130 | YUE.preventDefault(e); | |
|
131 | var url = "${h.url('admin_settings_my_repos')}"; | |
|
132 | ypjax(url, 'my', function(){ | |
|
133 | table_sort(); | |
|
134 | filter_activate(); | |
|
135 | }); | |
|
136 | }) | |
|
137 | YUE.on('show_pullrequests','click',function(e){ | |
|
138 | YUD.addClass('show_pullrequests', 'current'); | |
|
139 | YUD.removeClass('show_my','current'); | |
|
140 | YUD.removeClass('show_perms','current'); | |
|
141 | ||
|
155 | 142 | YUD.setStyle('my','display','none'); |
|
156 | YUD.setStyle('perms','display',''); | |
|
157 | YUD.setAttribute('q_filter','disabled','disabled'); | |
|
143 | YUD.setStyle('perms','display','none'); | |
|
144 | YUD.setStyle('pullrequests','display',''); | |
|
145 | YUD.setStyle('q_filter','display','none'); | |
|
158 | 146 | YUE.preventDefault(e); |
|
147 | var url = "${h.url('admin_settings_my_pullrequests')}"; | |
|
148 | ypjax(url, 'pullrequests'); | |
|
159 | 149 | }) |
|
160 | 150 | |
|
161 | ||
|
162 | 151 | // main table sorting |
|
163 | 152 | var myColumnDefs = [ |
|
164 | 153 | {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"}, |
@@ -170,6 +159,7 b' var myColumnDefs = [' | |||
|
170 | 159 | {key:"action2",label:"",sortable:false}, |
|
171 | 160 | ]; |
|
172 | 161 | |
|
162 | function table_sort(){ | |
|
173 | 163 | var myDataSource = new YAHOO.util.DataSource(YUD.get("repos_list")); |
|
174 | 164 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; |
|
175 | 165 | myDataSource.responseSchema = { |
@@ -224,6 +214,6 b' myDataSource3.responseSchema = {' | |||
|
224 | 214 | }; |
|
225 | 215 | |
|
226 | 216 | new YAHOO.widget.DataTable("tbl_list_wrap_repositories_groups", permsColumnDefs, myDataSource3, trans_defs); |
|
227 | ||
|
217 | } | |
|
228 | 218 | </script> |
|
229 | 219 | </%def> |
General Comments 0
You need to be logged in to leave comments.
Login now