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

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

Add functionality to add new repository info data to provider info
records + properly escape/unescape provider name when passing via url.

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                import urllib
12        ?>
13
14        <div class="providerInfoTable" py:def="ProviderInfoTable(records, isEditable, editLink)">
15        <table width="100%">
16                <tr class="headerRow">
17                                <th width="3%" />
18                                <th width="3%" />
19                        <th align="left">Provider Name</th>
20                </tr>
21                <div py:replace="ProviderInfoRecord(records, isEditable, editLink)" />
22               
23        </table>
24    </div>
25
26        <div py:def="ProviderInfoRecord(record, isEditable, editLink)">
27        <tr>
28                <span py:if="editLink"> 
29                        <td>
30                        <a href="${'%s%s' %(c.editLink, urllib.quote(record.name))}" onclick="Div_show('loading');">Edit</a>
31                        </td>
32                        <td py:if="c.user.isAdmin">
33                        <a href="${'%s%s' %(c.deleteLink, urllib.quote(record.name))}" onclick="Div_show('loading');">Delete</a>
34                        </td>
35                        <td py:if="not c.user.isAdmin" />
36                </span>
37                <span py:if="not editLink"><td /><td /></span>
38                <div py:replace="EditTextField(PI.NAME_ATT_NAME, record.name, isEditable, constants.TEXT_FIELD, width='20%')"/>
39        </tr>
40        <tr py:if="record.repositoryInfos or isEditable">
41                <td />
42                <th>Repository Info</th>
43                <td colspan="$colSpan">
44                <div py:replace="RepositoryInfoTable(record.repositoryInfos, isEditable, editLink, None)" />
45                </td>
46        </tr>
47       
48        </div>
49</html>
Note: See TracBrowser for help on using the repository browser.