[gen] Added 'freeze actions' to pod fields.
|
@ -19,8 +19,7 @@ except ImportError:
|
|||
_noroles = []
|
||||
|
||||
# Errors -----------------------------------------------------------------------
|
||||
jsMessages = ('no_elem_selected', 'delete_confirm', 'unlink_confirm',
|
||||
'unlock_confirm', 'warn_leave_form')
|
||||
jsMessages = ('no_elem_selected', 'action_confirm', 'warn_leave_form')
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
class ToolMixin(BaseMixin):
|
||||
|
@ -108,21 +107,37 @@ class ToolMixin(BaseMixin):
|
|||
if not bg: return url
|
||||
return 'background-image: url(%s)' % url
|
||||
|
||||
def generateDocument(self):
|
||||
'''Generates the document from field-related info. UID of object that
|
||||
is the template target is given in the request.'''
|
||||
def doPod(self):
|
||||
'''Performs an action linked to a pod field: generate, freeze,
|
||||
unfreeze... a document from a pod field.'''
|
||||
rq = self.REQUEST
|
||||
# Get the object on which a document must be generated.
|
||||
# Get the object that is the target of this action.
|
||||
obj = self.getObject(rq.get('objectUid'), appy=True)
|
||||
fieldName = rq.get('fieldName')
|
||||
# Get the document by accessing the value of the pod field.
|
||||
res = getattr(obj, fieldName)
|
||||
if isinstance(res, basestring):
|
||||
# An error has occurred, and p_res contains the error message
|
||||
obj.say(res)
|
||||
# What is the action to perform?
|
||||
action = rq.get('action', 'generate')
|
||||
if action == 'generate':
|
||||
# Generate a (or get a frozen) document by accessing the value of
|
||||
# the pod field.
|
||||
res = getattr(obj, fieldName)
|
||||
if isinstance(res, basestring):
|
||||
# An error has occurred, and p_res contains the error message
|
||||
obj.say(res)
|
||||
return self.goto(rq.get('HTTP_REFERER'))
|
||||
# res contains a FileInfo instance.
|
||||
res.writeResponse(rq.RESPONSE)
|
||||
elif action == 'freeze':
|
||||
# (Re-)freeze a document in the database.
|
||||
res = obj.freeze(fieldName, rq.get('template'), rq.get('podFormat'),
|
||||
noSecurity=False, freezeOdtOnError=False)
|
||||
obj.say(obj.translate('action_done'))
|
||||
return self.goto(rq.get('HTTP_REFERER'))
|
||||
elif action == 'unfreeze':
|
||||
# Unfreeze a document in the database.
|
||||
obj.unfreeze(fieldName, rq.get('template'), rq.get('podFormat'),
|
||||
noSecurity=False)
|
||||
obj.say(obj.translate('action_done'))
|
||||
return self.goto(rq.get('HTTP_REFERER'))
|
||||
# res contains a FileInfo instance.
|
||||
res.writeResponse(rq.RESPONSE)
|
||||
|
||||
def getAppName(self):
|
||||
'''Returns the name of the application.'''
|
||||
|
|
|
@ -156,7 +156,7 @@ class BaseMixin:
|
|||
urlBack = self.getTool().getSiteUrl()
|
||||
else:
|
||||
urlBack = self.getUrl(rq['HTTP_REFERER'])
|
||||
self.say(self.translate('delete_done'))
|
||||
self.say(self.translate('action_done'))
|
||||
self.goto(urlBack)
|
||||
|
||||
def onDeleteEvent(self):
|
||||
|
@ -188,7 +188,7 @@ class BaseMixin:
|
|||
field = sourceObject.getAppyType(rq['fieldName'])
|
||||
field.unlinkObject(sourceObject, targetObject)
|
||||
urlBack = self.getUrl(rq['HTTP_REFERER'])
|
||||
self.say(self.translate('unlink_done'))
|
||||
self.say(self.translate('action_done'))
|
||||
self.goto(urlBack)
|
||||
|
||||
def onCreate(self):
|
||||
|
@ -327,7 +327,7 @@ class BaseMixin:
|
|||
obj = tool.getObject(rq['objectUid'])
|
||||
obj.removeLock(rq['pageName'], force=True)
|
||||
urlBack = self.getUrl(rq['HTTP_REFERER'])
|
||||
self.say(self.translate('unlock_done'))
|
||||
self.say(self.translate('action_done'))
|
||||
self.goto(urlBack)
|
||||
|
||||
def onCreateWithoutForm(self):
|
||||
|
|
|
@ -203,28 +203,12 @@ msgstr ""
|
|||
msgid "page_unlock"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Are you sure you want to delete this element?"
|
||||
msgid "delete_confirm"
|
||||
#. Default: "Are you sure?"
|
||||
msgid "action_confirm"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Are you sure you want to unlink this element?"
|
||||
msgid "unlink_confirm"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Are you sure you want to unlock this page?"
|
||||
msgid "unlock_confirm"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "The element has been deleted."
|
||||
msgid "delete_done"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "The element has been unlinked."
|
||||
msgid "unlink_done"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "The page has been unlocked."
|
||||
msgid "unlock_done"
|
||||
#. Default: "The action has been performed."
|
||||
msgid "action_done"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Go to top"
|
||||
|
@ -287,10 +271,6 @@ msgstr ""
|
|||
msgid "doc"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "RTF"
|
||||
msgid "rtf"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "ODS"
|
||||
msgid "ods"
|
||||
msgstr ""
|
||||
|
@ -299,6 +279,22 @@ msgstr ""
|
|||
msgid "xls"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "frozen"
|
||||
msgid "frozen"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "(Re-)freeze"
|
||||
msgid "freezeField"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Unfreeze"
|
||||
msgid "unfreezeField"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Upload a new file"
|
||||
msgid "uploadField"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Welcome to this Appy-powered site."
|
||||
msgid "front_page_text"
|
||||
msgstr ""
|
||||
|
|
44
gen/tr/ar.po
|
@ -203,28 +203,12 @@ msgstr ""
|
|||
msgid "page_unlock"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Are you sure you want to delete this element?"
|
||||
msgid "delete_confirm"
|
||||
#. Default: "Are you sure?"
|
||||
msgid "action_confirm"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Are you sure you want to unlink this element?"
|
||||
msgid "unlink_confirm"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Are you sure you want to unlock this page?"
|
||||
msgid "unlock_confirm"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "The element has been deleted."
|
||||
msgid "delete_done"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "The element has been unlinked."
|
||||
msgid "unlink_done"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "The page has been unlocked."
|
||||
msgid "unlock_done"
|
||||
#. Default: "The action has been performed."
|
||||
msgid "action_done"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Go to top"
|
||||
|
@ -287,10 +271,6 @@ msgstr ""
|
|||
msgid "doc"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "RTF"
|
||||
msgid "rtf"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "ODS"
|
||||
msgid "ods"
|
||||
msgstr ""
|
||||
|
@ -299,6 +279,22 @@ msgstr ""
|
|||
msgid "xls"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "frozen"
|
||||
msgid "frozen"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "(Re-)freeze"
|
||||
msgid "freezeField"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Unfreeze"
|
||||
msgid "unfreezeField"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Upload a new file"
|
||||
msgid "uploadField"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Welcome to this Appy-powered site."
|
||||
msgid "front_page_text"
|
||||
msgstr ""
|
||||
|
|
44
gen/tr/de.po
|
@ -203,28 +203,12 @@ msgstr ""
|
|||
msgid "page_unlock"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Are you sure you want to delete this element?"
|
||||
msgid "delete_confirm"
|
||||
msgstr "Wollen Sie dieses Element wirklich entfernen?"
|
||||
|
||||
#. Default: "Are you sure you want to unlink this element?"
|
||||
msgid "unlink_confirm"
|
||||
#. Default: "Are you sure?"
|
||||
msgid "action_confirm"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Are you sure you want to unlock this page?"
|
||||
msgid "unlock_confirm"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "The element has been deleted."
|
||||
msgid "delete_done"
|
||||
msgstr "Das Element wurde entfernt."
|
||||
|
||||
#. Default: "The element has been unlinked."
|
||||
msgid "unlink_done"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "The page has been unlocked."
|
||||
msgid "unlock_done"
|
||||
#. Default: "The action has been performed."
|
||||
msgid "action_done"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Go to top"
|
||||
|
@ -287,10 +271,6 @@ msgstr "PDF"
|
|||
msgid "doc"
|
||||
msgstr "DOC (Microsoft Word)"
|
||||
|
||||
#. Default: "RTF"
|
||||
msgid "rtf"
|
||||
msgstr "RTF (Rich Text)"
|
||||
|
||||
#. Default: "ODS"
|
||||
msgid "ods"
|
||||
msgstr ""
|
||||
|
@ -299,6 +279,22 @@ msgstr ""
|
|||
msgid "xls"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "frozen"
|
||||
msgid "frozen"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "(Re-)freeze"
|
||||
msgid "freezeField"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Unfreeze"
|
||||
msgid "unfreezeField"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Upload a new file"
|
||||
msgid "uploadField"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Welcome to this Appy-powered site."
|
||||
msgid "front_page_text"
|
||||
msgstr ""
|
||||
|
|
48
gen/tr/en.po
|
@ -204,29 +204,13 @@ msgstr "Unlink"
|
|||
msgid "page_unlock"
|
||||
msgstr "Unlock"
|
||||
|
||||
#. Default: "Are you sure you want to delete this element?"
|
||||
msgid "delete_confirm"
|
||||
msgstr "Are you sure you want to delete this element?"
|
||||
#. Default: "Are you sure?"
|
||||
msgid "action_confirm"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Are you sure you want to unlink this element?"
|
||||
msgid "unlink_confirm"
|
||||
msgstr "Are you sure you want to unlink this element?"
|
||||
|
||||
#. Default: "Are you sure you want to unlock this page?"
|
||||
msgid "unlock_confirm"
|
||||
msgstr "Are you sure you want to unlock this page?"
|
||||
|
||||
#. Default: "The element has been deleted."
|
||||
msgid "delete_done"
|
||||
msgstr "The element has been deleted."
|
||||
|
||||
#. Default: "The element has been unlinked."
|
||||
msgid "unlink_done"
|
||||
msgstr "The element has been unlinked."
|
||||
|
||||
#. Default: "The page has been unlocked."
|
||||
msgid "unlock_done"
|
||||
msgstr "The page has been unlocked."
|
||||
#. Default: "The action has been performed."
|
||||
msgid "action_done"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Go to top"
|
||||
msgid "goto_first"
|
||||
|
@ -288,10 +272,6 @@ msgstr "PDF"
|
|||
msgid "doc"
|
||||
msgstr "DOC"
|
||||
|
||||
#. Default: "RTF"
|
||||
msgid "rtf"
|
||||
msgstr "RTF"
|
||||
|
||||
#. Default: "ODS"
|
||||
msgid "ods"
|
||||
msgstr "ODS"
|
||||
|
@ -300,6 +280,22 @@ msgstr "ODS"
|
|||
msgid "xls"
|
||||
msgstr "XLS"
|
||||
|
||||
#. Default: "frozen"
|
||||
msgid "frozen"
|
||||
msgstr "frozen"
|
||||
|
||||
#. Default: "(Re-)freeze"
|
||||
msgid "freezeField"
|
||||
msgstr "(Re-)freeze"
|
||||
|
||||
#. Default: "Unfreeze"
|
||||
msgid "unfreezeField"
|
||||
msgstr "Unfreeze"
|
||||
|
||||
#. Default: "Upload a new file"
|
||||
msgid "uploadField"
|
||||
msgstr "Upload a new file"
|
||||
|
||||
#. Default: "Welcome to this Appy-powered site."
|
||||
msgid "front_page_text"
|
||||
msgstr "Welcome to this Appy-powered site."
|
||||
|
|
46
gen/tr/es.po
|
@ -203,28 +203,12 @@ msgstr ""
|
|||
msgid "page_unlock"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Are you sure you want to delete this element?"
|
||||
msgid "delete_confirm"
|
||||
msgstr "¿Está seguro de querer suprimir ese elemento?"
|
||||
#. Default: "Are you sure?"
|
||||
msgid "action_confirm"
|
||||
msgstr "¿Está seguro?"
|
||||
|
||||
#. Default: "Are you sure you want to unlink this element?"
|
||||
msgid "unlink_confirm"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Are you sure you want to unlock this page?"
|
||||
msgid "unlock_confirm"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "The element has been deleted."
|
||||
msgid "delete_done"
|
||||
msgstr "El elemento ha sido suprimido."
|
||||
|
||||
#. Default: "The element has been unlinked."
|
||||
msgid "unlink_done"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "The page has been unlocked."
|
||||
msgid "unlock_done"
|
||||
#. Default: "The action has been performed."
|
||||
msgid "action_done"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Go to top"
|
||||
|
@ -287,10 +271,6 @@ msgstr "PDF"
|
|||
msgid "doc"
|
||||
msgstr "DOC (Microsoft Word)"
|
||||
|
||||
#. Default: "RTF"
|
||||
msgid "rtf"
|
||||
msgstr "RTF (Rich Text)"
|
||||
|
||||
#. Default: "ODS"
|
||||
msgid "ods"
|
||||
msgstr ""
|
||||
|
@ -299,6 +279,22 @@ msgstr ""
|
|||
msgid "xls"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "frozen"
|
||||
msgid "frozen"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "(Re-)freeze"
|
||||
msgid "freezeField"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Unfreeze"
|
||||
msgid "unfreezeField"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Upload a new file"
|
||||
msgid "uploadField"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Welcome to this Appy-powered site."
|
||||
msgid "front_page_text"
|
||||
msgstr ""
|
||||
|
|
48
gen/tr/fr.po
|
@ -204,29 +204,13 @@ msgstr "Dissocier"
|
|||
msgid "page_unlock"
|
||||
msgstr "Déverrouiller"
|
||||
|
||||
#. Default: "Are you sure you want to delete this element?"
|
||||
msgid "delete_confirm"
|
||||
msgstr "Êtes-vous sûr de vouloir supprimer cet élément?"
|
||||
#. Default: "Are you sure?"
|
||||
msgid "action_confirm"
|
||||
msgstr "Êtes-vous sûr?"
|
||||
|
||||
#. Default: "Are you sure you want to unlink this element?"
|
||||
msgid "unlink_confirm"
|
||||
msgstr "Êtes-vous sûr de vouloir dissocier cet élément?"
|
||||
|
||||
#. Default: "Are you sure you want to unlock this page?"
|
||||
msgid "unlock_confirm"
|
||||
msgstr "Êtes-vous sûr de vouloir déverrouiller cette page?"
|
||||
|
||||
#. Default: "The element has been deleted."
|
||||
msgid "delete_done"
|
||||
msgstr "L'élément a été supprimé."
|
||||
|
||||
#. Default: "The element has been unlinked."
|
||||
msgid "unlink_done"
|
||||
msgstr "L'élément a été dissocié."
|
||||
|
||||
#. Default: "The page has been unlocked."
|
||||
msgid "unlock_done"
|
||||
msgstr "La page a été déverrouillée."
|
||||
#. Default: "The action has been performed."
|
||||
msgid "action_done"
|
||||
msgstr "L'action a été réalisée."
|
||||
|
||||
#. Default: "Go to top"
|
||||
msgid "goto_first"
|
||||
|
@ -288,10 +272,6 @@ msgstr "PDF"
|
|||
msgid "doc"
|
||||
msgstr "DOC (Microsoft Word)"
|
||||
|
||||
#. Default: "RTF"
|
||||
msgid "rtf"
|
||||
msgstr "RTF (Rich Text)"
|
||||
|
||||
#. Default: "ODS"
|
||||
msgid "ods"
|
||||
msgstr "ODS (LibreOffice Calc)"
|
||||
|
@ -300,6 +280,22 @@ msgstr "ODS (LibreOffice Calc)"
|
|||
msgid "xls"
|
||||
msgstr "XLS (Microsoft Excel)"
|
||||
|
||||
#. Default: "frozen"
|
||||
msgid "frozen"
|
||||
msgstr "gelé"
|
||||
|
||||
#. Default: "(Re-)freeze"
|
||||
msgid "freezeField"
|
||||
msgstr "(Re-)geler"
|
||||
|
||||
#. Default: "Unfreeze"
|
||||
msgid "unfreezeField"
|
||||
msgstr "Dégeler"
|
||||
|
||||
#. Default: "Upload a new file"
|
||||
msgid "uploadField"
|
||||
msgstr "Écraser par..."
|
||||
|
||||
#. Default: "Welcome to this Appy-powered site."
|
||||
msgid "front_page_text"
|
||||
msgstr "Bienvenue sur ce site fabriqué avec <a href=\"http://appyframework.org\" target=\"_blank\">Appy</a>"
|
||||
|
|
46
gen/tr/it.po
|
@ -203,28 +203,12 @@ msgstr ""
|
|||
msgid "page_unlock"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Are you sure you want to delete this element?"
|
||||
msgid "delete_confirm"
|
||||
msgstr "È sicuro di voler eliminare questo elemento?"
|
||||
#. Default: "Are you sure?"
|
||||
msgid "action_confirm"
|
||||
msgstr "È sicuro?"
|
||||
|
||||
#. Default: "Are you sure you want to unlink this element?"
|
||||
msgid "unlink_confirm"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Are you sure you want to unlock this page?"
|
||||
msgid "unlock_confirm"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "The element has been deleted."
|
||||
msgid "delete_done"
|
||||
msgstr "L'elemento è stato cancellato."
|
||||
|
||||
#. Default: "The element has been unlinked."
|
||||
msgid "unlink_done"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "The page has been unlocked."
|
||||
msgid "unlock_done"
|
||||
#. Default: "The action has been performed."
|
||||
msgid "action_done"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Go to top"
|
||||
|
@ -287,10 +271,6 @@ msgstr "PDF"
|
|||
msgid "doc"
|
||||
msgstr "DOC (Microsoft Word)"
|
||||
|
||||
#. Default: "RTF"
|
||||
msgid "rtf"
|
||||
msgstr "RTF (Rich Text)"
|
||||
|
||||
#. Default: "ODS"
|
||||
msgid "ods"
|
||||
msgstr ""
|
||||
|
@ -299,6 +279,22 @@ msgstr ""
|
|||
msgid "xls"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "frozen"
|
||||
msgid "frozen"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "(Re-)freeze"
|
||||
msgid "freezeField"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Unfreeze"
|
||||
msgid "unfreezeField"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Upload a new file"
|
||||
msgid "uploadField"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Welcome to this Appy-powered site."
|
||||
msgid "front_page_text"
|
||||
msgstr ""
|
||||
|
|
44
gen/tr/nl.po
|
@ -203,28 +203,12 @@ msgstr ""
|
|||
msgid "page_unlock"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Are you sure you want to delete this element?"
|
||||
msgid "delete_confirm"
|
||||
msgstr "Wil u dit element werkelijk verwijderen?"
|
||||
|
||||
#. Default: "Are you sure you want to unlink this element?"
|
||||
msgid "unlink_confirm"
|
||||
#. Default: "Are you sure?"
|
||||
msgid "action_confirm"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Are you sure you want to unlock this page?"
|
||||
msgid "unlock_confirm"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "The element has been deleted."
|
||||
msgid "delete_done"
|
||||
msgstr "Het element werd verwijderd."
|
||||
|
||||
#. Default: "The element has been unlinked."
|
||||
msgid "unlink_done"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "The page has been unlocked."
|
||||
msgid "unlock_done"
|
||||
#. Default: "The action has been performed."
|
||||
msgid "action_done"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Go to top"
|
||||
|
@ -287,10 +271,6 @@ msgstr "PDF"
|
|||
msgid "doc"
|
||||
msgstr "DOC (Microsoft Word)"
|
||||
|
||||
#. Default: "RTF"
|
||||
msgid "rtf"
|
||||
msgstr "RTF (Rich Text)"
|
||||
|
||||
#. Default: "ODS"
|
||||
msgid "ods"
|
||||
msgstr ""
|
||||
|
@ -299,6 +279,22 @@ msgstr ""
|
|||
msgid "xls"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "frozen"
|
||||
msgid "frozen"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "(Re-)freeze"
|
||||
msgid "freezeField"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Unfreeze"
|
||||
msgid "unfreezeField"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Upload a new file"
|
||||
msgid "uploadField"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Welcome to this Appy-powered site."
|
||||
msgid "front_page_text"
|
||||
msgstr ""
|
||||
|
|
|
@ -102,9 +102,8 @@ td.search { padding-top: 8px }
|
|||
width: 350px; z-index : 100; background: white; padding: 8px;
|
||||
border: 1px solid grey }
|
||||
.dropdown { display:none; position: absolute; border: 1px solid #cccccc;
|
||||
background-color: white; padding-top: 4px }
|
||||
.dropdownMenu { cursor: pointer; padding-right: 4px }
|
||||
.dropdown a { padding: 0 0.5em }
|
||||
background-color: white; padding: 3px 4px 0 }
|
||||
.dropdownMenu { cursor: pointer; padding-right: 4px; font-size: 93% }
|
||||
.dropdown a:hover { text-decoration: underline }
|
||||
.list { margin-bottom: 3px }
|
||||
.list td, .list th { border: 1px solid grey;
|
||||
|
@ -156,5 +155,5 @@ td.search { padding-top: 8px }
|
|||
.homeTable th { padding-top: 5px; font-size: 105% }
|
||||
.first { margin-top: 0px }
|
||||
.error { margin: 5px }
|
||||
.podName { font-size: 90%; padding-left: 3px }
|
||||
.podName { font-size: 90% }
|
||||
.podTable { margin-left: 15px }
|
||||
|
|
|
@ -446,14 +446,14 @@ function triggerTransition(formId, transitionId, msg) {
|
|||
function onDeleteObject(objectUid) {
|
||||
f = document.getElementById('deleteForm');
|
||||
f.objectUid.value = objectUid;
|
||||
askConfirm('form', 'deleteForm', delete_confirm);
|
||||
askConfirm('form', 'deleteForm', action_confirm);
|
||||
}
|
||||
|
||||
function onDeleteEvent(objectUid, eventTime) {
|
||||
f = document.getElementById('deleteEventForm');
|
||||
f.objectUid.value = objectUid;
|
||||
f.eventTime.value = eventTime;
|
||||
askConfirm('form', 'deleteEventForm', delete_confirm);
|
||||
askConfirm('form', 'deleteEventForm', action_confirm);
|
||||
}
|
||||
|
||||
function onUnlinkObject(sourceUid, fieldName, targetUid) {
|
||||
|
@ -461,14 +461,14 @@ function onUnlinkObject(sourceUid, fieldName, targetUid) {
|
|||
f.sourceUid.value = sourceUid;
|
||||
f.fieldName.value = fieldName;
|
||||
f.targetUid.value = targetUid;
|
||||
askConfirm('form', 'unlinkForm', unlink_confirm);
|
||||
askConfirm('form', 'unlinkForm', action_confirm);
|
||||
}
|
||||
|
||||
function onUnlockPage(objectUid, pageName) {
|
||||
f = document.getElementById('unlockForm');
|
||||
f.objectUid.value = objectUid;
|
||||
f.pageName.value = pageName;
|
||||
askConfirm('form', 'unlockForm', unlock_confirm);
|
||||
askConfirm('form', 'unlockForm', action_confirm);
|
||||
}
|
||||
|
||||
function createCookie(name, value, days) {
|
||||
|
@ -521,17 +521,38 @@ function toggleCookie(cookieId) {
|
|||
}
|
||||
|
||||
// Function that allows to generate a document from a pod template.
|
||||
function generatePodDocument(uid, fieldName, template, podFormat, queryData,
|
||||
customParams) {
|
||||
var theForm = document.getElementById("podTemplateForm");
|
||||
theForm.objectUid.value = uid;
|
||||
theForm.fieldName.value = fieldName;
|
||||
theForm.template.value = template;
|
||||
theForm.podFormat.value = podFormat;
|
||||
theForm.queryData.value = queryData;
|
||||
if (customParams) { theForm.customParams.value = customParams; }
|
||||
else { theForm.customParams.value = ''; }
|
||||
theForm.submit();
|
||||
function generatePod(uid,fieldName,template,podFormat,queryData,customParams) {
|
||||
var f = document.getElementById('podForm');
|
||||
f.objectUid.value = uid;
|
||||
f.fieldName.value = fieldName;
|
||||
f.template.value = template;
|
||||
f.podFormat.value = podFormat;
|
||||
f.queryData.value = queryData;
|
||||
if (customParams) { f.customParams.value = customParams; }
|
||||
else { f.customParams.value = ''; }
|
||||
f.action.value = 'generate';
|
||||
f.submit();
|
||||
}
|
||||
|
||||
// Function that allows to (un-)freeze a document from a pod template.
|
||||
function freezePod(uid, fieldName, template, podFormat, action) {
|
||||
var f = document.getElementById('podForm');
|
||||
f.objectUid.value = uid;
|
||||
f.fieldName.value = fieldName;
|
||||
f.template.value = template;
|
||||
f.podFormat.value = podFormat;
|
||||
f.action.value = action;
|
||||
askConfirm('form', 'podForm', action_confirm);
|
||||
}
|
||||
|
||||
// Function that allows to upload a file for freezing it in a od field.
|
||||
function uploadPod(uid, fieldName, template, podFormat) {
|
||||
var f = document.getElementById('uploadForm');
|
||||
f.objectUid.value = uid;
|
||||
f.fieldName.value = fieldName;
|
||||
f.template.value = template;
|
||||
f.podFormat.value = podFormat;
|
||||
openPopup('uploadPopup');
|
||||
}
|
||||
|
||||
function protectAppyForm() {
|
||||
|
|
BIN
gen/ui/doc.png
Before Width: | Height: | Size: 832 B After Width: | Height: | Size: 475 B |
BIN
gen/ui/docFrozen.png
Normal file
After Width: | Height: | Size: 514 B |
BIN
gen/ui/freeze.png
Normal file
After Width: | Height: | Size: 350 B |
BIN
gen/ui/frozen.png
Normal file
After Width: | Height: | Size: 177 B |
BIN
gen/ui/ods.png
Before Width: | Height: | Size: 731 B After Width: | Height: | Size: 663 B |
BIN
gen/ui/odsFrozen.png
Normal file
After Width: | Height: | Size: 668 B |
BIN
gen/ui/odt.png
Before Width: | Height: | Size: 774 B After Width: | Height: | Size: 470 B |
BIN
gen/ui/odtFrozen.png
Normal file
After Width: | Height: | Size: 493 B |
BIN
gen/ui/pdf.png
Before Width: | Height: | Size: 400 B After Width: | Height: | Size: 432 B |
BIN
gen/ui/pdfFrozen.png
Normal file
After Width: | Height: | Size: 485 B |
BIN
gen/ui/rtf.png
Before Width: | Height: | Size: 225 B |
BIN
gen/ui/unfreeze.png
Normal file
After Width: | Height: | Size: 442 B |
BIN
gen/ui/upload.png
Normal file
After Width: | Height: | Size: 421 B |
BIN
gen/ui/xls.png
Before Width: | Height: | Size: 314 B After Width: | Height: | Size: 623 B |
BIN
gen/ui/xlsFrozen.png
Normal file
After Width: | Height: | Size: 621 B |
|
@ -128,15 +128,16 @@ class ToolWrapper(AbstractWrapper):
|
|||
<input type="hidden" name="objectUid"/>
|
||||
<input type="hidden" name="pageName"/>
|
||||
</form>
|
||||
<!-- Global form for generating a document from a pod template -->
|
||||
<form id="podTemplateForm" name="podTemplateForm" method="post"
|
||||
action=":ztool.absolute_url() + '/generateDocument'">
|
||||
<!-- Global form for generating/freezing a document from a pod template -->
|
||||
<form id="podForm" name="podForm" method="post"
|
||||
action=":ztool.absolute_url() + '/doPod'">
|
||||
<input type="hidden" name="objectUid"/>
|
||||
<input type="hidden" name="fieldName"/>
|
||||
<input type="hidden" name="template"/>
|
||||
<input type="hidden" name="podFormat"/>
|
||||
<input type="hidden" name="queryData"/>
|
||||
<input type="hidden" name="customParams"/>
|
||||
<input type="hidden" name="action" value="generate"/>
|
||||
</form>''')
|
||||
|
||||
pxPageBottom = Px('''
|
||||
|
|
|
@ -123,6 +123,21 @@ class AbstractWrapper(object):
|
|||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Popup for uploading a file in a pod field -->
|
||||
<div id="uploadPopup" class="popup" align="center">
|
||||
<form id="uploadForm" name="uploadForm" enctype="multipart/form-data"
|
||||
method="post" action=":ztool.absolute_url() + '/uploadPod'">
|
||||
<input type="hidden" name="objectUid"/>
|
||||
<input type="hidden" name="fieldName"/>
|
||||
<input type="hidden" name="template"/>
|
||||
<input type="hidden" name="podFormat"/>
|
||||
<input type="file" name="uploadedFile"/><br/><br/>
|
||||
<input type="submit" value=":_('object_save')"/>
|
||||
<input type="button" onclick="closePopup('uploadPopup')"
|
||||
value=":_('object_cancel')"/>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Popup for reinitializing the password -->
|
||||
<div id="askPasswordReinitPopup" class="popup"
|
||||
if="isAnon and ztool.showForgotPassword()">
|
||||
|
@ -791,19 +806,21 @@ class AbstractWrapper(object):
|
|||
zopeObj.reindex()
|
||||
return appyObj
|
||||
|
||||
def freeze(self, fieldName, template=None, format='pdf'):
|
||||
def freeze(self, fieldName, template=None, format='pdf', noSecurity=True,
|
||||
freezeOdtOnError=True):
|
||||
'''This method freezes the content of pod field named p_fieldName, for
|
||||
the given p_template (several templates can be given in
|
||||
podField.template), in the given p_format ("pdf" by default).'''
|
||||
field = self.o.getAppyType(fieldName)
|
||||
if field.type!= 'Pod': raise Exception('Cannot freeze non-Pod field.')
|
||||
return field.freeze(self, template, format)
|
||||
return field.freeze(self, template, format, noSecurity=noSecurity,
|
||||
freezeOdtOnError=freezeOdtOnError)
|
||||
|
||||
def unfreeze(self, fieldName, template=None, format='pdf'):
|
||||
def unfreeze(self, fieldName, template=None, format='pdf', noSecurity=True):
|
||||
'''This method unfreezes a pod field.'''
|
||||
field = self.o.getAppyType(fieldName)
|
||||
if field.type!= 'Pod': raise Exception('Cannot unfreeze non-Pod field.')
|
||||
field.unfreeze(self, template, format)
|
||||
field.unfreeze(self, template, format, noSecurity=noSecurity)
|
||||
|
||||
def delete(self):
|
||||
'''Deletes myself.'''
|
||||
|
|