provide actions for creating/editing institutions; toggle checkboxes in listings
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3576 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
a6dbafcce8
commit
fa4e4eed89
8 changed files with 72 additions and 11 deletions
|
@ -13,7 +13,8 @@
|
|||
summary string:Currently assigned objects;
|
||||
legend string:Parent Concepts;
|
||||
showPredicate string:yes;
|
||||
buttonText string:Remove Parents;"
|
||||
buttonText string:Remove Parents;
|
||||
formName string:parents;"
|
||||
style="float:left; padding-right:20px">
|
||||
<metal:parents use-macro="views/relation_macros/listing" />
|
||||
</div>
|
||||
|
@ -25,7 +26,8 @@
|
|||
summary string:Currently assigned objects;
|
||||
legend string:Child Concepts;
|
||||
showPredicate string:yes;
|
||||
buttonText string:Remove Children;"
|
||||
buttonText string:Remove Children;
|
||||
formName string:children;"
|
||||
style="clear:left">
|
||||
<metal:children use-macro="views/relation_macros/listing" />
|
||||
</div>
|
||||
|
@ -41,7 +43,8 @@
|
|||
summary string:Assignment candidates;
|
||||
legend string:Search;
|
||||
showPredicate nothing;
|
||||
buttonText string:Assign;">
|
||||
buttonText string:Assign;
|
||||
formName string:search;">
|
||||
<metal:assign use-macro="views/relation_macros/listing">
|
||||
<metal:search fill-slot="topActions">
|
||||
<metal:block use-macro="views/relation_macros/search" />
|
||||
|
|
|
@ -13,6 +13,12 @@ function focusOpener() {
|
|||
}
|
||||
}
|
||||
|
||||
function toggleCheckBoxes(toggle, fieldName) {
|
||||
var w = toggle.form[fieldName];
|
||||
if (w[0] == null) w = [w];
|
||||
for (i in w) w[i].checked=toggle.checked;
|
||||
}
|
||||
|
||||
function validate(nodeName, required) {
|
||||
// (work in progress) - may be used for onBlur event handler
|
||||
var w = dojo.byId(nodeName);
|
||||
|
|
|
@ -2,14 +2,23 @@
|
|||
|
||||
|
||||
<metal:assignments define-macro="listing">
|
||||
<script type="text/javascript">
|
||||
function toggleCheckBoxes(toggle, fieldName) {
|
||||
var w = toggle.form[fieldName];
|
||||
if (w[0] == null) w = [w];
|
||||
for (i in w) w[i].checked=toggle.checked;
|
||||
}
|
||||
</script>
|
||||
<fieldset>
|
||||
<legend tal:content="legend"
|
||||
i18n:translate=""
|
||||
style="padding: 0 4px 0 4px">Listing</legend>
|
||||
<metal:top define-slot="topActions" />
|
||||
<form metal:define-macro="listing_form"
|
||||
method="post" name="listing" action="."
|
||||
tal:attributes="action request/URL"
|
||||
method="post" action="."
|
||||
tal:define="formName formName|string:listing"
|
||||
tal:attributes="action request/URL;
|
||||
name formName"
|
||||
tal:condition="items">
|
||||
<input type="hidden" name="action" value="remove"
|
||||
tal:attributes="value action" />
|
||||
|
@ -21,7 +30,9 @@
|
|||
tal:attributes="summary summary">
|
||||
<thead>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th style="padding: 0">
|
||||
<input type="checkbox"
|
||||
onclick="toggleCheckBoxes(this, 'tokens:list')" /></th>
|
||||
<th i18n:translate="label_title">Title</th>
|
||||
<th i18n:translate="label_type">Type</th>
|
||||
<tal:relation condition="showPredicate">
|
||||
|
@ -35,12 +46,12 @@
|
|||
<tr tal:repeat="item items">
|
||||
<td class="field">
|
||||
<input class="formSelection"
|
||||
type="checkbox" name="tokens:list" id="#" value=""
|
||||
type="checkbox" name="tokens:list" value=""
|
||||
tal:condition="not:item/isProtected|nothing"
|
||||
tal:attributes="value item/token" />
|
||||
</td>
|
||||
<td>
|
||||
<a tal:content="item/title" href="#"
|
||||
<a tal:content="item/title"
|
||||
tal:attributes="href string:${item/url}/@@SelectedManagementView.html">
|
||||
Title
|
||||
</a>
|
||||
|
|
|
@ -193,7 +193,7 @@ class IQueryConcept(ILoopsAdapter):
|
|||
'to be used for the query and for presenting '
|
||||
'the results'),
|
||||
default=u'',
|
||||
required=True)
|
||||
required=False)
|
||||
|
||||
options = schema.List(
|
||||
title=_(u'Options'),
|
||||
|
|
Binary file not shown.
|
@ -3,7 +3,7 @@ msgstr ""
|
|||
|
||||
"Project-Id-Version: $Id$\n"
|
||||
"POT-Creation-Date: 2007-05-22 12:00 CET\n"
|
||||
"PO-Revision-Date: 2009-10-11 12:00 CET\n"
|
||||
"PO-Revision-Date: 2009-10-12 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"
|
||||
|
@ -110,6 +110,30 @@ msgstr "Person bearbeiten..."
|
|||
msgid "Modify person."
|
||||
msgstr "Person bearbeiten"
|
||||
|
||||
msgid "Create Institution..."
|
||||
msgstr "Institution anlegen..."
|
||||
|
||||
msgid "Create a new institution."
|
||||
msgstr "Eine neue Institution anlegen"
|
||||
|
||||
msgid "Edit Institution..."
|
||||
msgstr "Institution bearbeiten..."
|
||||
|
||||
msgid "Modify institution."
|
||||
msgstr "Institution bearbeiten"
|
||||
|
||||
msgid "Create Address..."
|
||||
msgstr "Adresse anlegen..."
|
||||
|
||||
msgid "Create a new address."
|
||||
msgstr "Eine neue Adresse anlegen"
|
||||
|
||||
msgid "Edit Address..."
|
||||
msgstr "Adresse bearbeiten..."
|
||||
|
||||
msgid "Modify address."
|
||||
msgstr "Adresse bearbeiten"
|
||||
|
||||
msgid "Create Resource, Type = "
|
||||
msgstr "Ressource anlegen, Typ = "
|
||||
|
||||
|
|
|
@ -78,6 +78,23 @@ actions.register('editAddress', 'portlet', DialogAction,
|
|||
dialogName='editAddress',
|
||||
)
|
||||
|
||||
actions.register('createInstitution', 'portlet', DialogAction,
|
||||
title=_(u'Create Institution...'),
|
||||
description=_(u'Create a new institution.'),
|
||||
viewName='create_concept.html',
|
||||
dialogName='createInstitution',
|
||||
typeToken='.loops/concepts/institution',
|
||||
fixedType=True,
|
||||
innerForm='inner_concept_form.html',
|
||||
)
|
||||
|
||||
actions.register('editInstitution', 'portlet', DialogAction,
|
||||
title=_(u'Edit Institution...'),
|
||||
description=_(u'Modify institution.'),
|
||||
viewName='edit_concept.html',
|
||||
dialogName='editInstitution',
|
||||
)
|
||||
|
||||
actions.register('send_email', 'object', DialogAction,
|
||||
description=_(u'Send a link to this object by email.'),
|
||||
viewName='object_send_email.html',
|
||||
|
|
2
query.py
2
query.py
|
@ -192,7 +192,7 @@ class IQueryConcept(IConceptSchema):
|
|||
'to be used for the query and for presenting '
|
||||
'the results'),
|
||||
default=u'',
|
||||
required=True)
|
||||
required=False)
|
||||
|
||||
options = schema.List(
|
||||
title=_(u'Options'),
|
||||
|
|
Loading…
Add table
Reference in a new issue