annotate rhodecode/templates/admin/users/user_edit.html @ 895:62c04c5cc971 beta

Added some more details into user edit permissions view
author Marcin Kuzminski <marcin@python-works.com>
date Wed, 29 Dec 2010 17:50:47 +0100
parents 79f42866bcbb
children b232a36cc51f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
216
c8162373f214 Cleaned the way based was used to generate submenu for admin, now it's much more clear to use submenu. Cleaned admin and added comment to middleware
Marcin Kuzminski <marcin@python-works.com>
parents: 182
diff changeset
1 ## -*- coding: utf-8 -*-
127
20dc7a5eb748 Html changes and cleanups, made folders for html templates, implemented tags and branches pages
Marcin Kuzminski <marcin@python-works.com>
parents: 70
diff changeset
2 <%inherit file="/base/base.html"/>
216
c8162373f214 Cleaned the way based was used to generate submenu for admin, now it's much more clear to use submenu. Cleaned admin and added comment to middleware
Marcin Kuzminski <marcin@python-works.com>
parents: 182
diff changeset
3
48
8e250e86a670 Css fixes, implemented removal of users, and display draft
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
4 <%def name="title()">
619
a1ec653f5f95 #38 updated RhodeCode titles
Marcin Kuzminski <marcin@python-works.com>
parents: 582
diff changeset
5 ${_('Edit user')} ${c.user.username} - ${c.rhodecode_name}
48
8e250e86a670 Css fixes, implemented removal of users, and display draft
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
6 </%def>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
7
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
8 <%def name="breadcrumbs_links()">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
9 ${h.link_to(_('Admin'),h.url('admin_home'))}
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
10 &raquo;
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
11 ${h.link_to(_('Users'),h.url('users'))}
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
12 &raquo;
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
13 ${_('edit')} "${c.user.username}"
48
8e250e86a670 Css fixes, implemented removal of users, and display draft
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
14 </%def>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
15
48
8e250e86a670 Css fixes, implemented removal of users, and display draft
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
16 <%def name="page_nav()">
182
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 174
diff changeset
17 ${self.menu('admin')}
48
8e250e86a670 Css fixes, implemented removal of users, and display draft
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
18 </%def>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
19
48
8e250e86a670 Css fixes, implemented removal of users, and display draft
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
20 <%def name="main()">
889
79f42866bcbb extended user editing view with permissions (still a todo)
Marcin Kuzminski <marcin@python-works.com>
parents: 888
diff changeset
21 <div class="box box-left">
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
22 <!-- box / title -->
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
23 <div class="title">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
24 ${self.breadcrumbs()}
48
8e250e86a670 Css fixes, implemented removal of users, and display draft
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
25 </div>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
26 <!-- end box / title -->
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
27 ${h.form(url('user', id=c.user.user_id),method='put')}
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
28 <div class="form">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
29 <!-- fields -->
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
30 <div class="fields">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
31 <div class="field">
398
8c50b164fb58 Implemented basic gravatar support on admin pages only for now
Marcin Kuzminski <marcin@python-works.com>
parents: 370
diff changeset
32 <div class="gravatar_box">
400
7eba3d1e4227 webhelpers import bugfix for gravatar
Marcin Kuzminski <marcin@python-works.com>
parents: 398
diff changeset
33 <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(c.user.email)}"/></div>
398
8c50b164fb58 Implemented basic gravatar support on admin pages only for now
Marcin Kuzminski <marcin@python-works.com>
parents: 370
diff changeset
34 <p>
8c50b164fb58 Implemented basic gravatar support on admin pages only for now
Marcin Kuzminski <marcin@python-works.com>
parents: 370
diff changeset
35 <strong>Change your avatar at <a href="http://gravatar.com">gravatar.com</a></strong><br/>
8c50b164fb58 Implemented basic gravatar support on admin pages only for now
Marcin Kuzminski <marcin@python-works.com>
parents: 370
diff changeset
36 ${_('Using')} ${c.user.email}
8c50b164fb58 Implemented basic gravatar support on admin pages only for now
Marcin Kuzminski <marcin@python-works.com>
parents: 370
diff changeset
37 </p>
8c50b164fb58 Implemented basic gravatar support on admin pages only for now
Marcin Kuzminski <marcin@python-works.com>
parents: 370
diff changeset
38 </div>
8c50b164fb58 Implemented basic gravatar support on admin pages only for now
Marcin Kuzminski <marcin@python-works.com>
parents: 370
diff changeset
39 </div>
8c50b164fb58 Implemented basic gravatar support on admin pages only for now
Marcin Kuzminski <marcin@python-works.com>
parents: 370
diff changeset
40
8c50b164fb58 Implemented basic gravatar support on admin pages only for now
Marcin Kuzminski <marcin@python-works.com>
parents: 370
diff changeset
41 <div class="field">
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
42 <div class="label">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
43 <label for="username">${_('Username')}:</label>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
44 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
45 <div class="input">
889
79f42866bcbb extended user editing view with permissions (still a todo)
Marcin Kuzminski <marcin@python-works.com>
parents: 888
diff changeset
46 ${h.text('username',class_='medium')}
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
47 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
48 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
49
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
50 <div class="field">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
51 <div class="label">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
52 <label for="new_password">${_('New password')}:</label>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
53 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
54 <div class="input">
889
79f42866bcbb extended user editing view with permissions (still a todo)
Marcin Kuzminski <marcin@python-works.com>
parents: 888
diff changeset
55 ${h.password('new_password',class_='medium')}
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
56 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
57 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
58
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
59 <div class="field">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
60 <div class="label">
697
540545d374fd fixes for #66 renamed name to First Name
Marcin Kuzminski <marcin@python-works.com>
parents: 619
diff changeset
61 <label for="name">${_('First Name')}:</label>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
62 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
63 <div class="input">
889
79f42866bcbb extended user editing view with permissions (still a todo)
Marcin Kuzminski <marcin@python-works.com>
parents: 888
diff changeset
64 ${h.text('name',class_='medium')}
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
65 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
66 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
67
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
68 <div class="field">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
69 <div class="label">
697
540545d374fd fixes for #66 renamed name to First Name
Marcin Kuzminski <marcin@python-works.com>
parents: 619
diff changeset
70 <label for="lastname">${_('Last Name')}:</label>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
71 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
72 <div class="input">
889
79f42866bcbb extended user editing view with permissions (still a todo)
Marcin Kuzminski <marcin@python-works.com>
parents: 888
diff changeset
73 ${h.text('lastname',class_='medium')}
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
74 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
75 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
76
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
77 <div class="field">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
78 <div class="label">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
79 <label for="email">${_('Email')}:</label>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
80 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
81 <div class="input">
889
79f42866bcbb extended user editing view with permissions (still a todo)
Marcin Kuzminski <marcin@python-works.com>
parents: 888
diff changeset
82 ${h.text('email',class_='medium')}
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
83 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
84 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
85
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
86 <div class="field">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
87 <div class="label label-checkbox">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
88 <label for="active">${_('Active')}:</label>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
89 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
90 <div class="checkboxes">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
91 ${h.checkbox('active',value=True)}
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
92 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
93 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
94
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
95 <div class="field">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
96 <div class="label label-checkbox">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
97 <label for="admin">${_('Admin')}:</label>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
98 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
99 <div class="checkboxes">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
100 ${h.checkbox('admin',value=True)}
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
101 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
102 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
103 <div class="buttons">
888
6b40654afa1e css optimizations
Marcin Kuzminski <marcin@python-works.com>
parents: 698
diff changeset
104 ${h.submit('save','Save',class_="ui-button")}
6b40654afa1e css optimizations
Marcin Kuzminski <marcin@python-works.com>
parents: 698
diff changeset
105 ${h.reset('reset','Reset',class_="ui-button")}
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
106 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
107 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
108 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 329
diff changeset
109 ${h.end_form()}
889
79f42866bcbb extended user editing view with permissions (still a todo)
Marcin Kuzminski <marcin@python-works.com>
parents: 888
diff changeset
110 </div>
79f42866bcbb extended user editing view with permissions (still a todo)
Marcin Kuzminski <marcin@python-works.com>
parents: 888
diff changeset
111 <div class="box box-right">
79f42866bcbb extended user editing view with permissions (still a todo)
Marcin Kuzminski <marcin@python-works.com>
parents: 888
diff changeset
112 <!-- box / title -->
79f42866bcbb extended user editing view with permissions (still a todo)
Marcin Kuzminski <marcin@python-works.com>
parents: 888
diff changeset
113 <div class="title">
79f42866bcbb extended user editing view with permissions (still a todo)
Marcin Kuzminski <marcin@python-works.com>
parents: 888
diff changeset
114 <h5>${_('Permissions')}</h5>
79f42866bcbb extended user editing view with permissions (still a todo)
Marcin Kuzminski <marcin@python-works.com>
parents: 888
diff changeset
115 </div>
895
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
116 <form id="map_form" method="post" action="{%url update_permissions %}">
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
117 <div class="form">
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
118 <div class="fields">
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
119
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
120
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
121
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
122 <table>
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
123 <tr>
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
124 <td class="label">${_('Permissions')}:</td>
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
125 <td>
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
126 <div>
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
127 <div style="float:left">
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
128 <div class="text">${_('Granted permissions')}</div>
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
129 ${h.select('granted_permissions',[],c.granted_permissions,multiple=True,size=8,style="min-width:210px")}
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
130 </div>
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
131 <div style="float:left;width:20px;padding-top:50px">
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
132 <img alt="add" id="add_element"
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
133 style="padding:2px;cursor:pointer"
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
134 src="/images/icons/arrow_left.png">
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
135 <br />
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
136 <img alt="remove" id="remove_element"
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
137 style="padding:2px;cursor:pointer"
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
138 src="/images/icons/arrow_right.png">
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
139 </div>
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
140 <div style="float:left">
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
141 <div class="text">${_('Available permissions')}</div>
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
142 ${h.select('available_permissions',[],c.available_permissions,multiple=True,size=8,style="min-width:210px")}
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
143 </div>
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
144 </div>
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
145 </td>
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
146 </tr>
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
147
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
148 </table>
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
149 <div class="buttons">
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
150 ${h.submit('Save','Save',class_="ui-button")}
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
151 </div>
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
152 </div>
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
153 </div>
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
154 </form>
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
155
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
156
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
157 <script type="text/javascript">
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
158 YAHOO.util.Event.onDOMReady(function(){
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
159
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
160 var D = YAHOO.util.Dom;
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
161 var E = YAHOO.util.Event;
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
162
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
163 //temp container for storage.
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
164 var cache = new Array();
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
165 var c = D.get('id_granted_permissions');
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
166
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
167 //get only selected options for further fullfilment
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
168 for(var i = 0;node =c.options[i];i++){
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
169 if(node.selected){
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
170 //push selected to my temp storage left overs :)
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
171 cache.push(node);
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
172 }
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
173 }
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
174
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
175 //clear select
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
176 c.options.length = 0;
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
177
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
178 //fill it with remembered options
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
179 for(var i = 0;node = cache[i];i++){
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
180 c.options[i]=new Option(node.text, node.value, false, false);
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
181 }
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
182
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
183 function target_callback(e){
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
184 window.location='/admin/t4?g='+e.target.value;
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
185 }
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
186
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
187 function prompts_action_callback(e){
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
188
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
189 var choosen = D.get('id_granted_permissions');
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
190 var availible = D.get('id_available_permissions');
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
191
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
192 if (this.id=='add_element'){
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
193 for(var i=0; node = availible.options[i];i++){
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
194 if(node.selected){
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
195 choosen.appendChild(new Option(node.text, node.value, false, false));
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
196 }
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
197 }
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
198 }
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
199 else if (this.id=='remove_element'){
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
200
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
201 //temp container for storage.
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
202 cache = new Array();
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
203
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
204 for(var i = 0;node = choosen.options[i];i++){
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
205 if(!node.selected){
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
206 //push left overs :)
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
207 cache.push(node);
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
208 }
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
209 }
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
210 //clear select
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
211 choosen.options.length = 0;
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
212 for(var i = 0;node = cache[i];i++){
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
213 choosen.options[i]=new Option(node.text, node.value, false, false);
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
214 }
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
215 }
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
216 else{
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
217
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
218 }
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
219 }
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
220
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
221 E.addListener('id_groups','change',target_callback);
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
222
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
223 E.addListener(['add_element','remove_element'],'click',prompts_action_callback)
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
224
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
225 E.addListener('map_form','submit',function(){
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
226 var choosen = D.get('id_granted_permissions');
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
227 for (var i = 0; i < choosen.options.length; i++) {
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
228 choosen.options[i].selected = 'selected';
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
229 }
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
230 })
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
231 });
62c04c5cc971 Added some more details into user edit permissions view
Marcin Kuzminski <marcin@python-works.com>
parents: 889
diff changeset
232 </script>
889
79f42866bcbb extended user editing view with permissions (still a todo)
Marcin Kuzminski <marcin@python-works.com>
parents: 888
diff changeset
233 </div>
216
c8162373f214 Cleaned the way based was used to generate submenu for admin, now it's much more clear to use submenu. Cleaned admin and added comment to middleware
Marcin Kuzminski <marcin@python-works.com>
parents: 182
diff changeset
234 </%def>