source: main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser_templates/applicantsrootmanagepage.pt @ 6197

Last change on this file since 6197 was 6184, checked in by Henrik Bettermann, 13 years ago

Implement local role assignment and removal in application section.

browser.py line 341: Use correct context for the IPrincipalRoleManager adapter.

File size: 4.5 KB
Line 
1<h2 i18n:translate="" tal:condition="view/label" tal:content="view/label">Label</h2>
2<div class="form-status" tal:define="status view/status" tal:condition="status">
3  <div i18n:translate="" tal:content="view/status"> Form status summary
4  </div>
5  <ul class="errors" tal:condition="view/errors">
6    <li tal:repeat="error view/error_views">
7      <span tal:replace="structure error">Error Type
8      </span>
9    </li>
10  </ul>
11</div>
12<form action="." tal:attributes="action request/URL" method="POST"
13      class="edit-form" enctype="multipart/form-data">
14  <div id="tabs">
15    <ul>
16      <li>
17      <a href="#tab-1">
18        <span tal:content="view/subunits">Contents
19        </span></a>
20      </li>
21      <li>
22      <a href="#tab-2">
23        <span>Local Roles
24        </span></a>
25      </li>
26    </ul>
27    <div id="tab-1">
28      <h3 tal:content="view/subunits">Applicants Containers</h3>
29      <table class="display dataTableManage">
30        <thead>
31          <tr>
32            <th>&nbsp;
33            </th>
34            <th>Year
35            </th>
36            <th>Code
37            </th>
38            <th>Title
39            </th>
40          </tr>
41        </thead>
42        <tbody>
43          <tr tal:repeat="entry context/values"         class="gradeB"> <td>
44              <input type="checkbox" name="val_id"
45                     tal:attributes="value entry/__name__" /> </td>
46            <td tal:content="entry/year">Year </td> <td>
47              <a href=""         tal:attributes="href python:view.url(entry)"
48                 tal:content="entry/__name__">Code</a> </td>
49            <td tal:content="entry/title">Title </td>
50          </tr>
51        </tbody>
52      </table>
53      <div id="actionsView">
54        <span class="actionButtons" tal:condition="view/availableActions">
55          <span tal:repeat="action view/actions" tal:omit-tag="">
56            <input tal:condition="python:action.label in view.taboneactions"
57                   tal:replace="structure action/render"/>
58          </span>
59        </span>
60      </div>
61    </div>
62    <div id="tab-2"> <br />
63        <table class="display dataTableManage">
64            <thead>
65                <tr>
66                    <th>&nbsp;
67                    </th>
68                    <th>User Id
69                    </th>
70                    <th>Name
71                    </th>
72                    <th>Local Role
73                    </th>
74                </tr>
75            </thead>
76            <tbody>
77                <tr tal:repeat="entry view/getUsersWithLocalRoles" class="gradeB">
78                    <td>
79                        <input type="checkbox" name="role_id" tal:attributes="value python: entry['user_name']+'|'+entry['local_role']" />
80                    </td>
81                    <td tal:content="entry/user_name"> USERNAME
82                    </td>
83                    <td tal:content="entry/user_title"> USERTITLE
84                    </td>
85                    <td tal:content="entry/local_role_title"> LOCAL ROLE
86                    </td>
87                </tr>
88            </tbody>
89        </table> <br /><br />
90        <div class="actionButtons" tal:condition="view/availableActions">
91            <span tal:repeat="action view/actions" tal:omit-tag="">
92                <input tal:condition="python:action.label in view.tabtwoactions1" tal:replace="structure action/render"/>
93            </span>
94        </div> <br /><br />
95        <table class="zebra">
96            <tr>
97                <td>
98                    <select id="user" name="user">
99                        <option tal:repeat="user view/getUsers" tal:attributes="value user/name">
100                        <span tal:replace="user/val/description">USERTITLE
101                        </span>
102                        </option>
103                    </select>
104                </td>
105                <td>
106                    <select id="local_role" name="local_role">
107                        <option tal:repeat="localrole view/getLocalRoles" tal:attributes="value localrole/name">
108                        <span tal:replace="localrole/title">LOCALROLETITLE
109                        </span>
110                        </option>
111                    </select>
112                </td>
113                <td>
114                    <div class="actionButtons" tal:condition="view/availableActions">
115                        <span tal:repeat="action view/actions" tal:omit-tag="">
116                            <input tal:condition="python:action.label in view.tabtwoactions2" tal:replace="structure action/render"/>
117                        </span>
118                    </div>
119                </td>
120            </tr>
121        </table>
122    </div>
123  </div>
124</form>
Note: See TracBrowser for help on using the repository browser.