PageRenderTime 16ms CodeModel.GetById 11ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 1ms

/templates/webapps/galaxy/user/info.mako

https://bitbucket.org/cistrome/cistrome-harvard/
Mako | 95 lines | 90 code | 5 blank | 0 comment | 3 complexity | d459b49ff2b5c5c239854c76dee783ac MD5 | raw file
 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', cntrller=cntrller, user_id=trans.security.encode_id( user.id ) )}" method="post" >
15            <div class="toolFormTitle">User information</div>
16            %if user_type_fd_id_select_field:
17                <div class="form-row">
18                    <label>User type:</label>
19                    ${user_type_fd_id_select_field.get_html()}
20                </div>
21            %else:
22                <input type="hidden" name="user_type_fd_id" value="${trans.security.encode_id( user_type_form_definition.id )}"/>
23            %endif
24            %for field in widgets:
25                <div class="form-row">
26                    <label>${field['label']}:</label>
27                    ${field['widget'].get_html()}
28                    <div class="toolParamHelp" style="clear: both;">
29                        ${field['helptext']}
30                    </div>
31                    <div style="clear: both"></div>
32                </div>
33            %endfor
34            <div class="form-row">
35                <input type="submit" name="edit_user_info_button" value="Save"/>
36            </div>
37        </form>
38    </div>
39    <p></p>
40%endif
41
42<p/>
43
44<div class="toolForm">
45    <form name="user_addresses" id="user_addresses" action="${h.url_for( controller='user', action='new_address', cntrller=cntrller, user_id=trans.security.encode_id( user.id ) )}" method="post" >
46        <div class="toolFormTitle">User Addresses</div>
47        <div class="toolFormBody">
48            %if user.addresses:
49                <div class="form-row">
50                <div class="grid-header">
51                    %for i, filter in enumerate( ['Active', 'Deleted', 'All'] ):
52                        %if i > 0:    
53                            <span>|</span>
54                        %endif
55                        %if show_filter == filter:
56                            <span class="filter"><a href="${h.url_for( controller='user', action='manage_user_info', cntrller=cntrller, show_filter=filter, user_id=trans.security.encode_id( user.id ) )}"><b>${filter}</b></a></span>
57                        %else:
58                            <span class="filter"><a href="${h.url_for( controller='user', action='manage_user_info', cntrller=cntrller, show_filter=filter, user_id=trans.security.encode_id( user.id ) )}">${filter}</a></span>
59                        %endif
60                    %endfor
61                </div>
62                </div>
63                <table class="grid">
64                    <tbody>
65                        %for index, address in enumerate(addresses):    
66                            <tr class="libraryRow libraryOrFolderRow" id="libraryRow">
67                                <td>
68                                    <div class="form-row">   
69                                        <label>${address.desc}:</label>
70                                        ${address.get_html()}
71                                    </div>
72                                    <div class="form-row">
73                                        <ul class="manage-table-actions">
74                                            <li>
75                                                %if not address.deleted:
76                                                    <a class="action-button"  href="${h.url_for( controller='user', action='edit_address', cntrller=cntrller, address_id=trans.security.encode_id( address.id ), user_id=trans.security.encode_id( user.id ) )}">Edit</a>
77                                                    <a class="action-button"  href="${h.url_for( controller='user', action='delete_address', cntrller=cntrller, address_id=trans.security.encode_id( address.id ), user_id=trans.security.encode_id( user.id ) )}">Delete</a>
78                                                %else:
79                                                    <a class="action-button"  href="${h.url_for( controller='user', action='undelete_address', cntrller=cntrller, address_id=trans.security.encode_id( address.id ), user_id=trans.security.encode_id( user.id ) )}">Undelete</a>
80                                                %endif
81                                            </li>
82                                        </ul>
83                                    </div>
84                                </td>
85                             </tr>             
86                        %endfor
87                    </tbody>
88                </table>
89            %endif
90            <div class="form-row">
91                <input type="submit" value="Add a new address">
92            </div>
93        </div>
94    </form>
95</div>