mirror of https://github.com/tLDP/LDP
OMF meta-data implementation.
This commit is contained in:
parent
1bf08a9651
commit
f90884583a
|
@ -0,0 +1,41 @@
|
|||
|
||||
from Globals import InitializeClass
|
||||
from Products.OMFDefault import DublinCoreImpl
|
||||
|
||||
class OMF(DublinCoreImpl):
|
||||
"""Mix-in class that provides OMF metadata, based on Dublin Core.
|
||||
"""
|
||||
|
||||
def __init__(self,
|
||||
title = '',
|
||||
subject = (),
|
||||
description = '',
|
||||
contributors = (),
|
||||
effective_date = None,
|
||||
expiration_date = None,
|
||||
format = 'text/html',
|
||||
language = '',
|
||||
rights = ''
|
||||
):
|
||||
DublinCoreImpl.__init__(self,
|
||||
title,
|
||||
subject,
|
||||
description,
|
||||
contributors,
|
||||
effective_date,
|
||||
expiration_date,
|
||||
format,
|
||||
language,
|
||||
rights)
|
||||
self._editMetadata(title,
|
||||
subject,
|
||||
description,
|
||||
contributors,
|
||||
effective_date,
|
||||
expiration_date,
|
||||
format,
|
||||
language,
|
||||
rights)
|
||||
|
||||
InitializeClass(OMF)
|
||||
|
|
@ -0,0 +1,114 @@
|
|||
<dtml-var manage_page_header>
|
||||
<dtml-var manage_tabs>
|
||||
|
||||
<h2>Opensource Metadata Framework Resource Metadata </h2>
|
||||
|
||||
|
||||
<dtml-let effectiveString="effective_date and effective_date.ISO() or 'None'"
|
||||
expirationString="expiration_date and expiration_date.ISO() or 'None'"
|
||||
>
|
||||
|
||||
<form action="manage_editMetadata" method="post">
|
||||
<table>
|
||||
|
||||
<tr valign="top">
|
||||
<th align="right"> Identifier
|
||||
</th>
|
||||
<td colspan="3"> <dtml-var Identifier>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr valign="top">
|
||||
<th align="right"> Title
|
||||
</th>
|
||||
<td colspan="3">
|
||||
<input type="text"
|
||||
name="title"
|
||||
value="&dtml-Title;"
|
||||
size="65">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr valign="top">
|
||||
<th align="right"> Description
|
||||
</th>
|
||||
<td colspan="3">
|
||||
<textarea name="description:text" rows="5"
|
||||
cols="65">&dtml-Description;</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr valign="top">
|
||||
<th align="right"> Subject
|
||||
</th>
|
||||
<td>
|
||||
<textarea name="subject:lines" rows="5"
|
||||
cols="30"><dtml-in Subject><dtml-var sequence-item>
|
||||
</dtml-in></textarea>
|
||||
</td>
|
||||
<th align="right"> Contributors
|
||||
</th>
|
||||
<td>
|
||||
<textarea name="contributors:lines" rows="5"
|
||||
cols="30"><dtml-in Contributors><dtml-var sequence-item>
|
||||
</dtml-in></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr valign="top">
|
||||
<th align="right"> Creation Date
|
||||
</th>
|
||||
<td> <dtml-var CreationDate>
|
||||
</td>
|
||||
<th align="right"> Last Modified Date
|
||||
</th>
|
||||
<td> <dtml-var ModificationDate>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr valign="top">
|
||||
<th align="right"> Effective Date
|
||||
</th>
|
||||
<td> <input type="text" name="effective_date"
|
||||
value="&dtml-effectiveString;">
|
||||
</td>
|
||||
<th align="right"> Expiration Date
|
||||
</th>
|
||||
<td> <input type="text" name="expiration_date"
|
||||
value="&dtml-expirationString;">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr valign="top">
|
||||
<th align="right"> Format
|
||||
</th>
|
||||
<td> <input type="text" name="format" value="&dtml-Format;">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr valign="top">
|
||||
<th align="right"> Language
|
||||
</th>
|
||||
<td> <input type="text" name="language" value="&dtml-Language;">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr valign="top">
|
||||
<th align="right"> Rights
|
||||
</th>
|
||||
<td> <input type="text" name="rights" value="&dtml-Rights;">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr valign="top">
|
||||
<td> <br> </td>
|
||||
<td>
|
||||
<input type="submit" value=" Change ">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
</dtml-let>
|
||||
|
||||
<dtml-var manage_page_footer>
|
Loading…
Reference in New Issue