work in progress: handle videos integrated as external access (xa) objects

git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@2776 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
helmutm 2008-07-28 12:35:24 +00:00
parent 208f5338ac
commit 543a2e4127
6 changed files with 17 additions and 9 deletions

View file

@ -71,13 +71,18 @@ class ObjectForm(NodeView):
template = ViewPageTemplateFile('form_macros.pt')
customMacro = None
formState = FormState() # dummy, don't update!
isInnerHtml = True
#isInnerHtml = True
def __init__(self, context, request):
super(ObjectForm, self).__init__(context, request)
# target is the object the view acts upon - this is not necessarily
# the same object as the context (the object the view was created for)
self.target = context
#self.registerDojoForm()
@Lazy
def isInnerHtml(self):
return bool(self.request.form.get('dialog'))
def closeAction(self, submit=False):
if self.isInnerHtml:

View file

@ -224,7 +224,7 @@ img.notselected {
margin: 1em 0 1em 0;
}
.button a, .button a:visited {
.button a:link, .button a:visited {
padding: 2px 4px 2px 4px;
background-color: #e8e8e8;
text-decoration: None;

View file

@ -59,4 +59,5 @@ class FlashVideo(ConceptView):
@Lazy
def startName(self):
# HTML file has the same name as the directory it is in.
return self.adapted.address + '.html'

View file

@ -3,13 +3,12 @@
<div metal:define-macro="flashvideo">
<h1 tal:attributes="ondblclick item/openEditWindow">
<span tal:content="item/title">Title</span>
</h1>
<div><br />
<a href="." target="_blank" class="button"
<metal:resources use-macro="item/conceptMacros/concepttitle" />
<div class="button">
<a href="." target="_blank"
i18n:translate=""
tal:define="baseUrl python: view.getUrlForTarget(item.context)"
tal:attributes="href string:$baseUrl/xa/${item/startName}">Open Resource</a>
tal:attributes="href string:$baseUrl/xa/${item/startName}">Play Movie</a>
</div>
<metal:resources use-macro="item/conceptMacros/conceptchildren" />
<metal:resources use-macro="item/conceptMacros/conceptresources" />

Binary file not shown.

View file

@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: $Id$\n"
"POT-Creation-Date: 2007-05-22 12:00 CET\n"
"PO-Revision-Date: 2008-01-23 12:00 CET\n"
"PO-Revision-Date: 2008-07-28 12:00 CET\n"
"Last-Translator: Helmut Merz <helmutm@cy55.de>\n"
"Language-Team: loops developers <helmutm@cy55.de>\n"
"MIME-Version: 1.0\n"
@ -80,6 +80,9 @@ msgstr "Glossareintrag anlegen..."
msgid "Create Glossary Item"
msgstr "Glossareintrag anlegen"
msgid "Play Movie"
msgstr "Video abspielen"
msgid "Favorites"
msgstr "Lesezeichen"