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

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

Add Harvester class to run the jOAI Harvester API and run repository
harvests. Add code throughout the app to allow harvests to be
ran from the UI. Add new test data and tests to exercise the new
functionality and adjust the config file to allow input of required
harvest data. Add confirmation pop up when running deletes.

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       <script py:if="c.user.isAdmin" type="text/javascript">
14function confirmProviderInfoDelete() 
15{
16        var r=confirm('Do you really want to delete this provider info data?');
17        if (r==true)
18        {
19                Div_show("loading");
20                return true; 
21        }
22        return false;
23}
24        </script>
25
26        <div class="providerInfoTable" py:def="ProviderInfoTable(records, isEditable, editLink, harvestLink)">
27        <table width="100%">
28                <tr class="headerRow">
29                                <th width="3%" />
30                                <th width="3%" />
31                        <th align="left">Provider Name</th>
32                </tr>
33                <div py:replace="ProviderInfoRecord(records, isEditable, editLink, harvestLink)" />
34        </table>
35    </div>
36
37        <div py:def="ProviderInfoRecord(record, isEditable, editLink, harvestLink)">
38        <tr>
39                <span py:if="editLink"> 
40                        <td>
41                        <a href="${'%s%s' %(editLink, urllib.quote(record.name))}" onclick="Div_show('loading');">Edit</a>
42                        </td>
43                        <td py:if="c.user.isAdmin">
44                        <a href="${'%s%s' %(c.deleteLink, urllib.quote(record.name))}" onclick="return confirmProviderInfoDelete();">Delete</a>
45                        </td>
46                        <td py:if="not c.user.isAdmin" />
47                </span>
48                <span py:if="not editLink"><td /><td /></span>
49                <?python
50adminEdit = False
51if c.user.isAdmin and isEditable:
52        adminEdit = True
53                ?>
54                <div py:replace="EditTextField(PI.NAME_ATT_NAME, record.name, adminEdit, constants.TEXT_FIELD, width='20%')"/>
55                <input py:if="not adminEdit" type="hidden" name="${PI.NAME_ATT_NAME}" value="${record.name}"/>
56        </tr>
57        <tr py:if="record.repositoryInfos or isEditable">
58                <td />
59                <th>Repository Info</th>
60                <td colspan="$colSpan">
61                <div py:replace="RepositoryInfoTable(record.repositoryInfos, isEditable, editLink, harvestLink.replace(constants.PROVIDER_REPLACEMENT, urllib.quote(record.name)))" />
62                </td>
63        </tr>
64        </div>
65</html>
Note: See TracBrowser for help on using the repository browser.