1 | <%inherit file="/base.mako"/> |
---|
2 | <%namespace file="/user/info.mako" import="render_user_info" /> |
---|
3 | <%namespace file="/message.mako" import="render_msg" /> |
---|
4 | |
---|
5 | %if message: |
---|
6 | ${render_msg( message, status )} |
---|
7 | %endif |
---|
8 | |
---|
9 | ${render_user_info()} |
---|
10 | |
---|
11 | %if user.values or user_info_forms: |
---|
12 | <p></p> |
---|
13 | <div class="toolForm"> |
---|
14 | <form name="user_info" id="user_info" action="${h.url_for( controller='user', action='edit_info', user_id=user.id, admin_view=admin_view )}" method="post" > |
---|
15 | <div class="toolFormTitle">User information</div> |
---|
16 | %if user_info_select: |
---|
17 | <div class="form-row"> |
---|
18 | <label>User type:</label> |
---|
19 | ${user_info_select.get_html()} |
---|
20 | </div> |
---|
21 | %endif |
---|
22 | %for field in widgets: |
---|
23 | <div class="form-row"> |
---|
24 | <label>${field['label']}:</label> |
---|
25 | ${field['widget'].get_html()} |
---|
26 | <div class="toolParamHelp" style="clear: both;"> |
---|
27 | ${field['helptext']} |
---|
28 | </div> |
---|
29 | <div style="clear: both"></div> |
---|
30 | </div> |
---|
31 | %endfor |
---|
32 | %if not user_info_select: |
---|
33 | <input type="hidden" name="user_info_select" value="${user_info_form.id}"/> |
---|
34 | %endif |
---|
35 | |
---|
36 | <div class="form-row"> |
---|
37 | <input type="submit" name="edit_user_info_button" value="Save"/> |
---|
38 | </div> |
---|
39 | </form> |
---|
40 | </div> |
---|
41 | <p></p> |
---|
42 | %endif |
---|
43 | |
---|
44 | <p/> |
---|
45 | |
---|
46 | <div class="toolForm"> |
---|
47 | <form name="user_addresses" id="user_addresses" action="${h.url_for( controller='user', action='new_address', user_id=user.id, admin_view=admin_view )}" method="post" > |
---|
48 | <div class="toolFormTitle">User Addresses</div> |
---|
49 | <div class="toolFormBody"> |
---|
50 | %if user.addresses: |
---|
51 | <div class="form-row"> |
---|
52 | <div class="grid-header"> |
---|
53 | %for i, filter in enumerate( ['Active', 'Deleted', 'All'] ): |
---|
54 | %if i > 0: |
---|
55 | <span>|</span> |
---|
56 | %endif |
---|
57 | %if show_filter == filter: |
---|
58 | <span class="filter"><a href="${h.url_for( controller='user', action='show_info', show_filter=filter, user_id=user.id, admin_view=admin_view )}"><b>${filter}</b></a></span> |
---|
59 | %else: |
---|
60 | <span class="filter"><a href="${h.url_for( controller='user', action='show_info', show_filter=filter, user_id=user.id, admin_view=admin_view )}">${filter}</a></span> |
---|
61 | %endif |
---|
62 | %endfor |
---|
63 | </div> |
---|
64 | </div> |
---|
65 | <table class="grid"> |
---|
66 | <tbody> |
---|
67 | %for index, address in enumerate(addresses): |
---|
68 | <tr class="libraryRow libraryOrFolderRow" id="libraryRow"> |
---|
69 | <td> |
---|
70 | <div class="form-row"> |
---|
71 | <label>${address.desc}:</label> |
---|
72 | ${address.get_html()} |
---|
73 | </div> |
---|
74 | <div class="form-row"> |
---|
75 | <ul class="manage-table-actions"> |
---|
76 | <li> |
---|
77 | %if not address.deleted: |
---|
78 | <a class="action-button" href="${h.url_for( controller='user', action='edit_address', admin_view=admin_view, address_id=address.id, user_id=user.id )}"><span>Edit</span></a> |
---|
79 | <a class="action-button" href="${h.url_for( controller='user', action='delete_address', admin_view=admin_view, address_id=address.id, user_id=user.id)}"><span>Delete</span></a> |
---|
80 | %else: |
---|
81 | <a class="action-button" href="${h.url_for( controller='user', action='undelete_address', admin_view=admin_view, address_id=address.id, user_id=user.id)}"><span>Undelete</span></a> |
---|
82 | %endif |
---|
83 | </li> |
---|
84 | </ul> |
---|
85 | </div> |
---|
86 | </td> |
---|
87 | </tr> |
---|
88 | %endfor |
---|
89 | </tbody> |
---|
90 | </table> |
---|
91 | %endif |
---|
92 | <div class="form-row"> |
---|
93 | <input type="submit" value="Add a new address"> |
---|
94 | </div> |
---|
95 | </div> |
---|
96 | </form> |
---|
97 | </div> |
---|