##// END OF EJS Templates
Corrected some label-input linking in templates
Augusto Herrmann -
r1575:e0b06946 beta
parent child Browse files
Show More
@@ -1,64 +1,64 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 ${_('Add repos group')} - ${c.rhodecode_name}
5 ${_('Add repos group')} - ${c.rhodecode_name}
6 </%def>
6 </%def>
7 <%def name="breadcrumbs_links()">
7 <%def name="breadcrumbs_links()">
8 ${h.link_to(_('Admin'),h.url('admin_home'))}
8 ${h.link_to(_('Admin'),h.url('admin_home'))}
9 &raquo;
9 &raquo;
10 ${h.link_to(_('Repos groups'),h.url('repos_groups'))}
10 ${h.link_to(_('Repos groups'),h.url('repos_groups'))}
11 &raquo;
11 &raquo;
12 ${_('add new repos group')}
12 ${_('add new repos group')}
13 </%def>
13 </%def>
14
14
15 <%def name="page_nav()">
15 <%def name="page_nav()">
16 ${self.menu('admin')}
16 ${self.menu('admin')}
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 <!-- end box / title -->
25 <!-- end box / title -->
26 ${h.form(url('repos_groups'))}
26 ${h.form(url('repos_groups'))}
27 <div class="form">
27 <div class="form">
28 <!-- fields -->
28 <!-- fields -->
29 <div class="fields">
29 <div class="fields">
30 <div class="field">
30 <div class="field">
31 <div class="label">
31 <div class="label">
32 <label for="users_group_name">${_('Group name')}:</label>
32 <label for="group_name">${_('Group name')}:</label>
33 </div>
33 </div>
34 <div class="input">
34 <div class="input">
35 ${h.text('group_name',class_='medium')}
35 ${h.text('group_name',class_='medium')}
36 </div>
36 </div>
37 </div>
37 </div>
38
38
39 <div class="field">
39 <div class="field">
40 <div class="label label-textarea">
40 <div class="label label-textarea">
41 <label for="description">${_('Description')}:</label>
41 <label for="group_description">${_('Description')}:</label>
42 </div>
42 </div>
43 <div class="textarea text-area editor">
43 <div class="textarea text-area editor">
44 ${h.textarea('group_description',cols=23,rows=5,class_="medium")}
44 ${h.textarea('group_description',cols=23,rows=5,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="repo_group">${_('Group parent')}:</label>
50 <label for="group_parent_id">${_('Group parent')}:</label>
51 </div>
51 </div>
52 <div class="input">
52 <div class="input">
53 ${h.select('group_parent_id','',c.repo_groups,class_="medium")}
53 ${h.select('group_parent_id','',c.repo_groups,class_="medium")}
54 </div>
54 </div>
55 </div>
55 </div>
56
56
57 <div class="buttons">
57 <div class="buttons">
58 ${h.submit('save',_('save'),class_="ui-button")}
58 ${h.submit('save',_('save'),class_="ui-button")}
59 </div>
59 </div>
60 </div>
60 </div>
61 </div>
61 </div>
62 ${h.end_form()}
62 ${h.end_form()}
63 </div>
63 </div>
64 </%def>
64 </%def>
@@ -1,64 +1,64 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 repos group')} ${c.repos_group.name} - ${c.rhodecode_name}
5 ${_('Edit repos group')} ${c.repos_group.name} - ${c.rhodecode_name}
6 </%def>
6 </%def>
7 <%def name="breadcrumbs_links()">
7 <%def name="breadcrumbs_links()">
8 ${h.link_to(_('Admin'),h.url('admin_home'))}
8 ${h.link_to(_('Admin'),h.url('admin_home'))}
9 &raquo;
9 &raquo;
10 ${h.link_to(_('Repos groups'),h.url('repos_groups'))}
10 ${h.link_to(_('Repos groups'),h.url('repos_groups'))}
11 &raquo;
11 &raquo;
12 ${_('edit repos group')} "${c.repos_group.name}"
12 ${_('edit repos group')} "${c.repos_group.name}"
13 </%def>
13 </%def>
14
14
15 <%def name="page_nav()">
15 <%def name="page_nav()">
16 ${self.menu('admin')}
16 ${self.menu('admin')}
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 <!-- end box / title -->
25 <!-- end box / title -->
26 ${h.form(url('repos_group',id=c.repos_group.group_id),method='put')}
26 ${h.form(url('repos_group',id=c.repos_group.group_id),method='put')}
27 <div class="form">
27 <div class="form">
28 <!-- fields -->
28 <!-- fields -->
29 <div class="fields">
29 <div class="fields">
30 <div class="field">
30 <div class="field">
31 <div class="label">
31 <div class="label">
32 <label for="users_group_name">${_('Group name')}:</label>
32 <label for="group_name">${_('Group name')}:</label>
33 </div>
33 </div>
34 <div class="input">
34 <div class="input">
35 ${h.text('group_name',class_='medium')}
35 ${h.text('group_name',class_='medium')}
36 </div>
36 </div>
37 </div>
37 </div>
38
38
39 <div class="field">
39 <div class="field">
40 <div class="label label-textarea">
40 <div class="label label-textarea">
41 <label for="description">${_('Description')}:</label>
41 <label for="group_description">${_('Description')}:</label>
42 </div>
42 </div>
43 <div class="textarea text-area editor">
43 <div class="textarea text-area editor">
44 ${h.textarea('group_description',cols=23,rows=5,class_="medium")}
44 ${h.textarea('group_description',cols=23,rows=5,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="repo_group">${_('Group parent')}:</label>
50 <label for="group_parent_id">${_('Group parent')}:</label>
51 </div>
51 </div>
52 <div class="input">
52 <div class="input">
53 ${h.select('group_parent_id','',c.repo_groups,class_="medium")}
53 ${h.select('group_parent_id','',c.repo_groups,class_="medium")}
54 </div>
54 </div>
55 </div>
55 </div>
56
56
57 <div class="buttons">
57 <div class="buttons">
58 ${h.submit('save',_('save'),class_="ui-button")}
58 ${h.submit('save',_('save'),class_="ui-button")}
59 </div>
59 </div>
60 </div>
60 </div>
61 </div>
61 </div>
62 ${h.end_form()}
62 ${h.end_form()}
63 </div>
63 </div>
64 </%def>
64 </%def>
@@ -1,192 +1,192 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 ${_('Settings administration')} - ${c.rhodecode_name}
5 ${_('Settings administration')} - ${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'))} &raquo; ${_('Settings')}
9 ${h.link_to(_('Admin'),h.url('admin_home'))} &raquo; ${_('Settings')}
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 <div class="box">
17 <div class="box">
18 <!-- box / title -->
18 <!-- box / title -->
19 <div class="title">
19 <div class="title">
20 ${self.breadcrumbs()}
20 ${self.breadcrumbs()}
21 </div>
21 </div>
22 <!-- end box / title -->
22 <!-- end box / title -->
23
23
24 <h3>${_('Remap and rescan repositories')}</h3>
24 <h3>${_('Remap and rescan repositories')}</h3>
25 ${h.form(url('admin_setting', setting_id='mapping'),method='put')}
25 ${h.form(url('admin_setting', setting_id='mapping'),method='put')}
26 <div class="form">
26 <div class="form">
27 <!-- fields -->
27 <!-- fields -->
28
28
29 <div class="fields">
29 <div class="fields">
30 <div class="field">
30 <div class="field">
31 <div class="label label-checkbox">
31 <div class="label label-checkbox">
32 <label for="destroy">${_('rescan option')}:</label>
32 <label for="destroy">${_('rescan option')}:</label>
33 </div>
33 </div>
34 <div class="checkboxes">
34 <div class="checkboxes">
35 <div class="checkbox">
35 <div class="checkbox">
36 ${h.checkbox('destroy',True)}
36 ${h.checkbox('destroy',True)}
37 <label for="checkbox-1">
37 <label for="destroy">
38 <span class="tooltip" title="${h.tooltip(_('In case a repository was deleted from filesystem and there are leftovers in the database check this option to scan obsolete data in database and remove it.'))}">
38 <span class="tooltip" title="${h.tooltip(_('In case a repository was deleted from filesystem and there are leftovers in the database check this option to scan obsolete data in database and remove it.'))}">
39 ${_('destroy old data')}</span> </label>
39 ${_('destroy old data')}</span> </label>
40 </div>
40 </div>
41 </div>
41 </div>
42 </div>
42 </div>
43
43
44 <div class="buttons">
44 <div class="buttons">
45 ${h.submit('rescan',_('Rescan repositories'),class_="ui-button")}
45 ${h.submit('rescan',_('Rescan repositories'),class_="ui-button")}
46 </div>
46 </div>
47 </div>
47 </div>
48 </div>
48 </div>
49 ${h.end_form()}
49 ${h.end_form()}
50
50
51 <h3>${_('Whoosh indexing')}</h3>
51 <h3>${_('Whoosh indexing')}</h3>
52 ${h.form(url('admin_setting', setting_id='whoosh'),method='put')}
52 ${h.form(url('admin_setting', setting_id='whoosh'),method='put')}
53 <div class="form">
53 <div class="form">
54 <!-- fields -->
54 <!-- fields -->
55
55
56 <div class="fields">
56 <div class="fields">
57 <div class="field">
57 <div class="field">
58 <div class="label label-checkbox">
58 <div class="label label-checkbox">
59 <label for="destroy">${_('index build option')}:</label>
59 <label>${_('index build option')}:</label>
60 </div>
60 </div>
61 <div class="checkboxes">
61 <div class="checkboxes">
62 <div class="checkbox">
62 <div class="checkbox">
63 ${h.checkbox('full_index',True)}
63 ${h.checkbox('full_index',True)}
64 <label for="checkbox-1">${_('build from scratch')}</label>
64 <label for="full_index">${_('build from scratch')}</label>
65 </div>
65 </div>
66 </div>
66 </div>
67 </div>
67 </div>
68
68
69 <div class="buttons">
69 <div class="buttons">
70 ${h.submit('reindex',_('Reindex'),class_="ui-button")}
70 ${h.submit('reindex',_('Reindex'),class_="ui-button")}
71 </div>
71 </div>
72 </div>
72 </div>
73 </div>
73 </div>
74 ${h.end_form()}
74 ${h.end_form()}
75
75
76 <h3>${_('Global application settings')}</h3>
76 <h3>${_('Global application settings')}</h3>
77 ${h.form(url('admin_setting', setting_id='global'),method='put')}
77 ${h.form(url('admin_setting', setting_id='global'),method='put')}
78 <div class="form">
78 <div class="form">
79 <!-- fields -->
79 <!-- fields -->
80
80
81 <div class="fields">
81 <div class="fields">
82
82
83 <div class="field">
83 <div class="field">
84 <div class="label">
84 <div class="label">
85 <label for="rhodecode_title">${_('Application name')}:</label>
85 <label for="rhodecode_title">${_('Application name')}:</label>
86 </div>
86 </div>
87 <div class="input">
87 <div class="input">
88 ${h.text('rhodecode_title',size=30)}
88 ${h.text('rhodecode_title',size=30)}
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="rhodecode_realm">${_('Realm text')}:</label>
94 <label for="rhodecode_realm">${_('Realm text')}:</label>
95 </div>
95 </div>
96 <div class="input">
96 <div class="input">
97 ${h.text('rhodecode_realm',size=30)}
97 ${h.text('rhodecode_realm',size=30)}
98 </div>
98 </div>
99 </div>
99 </div>
100
100
101 <div class="field">
101 <div class="field">
102 <div class="label">
102 <div class="label">
103 <label for="ga_code">${_('GA code')}:</label>
103 <label for="rhodecode_ga_code">${_('GA code')}:</label>
104 </div>
104 </div>
105 <div class="input">
105 <div class="input">
106 ${h.text('rhodecode_ga_code',size=30)}
106 ${h.text('rhodecode_ga_code',size=30)}
107 </div>
107 </div>
108 </div>
108 </div>
109
109
110 <div class="buttons">
110 <div class="buttons">
111 ${h.submit('save',_('Save settings'),class_="ui-button")}
111 ${h.submit('save',_('Save settings'),class_="ui-button")}
112 ${h.reset('reset',_('Reset'),class_="ui-button")}
112 ${h.reset('reset',_('Reset'),class_="ui-button")}
113 </div>
113 </div>
114 </div>
114 </div>
115 </div>
115 </div>
116 ${h.end_form()}
116 ${h.end_form()}
117
117
118 <h3>${_('Mercurial settings')}</h3>
118 <h3>${_('Mercurial settings')}</h3>
119 ${h.form(url('admin_setting', setting_id='mercurial'),method='put')}
119 ${h.form(url('admin_setting', setting_id='mercurial'),method='put')}
120 <div class="form">
120 <div class="form">
121 <!-- fields -->
121 <!-- fields -->
122
122
123 <div class="fields">
123 <div class="fields">
124
124
125 <div class="field">
125 <div class="field">
126 <div class="label label-checkbox">
126 <div class="label label-checkbox">
127 <label for="web_push_ssl">${_('Web')}:</label>
127 <label>${_('Web')}:</label>
128 </div>
128 </div>
129 <div class="checkboxes">
129 <div class="checkboxes">
130 <div class="checkbox">
130 <div class="checkbox">
131 ${h.checkbox('web_push_ssl','true')}
131 ${h.checkbox('web_push_ssl','true')}
132 <label for="web_push_ssl">${_('require ssl for pushing')}</label>
132 <label for="web_push_ssl">${_('require ssl for pushing')}</label>
133 </div>
133 </div>
134 </div>
134 </div>
135 </div>
135 </div>
136
136
137 <div class="field">
137 <div class="field">
138 <div class="label label-checkbox">
138 <div class="label label-checkbox">
139 <label for="web_push_ssl">${_('Hooks')}:</label>
139 <label>${_('Hooks')}:</label>
140 </div>
140 </div>
141 <div class="input">
141 <div class="input">
142 ${h.link_to(_('advanced setup'),url('admin_edit_setting',setting_id='hooks'))}
142 ${h.link_to(_('advanced setup'),url('admin_edit_setting',setting_id='hooks'))}
143 </div>
143 </div>
144 <div class="checkboxes">
144 <div class="checkboxes">
145 <div class="checkbox">
145 <div class="checkbox">
146 ${h.checkbox('hooks_changegroup_update','True')}
146 ${h.checkbox('hooks_changegroup_update','True')}
147 <label for="hooks_changegroup_update">${_('Update repository after push (hg update)')}</label>
147 <label for="hooks_changegroup_update">${_('Update repository after push (hg update)')}</label>
148 </div>
148 </div>
149 <div class="checkbox">
149 <div class="checkbox">
150 ${h.checkbox('hooks_changegroup_repo_size','True')}
150 ${h.checkbox('hooks_changegroup_repo_size','True')}
151 <label for="hooks_changegroup_repo_size">${_('Show repository size after push')}</label>
151 <label for="hooks_changegroup_repo_size">${_('Show repository size after push')}</label>
152 </div>
152 </div>
153 <div class="checkbox">
153 <div class="checkbox">
154 ${h.checkbox('hooks_pretxnchangegroup_push_logger','True')}
154 ${h.checkbox('hooks_pretxnchangegroup_push_logger','True')}
155 <label for="hooks_pretxnchangegroup_push_logger">${_('Log user push commands')}</label>
155 <label for="hooks_pretxnchangegroup_push_logger">${_('Log user push commands')}</label>
156 </div>
156 </div>
157 <div class="checkbox">
157 <div class="checkbox">
158 ${h.checkbox('hooks_preoutgoing_pull_logger','True')}
158 ${h.checkbox('hooks_preoutgoing_pull_logger','True')}
159 <label for="hooks_preoutgoing_pull_logger">${_('Log user pull commands')}</label>
159 <label for="hooks_preoutgoing_pull_logger">${_('Log user pull commands')}</label>
160 </div>
160 </div>
161 </div>
161 </div>
162 </div>
162 </div>
163
163
164 <div class="field">
164 <div class="field">
165 <div class="label">
165 <div class="label">
166 <label for="paths_root_path">${_('Repositories location')}:</label>
166 <label for="paths_root_path">${_('Repositories location')}:</label>
167 </div>
167 </div>
168 <div class="input">
168 <div class="input">
169 ${h.text('paths_root_path',size=30,readonly="readonly")}
169 ${h.text('paths_root_path',size=30,readonly="readonly")}
170 <span id="path_unlock" class="tooltip"
170 <span id="path_unlock" class="tooltip"
171 title="${h.tooltip(_('This a crucial application setting. If you are really sure you need to change this, you must restart application in order to make this setting take effect. Click this label to unlock.'))}">
171 title="${h.tooltip(_('This a crucial application setting. If you are really sure you need to change this, you must restart application in order to make this setting take effect. Click this label to unlock.'))}">
172 ${_('unlock')}</span>
172 ${_('unlock')}</span>
173 </div>
173 </div>
174 </div>
174 </div>
175
175
176 <div class="buttons">
176 <div class="buttons">
177 ${h.submit('save',_('Save settings'),class_="ui-button")}
177 ${h.submit('save',_('Save settings'),class_="ui-button")}
178 ${h.reset('reset',_('Reset'),class_="ui-button")}
178 ${h.reset('reset',_('Reset'),class_="ui-button")}
179 </div>
179 </div>
180 </div>
180 </div>
181 </div>
181 </div>
182 ${h.end_form()}
182 ${h.end_form()}
183
183
184 <script type="text/javascript">
184 <script type="text/javascript">
185 YAHOO.util.Event.onDOMReady(function(){
185 YAHOO.util.Event.onDOMReady(function(){
186 YAHOO.util.Event.addListener('path_unlock','click',function(){
186 YAHOO.util.Event.addListener('path_unlock','click',function(){
187 YAHOO.util.Dom.get('paths_root_path').removeAttribute('readonly');
187 YAHOO.util.Dom.get('paths_root_path').removeAttribute('readonly');
188 });
188 });
189 });
189 });
190 </script>
190 </script>
191 </div>
191 </div>
192 </%def>
192 </%def>
@@ -1,149 +1,149 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 &raquo;
10 &raquo;
11 ${h.link_to(_('Users'),h.url('users'))}
11 ${h.link_to(_('Users'),h.url('users'))}
12 &raquo;
12 &raquo;
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('update_user', id=c.user.user_id),method='put')}
27 ${h.form(url('update_user', id=c.user.user_id),method='put')}
28 <div class="form">
28 <div class="form">
29 <div class="field">
29 <div class="field">
30 <div class="gravatar_box">
30 <div class="gravatar_box">
31 <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(c.user.email)}"/></div>
31 <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(c.user.email)}"/></div>
32 <p>
32 <p>
33 <strong>${_('Change your avatar at')} <a href="http://gravatar.com">gravatar.com</a></strong><br/>
33 <strong>${_('Change your avatar at')} <a href="http://gravatar.com">gravatar.com</a></strong><br/>
34 ${_('Using')} ${c.user.email}
34 ${_('Using')} ${c.user.email}
35 </p>
35 </p>
36 </div>
36 </div>
37 </div>
37 </div>
38 <div class="field">
38 <div class="field">
39 <div class="label">
39 <div class="label">
40 <label>${_('API key')}</label> ${c.user.api_key}
40 <label>${_('API key')}</label> ${c.user.api_key}
41 </div>
41 </div>
42 </div>
42 </div>
43
43
44 <div class="fields">
44 <div class="fields">
45 <div class="field">
45 <div class="field">
46 <div class="label">
46 <div class="label">
47 <label for="username">${_('Username')}:</label>
47 <label for="username">${_('Username')}:</label>
48 </div>
48 </div>
49 <div class="input">
49 <div class="input">
50 ${h.text('username',class_='medium')}
50 ${h.text('username',class_='medium')}
51 </div>
51 </div>
52 </div>
52 </div>
53
53
54 <div class="field">
54 <div class="field">
55 <div class="label">
55 <div class="label">
56 <label for="ldap_dn">${_('LDAP DN')}:</label>
56 <label for="ldap_dn">${_('LDAP DN')}:</label>
57 </div>
57 </div>
58 <div class="input">
58 <div class="input">
59 ${h.text('ldap_dn',class_='medium')}
59 ${h.text('ldap_dn',class_='medium')}
60 </div>
60 </div>
61 </div>
61 </div>
62
62
63 <div class="field">
63 <div class="field">
64 <div class="label">
64 <div class="label">
65 <label for="new_password">${_('New password')}:</label>
65 <label for="new_password">${_('New password')}:</label>
66 </div>
66 </div>
67 <div class="input">
67 <div class="input">
68 ${h.password('new_password',class_='medium',autocomplete="off")}
68 ${h.password('new_password',class_='medium',autocomplete="off")}
69 </div>
69 </div>
70 </div>
70 </div>
71
71
72 <div class="field">
72 <div class="field">
73 <div class="label">
73 <div class="label">
74 <label for="name">${_('First Name')}:</label>
74 <label for="name">${_('First Name')}:</label>
75 </div>
75 </div>
76 <div class="input">
76 <div class="input">
77 ${h.text('name',class_='medium')}
77 ${h.text('name',class_='medium')}
78 </div>
78 </div>
79 </div>
79 </div>
80
80
81 <div class="field">
81 <div class="field">
82 <div class="label">
82 <div class="label">
83 <label for="lastname">${_('Last Name')}:</label>
83 <label for="lastname">${_('Last Name')}:</label>
84 </div>
84 </div>
85 <div class="input">
85 <div class="input">
86 ${h.text('lastname',class_='medium')}
86 ${h.text('lastname',class_='medium')}
87 </div>
87 </div>
88 </div>
88 </div>
89
89
90 <div class="field">
90 <div class="field">
91 <div class="label">
91 <div class="label">
92 <label for="email">${_('Email')}:</label>
92 <label for="email">${_('Email')}:</label>
93 </div>
93 </div>
94 <div class="input">
94 <div class="input">
95 ${h.text('email',class_='medium')}
95 ${h.text('email',class_='medium')}
96 </div>
96 </div>
97 </div>
97 </div>
98
98
99 <div class="field">
99 <div class="field">
100 <div class="label label-checkbox">
100 <div class="label label-checkbox">
101 <label for="active">${_('Active')}:</label>
101 <label for="active">${_('Active')}:</label>
102 </div>
102 </div>
103 <div class="checkboxes">
103 <div class="checkboxes">
104 ${h.checkbox('active',value=True)}
104 ${h.checkbox('active',value=True)}
105 </div>
105 </div>
106 </div>
106 </div>
107
107
108 <div class="field">
108 <div class="field">
109 <div class="label label-checkbox">
109 <div class="label label-checkbox">
110 <label for="admin">${_('Admin')}:</label>
110 <label for="admin">${_('Admin')}:</label>
111 </div>
111 </div>
112 <div class="checkboxes">
112 <div class="checkboxes">
113 ${h.checkbox('admin',value=True)}
113 ${h.checkbox('admin',value=True)}
114 </div>
114 </div>
115 </div>
115 </div>
116 <div class="buttons">
116 <div class="buttons">
117 ${h.submit('save',_('Save'),class_="ui-button")}
117 ${h.submit('save',_('Save'),class_="ui-button")}
118 ${h.reset('reset',_('Reset'),class_="ui-button")}
118 ${h.reset('reset',_('Reset'),class_="ui-button")}
119 </div>
119 </div>
120 </div>
120 </div>
121 </div>
121 </div>
122 ${h.end_form()}
122 ${h.end_form()}
123 </div>
123 </div>
124 <div class="box box-right">
124 <div class="box box-right">
125 <!-- box / title -->
125 <!-- box / title -->
126 <div class="title">
126 <div class="title">
127 <h5>${_('Permissions')}</h5>
127 <h5>${_('Permissions')}</h5>
128 </div>
128 </div>
129 ${h.form(url('user_perm', id=c.user.user_id),method='put')}
129 ${h.form(url('user_perm', id=c.user.user_id),method='put')}
130 <div class="form">
130 <div class="form">
131 <!-- fields -->
131 <!-- fields -->
132 <div class="fields">
132 <div class="fields">
133 <div class="field">
133 <div class="field">
134 <div class="label label-checkbox">
134 <div class="label label-checkbox">
135 <label for="">${_('Create repositories')}:</label>
135 <label for="create_repo_perm">${_('Create repositories')}:</label>
136 </div>
136 </div>
137 <div class="checkboxes">
137 <div class="checkboxes">
138 ${h.checkbox('create_repo_perm',value=True)}
138 ${h.checkbox('create_repo_perm',value=True)}
139 </div>
139 </div>
140 </div>
140 </div>
141 <div class="buttons">
141 <div class="buttons">
142 ${h.submit('save',_('Save'),class_="ui-button")}
142 ${h.submit('save',_('Save'),class_="ui-button")}
143 ${h.reset('reset',_('Reset'),class_="ui-button")}
143 ${h.reset('reset',_('Reset'),class_="ui-button")}
144 </div>
144 </div>
145 </div>
145 </div>
146 </div>
146 </div>
147 ${h.end_form()}
147 ${h.end_form()}
148 </div>
148 </div>
149 </%def>
149 </%def>
@@ -1,270 +1,270 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 &raquo;
10 &raquo;
11 ${h.link_to(_('UsersGroups'),h.url('users_groups'))}
11 ${h.link_to(_('UsersGroups'),h.url('users_groups'))}
12 &raquo;
12 &raquo;
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 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('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="${h.url("/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="${h.url("/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="${h.url("/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="${h.url("/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 <div class="box box-right">
245 <div class="box box-right">
246 <!-- box / title -->
246 <!-- box / title -->
247 <div class="title">
247 <div class="title">
248 <h5>${_('Permissions')}</h5>
248 <h5>${_('Permissions')}</h5>
249 </div>
249 </div>
250 ${h.form(url('users_group_perm', id=c.users_group.users_group_id), method='put')}
250 ${h.form(url('users_group_perm', id=c.users_group.users_group_id), method='put')}
251 <div class="form">
251 <div class="form">
252 <!-- fields -->
252 <!-- fields -->
253 <div class="fields">
253 <div class="fields">
254 <div class="field">
254 <div class="field">
255 <div class="label label-checkbox">
255 <div class="label label-checkbox">
256 <label for="">${_('Create repositories')}:</label>
256 <label for="create_repo_perm">${_('Create repositories')}:</label>
257 </div>
257 </div>
258 <div class="checkboxes">
258 <div class="checkboxes">
259 ${h.checkbox('create_repo_perm',value=True)}
259 ${h.checkbox('create_repo_perm',value=True)}
260 </div>
260 </div>
261 </div>
261 </div>
262 <div class="buttons">
262 <div class="buttons">
263 ${h.submit('save',_('Save'),class_="ui-button")}
263 ${h.submit('save',_('Save'),class_="ui-button")}
264 ${h.reset('reset',_('Reset'),class_="ui-button")}
264 ${h.reset('reset',_('Reset'),class_="ui-button")}
265 </div>
265 </div>
266 </div>
266 </div>
267 </div>
267 </div>
268 ${h.end_form()}
268 ${h.end_form()}
269 </div>
269 </div>
270 </%def>
270 </%def>
General Comments 0
You need to be logged in to leave comments. Login now