source: TI01-discovery/trunk/OAIInfoEditor/oai_info_editor/templates/provider_info.html @ 5235

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI01-discovery/trunk/OAIInfoEditor/oai_info_editor/templates/provider_info.html@5235
Revision 5235, 1.6 KB checked in by cbyrom, 11 years ago (diff)

Add functionality to allow admin users to add new provider info +
restrict deletion of info to admin users + add basic input checking
to ensure provider name is specified as a minimum.

Line 
1<!--! Template methods to support Change Request data -->
2<html xmlns="http://www.w3.org/1999/xhtml" 
3        xmlns:py="http://genshi.edgewall.org/"
4        xmlns:xi="http://www.w3.org/2001/XInclude"
5        py:strip="">
6        <xi:include href="utils.html" />
7        <xi:include href="repository_info.html" />
8    <?python
9                import oai_info_editor.lib.constants as constants
10                import oai_info_editor.model.providerinfo as PI
11        ?>
12
13        <div class="providerInfoTable" py:def="ProviderInfoTable(records, isEditable, editLink)">
14        <table width="100%">
15                <tr class="headerRow">
16                                <th width="3%" />
17                                <th width="3%" />
18                        <th align="left">Provider Name</th>
19                </tr>
20                <div py:replace="ProviderInfoRecord(records, isEditable, editLink)" />
21               
22        </table>
23    </div>
24
25        <div py:def="ProviderInfoRecord(record, isEditable, editLink)">
26        <tr>
27                <span py:if="editLink"> 
28                        <td>
29                        <a href="${'%s%s' %(c.editLink, record.name)}" onclick="Div_show('loading');">Edit</a>
30                        </td>
31                        <td py:if="c.user.isAdmin">
32                        <a href="${'%s%s' %(c.deleteLink, record.name)}" onclick="Div_show('loading');">Delete</a>
33                        </td>
34                        <td py:if="not c.user.isAdmin" />
35                </span>
36                <span py:if="not editLink"><td /><td /></span>
37                <div py:replace="EditTextField(PI.NAME_ATT_NAME, record.name, isEditable, constants.TEXT_FIELD, width='20%')"/>
38        </tr>
39        <tr py:if="record.repositoryInfos or isEditable">
40                <td />
41                <th>Repository Info</th>
42                <td colspan="$colSpan">
43                <div py:replace="RepositoryInfoTable(record.repositoryInfos, isEditable, editLink, None)" />
44                </td>
45        </tr>
46       
47        </div>
48</html>
Note: See TracBrowser for help on using the repository browser.