Mercurial > kallithea
annotate rhodecode/templates/admin/users_groups/users_group_edit.html @ 2105:926f55b038bc beta
added initial rc-extension module
- possible to store additional mappings for stats
- possible to overwrite and add to whoosh index extensions
issue #322
- post create repo hook callback
- post push/pull hooks callback
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Tue, 06 Mar 2012 23:03:10 +0200 |
parents | f48bce87475b |
children | 6776f4e569d7 |
rev | line source |
---|---|
972
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
1 ## -*- coding: utf-8 -*- |
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
2 <%inherit file="/base/base.html"/> |
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
3 |
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
4 <%def name="title()"> |
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
5 ${_('Edit users group')} ${c.users_group.users_group_name} - ${c.rhodecode_name} |
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
6 </%def> |
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
7 |
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
8 <%def name="breadcrumbs_links()"> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
9 ${h.link_to(_('Admin'),h.url('admin_home'))} |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
10 » |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
11 ${h.link_to(_('UsersGroups'),h.url('users_groups'))} |
972
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
12 » |
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
13 ${_('edit')} "${c.users_group.users_group_name}" |
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
14 </%def> |
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
15 |
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
16 <%def name="page_nav()"> |
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
17 ${self.menu('admin')} |
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
18 </%def> |
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
19 |
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
20 <%def name="main()"> |
1124 | 21 <div class="box box-left"> |
972
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
22 <!-- box / title --> |
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
23 <div class="title"> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
24 ${self.breadcrumbs()} |
972
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
25 </div> |
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
26 <!-- end box / title --> |
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
27 ${h.form(url('users_group', id=c.users_group.users_group_id),method='put', id='edit_users_group')} |
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
28 <div class="form"> |
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
29 <!-- fields --> |
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
30 <div class="fields"> |
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
31 <div class="field"> |
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
32 <div class="label"> |
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
33 <label for="users_group_name">${_('Group name')}:</label> |
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
34 </div> |
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
35 <div class="input"> |
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
36 ${h.text('users_group_name',class_='small')} |
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
37 </div> |
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
38 </div> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
39 |
972
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
40 <div class="field"> |
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
41 <div class="label label-checkbox"> |
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
42 <label for="users_group_active">${_('Active')}:</label> |
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
43 </div> |
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
44 <div class="checkboxes"> |
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
45 ${h.checkbox('users_group_active',value=True)} |
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
46 </div> |
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
47 </div> |
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
48 <div class="field"> |
985
4e38b2bc8835
extended functionality on users groups select box
Marcin Kuzminski <marcin@python-works.com>
parents:
972
diff
changeset
|
49 <div class="label"> |
972
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
50 <label for="users_group_active">${_('Members')}:</label> |
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
51 </div> |
985
4e38b2bc8835
extended functionality on users groups select box
Marcin Kuzminski <marcin@python-works.com>
parents:
972
diff
changeset
|
52 <div class="select"> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
53 <table> |
972
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
54 <tr> |
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
55 <td> |
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
56 <div> |
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
57 <div style="float:left"> |
985
4e38b2bc8835
extended functionality on users groups select box
Marcin Kuzminski <marcin@python-works.com>
parents:
972
diff
changeset
|
58 <div class="text" style="padding: 0px 0px 6px;">${_('Choosen group members')}</div> |
972
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
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")} |
985
4e38b2bc8835
extended functionality on users groups select box
Marcin Kuzminski <marcin@python-works.com>
parents:
972
diff
changeset
|
60 <div id="remove_all_elements" style="cursor:pointer;text-align:center"> |
4e38b2bc8835
extended functionality on users groups select box
Marcin Kuzminski <marcin@python-works.com>
parents:
972
diff
changeset
|
61 ${_('Remove all elements')} |
1701
b702d0d4b030
fixed inline comment indicator.
Marcin Kuzminski <marcin@python-works.com>
parents:
1575
diff
changeset
|
62 <img alt="remove" style="vertical-align:text-bottom" src="${h.url('/images/icons/arrow_right.png')}"/> |
985
4e38b2bc8835
extended functionality on users groups select box
Marcin Kuzminski <marcin@python-works.com>
parents:
972
diff
changeset
|
63 </div> |
972
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
64 </div> |
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
65 <div style="float:left;width:20px;padding-top:50px"> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
66 <img alt="add" id="add_element" |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
67 style="padding:2px;cursor:pointer" |
1701
b702d0d4b030
fixed inline comment indicator.
Marcin Kuzminski <marcin@python-works.com>
parents:
1575
diff
changeset
|
68 src="${h.url('/images/icons/arrow_left.png')}"/> |
972
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
69 <br /> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
70 <img alt="remove" id="remove_element" |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
71 style="padding:2px;cursor:pointer" |
1701
b702d0d4b030
fixed inline comment indicator.
Marcin Kuzminski <marcin@python-works.com>
parents:
1575
diff
changeset
|
72 src="${h.url('/images/icons/arrow_right.png')}"/> |
972
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
73 </div> |
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
74 <div style="float:left"> |
985
4e38b2bc8835
extended functionality on users groups select box
Marcin Kuzminski <marcin@python-works.com>
parents:
972
diff
changeset
|
75 <div class="text" style="padding: 0px 0px 6px;">${_('Available members')}</div> |
972
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
76 ${h.select('available_members',[],c.available_members,multiple=True,size=8,style="min-width:210px")} |
985
4e38b2bc8835
extended functionality on users groups select box
Marcin Kuzminski <marcin@python-works.com>
parents:
972
diff
changeset
|
77 <div id="add_all_elements" style="cursor:pointer;text-align:center"> |
1701
b702d0d4b030
fixed inline comment indicator.
Marcin Kuzminski <marcin@python-works.com>
parents:
1575
diff
changeset
|
78 <img alt="add" style="vertical-align:text-bottom" src="${h.url('/images/icons/arrow_left.png')}"/> |
985
4e38b2bc8835
extended functionality on users groups select box
Marcin Kuzminski <marcin@python-works.com>
parents:
972
diff
changeset
|
79 ${_('Add all elements')} |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
80 </div> |
972
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
81 </div> |
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
82 </div> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
83 </td> |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
84 </tr> |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
85 </table> |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
86 </div> |
972
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
87 |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
88 </div> |
972
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
89 <div class="buttons"> |
1472
aaec08ad9daf
Added pt_BR localization, added i18n wrappers on some places missing, fixed css in settings screen for longer labels.
Augusto Herrmann <augusto.herrmann@planejamento.gov.br>
parents:
1271
diff
changeset
|
90 ${h.submit('save',_('save'),class_="ui-button")} |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
91 </div> |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
92 </div> |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
93 </div> |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
94 ${h.end_form()} |
972
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
95 </div> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
96 |
1952
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
97 <div class="box box-right"> |
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
98 <!-- box / title --> |
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
99 <div class="title"> |
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
100 <h5>${_('Permissions')}</h5> |
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
101 </div> |
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
102 ${h.form(url('users_group_perm', id=c.users_group.users_group_id), method='put')} |
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
103 <div class="form"> |
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
104 <!-- fields --> |
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
105 <div class="fields"> |
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
106 <div class="field"> |
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
107 <div class="label label-checkbox"> |
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
108 <label for="create_repo_perm">${_('Create repositories')}:</label> |
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
109 </div> |
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
110 <div class="checkboxes"> |
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
111 ${h.checkbox('create_repo_perm',value=True)} |
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
112 </div> |
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
113 </div> |
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
114 <div class="buttons"> |
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
115 ${h.submit('save',_('Save'),class_="ui-button")} |
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
116 ${h.reset('reset',_('Reset'),class_="ui-button")} |
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
117 </div> |
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
118 </div> |
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
119 </div> |
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
120 ${h.end_form()} |
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
121 </div> |
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
122 |
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
123 <div class="box box-right"> |
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
124 <!-- box / title --> |
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
125 <div class="title"> |
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
126 <h5>${_('Group members')}</h5> |
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
127 </div> |
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
128 <div class="group_members_wrap"> |
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
129 <ul class="group_members"> |
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
130 %for user in c.group_members_obj: |
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
131 <li> |
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
132 <div class="group_member"> |
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
133 <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(user.email,24)}"/> </div> |
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
134 <div>${user.username}</div> |
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
135 <div>${user.full_name}</div> |
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
136 </div> |
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
137 </li> |
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
138 %endfor |
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
139 </ul> |
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
140 </div> |
4a7de41dc22a
show members in user groups with avatars
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
141 </div> |
972
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
142 <script type="text/javascript"> |
1961 | 143 YAHOO.util.Event.onDOMReady(function(){ |
144 var D = YAHOO.util.Dom; | |
145 var E = YAHOO.util.Event; | |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
146 |
1961 | 147 //definition of containers ID's |
148 var available_container = 'available_members'; | |
149 var selected_container = 'users_group_members'; | |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
150 |
1961 | 151 //form containing containers id |
152 var form_id = 'edit_users_group'; | |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
153 |
1961 | 154 //temp container for selected storage. |
155 var cache = new Array(); | |
156 var av_cache = new Array(); | |
157 var c = D.get(selected_container); | |
158 var ac = D.get(available_container); | |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
159 |
1961 | 160 //get only selected options for further fullfilment |
161 for(var i = 0;node =c.options[i];i++){ | |
162 if(node.selected){ | |
163 //push selected to my temp storage left overs :) | |
164 cache.push(node); | |
165 } | |
166 } | |
972
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
167 |
1961 | 168 //get all available options to cache |
169 for(var i = 0;node =ac.options[i];i++){ | |
170 //push selected to my temp storage left overs :) | |
171 av_cache.push(node); | |
172 } | |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
173 |
1961 | 174 //fill available only with those not in choosen |
175 ac.options.length=0; | |
176 tmp_cache = new Array(); | |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
177 |
1961 | 178 for(var i = 0;node = av_cache[i];i++){ |
179 var add = true; | |
180 for(var i2 = 0;node_2 = cache[i2];i2++){ | |
181 if(node.value == node_2.value){ | |
182 add=false; | |
183 break; | |
184 } | |
185 } | |
186 if(add){ | |
187 tmp_cache.push(new Option(node.text, node.value, false, false)); | |
188 } | |
189 } | |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
190 |
1961 | 191 for(var i = 0;node = tmp_cache[i];i++){ |
192 ac.options[i] = node; | |
193 } | |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
194 |
1961 | 195 function prompts_action_callback(e){ |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
196 |
1961 | 197 var choosen = D.get(selected_container); |
198 var available = D.get(available_container); | |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
199 |
1961 | 200 //get checked and unchecked options from field |
201 function get_checked(from_field){ | |
202 //temp container for storage. | |
203 var sel_cache = new Array(); | |
204 var oth_cache = new Array(); | |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
205 |
1961 | 206 for(var i = 0;node = from_field.options[i];i++){ |
207 if(node.selected){ | |
208 //push selected fields :) | |
209 sel_cache.push(node); | |
210 } | |
211 else{ | |
212 oth_cache.push(node) | |
213 } | |
214 } | |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
215 |
1961 | 216 return [sel_cache,oth_cache] |
217 } | |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
218 |
1961 | 219 //fill the field with given options |
220 function fill_with(field,options){ | |
221 //clear firtst | |
222 field.options.length=0; | |
223 for(var i = 0;node = options[i];i++){ | |
224 field.options[i]=new Option(node.text, node.value, | |
225 false, false); | |
226 } | |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
227 |
1961 | 228 } |
229 //adds to current field | |
230 function add_to(field,options){ | |
231 for(var i = 0;node = options[i];i++){ | |
232 field.appendChild(new Option(node.text, node.value, | |
233 false, false)); | |
234 } | |
235 } | |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
236 |
1961 | 237 // add action |
238 if (this.id=='add_element'){ | |
239 var c = get_checked(available); | |
240 add_to(choosen,c[0]); | |
241 fill_with(available,c[1]); | |
242 } | |
243 // remove action | |
244 if (this.id=='remove_element'){ | |
245 var c = get_checked(choosen); | |
246 add_to(available,c[0]); | |
247 fill_with(choosen,c[1]); | |
248 } | |
249 // add all elements | |
250 if(this.id=='add_all_elements'){ | |
251 for(var i=0; node = available.options[i];i++){ | |
252 choosen.appendChild(new Option(node.text, | |
253 node.value, false, false)); | |
254 } | |
255 available.options.length = 0; | |
256 } | |
257 //remove all elements | |
258 if(this.id=='remove_all_elements'){ | |
259 for(var i=0; node = choosen.options[i];i++){ | |
260 available.appendChild(new Option(node.text, | |
261 node.value, false, false)); | |
262 } | |
263 choosen.options.length = 0; | |
264 } | |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
265 |
1961 | 266 } |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
267 |
1961 | 268 E.addListener(['add_element','remove_element', |
269 'add_all_elements','remove_all_elements'],'click', | |
270 prompts_action_callback) | |
972
2c8fd84935a4
#56 implemented users groups editing,
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
271 |
1961 | 272 E.addListener(form_id,'submit',function(){ |
273 var choosen = D.get(selected_container); | |
274 for (var i = 0; i < choosen.options.length; i++) { | |
275 choosen.options[i].selected = 'selected'; | |
276 } | |
277 }); | |
278 }); | |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
279 </script> |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
280 </%def> |