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

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

Add edit functionality to allow provider info, and associated
repository info to be updated via the web interface. Add code to
extract inputs, using indexing prefixes to allow multiple repository
infos to be specified, then use this to update the backend XML file -
with this being backed up in the process.

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>
32                        <a href="${'%s%s' %(c.deleteLink, record.name)}" onclick="Div_show('loading');">Delete</a>
33                        </td>
34                </span>
35                <span py:if="not editLink"><td /><td /></span>
36                <div py:replace="EditTextField(PI.NAME_ATT_NAME, record.name, isEditable, constants.TEXT_FIELD, width='20%')"/>
37        </tr>
38        <tr py:if="record.repositoryInfos or isEditable">
39                <td />
40                <th>Repository Info</th>
41                <td colspan="$colSpan">
42                <div py:replace="RepositoryInfoTable(record.repositoryInfos, isEditable, editLink, None)" />
43                </td>
44        </tr>
45       
46        </div>
47</html>
Note: See TracBrowser for help on using the repository browser.