-
Notifications
You must be signed in to change notification settings - Fork 0
Components
Helge Heß edited this page Sep 25, 2024
·
1 revision
The old UI in OGo implemented using "WOComponent"s aka WebObjects components. The WebObjects framework is called "NGObjWeb" in SOPE and extends the old Apple version quite significantly. Yet the basic things are the same.
In OGo page level components are often (but not always) created using the Component Activation system.
A WOComponent itself usually consists of:
- a template
- either
.wo
(directory w/ .html template plus .wod binding file) - or
.wox
(single file, XML based, namespaces for bindings)
- either
- an Objective-C class
Usually a UI bundle would contain the WOComponent templates as resources, but in the case of OGo the OGoResourceManager
class overrides that and puts them into a central directory (so that the installed bundles do not have to be touched for template modifications).
LSWAppointmentViewer.wox:
<?xml version='1.0' encoding="iso-8859-1" standalone="yes" ?>
<page
var:title="labels.AppointmentViewerTitle"
xmlns="http://www.opengroupware.org/ns/wox/ogo"
xmlns:var="http://www.skyrix.com/od/binding"
xmlns:const="http://www.skyrix.com/od/constant"
xmlns:html="http://www.w3.org/1999/xhtml"
>
<head var:title="startDate">
<buttons>
<button name="clip" label="clip"
action="placeInClipboard" />
<button name="mail" label="send"
action="mailObject" url="objectUrl" />
<button name="delete" label="deleteButtonLabel"
action="delete" var:enabled="hasLoginDeleteAccess" />
<button name="move" label="move"
action="move" var:enabled="hasLoginEditAccess" />
<button name="edit" label="edit"
action="edit" var:enabled="hasLoginEditAccess" />
<button name="print" label="printButtonLabel"
action="printApt" target="print" />
</buttons>
<attributes>
<attribute label="title" var:string="appointment.title" />
<!-- TODO: add map24 / gmaps / etc support -->
<attribute label="location" var:string="appointment.location" />
<attribute label="formletter" enabled="formLetterTypes.isNotEmpty">
<var:foreach list="formLetterTypes" item="formLetterType"
const:separator=", "
><html:a actionClass="OGoAptFormLetter"
var:directActionName="formLetterActionName"
var:_oid="appointment.dateId"
var:_type="formLetterType"
var:_v="appointment.objectVersion"
target="formletter"><var:string value="formLetterType" /></html:a>
</var:foreach>
</attribute>
</attributes>
</head>
<body>
<tab selectionDefault="scheduler_appointment_view">
<tabitem key="attributes" label="attributes">
<attributes sub-table="1">
<attribute label="startTime" var:string="startDate" is-sub="1" />
<attribute label="endTime" var:string="endDate" is-sub="1" />
<attribute label="notificationTime" var:string="notificationTime"
is-sub="1" />
<attribute label="cycle" is-sub="1" enabled="isCyclic">
<var:string value="appointment" formatter="recurrenceFormatter"/>
</attribute>
<attribute label="resource" var:string="object.resourceNames"
is-sub="1" />
<attribute label="attribute_aptType" var:string="aptTypeLabel"
is-sub="1" />
<attribute label="absence" var:string="object.absence"
enabled="object.isAbsence.boolValue" is-sub="1" />
<var:if condition="isOwnerArchived" const:negate="1">
<attribute label="creator" var:string="appointment.owner.login"
is-sub="1" />
</var:if>
<attribute label="creator" var:string="appointment.owner.login"
enabled="isOwnerArchived"
is-sub="1" shows-deleted-object="1" />
<attribute label="accessTeamLabel" is-sub="1">
<var:string var:value="accessTeamLabel"
var:valueWhenEmpty="labels.private" />
</attribute>
<attribute label="writeAccess" var:string="writeAccessList"
is-sub="1" />
<attribute label="comment" is-sub="1">
<var:string var:value="appointment.comment"
const:insertBR="1"
const:valueWhenEmpty="" />
</attribute>
<attribute label="ignoreConflictsLabel" var:string="ignoreConflicts"
is-sub="1" />
<attribute label="objectVersionLabel"
var:string="appointment.objectVersion"
is-sub="1" />
<var:if condition="showProperties">
<var:component className="LSWObjectViewer"
object="extendedAttributes"
attributes="extendedAttributeSpec"
const:namespace=
"http://www.opengroupware.org/properties/ext-attr"
/>
</var:if>
</attributes>
</tabitem>
<tabitem key="participants" label="participants">
<var:component className="SkyAptParticipantsList"
var:appointment="appointment"/>
</tabitem>
<tabitem key="notes" label="notes">
<var:component className="SkyNoteList"
var:appointment="appointment"
var:title="appointment.title" />
</tabitem>
<tabitem key="conflicts" label="conflicts">
<var:component className="OGoAptConflictsList"
var:appointment="appointment"/>
</tabitem>
<tabitem key="links" label="links">
<var:component className="OGoObjectLinkList" var:object="appointment"/>
</tabitem>
<tabitem key="log" label="logsLabel">
<var:component className="SkyObjectLogList" var:object="appointment"/>
</tabitem>
</tab>
</body>
</page>