diff --git a/pom.xml b/pom.xml index df54bff02b9c12232d0f6088b97d485676c8896d..7c62f4df09c0f8dc66730df4bc3075c371f05d7c 100644 --- a/pom.xml +++ b/pom.xml @@ -122,6 +122,8 @@ <configuration> <messagesDirectory>${basedir}/src/main/resources/config/dptbase-work</messagesDirectory> <generateEditorWrapper>true</generateEditorWrapper> + <useEditorXML>true</useEditorXML> + <addGenerateSuffix>false</addGenerateSuffix> </configuration> </plugin> </plugins> diff --git a/src/main/datamodel/editor/work-editor.xml b/src/main/datamodel/editor/work-editor.xml new file mode 100644 index 0000000000000000000000000000000000000000..a8a1d39fc9f566c490aafea9e0e2686951cbe998 --- /dev/null +++ b/src/main/datamodel/editor/work-editor.xml @@ -0,0 +1,32 @@ +<editor objecttype="work"> + <tab i18n="module.dptbase.work.editor.tab.general" id="work-editor-general" active="true"> + <item id="preferredTitle" file="webapp:editor/import_editor_form_work-title.xed"/> + <item ref="alphabet"/> + <item ref="language"/> + <item ref="variantTitle"/> + <item ref="recordSource"/> + <item ref="identifier"/> + </tab> + <tab i18n="module.dptbase.work.editor.tab.content" id="work-editor-content"> + <item ref="subject"/> + <item ref="date"/> + <item ref="place"/> + <item ref="placeIdentifier"/> + <item ref="bibReference"/> + <item ref="content"/> + <item ref="note"/> + <item ref="internalRemark"/> + </tab> + <tab i18n="module.dptbase.work.editor.tab.relations" id="work-editor-relations" referrer="searchclass=work_subselect"> + <item ref="relation"/> + <item ref="externalLink"/> + </tab> + <tab i18n="module.dptbase.work.editor.tab.agent" id="work-editor-agent" referrer="searchclass=agent_subselect"> + <item ref="person"/> + </tab> + <tab i18n="module.dptbase.work.editor.tab.admin" id="work-editor-admin"> + <item ref="editor"/> + <status/> + <item ref="recordType"/> + </tab> +</editor> \ No newline at end of file diff --git a/src/main/resources/META-INF/resources/editor/import_editor_form_work-common-generated.xed b/src/main/resources/META-INF/resources/editor/import_editor_form_work-common-generated.xed deleted file mode 100644 index a64eabea2259ccf84a7dbcb3c99a9c68b07fcfa5..0000000000000000000000000000000000000000 --- a/src/main/resources/META-INF/resources/editor/import_editor_form_work-common-generated.xed +++ /dev/null @@ -1,636 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<xed:template xmlns:xed="http://www.mycore.de/xeditor"> - <xed:template id="work-label"> - <label for="label"> - <xed:output i18n="module.dptbase.work.mcrlabel.label" /> - <xed:output value="'Â (*)'" /> - </label> - <div class="dpt-editor-row dpt-editor-text"> - <xed:bind xpath="../@label"> - <input type="text" class="dpt_editor_inputfield" id="label" maxlength="256" /> - <xed:display-validation-message /> - <xed:validate display="local" required="true"> - <div class="dpt-editor-validation-message"> - <xed:output i18n="module.dptbase.work.mcrlabel.cond" /> - </div> - </xed:validate> - </xed:bind> - </div> - </xed:template> - <xed:template id="work-preferredTitle"> - <label for="preferredTitle"> - <xed:output i18n="module.dptbase.work.preferredTitle.label" /> - <xed:output value="'Â (*)'" /> - </label> - <xed:bind xpath="def.preferredTitle[@class='MCRMetaLangText']"> - <xed:bind xpath="@notinherit" set="true" /> - <xed:bind xpath="@heritable" set="false" /> - <div class="dpt-editor-row dpt-editor-select-text-multiple"> - <xed:repeat xpath="preferredTitle" min="4" max="4"> - <xed:bind xpath="@inherited" set="0" /> - <xed:bind xpath="@type"> - <select class="dpt_editor_select" title="{i18n:false.typesel}"> - <option value=""> - <xed:output i18n="module.dptbase.common.editor.choose" /> - </option> - <xed:include uri="xslStyle:items2options:classification:editor[Text]:-1:children:Romanisation" cacheable="false" /> - </select> - </xed:bind> - <input type="text" class="dpt_editor_inputfield" id="preferredTitle" maxlength="256" /> - <hr /> - </xed:repeat> - <xed:display-validation-message /> - <xed:validate display="local" test="string-length(preferredTitle/@type) > 0 and string-length(preferredTitle/text()) >0"> - <div class="dpt-editor-validation-message"> - <xed:output i18n="module.dptbase.work.preferredTitle.cond" /> - </div> - </xed:validate> - </div> - </xed:bind> - </xed:template> - <xed:template id="work-alphabet"> - <label for="alphabet"> - <xed:output i18n="module.dptbase.work.alphabet.label" /> - </label> - <xed:bind xpath="def.alphabet[@class='MCRMetaClassification']"> - <xed:bind xpath="@notinherit" set="true" /> - <xed:bind xpath="@heritable" set="false" /> - <div class="dpt-editor-row dpt-editor-select"> - <xed:repeat xpath="alphabet" min="1" max="1"> - <xed:bind xpath="@inherited" set="0" /> - <xed:bind xpath="@classid" default="MyMssAlphabet" /> - <xed:bind xpath="@categid"> - <select class="dpt_editor_select"> - <option value=""> - <xed:output i18n="module.dptbase.common.editor.choose" /> - </option> - <xed:include uri="xslStyle:items2options:classification:editor[Text]:-1:children:MyMssAlphabet" cacheable="false" /> - </select> - </xed:bind> - </xed:repeat> - </div> - </xed:bind> - </xed:template> - <xed:template id="work-language"> - <label for="language"> - <xed:output i18n="module.dptbase.work.language.label" /> - </label> - <xed:bind xpath="def.language[@class='MCRMetaClassification']"> - <xed:bind xpath="@notinherit" set="true" /> - <xed:bind xpath="@heritable" set="false" /> - <div class="dpt-editor-row dpt-editor-select-multiple"> - <xed:repeat xpath="language" min="1" max="999"> - <xed:bind xpath="@inherited" set="0" /> - <div class="dpt-editor-control-buttons"> - <xed:controls>append remove up down</xed:controls> - </div> - <xed:bind xpath="@classid" default="MyMssLanguage" /> - <xed:bind xpath="@categid"> - <select class="dpt_editor_select"> - <option value=""> - <xed:output i18n="module.dptbase.common.editor.choose" /> - </option> - <xed:include uri="xslStyle:items2options:classification:editor[Text]:-1:children:MyMssLanguage" cacheable="false" /> - </select> - </xed:bind> - <hr /> - </xed:repeat> - </div> - </xed:bind> - </xed:template> - <xed:template id="work-variantTitle"> - <label for="variantTitle"> - <xed:output i18n="module.dptbase.work.variantTitle.label" /> - </label> - <xed:bind xpath="def.variantTitle[@class='MCRMetaLangText']"> - <xed:bind xpath="@notinherit" set="true" /> - <xed:bind xpath="@heritable" set="false" /> - <div class="dpt-editor-row dpt-editor-select-select-text-multiple"> - <xed:repeat xpath="variantTitle" min="5" max="999"> - <xed:bind xpath="@inherited" set="0" /> - <div class="dpt-editor-control-buttons"> - <xed:controls>append remove up down</xed:controls> - </div> - <xed:include uri="webapp:editor/import_editor_form_common.xed" ref="language_text" /> - <xed:include uri="webapp:editor/import_editor_form_common.xed" ref="type_original" /> - <input type="text" class="dpt_editor_inputfield" id="variantTitle" maxlength="256" /> - <hr /> - </xed:repeat> - </div> - </xed:bind> - </xed:template> - <xed:template id="work-recordType"> - <xed:bind xpath="def.recordType[@class='MCRMetaLangText']/recordType" set="work" /> - </xed:template> - <xed:template id="work-recordSource"> - <label for="recordSource"> - <xed:output i18n="module.dptbase.work.recordSource.label" /> - <xed:output value="'Â (*)'" /> - </label> - <xed:bind xpath="def.recordSource[@class='MCRMetaClassification']"> - <xed:bind xpath="@notinherit" set="true" /> - <xed:bind xpath="@heritable" set="false" /> - <div class="dpt-editor-row dpt-editor-select"> - <xed:repeat xpath="recordSource" min="1" max="1"> - <xed:bind xpath="@inherited" set="0" /> - <xed:bind xpath="@classid" default="WorkRecordSource" /> - <xed:bind xpath="@categid"> - <select class="dpt_editor_select"> - <option value=""> - <xed:output i18n="module.dptbase.common.editor.choose" /> - </option> - <xed:include uri="xslStyle:items2options:classification:editor[Text]:-1:children:WorkRecordSource" cacheable="false" /> - </select> - </xed:bind> - </xed:repeat> - <xed:display-validation-message /> - <xed:validate display="local" test="string-length(recordSource/@categid) > 0"> - <div class="dpt-editor-validation-message"> - <xed:output i18n="module.dptbase.work.recordSource.cond" /> - </div> - </xed:validate> - </div> - </xed:bind> - </xed:template> - <xed:template id="work-identifier"> - <label for="identifier"> - <xed:output i18n="module.dptbase.work.identifier.label" /> - </label> - <xed:bind xpath="def.identifier[@class='MCRMetaLangText']"> - <xed:bind xpath="@notinherit" set="true" /> - <xed:bind xpath="@heritable" set="false" /> - <div class="dpt-editor-row dpt-editor-select-text-multiple"> - <xed:repeat xpath="identifier" min="1" max="999"> - <xed:bind xpath="@inherited" set="0" /> - <div class="dpt-editor-control-buttons"> - <xed:controls>append remove up down</xed:controls> - </div> - <xed:bind xpath="@type"> - <select class="dpt_editor_select" title="{i18n:false.typesel}"> - <option value=""> - <xed:output i18n="module.dptbase.common.editor.choose" /> - </option> - <xed:include uri="xslStyle:items2options:classification:editor[Text]:-1:children:WorkIdentifier" cacheable="false" /> - </select> - </xed:bind> - <input type="text" class="dpt_editor_inputfield" id="identifier" maxlength="256" /> - <hr /> - </xed:repeat> - <xed:display-validation-message /> - <xed:validate display="local" test="(string-length(identifier/@type) + string-length(identifier/text()) = 0) or ((string-length(identifier/@type) > 0) and (string-length(identifier/text()) > 0))"> - <div class="dpt-editor-validation-message"> - <xed:output i18n="module.dptbase.work.identifier.cond" /> - </div> - </xed:validate> - </div> - </xed:bind> - </xed:template> - <xed:template id="work-subject"> - <label for="subject"> - <xed:output i18n="module.dptbase.work.subject.label" /> - </label> - <xed:bind xpath="def.subject[@class='MCRMetaClassification']"> - <xed:bind xpath="@notinherit" set="true" /> - <xed:bind xpath="@heritable" set="false" /> - <div class="dpt-editor-row dpt-editor-select-multiple"> - <xed:repeat xpath="subject" min="1" max="999"> - <xed:bind xpath="@inherited" set="0" /> - <div class="dpt-editor-control-buttons"> - <xed:controls>append remove up down</xed:controls> - </div> - <xed:bind xpath="@classid" default="MyMssSubjectMatter" /> - <xed:bind xpath="@categid"> - <select class="dpt_editor_select"> - <option value=""> - <xed:output i18n="module.dptbase.common.editor.choose" /> - </option> - <xed:include uri="xslStyle:items2options:classification:editor[Text]:-1:children:MyMssSubjectMatter" cacheable="false" /> - </select> - </xed:bind> - <hr /> - </xed:repeat> - </div> - </xed:bind> - </xed:template> - <xed:template id="work-date"> - <label for="date"> - <xed:output i18n="module.dptbase.work.date.label" /> - </label> - <xed:bind xpath="def.date[@class='MCRMetaHistoryDate']"> - <xed:bind xpath="@notinherit" set="true" /> - <xed:bind xpath="@heritable" set="false" /> - <div class="dpt-editor-row dpt-editor-date-multiple"> - <xed:repeat xpath="date" min="1" max="999"> - <xed:bind xpath="@inherited" set="0" /> - <div class="dpt-editor-control-buttons"> - <xed:controls>append remove up down</xed:controls> - </div> - <div class="dpt-editor-row"> - <div class="dpt-editor-row dpt-editor-select-text-multiple"> - <xed:repeat xpath="text"> - <div class="dpt-editor-control-buttons"> - <xed:controls>append remove up down</xed:controls> - </div> - <xed:include uri="webapp:editor/import_editor_form_common.xed" ref="language_application" /> - <input type="text" class="dpt_editor_inputarea" id="date" maxlength="128" placeholder="{i18n:module.dptbase.work.date.hint1}" /> - </xed:repeat> - </div> - <div class="dpt-editor-row-date-type-from-to"> - <xed:include uri="webapp:editor/import_editor_form_common.xed" ref="date_calendar" /> - <xed:bind xpath="von"> - <input type="text" class="dpt_editor_inputfield" id="daterange" maxlength="128" placeholder="{i18n:module.dptbase.work.date.hint3}" /> - </xed:bind> - <xed:bind xpath="bis"> - <input type="text" class="dpt_editor_inputfield" id="daterange" maxlength="128" placeholder="{i18n:module.dptbase.work.date.hint4}" /> - </xed:bind> - <xed:bind xpath="ivon" /> - <xed:bind xpath="ibis" /> - </div> - </div> - <hr /> - </xed:repeat> - </div> - </xed:bind> - </xed:template> - <xed:template id="work-place"> - <label for="place"> - <xed:output i18n="module.dptbase.work.place.label" /> - </label> - <xed:bind xpath="def.place[@class='MCRMetaLangText']"> - <xed:bind xpath="@notinherit" set="true" /> - <xed:bind xpath="@heritable" set="false" /> - <div class="dpt-editor-row dpt-editor-select-text-multiple"> - <xed:repeat xpath="place" min="1" max="999"> - <xed:bind xpath="@inherited" set="0" /> - <div class="dpt-editor-control-buttons"> - <xed:controls>append remove up down</xed:controls> - </div> - <xed:include uri="webapp:editor/import_editor_form_common.xed" ref="language_application" /> - <input type="text" class="dpt_editor_inputfield" id="place" maxlength="256" /> - <hr /> - </xed:repeat> - </div> - </xed:bind> - </xed:template> - <xed:template id="work-placeIdentifier"> - <label for="placeIdentifier"> - <xed:output i18n="module.dptbase.work.placeIdentifier.label" /> - </label> - <xed:bind xpath="def.placeIdentifier[@class='MCRMetaLangText']"> - <xed:bind xpath="@notinherit" set="true" /> - <xed:bind xpath="@heritable" set="false" /> - <div class="dpt-editor-row dpt-editor-select-text-multiple"> - <xed:repeat xpath="placeIdentifier" min="1" max="999"> - <xed:bind xpath="@inherited" set="0" /> - <div class="dpt-editor-control-buttons"> - <xed:controls>append remove up down</xed:controls> - </div> - <xed:bind xpath="@type"> - <select class="dpt_editor_select" title="{i18n:false.typesel}"> - <option value=""> - <xed:output i18n="module.dptbase.common.editor.choose" /> - </option> - <xed:include uri="xslStyle:items2options:classification:editor[Text]:-1:children:PlaceIdentifier" cacheable="false" /> - </select> - </xed:bind> - <input type="text" class="dpt_editor_inputfield" id="placeIdentifier" maxlength="256" /> - <hr /> - </xed:repeat> - <xed:display-validation-message /> - <xed:validate display="local" test="(string-length(placeIdentifier/@type) + string-length(placeIdentifier/text()) = 0) or ((string-length(placeIdentifier/@type) > 0) and (string-length(placeIdentifier/text()) > 0))"> - <div class="dpt-editor-validation-message"> - <xed:output i18n="module.dptbase.work.placeIdentifier.cond" /> - </div> - </xed:validate> - </div> - </xed:bind> - </xed:template> - <xed:template id="work-relation"> - <label for="relation"> - <xed:output i18n="module.dptbase.work.relation.label" /> - </label> - <xed:bind xpath="def.relation[@class='MCRMetaLinkID']"> - <xed:bind xpath="@notinherit" set="true" /> - <xed:bind xpath="@heritable" set="false" /> - <div class="dpt-editor-row dpt-editor-select-work-link-multiple"> - <xed:repeat xpath="relation" min="1" max="999"> - <xed:bind xpath="@inherited" set="0" /> - <div class="dpt-editor-control-buttons"> - <xed:controls>append remove up down</xed:controls> - </div> - <xed:bind xpath="@type"> - <select class="dpt_editor_select" title="{i18n:false.typesel}"> - <option value=""> - <xed:output i18n="module.dptbase.common.editor.choose" /> - </option> - <xed:include uri="xslStyle:active-items2options:classification:editor[Text]:-1:children:WorkRelation" cacheable="false" /> - </select> - </xed:bind> - <xed:bind xpath="@inherited" default="0" /> - <xed:bind xpath="@xlink:type" default="locator" /> - <xed:bind xpath="@xlink:label" /> - <button type="submit" xed:target="subselect" xed:href="/indexpage?searchclass=work_subselect"> - <xed:output i18n="module.dptbase.work.relation.choose" /> - </button> - <xed:controls>remove</xed:controls> - <xed:if test="@xlink:title"> - <div class="dpt-editor-datamodel-link-text"> - <xed:output value="@xlink:title" /> - <span>(</span> - <xed:output value="@xlink:href" /> - <span>)</span> - </div> - </xed:if> - <hr /> - </xed:repeat> - <xed:display-validation-message /> - <xed:validate display="local" test="(string-length(relation/@type) + string-length(relation/@xlink:href) = 0) or ((string-length(relation/@type) > 0) and (string-length(relation/@xlink:href) > 0))"> - <div class="dpt-editor-validation-message"> - <xed:output i18n="module.dptbase.work.relation.cond" /> - </div> - </xed:validate> - </div> - </xed:bind> - </xed:template> - <xed:template id="work-person"> - <label for="person"> - <xed:output i18n="module.dptbase.work.person.label" /> - </label> - <xed:bind xpath="def.person[@class='MCRMetaPersonReference']"> - <xed:bind xpath="@notinherit" set="true" /> - <xed:bind xpath="@heritable" set="false" /> - <div class="dpt-editor-row dpt-editor-person-multiple"> - <xed:repeat xpath="person" min="1" max="10"> - <xed:bind xpath="@inherited" set="0" /> - <div class="dpt-editor-control-buttons"> - <xed:controls>append remove up down</xed:controls> - </div> - <div class="dpt_editor_person_container"> - <div> - <div class="dpt_editor_name-ltr"> - <label for="person"> - <xed:output i18n="module.mymss.agent.property2.label" /> - </label> - </div> - <div class="dpt_editor_value-ltr"> - <xed:repeat xpath="property[@classid='MyMssFunctionOfPerson']" min="1" max="5"> - <p> - <xed:controls>append remove up down</xed:controls> - </p> - <p> - <xed:bind xpath="@categid"> - <select class="dpt_editor_select"> - <option value=""> - <xed:output i18n="module.dptbase.common.editor.choose" /> - </option> - <xed:include uri="xslStyle:items2options:classification:editor[Text]:-1:children:MyMssFunctionOfPerson" cacheable="false" /> - </select> - </xed:bind> - </p> - </xed:repeat> - </div> - </div> - <div> - <div class="dpt_editor_name-ltr"> - <label for="person"> - <xed:output i18n="module.mymss.agent.name.label" /> - </label> - </div> - <div class="dpt_editor_value-ltr"> - <xed:repeat xpath="personname" min="1" max="5"> - <p style="text-align:left"> - <xed:include uri="webapp:editor/import_editor_form_common.xed" ref="language_text" /> - <xed:include uri="webapp:editor/import_editor_form_common.xed" ref="type_original" /> - <xed:bind xpath="@categid"> - <select class="dpt_editor_select"> - <option value=""> - <xed:output i18n="module.dptbase.common.editor.choose" /> - </option> - <xed:include uri="xslStyle:items2options:classification:editor[Text]:-1:children:MyMssTypeOfName" cacheable="false" /> - </select> - </xed:bind> - <xed:controls>append remove up down</xed:controls> - </p> - <p> - <textarea type="text" class="dpt_editor_inputarea" id="person" height="7" /> - </p> - </xed:repeat> - </div> - </div> - <div> - <div class="dpt_editor_name-ltr"> - <label for="person"> - <xed:output i18n="module.mymss.agent.link.label" /> - </label> - </div> - <div class="dpt_editor_value-ltr"> - <xed:bind xpath="link[@xlink:type='locator']"> - <xed:bind xpath="@xlink:label" /> - <p> - <button type="submit" style="padding-top:0px; width:350px;" class="dpt_editor_button dpt_editor_button_default" xed:target="subselect" xed:href="/indexpage?searchclass=agent_subselect"> - <xed:output i18n="module.mymss.agent.link.choose" /> - </button> - <xed:controls>remove</xed:controls> - </p> - <xed:if test="@xlink:title"> - <p> - <xed:output value="@xlink:title" /> - ( - <xed:output value="@xlink:href" /> - )Â Â - </p> - </xed:if> - </xed:bind> - </div> - </div> - <div> - <div class="dpt_editor_name-ltr"> - <label for="person"> - <xed:output i18n="module.mymss.agent.remark.label" /> - </label> - </div> - <div class="dpt_editor_value-ltr"> - <xed:repeat xpath="remark" min="1" max="5"> - <p> - <xed:include uri="webapp:editor/import_editor_form_common.xed" ref="language_text" /> - <xed:include uri="webapp:editor/import_editor_form_common.xed" ref="type_original" /> - <xed:controls>append remove up down</xed:controls> - </p> - <p> - <textarea type="text" class="dpt_editor_inputarea" id="person" height="7" /> - </p> - </xed:repeat> - </div> - </div> - <div> - <div class="dpt_editor_name-ltr"> - <label for="person"> - <xed:output i18n="module.mymss.agent.flag.label" /> - </label> - </div> - <div class="dpt_editor_value-ltr"> - <xed:repeat xpath="flag[@classid='PersonReferenceFlag']" min="1" max="5"> - <p> - <xed:controls>append remove up down</xed:controls> - </p> - <p> - <xed:bind xpath="@categid"> - <select class="dpt_editor_select"> - <option value=""> - <xed:output i18n="module.dptbase.common.editor.choose" /> - </option> - <xed:include uri="xslStyle:items2options:classification:editor[Text]:-1:children:PersonReferenceFlag" cacheable="false" /> - </select> - </xed:bind> - </p> - </xed:repeat> - </div> - </div> - <div> - <div class="dpt_editor_name-ltr" colspan="2"> - <hr /> - </div> - </div> - <xed:display-validation-message /> - <xed:validate display="here" test="(((string-length(personname/text()) > 0 and string-length(personname/@categid) > 0) or link/@xlink:href) and string-length(property/@categid) > 0) or (string-length(personname/text()) = 0 and not(link/@xlink:href) and string-length(remark/text()) = 0)"> - <xed:output i18n="module.mymss.agent.cond" /> - </xed:validate> - </div> - <hr /> - </xed:repeat> - </div> - </xed:bind> - </xed:template> - <xed:template id="work-bibReference"> - <label for="bibReference"> - <xed:output i18n="module.dptbase.work.bibReference.label" /> - </label> - <xed:bind xpath="def.bibReference[@class='MCRMetaLangText']"> - <xed:bind xpath="@notinherit" set="true" /> - <xed:bind xpath="@heritable" set="false" /> - <div class="dpt-editor-row dpt-editor-select-text-multiple"> - <xed:repeat xpath="bibReference" min="1" max="999"> - <xed:bind xpath="@inherited" set="0" /> - <div class="dpt-editor-control-buttons"> - <xed:controls>append remove up down</xed:controls> - </div> - <xed:include uri="webapp:editor/import_editor_form_common.xed" ref="language_application" /> - <textarea type="text" class="dpt_editor_inputarea" id="bibReference" height="7" /> - <hr /> - </xed:repeat> - </div> - </xed:bind> - </xed:template> - <xed:template id="work-content"> - <label for="content"> - <xed:output i18n="module.dptbase.work.content.label" /> - </label> - <xed:bind xpath="def.content[@class='MCRMetaLangText']"> - <xed:bind xpath="@notinherit" set="true" /> - <xed:bind xpath="@heritable" set="false" /> - <div class="dpt-editor-row dpt-editor-select-text-multiple"> - <xed:repeat xpath="content" min="1" max="999"> - <xed:bind xpath="@inherited" set="0" /> - <div class="dpt-editor-control-buttons"> - <xed:controls>append remove up down</xed:controls> - </div> - <xed:include uri="webapp:editor/import_editor_form_common.xed" ref="language_application" /> - <textarea type="text" class="dpt_editor_inputarea" id="content" height="7" /> - <hr /> - </xed:repeat> - </div> - </xed:bind> - </xed:template> - <xed:template id="work-note"> - <label for="note"> - <xed:output i18n="module.dptbase.work.note.label" /> - </label> - <xed:bind xpath="def.note[@class='MCRMetaLangText']"> - <xed:bind xpath="@notinherit" set="true" /> - <xed:bind xpath="@heritable" set="false" /> - <div class="dpt-editor-row dpt-editor-select-text-multiple"> - <xed:repeat xpath="note" min="1" max="999"> - <xed:bind xpath="@inherited" set="0" /> - <div class="dpt-editor-control-buttons"> - <xed:controls>append remove up down</xed:controls> - </div> - <xed:include uri="webapp:editor/import_editor_form_common.xed" ref="language_application" /> - <textarea type="text" class="dpt_editor_inputarea" id="note" height="7" /> - <hr /> - </xed:repeat> - </div> - </xed:bind> - </xed:template> - <xed:template id="work-internalRemark"> - <label for="internalRemark"> - <xed:output i18n="module.dptbase.work.internalRemark.label" /> - </label> - <xed:bind xpath="def.internalRemark[@class='MCRMetaLangText']"> - <xed:bind xpath="@notinherit" set="true" /> - <xed:bind xpath="@heritable" set="false" /> - <div class="dpt-editor-row dpt-editor-select-text-multiple"> - <xed:repeat xpath="internalRemark" min="1" max="999"> - <xed:bind xpath="@inherited" set="0" /> - <div class="dpt-editor-control-buttons"> - <xed:controls>append remove up down</xed:controls> - </div> - <xed:include uri="webapp:editor/import_editor_form_common.xed" ref="language_application" /> - <textarea type="text" class="dpt_editor_inputarea" id="internalRemark" height="7" /> - <hr /> - </xed:repeat> - </div> - </xed:bind> - </xed:template> - <xed:template id="work-externalLink"> - <label for="externalLink"> - <xed:output i18n="module.dptbase.work.externalLink.label" /> - </label> - <xed:bind xpath="def.externalLink[@class='MCRMetaLink']"> - <xed:bind xpath="@notinherit" set="true" /> - <xed:bind xpath="@heritable" set="false" /> - <div class="dpt-editor-row dpt-editor-link-multiple"> - <xed:repeat xpath="externalLink" min="1" max="999"> - <xed:bind xpath="@inherited" set="0" /> - <div class="dpt-editor-control-buttons"> - <xed:controls>append remove up down</xed:controls> - </div> - <xed:bind xpath="@xlink:type" default="locator" /> - <xed:bind xpath="@xlink:title"> - <input type="text" class="dpt_editor_inputfield" maxlength="512" placeholder="{i18n:module.dptbase.work.externalLink.title}" /> - </xed:bind> - <xed:bind xpath="@xlink:href"> - <input type="text" class="dpt_editor_inputfield" maxlength="512" placeholder="{i18n:module.dptbase.work.externalLink.url}" /> - </xed:bind> - <hr /> - </xed:repeat> - </div> - </xed:bind> - </xed:template> - <xed:template id="work-editor"> - <label for="editor"> - <xed:output i18n="module.dptbase.work.editor.label" /> - <xed:output value="'Â (*)'" /> - </label> - <xed:bind xpath="def.editor[@class='MCRMetaLangText']"> - <xed:bind xpath="@notinherit" set="true" /> - <xed:bind xpath="@heritable" set="false" /> - <div class="dpt-editor-row dpt-editor-select-text-multiple"> - <xed:repeat xpath="editor" min="1" max="999"> - <xed:bind xpath="@inherited" set="0" /> - <div class="dpt-editor-control-buttons"> - <xed:controls>append remove up down</xed:controls> - </div> - <xed:include uri="webapp:editor/import_editor_form_common.xed" ref="language_application" /> - <input type="text" class="dpt_editor_inputfield" id="editor" maxlength="256" /> - <hr /> - </xed:repeat> - <xed:display-validation-message /> - <xed:validate display="local" test="string-length(editor/text()) >0"> - <div class="dpt-editor-validation-message"> - <xed:output i18n="module.dptbase.work.editor.cond" /> - </div> - </xed:validate> - </div> - </xed:bind> - </xed:template> -</xed:template> diff --git a/src/main/resources/META-INF/resources/editor/import_editor_form_work-common.xed b/src/main/resources/META-INF/resources/editor/import_editor_form_work-common.xed index accbd93a6e51b286b5cda209ce8f434074ff9c9a..782906440f5472ad0b05d1e32285ae3c26cb5126 100644 --- a/src/main/resources/META-INF/resources/editor/import_editor_form_work-common.xed +++ b/src/main/resources/META-INF/resources/editor/import_editor_form_work-common.xed @@ -1,179 +1,628 @@ <?xml version="1.0" encoding="UTF-8"?> -<xed:template xmlns:xed="http://www.mycore.de/xeditor" xmlns:dptbase="https://www.urz.uni-leipzig.de/dptbase"> - <xed:template id="work-ltr"> - <script type="text/javascript" src="/js/transliterations-work.js"/> - <div class="tab-pane active" id="tab1"> - <table class="dpt_editor_table"> - <tr> - <td class="dpt_editor_name-ltr"> - <xed:output i18n="module.dptbase.work.transliteration.source"/> - </td> - <td class="dpt_editor_value-ltr"> - <input type="input" id="transliteration-source"/> - <a href="/content/transliteration.xed" target="_blank"> - <xed:output i18n="module.dptbase.work.transliteration.hints"/> - </a> - </td> - </tr> - - <dptbase:input tag="preferredTitle" i18n="module.dptbase.work.preferredTitle.din" dir="ltr" min="1" max="1" - type="din" required="true" id="preferred_title_din"/> - - <dptbase:input tag="preferredTitle" i18n="module.dptbase.work.preferredTitle.dmg" dir="ltr" min="1" max="1" - type="dmg" id="preferred_title_dmg"/> - - <dptbase:input tag="preferredTitle" i18n="module.dptbase.work.preferredTitle.int" dir="ltr" min="1" max="1" - type="int" id="preferred_title_int"/> - - <dptbase:input tag="preferredTitle" i18n="module.dptbase.work.preferredTitle.orig" dir="ltr" min="1" max="1" - type="orig" id="preferred_title_orig"/> - - <dptbase:classification tag="alphabet" classid="MyMssAlphabet" i18n="module.dptbase.work.alphabet" dir="ltr" - min="1" - max="1"/> - - <dptbase:classification tag="language" classid="MyMssLanguage" i18n="module.dptbase.work.language" dir="ltr" - min="1" - max="10"/> - - <dptbase:input tag="variantTitle" i18n="module.dptbase.work.variantTitle" dir="ltr" min="1" max="10" - textLangSelect="true"/> - - <dptbase:fixedText tag="recordType" value="work"/> - - <dptbase:classification tag="recordSource" classid="WorkRecordSource" i18n="module.dptbase.work.recordSource" - required="true" dir="ltr" min="1" max="1"/> - - <xed:if test="$MCR.Metadata.Type.manuscript='true'"> - <dptbase:classification tag="subject" classid="MyMssSubjectMatter" - i18n="module.mymss.manuscript.mss45" dir="ltr" min="1" max="10"/> - </xed:if> - - <dptbase:input tag="identifier" classid="WorkIdentifier" defaultClass="gnd" - i18n="module.dptbase.work.identifier" - dir="ltr" min="1" max="10"/> - - <dptbase:historydate tag="date" i18n="module.dptbase.work.date" dir="ltr" min="1" max="5"/> - - <dptbase:input tag="place" i18n="module.dptbase.work.place" dir="ltr" min="1" max="10" appLangSelect="true"/> - - <dptbase:input tag="placeIdentifier" classid="PlaceIdentifier" defaultClass="gnd" - i18n="module.dptbase.work.placeIdentifier" dir="ltr" min="1" max="10"/> - - <dptbase:typedLinkId tag="relation" classid="WorkRelation" active="true" type="work" - i18n="module.dptbase.work.relation" dir="ltr" min="1" max="10"/> - - <dptbase:text tag="bibReference" i18n="module.dptbase.work.bibReference" dir="ltr" min="1" max="10" - appLangSelect="true"/> - - <dptbase:text tag="content" i18n="module.dptbase.work.content" dir="ltr" min="1" max="10" appLangSelect="true"/> - - <dptbase:text tag="note" i18n="module.dptbase.work.note" dir="ltr" min="1" max="10" appLangSelect="true"/> - - <dptbase:text tag="internalRemark" i18n="module.dptbase.work.internalRemark" dir="ltr" min="1" max="10" - appLangSelect="true"/> - - <dptbase:link tag="externalLink" i18n="module.dptbase.work.externalLink" dir="ltr" min="1" max="10"/> - - <dptbase:input tag="editor" i18n="module.dptbase.work.editor" required="true" dir="ltr" min="1" max="10" - appLangSelect="true"/> - - <dptbase:statusOfWorkflow dir="ltr"/> - </table> +<!-- + Warning: This file was generated automatically by the maven-datamodel-editor-plugin. Do not change! + --> +<xed:template xmlns:xed="http://www.mycore.de/xeditor"> + <xed:template id="work-label"> + <label for="label"> + <xed:output i18n="module.dptbase.work.mcrlabel.label" /> + <xed:output value="'Â (*)'" /> + </label> + <div class="dpt-editor-row dpt-editor-text"> + <xed:bind xpath="../@label"> + <input type="text" class="dpt_editor_inputfield" id="label" maxlength="256" /> + <xed:display-validation-message /> + <xed:validate display="local" required="true"> + <div class="dpt-editor-validation-message"> + <xed:output i18n="module.dptbase.work.mcrlabel.cond" /> + </div> + </xed:validate> + </xed:bind> </div> - - <div class="tab-pane" id="tab2"> - <table> - <dptbase:personreference tag="person" dir="ltr" min="1" max="10" i18n="module.dptbase.agent"/> - </table> - </div> - - <xed:post-processor xsl="work-postprocessor.xsl"/> - <xed:include uri="webapp:editor/import_editor_common_cleanup-rules.xed" ref="cleanup-rules"/> - </xed:template> - - <xed:template id="work-rtl"> - <div class="tab-pane active" id="tab1"> - <table class="dpt_editor_table"> - <dptbase:input tag="preferredTitle" i18n="module.dptbase.work.preferredTitle" required="true" dir="rtl" min="1" - max="3" classid="Romanisation" defaultClass="orig"/> - - <dptbase:classification tag="alphabet" classid="MyMssAlphabet" i18n="module.dptbase.work.alphabet" dir="rtl" - min="1" - max="1"/> - - <dptbase:classification tag="language" classid="MyMssLanguage" i18n="module.dptbase.work.language" dir="rtl" - min="1" - max="10"/> - - <dptbase:input tag="variantTitle" i18n="module.dptbase.work.variantTitle" dir="rtl" min="1" max="10" - textLangSelect="true"/> - - <dptbase:fixedText tag="recordType" value="work"/> - - <dptbase:classification tag="recordSource" classid="WorkRecordSource" i18n="module.dptbase.work.recordSource" - required="true" dir="rtl" min="1" max="1"/> - - <xed:if test="$MCR.Metadata.Type.manuscript='true'"> - <dptbase:classification tag="subject" classid="MyMssSubjectMatter" - i18n="module.mymss.manuscript.mss45" dir="rtl" min="1" max="10"/> - </xed:if> - - <dptbase:input tag="identifier" classid="WorkIdentifier" defaultClass="gnd" - i18n="module.dptbase.work.identifier" - dir="rtl" min="1" max="10"/> - - <dptbase:historydate tag="date" i18n="module.dptbase.work.date" dir="rtl" min="1" max="5"/> - - <dptbase:input tag="place" i18n="module.dptbase.work.place" dir="rtl" min="1" max="10" appLangSelect="true"/> - - <dptbase:input tag="placeIdentifier" classid="PlaceIdentifier" defaultClass="gnd" - i18n="module.dptbase.work.placeIdentifier" dir="rtl" min="1" max="1"/> - - <dptbase:typedLinkId tag="relation" classid="WorkRelation" active="true" type="work" - i18n="module.dptbase.work.relation" dir="rtl" min="1" max="10"/> - - <dptbase:text tag="bibReference" i18n="module.dptbase.work.bibReference" dir="rtl" min="1" max="10" - appLangSelect="true"/> - - <dptbase:text tag="content" i18n="module.dptbase.work.content" dir="rtl" min="1" max="10" appLangSelect="true"/> - - <dptbase:text tag="note" i18n="module.dptbase.work.note" dir="rtl" min="1" max="10" appLangSelect="true"/> - - <dptbase:text tag="internalRemark" i18n="module.dptbase.work.internalRemark" dir="rtl" min="1" max="10" - appLangSelect="true"/> - - <dptbase:link tag="externalLink" i18n="module.dptbase.work.externalLink" dir="rtl" min="1" max="10"/> - - <dptbase:input tag="editor" i18n="module.dptbase.work.editor" required="true" dir="rtl" min="1" max="10" - appLangSelect="true"/> - - <dptbase:statusOfWorkflow dir="rtl"/> - </table> - </div> - - <div class="tab-pane" id="tab2"> - <table> - <dptbase:personreference tag="person" dir="rtl" min="1" max="10" i18n="module.dptbase.agent"/> - </table> - </div> - - <xed:post-processor xsl="work-postprocessor.xsl"/> - <xed:include uri="webapp:editor/import_editor_common_cleanup-rules.xed" ref="cleanup-rules"/> - </xed:template> - - <xed:template id="nav-tabs"> - <ul class="nav nav-pills nav-fill"> - <li class="nav-item active"> - <a class="nav-link" href="#tab1" data-toggle="tab"> - <xed:output i18n="module.mymss.manuscript.editor.subtitle.general"/> - </a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#tab2" data-toggle="tab"> - <xed:output i18n="module.mymss.manuscript.editor.subtitle.origin"/> - </a> - </li> - </ul> + </xed:template> + <xed:template id="work-preferredTitle"> + <label for="preferredTitle"> + <xed:output i18n="module.dptbase.work.preferredTitle.label" /> + <xed:output value="'Â (*)'" /> + </label> + <xed:bind xpath="def.preferredTitle[@class='MCRMetaLangText']"> + <xed:bind xpath="@notinherit" set="true" /> + <xed:bind xpath="@heritable" set="false" /> + <div class="dpt-editor-row dpt-editor-select-text-multiple"> + <xed:repeat xpath="preferredTitle" min="4" max="4"> + <xed:bind xpath="@inherited" set="0" /> + <xed:bind xpath="@type"> + <select class="dpt_editor_select" title="{i18n:false.typesel}"> + <option value=""> + <xed:output i18n="module.dptbase.common.editor.choose" /> + </option> + <xed:include uri="xslStyle:items2options:classification:editor[Text]:-1:children:Romanisation" cacheable="false" /> + </select> + </xed:bind> + <input type="text" class="dpt_editor_inputfield" id="preferredTitle" maxlength="256" /> + <hr /> + </xed:repeat> + <xed:display-validation-message /> + <xed:validate display="local" test="string-length(preferredTitle/@type) > 0 and string-length(preferredTitle/text()) >0"> + <div class="dpt-editor-validation-message"> + <xed:output i18n="module.dptbase.work.preferredTitle.cond" /> + </div> + </xed:validate> + </div> + </xed:bind> + </xed:template> + <xed:template id="work-alphabet"> + <label for="alphabet"> + <xed:output i18n="module.dptbase.work.alphabet.label" /> + </label> + <xed:bind xpath="def.alphabet[@class='MCRMetaClassification']"> + <xed:bind xpath="@notinherit" set="true" /> + <xed:bind xpath="@heritable" set="false" /> + <div class="dpt-editor-row dpt-editor-select"> + <xed:repeat xpath="alphabet" min="1" max="1"> + <xed:bind xpath="@inherited" set="0" /> + <xed:bind xpath="@classid" default="MyMssAlphabet" /> + <xed:bind xpath="@categid"> + <select class="dpt_editor_select"> + <option value=""> + <xed:output i18n="module.dptbase.common.editor.choose" /> + </option> + <xed:include uri="xslStyle:items2options:classification:editor[Text]:-1:children:MyMssAlphabet" cacheable="false" /> + </select> + </xed:bind> + </xed:repeat> + </div> + </xed:bind> + </xed:template> + <xed:template id="work-language"> + <label for="language"> + <xed:output i18n="module.dptbase.work.language.label" /> + </label> + <xed:bind xpath="def.language[@class='MCRMetaClassification']"> + <xed:bind xpath="@notinherit" set="true" /> + <xed:bind xpath="@heritable" set="false" /> + <div class="dpt-editor-row dpt-editor-select-multiple"> + <xed:repeat xpath="language" min="1" max="999"> + <xed:bind xpath="@inherited" set="0" /> + <div class="dpt-editor-control-buttons"> + <xed:controls>append remove up down</xed:controls> + </div> + <xed:bind xpath="@classid" default="MyMssLanguage" /> + <xed:bind xpath="@categid"> + <select class="dpt_editor_select"> + <option value=""> + <xed:output i18n="module.dptbase.common.editor.choose" /> + </option> + <xed:include uri="xslStyle:items2options:classification:editor[Text]:-1:children:MyMssLanguage" cacheable="false" /> + </select> + </xed:bind> + <hr /> + </xed:repeat> + </div> + </xed:bind> + </xed:template> + <xed:template id="work-variantTitle"> + <label for="variantTitle"> + <xed:output i18n="module.dptbase.work.variantTitle.label" /> + </label> + <xed:bind xpath="def.variantTitle[@class='MCRMetaLangText']"> + <xed:bind xpath="@notinherit" set="true" /> + <xed:bind xpath="@heritable" set="false" /> + <div class="dpt-editor-row dpt-editor-select-select-text-multiple"> + <xed:repeat xpath="variantTitle" min="5" max="999"> + <xed:bind xpath="@inherited" set="0" /> + <div class="dpt-editor-control-buttons"> + <xed:controls>append remove up down</xed:controls> + </div> + <xed:include uri="webapp:editor/import_editor_form_common.xed" ref="language_text" /> + <xed:include uri="webapp:editor/import_editor_form_common.xed" ref="type_original" /> + <input type="text" class="dpt_editor_inputfield" id="variantTitle" maxlength="256" /> + <hr /> + </xed:repeat> + </div> + </xed:bind> + </xed:template> + <xed:template id="work-recordType"> + <xed:bind xpath="def.recordType[@class='MCRMetaLangText']/recordType" set="work" /> + </xed:template> + <xed:template id="work-recordSource"> + <label for="recordSource"> + <xed:output i18n="module.dptbase.work.recordSource.label" /> + <xed:output value="'Â (*)'" /> + </label> + <xed:bind xpath="def.recordSource[@class='MCRMetaClassification']"> + <xed:bind xpath="@notinherit" set="true" /> + <xed:bind xpath="@heritable" set="false" /> + <div class="dpt-editor-row dpt-editor-select"> + <xed:repeat xpath="recordSource" min="1" max="1"> + <xed:bind xpath="@inherited" set="0" /> + <xed:bind xpath="@classid" default="WorkRecordSource" /> + <xed:bind xpath="@categid"> + <select class="dpt_editor_select"> + <option value=""> + <xed:output i18n="module.dptbase.common.editor.choose" /> + </option> + <xed:include uri="xslStyle:items2options:classification:editor[Text]:-1:children:WorkRecordSource" cacheable="false" /> + </select> + </xed:bind> + </xed:repeat> + <xed:display-validation-message /> + <xed:validate display="local" test="string-length(recordSource/@categid) > 0"> + <div class="dpt-editor-validation-message"> + <xed:output i18n="module.dptbase.work.recordSource.cond" /> + </div> + </xed:validate> + </div> + </xed:bind> + </xed:template> + <xed:template id="work-identifier"> + <label for="identifier"> + <xed:output i18n="module.dptbase.work.identifier.label" /> + </label> + <xed:bind xpath="def.identifier[@class='MCRMetaLangText']"> + <xed:bind xpath="@notinherit" set="true" /> + <xed:bind xpath="@heritable" set="false" /> + <div class="dpt-editor-row dpt-editor-select-text-multiple"> + <xed:repeat xpath="identifier" min="1" max="999"> + <xed:bind xpath="@inherited" set="0" /> + <div class="dpt-editor-control-buttons"> + <xed:controls>append remove up down</xed:controls> + </div> + <xed:bind xpath="@type"> + <select class="dpt_editor_select" title="{i18n:false.typesel}"> + <option value=""> + <xed:output i18n="module.dptbase.common.editor.choose" /> + </option> + <xed:include uri="xslStyle:items2options:classification:editor[Text]:-1:children:WorkIdentifier" cacheable="false" /> + </select> + </xed:bind> + <input type="text" class="dpt_editor_inputfield" id="identifier" maxlength="256" /> + <hr /> + </xed:repeat> + <xed:display-validation-message /> + <xed:validate display="local" test="(string-length(identifier/@type) + string-length(identifier/text()) = 0) or ((string-length(identifier/@type) > 0) and (string-length(identifier/text()) > 0))"> + <div class="dpt-editor-validation-message"> + <xed:output i18n="module.dptbase.work.identifier.cond" /> + </div> + </xed:validate> + </div> + </xed:bind> + </xed:template> + <xed:template id="work-subject"> + <label for="subject"> + <xed:output i18n="module.dptbase.work.subject.label" /> + </label> + <xed:bind xpath="def.subject[@class='MCRMetaClassification']"> + <xed:bind xpath="@notinherit" set="true" /> + <xed:bind xpath="@heritable" set="false" /> + <div class="dpt-editor-row dpt-editor-select-multiple"> + <xed:repeat xpath="subject" min="1" max="999"> + <xed:bind xpath="@inherited" set="0" /> + <div class="dpt-editor-control-buttons"> + <xed:controls>append remove up down</xed:controls> + </div> + <xed:bind xpath="@classid" default="MyMssSubjectMatter" /> + <xed:bind xpath="@categid"> + <select class="dpt_editor_select"> + <option value=""> + <xed:output i18n="module.dptbase.common.editor.choose" /> + </option> + <xed:include uri="xslStyle:items2options:classification:editor[Text]:-1:children:MyMssSubjectMatter" cacheable="false" /> + </select> + </xed:bind> + <hr /> + </xed:repeat> + </div> + </xed:bind> + </xed:template> + <xed:template id="work-date"> + <label for="date"> + <xed:output i18n="module.dptbase.work.date.label" /> + </label> + <xed:bind xpath="def.date[@class='MCRMetaHistoryDate']"> + <xed:bind xpath="@notinherit" set="true" /> + <xed:bind xpath="@heritable" set="false" /> + <div class="dpt-editor-row dpt-editor-date-multiple"> + <xed:repeat xpath="date" min="1" max="999"> + <xed:bind xpath="@inherited" set="0" /> + <div class="dpt-editor-control-buttons"> + <xed:controls>append remove up down</xed:controls> + </div> + <div class="dpt-editor-row"> + <div class="dpt-editor-row dpt-editor-select-text-multiple"> + <xed:repeat xpath="text"> + <div class="dpt-editor-control-buttons"> + <xed:controls>append remove up down</xed:controls> + </div> + <xed:include uri="webapp:editor/import_editor_form_common.xed" ref="language_application" /> + <input type="text" class="dpt_editor_inputarea" id="date" maxlength="128" placeholder="{i18n:module.dptbase.work.date.hint1}" /> + </xed:repeat> + </div> + <div class="dpt-editor-row-date-type-from-to"> + <xed:include uri="webapp:editor/import_editor_form_common.xed" ref="date_calendar" /> + <xed:bind xpath="von"> + <input type="text" class="dpt_editor_inputfield" id="daterange" maxlength="128" placeholder="{i18n:module.dptbase.work.date.hint3}" /> + </xed:bind> + <xed:bind xpath="bis"> + <input type="text" class="dpt_editor_inputfield" id="daterange" maxlength="128" placeholder="{i18n:module.dptbase.work.date.hint4}" /> + </xed:bind> + <xed:bind xpath="ivon" /> + <xed:bind xpath="ibis" /> + </div> + </div> + <hr /> + </xed:repeat> + </div> + </xed:bind> + </xed:template> + <xed:template id="work-place"> + <label for="place"> + <xed:output i18n="module.dptbase.work.place.label" /> + </label> + <xed:bind xpath="def.place[@class='MCRMetaLangText']"> + <xed:bind xpath="@notinherit" set="true" /> + <xed:bind xpath="@heritable" set="false" /> + <div class="dpt-editor-row dpt-editor-select-text-multiple"> + <xed:repeat xpath="place" min="1" max="999"> + <xed:bind xpath="@inherited" set="0" /> + <div class="dpt-editor-control-buttons"> + <xed:controls>append remove up down</xed:controls> + </div> + <xed:include uri="webapp:editor/import_editor_form_common.xed" ref="language_application" /> + <input type="text" class="dpt_editor_inputfield" id="place" maxlength="256" /> + <hr /> + </xed:repeat> + </div> + </xed:bind> + </xed:template> + <xed:template id="work-placeIdentifier"> + <label for="placeIdentifier"> + <xed:output i18n="module.dptbase.work.placeIdentifier.label" /> + </label> + <xed:bind xpath="def.placeIdentifier[@class='MCRMetaLangText']"> + <xed:bind xpath="@notinherit" set="true" /> + <xed:bind xpath="@heritable" set="false" /> + <div class="dpt-editor-row dpt-editor-select-text-multiple"> + <xed:repeat xpath="placeIdentifier" min="1" max="999"> + <xed:bind xpath="@inherited" set="0" /> + <div class="dpt-editor-control-buttons"> + <xed:controls>append remove up down</xed:controls> + </div> + <xed:bind xpath="@type"> + <select class="dpt_editor_select" title="{i18n:false.typesel}"> + <option value=""> + <xed:output i18n="module.dptbase.common.editor.choose" /> + </option> + <xed:include uri="xslStyle:items2options:classification:editor[Text]:-1:children:PlaceIdentifier" cacheable="false" /> + </select> + </xed:bind> + <input type="text" class="dpt_editor_inputfield" id="placeIdentifier" maxlength="256" /> + <hr /> + </xed:repeat> + <xed:display-validation-message /> + <xed:validate display="local" test="(string-length(placeIdentifier/@type) + string-length(placeIdentifier/text()) = 0) or ((string-length(placeIdentifier/@type) > 0) and (string-length(placeIdentifier/text()) > 0))"> + <div class="dpt-editor-validation-message"> + <xed:output i18n="module.dptbase.work.placeIdentifier.cond" /> + </div> + </xed:validate> + </div> + </xed:bind> + </xed:template> + <xed:template id="work-relation"> + <label for="relation"> + <xed:output i18n="module.dptbase.work.relation.label" /> + </label> + <xed:bind xpath="def.relation[@class='MCRMetaLinkID']"> + <xed:bind xpath="@notinherit" set="true" /> + <xed:bind xpath="@heritable" set="false" /> + <div class="dpt-editor-row dpt-editor-select-work-link-multiple"> + <xed:repeat xpath="relation" min="1" max="999"> + <xed:bind xpath="@inherited" set="0" /> + <div class="dpt-editor-control-buttons"> + <xed:controls>append remove up down</xed:controls> + </div> + <xed:bind xpath="@type"> + <select class="dpt_editor_select" title="{i18n:false.typesel}"> + <option value=""> + <xed:output i18n="module.dptbase.common.editor.choose" /> + </option> + <xed:include uri="xslStyle:active-items2options:classification:editor[Text]:-1:children:WorkRelation" cacheable="false" /> + </select> + </xed:bind> + <xed:bind xpath="@inherited" default="0" /> + <xed:bind xpath="@xlink:type" default="locator" /> + <xed:bind xpath="@xlink:label" /> + <button type="submit" xed:target="subselect" xed:href="/indexpage?searchclass=work_subselect"> + <xed:output i18n="module.dptbase.work.relation.choose" /> + </button> + <xed:controls>remove</xed:controls> + <xed:if test="@xlink:title"> + <div class="dpt-editor-datamodel-link-text"> + <xed:output value="@xlink:title" /> + <span>(</span> + <xed:output value="@xlink:href" /> + <span>)</span> + </div> + </xed:if> + <hr /> + </xed:repeat> + <xed:display-validation-message /> + <xed:validate display="local" test="(string-length(relation/@type) + string-length(relation/@xlink:href) = 0) or ((string-length(relation/@type) > 0) and (string-length(relation/@xlink:href) > 0))"> + <div class="dpt-editor-validation-message"> + <xed:output i18n="module.dptbase.work.relation.cond" /> + </div> + </xed:validate> + </div> + </xed:bind> + </xed:template> + <xed:template id="work-person"> + <label for="person"> + <xed:output i18n="module.dptbase.work.person.label" /> + </label> + <xed:bind xpath="def.person[@class='MCRMetaPersonReference']"> + <xed:bind xpath="@notinherit" set="true" /> + <xed:bind xpath="@heritable" set="false" /> + <div class="dpt-editor-row dpt-editor-person-multiple"> + <xed:repeat xpath="person" min="1" max="10"> + <xed:bind xpath="@inherited" set="0" /> + <div class="dpt-editor-control-buttons"> + <xed:controls>append remove up down</xed:controls> + </div> + <div class="dpt_editor_person_container"> + <div> + <label for="person"> + <h3> + <xed:output i18n="module.mymss.agent.property2.label" /> + </h3> + </label> + <div class="dpt-editor-row dpt-editor-select-multiple"> + <xed:repeat xpath="property[@classid='MyMssFunctionOfPerson']" min="1" max="5"> + <div class="dpt-editor-control-buttons"> + <xed:controls>append remove up down</xed:controls> + </div> + <xed:bind xpath="@categid"> + <select class="dpt_editor_select"> + <option value=""> + <xed:output i18n="module.dptbase.common.editor.choose" /> + </option> + <xed:include uri="xslStyle:items2options:classification:editor[Text]:-1:children:MyMssFunctionOfPerson" cacheable="false" /> + </select> + </xed:bind> + </xed:repeat> + </div> + </div> + <div> + <label for="person"> + <h3> + <xed:output i18n="module.mymss.agent.name.label" /> + </h3> + </label> + <div class="dpt-editor-row dpt-editor-select-text-multiple"> + <xed:repeat xpath="personname" min="1" max="5"> + <div class="dpt-editor-control-buttons"> + <xed:controls>append remove up down</xed:controls> + </div> + <div> + <xed:include uri="webapp:editor/import_editor_form_common.xed" ref="language_text" /> + <xed:include uri="webapp:editor/import_editor_form_common.xed" ref="type_original" /> + <xed:bind xpath="@categid"> + <select class="dpt_editor_select"> + <option value=""> + <xed:output i18n="module.dptbase.common.editor.choose" /> + </option> + <xed:include uri="xslStyle:items2options:classification:editor[Text]:-1:children:MyMssTypeOfName" cacheable="false" /> + </select> + </xed:bind> + </div> + <textarea type="text" class="dpt_editor_inputarea" id="person" height="7" /> + </xed:repeat> + </div> + </div> + <div> + <label for="person"> + <h3> + <xed:output i18n="module.mymss.agent.link.label" /> + </h3> + </label> + <div class="dpt-editor-row dpt-editor-select-agent-link"> + <xed:bind xpath="link[@xlink:type='locator']"> + <xed:bind xpath="@xlink:label" /> + <button type="submit" style="padding-top:0px; width:350px;" class="dpt_editor_button dpt_editor_button_default" xed:target="subselect" xed:href="/indexpage?searchclass=agent_subselect"> + <xed:output i18n="module.mymss.agent.link.choose" /> + </button> + <xed:controls>remove</xed:controls> + <xed:if test="@xlink:title"> + <p> + <xed:output value="@xlink:title" /> + ( + <xed:output value="@xlink:href" /> + )Â Â + </p> + </xed:if> + </xed:bind> + </div> + </div> + <div> + <label for="person"> + <h3> + <xed:output i18n="module.mymss.agent.remark.label" /> + </h3> + </label> + <div class="dpt-editor-row dpt-editor-select-text-multiple"> + <xed:repeat xpath="remark" min="1" max="5"> + <div class="dpt-editor-control-buttons"> + <xed:controls>append remove up down</xed:controls> + </div> + <div> + <xed:include uri="webapp:editor/import_editor_form_common.xed" ref="language_text" /> + <xed:include uri="webapp:editor/import_editor_form_common.xed" ref="type_original" /> + </div> + <textarea type="text" class="dpt_editor_inputarea" id="person" height="7" /> + </xed:repeat> + </div> + </div> + <div> + <label for="person"> + <h3> + <xed:output i18n="module.mymss.agent.flag.label" /> + </h3> + </label> + <div class="dpt-editor-row dpt-editor-select-multiple"> + <xed:repeat xpath="flag[@classid='PersonReferenceFlag']" min="1" max="5"> + <div class="dpt-editor-control-buttons"> + <xed:controls>append remove up down</xed:controls> + </div> + <xed:bind xpath="@categid"> + <select class="dpt_editor_select"> + <option value=""> + <xed:output i18n="module.dptbase.common.editor.choose" /> + </option> + <xed:include uri="xslStyle:items2options:classification:editor[Text]:-1:children:PersonReferenceFlag" cacheable="false" /> + </select> + </xed:bind> + </xed:repeat> + </div> + </div> + <xed:display-validation-message /> + <xed:validate display="here" test="(((string-length(personname/text()) > 0 and string-length(personname/@categid) > 0) or link/@xlink:href) and string-length(property/@categid) > 0) or (string-length(personname/text()) = 0 and not(link/@xlink:href) and string-length(remark/text()) = 0)"> + <xed:output i18n="module.mymss.agent.cond" /> + </xed:validate> + </div> + <hr /> + </xed:repeat> + </div> + </xed:bind> + </xed:template> + <xed:template id="work-bibReference"> + <label for="bibReference"> + <xed:output i18n="module.dptbase.work.bibReference.label" /> + </label> + <xed:bind xpath="def.bibReference[@class='MCRMetaLangText']"> + <xed:bind xpath="@notinherit" set="true" /> + <xed:bind xpath="@heritable" set="false" /> + <div class="dpt-editor-row dpt-editor-select-text-multiple"> + <xed:repeat xpath="bibReference" min="1" max="999"> + <xed:bind xpath="@inherited" set="0" /> + <div class="dpt-editor-control-buttons"> + <xed:controls>append remove up down</xed:controls> + </div> + <xed:include uri="webapp:editor/import_editor_form_common.xed" ref="language_application" /> + <textarea type="text" class="dpt_editor_inputarea" id="bibReference" height="7" /> + <hr /> + </xed:repeat> + </div> + </xed:bind> + </xed:template> + <xed:template id="work-content"> + <label for="content"> + <xed:output i18n="module.dptbase.work.content.label" /> + </label> + <xed:bind xpath="def.content[@class='MCRMetaLangText']"> + <xed:bind xpath="@notinherit" set="true" /> + <xed:bind xpath="@heritable" set="false" /> + <div class="dpt-editor-row dpt-editor-select-text-multiple"> + <xed:repeat xpath="content" min="1" max="999"> + <xed:bind xpath="@inherited" set="0" /> + <div class="dpt-editor-control-buttons"> + <xed:controls>append remove up down</xed:controls> + </div> + <xed:include uri="webapp:editor/import_editor_form_common.xed" ref="language_application" /> + <textarea type="text" class="dpt_editor_inputarea" id="content" height="7" /> + <hr /> + </xed:repeat> + </div> + </xed:bind> + </xed:template> + <xed:template id="work-note"> + <label for="note"> + <xed:output i18n="module.dptbase.work.note.label" /> + </label> + <xed:bind xpath="def.note[@class='MCRMetaLangText']"> + <xed:bind xpath="@notinherit" set="true" /> + <xed:bind xpath="@heritable" set="false" /> + <div class="dpt-editor-row dpt-editor-select-text-multiple"> + <xed:repeat xpath="note" min="1" max="999"> + <xed:bind xpath="@inherited" set="0" /> + <div class="dpt-editor-control-buttons"> + <xed:controls>append remove up down</xed:controls> + </div> + <xed:include uri="webapp:editor/import_editor_form_common.xed" ref="language_application" /> + <textarea type="text" class="dpt_editor_inputarea" id="note" height="7" /> + <hr /> + </xed:repeat> + </div> + </xed:bind> + </xed:template> + <xed:template id="work-internalRemark"> + <label for="internalRemark"> + <xed:output i18n="module.dptbase.work.internalRemark.label" /> + </label> + <xed:bind xpath="def.internalRemark[@class='MCRMetaLangText']"> + <xed:bind xpath="@notinherit" set="true" /> + <xed:bind xpath="@heritable" set="false" /> + <div class="dpt-editor-row dpt-editor-select-text-multiple"> + <xed:repeat xpath="internalRemark" min="1" max="999"> + <xed:bind xpath="@inherited" set="0" /> + <div class="dpt-editor-control-buttons"> + <xed:controls>append remove up down</xed:controls> + </div> + <xed:include uri="webapp:editor/import_editor_form_common.xed" ref="language_application" /> + <textarea type="text" class="dpt_editor_inputarea" id="internalRemark" height="7" /> + <hr /> + </xed:repeat> + </div> + </xed:bind> + </xed:template> + <xed:template id="work-externalLink"> + <label for="externalLink"> + <xed:output i18n="module.dptbase.work.externalLink.label" /> + </label> + <xed:bind xpath="def.externalLink[@class='MCRMetaLink']"> + <xed:bind xpath="@notinherit" set="true" /> + <xed:bind xpath="@heritable" set="false" /> + <div class="dpt-editor-row dpt-editor-link-multiple"> + <xed:repeat xpath="externalLink" min="1" max="999"> + <xed:bind xpath="@inherited" set="0" /> + <div class="dpt-editor-control-buttons"> + <xed:controls>append remove up down</xed:controls> + </div> + <xed:bind xpath="@xlink:type" default="locator" /> + <xed:bind xpath="@xlink:title"> + <input type="text" class="dpt_editor_inputfield" maxlength="512" placeholder="{i18n:module.dptbase.work.externalLink.title}" /> + </xed:bind> + <xed:bind xpath="@xlink:href"> + <input type="text" class="dpt_editor_inputfield" maxlength="512" placeholder="{i18n:module.dptbase.work.externalLink.url}" /> + </xed:bind> + <hr /> + </xed:repeat> + </div> + </xed:bind> + </xed:template> + <xed:template id="work-editor"> + <label for="editor"> + <xed:output i18n="module.dptbase.work.editor.label" /> + <xed:output value="'Â (*)'" /> + </label> + <xed:bind xpath="def.editor[@class='MCRMetaLangText']"> + <xed:bind xpath="@notinherit" set="true" /> + <xed:bind xpath="@heritable" set="false" /> + <div class="dpt-editor-row dpt-editor-select-text-multiple"> + <xed:repeat xpath="editor" min="1" max="999"> + <xed:bind xpath="@inherited" set="0" /> + <div class="dpt-editor-control-buttons"> + <xed:controls>append remove up down</xed:controls> + </div> + <xed:include uri="webapp:editor/import_editor_form_common.xed" ref="language_application" /> + <input type="text" class="dpt_editor_inputfield" id="editor" maxlength="256" /> + <hr /> + </xed:repeat> + <xed:display-validation-message /> + <xed:validate display="local" test="string-length(editor/text()) >0"> + <div class="dpt-editor-validation-message"> + <xed:output i18n="module.dptbase.work.editor.cond" /> + </div> + </xed:validate> + </div> + </xed:bind> </xed:template> </xed:template> diff --git a/src/main/resources/META-INF/resources/editor/import_editor_form_work-ltr-generated.xed b/src/main/resources/META-INF/resources/editor/import_editor_form_work-ltr-generated.xed deleted file mode 100644 index f9a454e780b09209a3af37d18fbe1a60562a4d56..0000000000000000000000000000000000000000 --- a/src/main/resources/META-INF/resources/editor/import_editor_form_work-ltr-generated.xed +++ /dev/null @@ -1,108 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<xed:template xmlns:xed="http://www.mycore.de/xeditor"> - <xed:cancel url="/receive/{$id}"/> - <xed:cancel url="/index.html"/> - <xed:source uri="xslStyle:mycoreobject_preprocessor:notnull:mcrobject:{$id}"/> - - <div class="dpt_editor_container"> - <div class="dpt_editor_required"> - <xed:output i18n="module.dptbase.common.editor.headMessage"/> - </div> - - <xed:bind xpath="/mycoreobject/@ID" initially="{$origin}_work_00000000"/> - <xed:bind xpath="/mycoreobject/@label"/> - <xed:bind xpath="/mycoreobject/@version"/> - - <xed:bind xpath="/mycoreobject/structure"/> - <xed:bind xpath="/mycoreobject/service"/> - - <div id="dpt_editor"> - <xed:bind xpath="/mycoreobject/metadata"> - <xed:bind xpath="def.gndxml"/> - <xed:bind xpath="def.lccnxml"/> - <xed:bind xpath="def.lcnafxml"/> - - <xed:include uri="webapp:editor/import_editor_form_work-common.xed" ref="nav-tabs"/> - <div class="tab-content" style="margin-top:15px;"> - <div class="tab-pane active" id="tab1"> - <table class="dpt_editor_table"> - <tr> - <td class="dpt_editor_name-ltr"> - <xed:output i18n="module.dptbase.work.transliteration.source"/> - </td> - <td class="dpt_editor_value-ltr"> - <input type="input" id="transliteration-source"/> - <a href="/content/transliteration.xed" target="_blank"> - <xed:output i18n="module.dptbase.work.transliteration.hints"/> - </a> - </td> - </tr> - - <xed:include uri="webapp:editor/import_editor_form_work-common-generated.xed" ref="preferredTitle-ltr"/> - <xed:include uri="webapp:editor/import_editor_form_work-common-generated.xed" ref="alphabet-ltr"/> - <xed:include uri="webapp:editor/import_editor_form_work-common-generated.xed" ref="language-ltr"/> - <xed:include uri="webapp:editor/import_editor_form_work-common-generated.xed" ref="variantTitle-ltr"/> - <xed:include uri="webapp:editor/import_editor_form_work-common-generated.xed" ref="recordSource-ltr"/> - <xed:include uri="webapp:editor/import_editor_form_work-common-generated.xed" ref="identifier-ltr"/> - <xed:include uri="webapp:editor/import_editor_form_work-common-generated.xed" ref="subject-ltr"/> - <xed:include uri="webapp:editor/import_editor_form_work-common-generated.xed" ref="date-ltr"/> - <xed:include uri="webapp:editor/import_editor_form_work-common-generated.xed" ref="place-ltr"/> - <xed:include uri="webapp:editor/import_editor_form_work-common-generated.xed" ref="placeIdentifier-ltr"/> - <xed:include uri="webapp:editor/import_editor_form_work-common-generated.xed" ref="relation-ltr"/> - <xed:include uri="webapp:editor/import_editor_form_work-common-generated.xed" ref="bibReference-ltr"/> - <xed:include uri="webapp:editor/import_editor_form_work-common-generated.xed" ref="content-ltr"/> - <xed:include uri="webapp:editor/import_editor_form_work-common-generated.xed" ref="note-ltr"/> - <xed:include uri="webapp:editor/import_editor_form_work-common-generated.xed" ref="internalRemark-ltr"/> - <xed:include uri="webapp:editor/import_editor_form_work-common-generated.xed" ref="externalLink-ltr"/> - <xed:include uri="webapp:editor/import_editor_form_work-common-generated.xed" ref="editor-ltr"/> - <xed:include uri="webapp:editor/import_editor_form_common.xed" ref="status-ltr"/> - </table> - </div> - - <div class="tab-pane" id="tab2"> - <table class="dpt_editor_table"> - <xed:include uri="webapp:editor/import_editor_form_work-common-generated.xed" ref="person-ltr"/> - </table> - </div> - </div> - - <xed:include uri="webapp:editor/import_editor_form_work-common-generated.xed" ref="hidden_fields"/> - </xed:bind> - - <table> - <tr> - <td class="dpt_editor_name-ltr"> - </td> - <td class="dpt_editor_value-ltr"> - <div class="dpt_editor_submit_group"> - <button type="submit" class="dpt_editor_button dpt_editor_button_default" xed:target="cancel"> - <xed:output i18n="module.dptbase.common.editor.button.cancel"/> - </button> - <xed:choose> - <xed:when test="contains(/mycoreobject/@ID, '_00000000')"> - <button type="submit" class="dpt_editor_button dpt_editor_button_primary" xed:target="servlet" - xed:href="CreateObjectServlet"> - <xed:output i18n="module.dptbase.common.editor.button.save"/> - </button> - </xed:when> - <xed:otherwise> - <button type="submit" class="dpt_editor_button dpt_editor_button_primary" xed:target="servlet" - xed:href="UpdateObjectServlet"> - <xed:output i18n="module.dptbase.common.editor.button.save"/> - </button> - </xed:otherwise> - </xed:choose> - </div> - </td> - </tr> - </table> - - <xed:post-processor xsl="work-postprocessor.xsl"/> - <xed:include uri="webapp:editor/import_editor_common_cleanup-rules.xed" ref="cleanup-rules"/> - - </div> - </div> - - <script type="text/javascript" src="/js/transliterations-work2.js"/> -</xed:template> diff --git a/src/main/resources/META-INF/resources/editor/import_editor_form_work-ltr.xed b/src/main/resources/META-INF/resources/editor/import_editor_form_work-ltr.xed deleted file mode 100644 index 94e06df957439d9b8f49b2d014f0a3c296770eb4..0000000000000000000000000000000000000000 --- a/src/main/resources/META-INF/resources/editor/import_editor_form_work-ltr.xed +++ /dev/null @@ -1,64 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<xed:template xmlns:xed="http://www.mycore.de/xeditor"> - <xed:preload uri="xslStyle:xeditor-work:webapp:editor/import_editor_form_work-common.xed"/> - - <xed:cancel url="/receive/{$id}"/> - <xed:cancel url="/index.html"/> - <xed:source uri="xslStyle:mycoreobject_preprocessor:notnull:mcrobject:{$id}"/> - - <div class="dpt_editor_container"> - <div class="dpt_editor_required"> - <xed:output i18n="module.dptbase.common.editor.headMessage"/> - </div> - - <xed:bind xpath="/mycoreobject/@ID" initially="{$origin}_work_00000000"/> - <xed:bind xpath="/mycoreobject/@label"/> - <xed:bind xpath="/mycoreobject/@version"/> - - <xed:bind xpath="/mycoreobject/structure"/> - <xed:bind xpath="/mycoreobject/service"/> - - <div id="dpt_editor"> - <xed:bind xpath="/mycoreobject/metadata"> - <xed:bind xpath="def.gndxml"/> - <xed:bind xpath="def.lccnxml"/> - <xed:bind xpath="def.lcnafxml"/> - - <xed:include uri="webapp:editor/import_editor_form_work-common.xed" ref="nav-tabs"/> - <div class="tab-content" style="margin-top:15px;"> - <xed:include ref="work-ltr"/> - </div> - </xed:bind> - - <table> - <tr> - <td class="dpt_editor_name-ltr"> - </td> - <td class="dpt_editor_value-ltr"> - <div class="dpt_editor_submit_group"> - <button type="submit" class="dpt_editor_button dpt_editor_button_default" xed:target="cancel"> - <xed:output i18n="module.dptbase.common.editor.button.cancel"/> - </button> - <xed:choose> - <xed:when test="contains(/mycoreobject/@ID, '_00000000')"> - <button type="submit" class="dpt_editor_button dpt_editor_button_primary" xed:target="servlet" - xed:href="CreateObjectServlet"> - <xed:output i18n="module.dptbase.common.editor.button.save"/> - </button> - </xed:when> - <xed:otherwise> - <button type="submit" class="dpt_editor_button dpt_editor_button_primary" xed:target="servlet" - xed:href="UpdateObjectServlet"> - <xed:output i18n="module.dptbase.common.editor.button.save"/> - </button> - </xed:otherwise> - </xed:choose> - </div> - </td> - </tr> - </table> - - </div> - </div> -</xed:template> diff --git a/src/main/resources/META-INF/resources/editor/import_editor_form_work-rtl.xed b/src/main/resources/META-INF/resources/editor/import_editor_form_work-rtl.xed deleted file mode 100644 index 98d2bd2cc71935186b806d448c1d5a2399289961..0000000000000000000000000000000000000000 --- a/src/main/resources/META-INF/resources/editor/import_editor_form_work-rtl.xed +++ /dev/null @@ -1,64 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<xed:template xmlns:xed="http://www.mycore.de/xeditor"> - <xed:preload uri="xslStyle:xeditor-work:webapp:editor/import_editor_form_work-common.xed"/> - - <xed:cancel url="/receive/{$id}"/> - <xed:cancel url="/index.html"/> - <xed:source uri="xslStyle:mycoreobject_preprocessor:notnull:mcrobject:{$id}"/> - - <div class="dpt_editor_container"> - <div class="dpt_editor_required"> - <xed:output i18n="module.dptbase.common.editor.headMessage"/> - </div> - - <xed:bind xpath="/mycoreobject/@ID" initially="{$origin}_work_00000000"/> - <xed:bind xpath="/mycoreobject/@label"/> - <xed:bind xpath="/mycoreobject/@version"/> - - <xed:bind xpath="/mycoreobject/structure"/> - <xed:bind xpath="/mycoreobject/service"/> - - <div id="dpt_editor"> - <xed:bind xpath="/mycoreobject/metadata"> - <xed:bind xpath="def.gndxml" /> - <xed:bind xpath="def.lccnxml" /> - <xed:bind xpath="def.lcnafxml" /> - - <xed:include uri="webapp:editor/import_editor_form_work-common.xed" ref="nav-tabs"/> - <div class="tab-content" style="margin-top:15px;"> - <xed:include ref="work-rtl"/> - </div> - </xed:bind> - - <table> - <tr> - <td class="dpt_editor_name-rtl"> - </td> - <td class="dpt_editor_value-rtl"> - <div class="dpt_editor_submit_group"> - <button type="submit" class="dpt_editor_button dpt_editor_button_default" xed:target="cancel"> - <xed:output i18n="module.dptbase.common.editor.button.cancel"/> - </button> - <xed:choose> - <xed:when test="contains(/mycoreobject/@ID, '_00000000')"> - <button type="submit" class="dpt_editor_button dpt_editor_button_primary" xed:target="servlet" - xed:href="CreateObjectServlet"> - <xed:output i18n="module.dptbase.common.editor.button.save"/> - </button> - </xed:when> - <xed:otherwise> - <button type="submit" class="dpt_editor_button dpt_editor_button_primary" xed:target="servlet" - xed:href="UpdateObjectServlet"> - <xed:output i18n="module.dptbase.common.editor.button.save"/> - </button> - </xed:otherwise> - </xed:choose> - </div> - </td> - </tr> - </table> - - </div> - </div> -</xed:template> diff --git a/src/main/resources/META-INF/resources/editor/import_editor_form_work-title.xed b/src/main/resources/META-INF/resources/editor/import_editor_form_work-title.xed new file mode 100644 index 0000000000000000000000000000000000000000..07542547a05f3cf8ed464074702c6c280426c756 --- /dev/null +++ b/src/main/resources/META-INF/resources/editor/import_editor_form_work-title.xed @@ -0,0 +1,79 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xed:template xmlns:xed="http://www.mycore.de/xeditor"> + <xed:template id="preferredTitle"> + <script src="/js/transliterations-work.js" type="text/javascript"/> + + <label for="transliteration-source"> + <xed:output i18n="module.dptbase.work.transliteration.source"/> + </label> + <div class="dpt-editor-row dpt-editor-text"> + <input type="input" id="transliteration-source"/> + <p> + <a href="/content/transliteration.xed" target="_blank"> + <xed:output i18n="module.dptbase.work.transliteration.hints"/> + </a> + </p> + </div> + + <hr/> + + <xed:bind xpath="def.preferredTitle[@class='MCRMetaLangText']"> + <xed:bind xpath="@notinherit" set="true"/> + <xed:bind xpath="@heritable" set="false"/> + + <label for="title-din"> + <xed:output i18n="module.dptbase.work.preferredTitle.din.label"/> + <xed:output value="'Â (*)'"/> + </label> + <div class="dpt-editor-row dpt-editor-text"> + <xed:bind xpath="preferredTitle[@type='din']"> + <xed:bind xpath="@inherited" set="0"/> + <input type="text" class="dpt_editor_inputfield" id="preferred-title-din" maxlength="256"/> + + <xed:display-validation-message/> + <xed:validate display="local" test="string-length(text()) > 0"> + <div class="dpt-editor-validation-message"> + <xed:output i18n="module.dptbase.work.preferredTitle.din.cond"/> + </div> + </xed:validate> + </xed:bind> + </div> + + <hr/> + + <label for="title-dmg"> + <xed:output i18n="module.dptbase.work.preferredTitle.dmg.label"/> + </label> + <div class="dpt-editor-row dpt-editor-text"> + <xed:bind xpath="preferredTitle[@type='dmg']"> + <xed:bind xpath="@inherited" set="0"/> + <input type="text" class="dpt_editor_inputfield" id="preferred-title-dmg" maxlength="256"/> + </xed:bind> + </div> + + <hr/> + + <label for="title-int"> + <xed:output i18n="module.dptbase.work.preferredTitle.int.label"/> + </label> + <div class="dpt-editor-row dpt-editor-text"> + <xed:bind xpath="preferredTitle[@type='int']"> + <xed:bind xpath="@inherited" set="0"/> + <input type="text" class="dpt_editor_inputfield" id="preferred-title-int" maxlength="256"/> + </xed:bind> + </div> + + <hr/> + + <label for="title-orig"> + <xed:output i18n="module.dptbase.work.preferredTitle.orig.label"/> + </label> + <div class="dpt-editor-row dpt-editor-text"> + <xed:bind xpath="preferredTitle[@type='orig']"> + <xed:bind xpath="@inherited" set="0"/> + <input type="text" class="dpt_editor_inputfield" id="preferred-title-orig" maxlength="256"/> + </xed:bind> + </div> + </xed:bind> + </xed:template> +</xed:template> diff --git a/src/main/resources/META-INF/resources/editor_form_commit-work-generated.xed b/src/main/resources/META-INF/resources/editor_form_commit-work-generated.xed deleted file mode 100644 index 2531df6ea018abd287879ec99f71c7f89fb13c5e..0000000000000000000000000000000000000000 --- a/src/main/resources/META-INF/resources/editor_form_commit-work-generated.xed +++ /dev/null @@ -1,106 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<MyCoReWebPage xmlns:html="http://mycore.de/XSL/html"> - <section i18n="module.dptbase.work.editor.commit.label" xml:lang="all"> - <html:section> - <div class="container" id="editor-form-work"> - <h1> - <i18n key="module.dptbase.work.editor.commit.label" /> - </h1> - <xed:form xmlns:xed="http://www.mycore.de/xeditor" method="post" class="dpt-editor-form"> - <xed:choose> - <xed:when test="not($CurrentUser = 'guest')"> - <xed:source uri="xslStyle:mycoreobject_preprocessor:notnull:mcrobject:{$id}" /> - <xed:cancel url="/receive/{$id}" /> - <xed:cancel url="/index.html" /> - <p class="dpt_editor_info"> - <xed:output i18n="module.dptbase.common.editor.headMessage" /> - </p> - <fieldset> - <xed:bind xpath="/mycoreobject/@ID" initially="{$origin}_work_00000000" /> - <xed:bind xpath="/mycoreobject/@label" /> - <xed:bind xpath="/mycoreobject/@version" /> - <xed:bind xpath="/mycoreobject/structure" /> - <xed:bind xpath="/mycoreobject/metadata"> - <xed:include uri="webapp:editor/import_editor_form_work-common-generated.xed" ref="work-label" /> - <hr /> - <xed:include uri="webapp:editor/import_editor_form_work-common-generated.xed" ref="work-preferredTitle" /> - <hr /> - <xed:include uri="webapp:editor/import_editor_form_work-common-generated.xed" ref="work-alphabet" /> - <hr /> - <xed:include uri="webapp:editor/import_editor_form_work-common-generated.xed" ref="work-language" /> - <hr /> - <xed:include uri="webapp:editor/import_editor_form_work-common-generated.xed" ref="work-variantTitle" /> - <hr /> - <xed:include uri="webapp:editor/import_editor_form_work-common-generated.xed" ref="work-recordType" /> - <hr /> - <xed:include uri="webapp:editor/import_editor_form_work-common-generated.xed" ref="work-recordSource" /> - <hr /> - <xed:include uri="webapp:editor/import_editor_form_work-common-generated.xed" ref="work-identifier" /> - <hr /> - <xed:include uri="webapp:editor/import_editor_form_work-common-generated.xed" ref="work-subject" /> - <hr /> - <xed:include uri="webapp:editor/import_editor_form_work-common-generated.xed" ref="work-date" /> - <hr /> - <xed:include uri="webapp:editor/import_editor_form_work-common-generated.xed" ref="work-place" /> - <hr /> - <xed:include uri="webapp:editor/import_editor_form_work-common-generated.xed" ref="work-placeIdentifier" /> - <hr /> - <xed:include uri="webapp:editor/import_editor_form_work-common-generated.xed" ref="work-relation" /> - <hr /> - <xed:include uri="webapp:editor/import_editor_form_work-common-generated.xed" ref="work-person" /> - <hr /> - <xed:include uri="webapp:editor/import_editor_form_work-common-generated.xed" ref="work-bibReference" /> - <hr /> - <xed:include uri="webapp:editor/import_editor_form_work-common-generated.xed" ref="work-content" /> - <hr /> - <xed:include uri="webapp:editor/import_editor_form_work-common-generated.xed" ref="work-note" /> - <hr /> - <xed:include uri="webapp:editor/import_editor_form_work-common-generated.xed" ref="work-internalRemark" /> - <hr /> - <xed:include uri="webapp:editor/import_editor_form_work-common-generated.xed" ref="work-externalLink" /> - <hr /> - <xed:include uri="webapp:editor/import_editor_form_work-common-generated.xed" ref="work-gndxml" /> - <hr /> - <xed:include uri="webapp:editor/import_editor_form_work-common-generated.xed" ref="work-lccnxml" /> - <hr /> - <xed:include uri="webapp:editor/import_editor_form_work-common-generated.xed" ref="work-lcnafxml" /> - <hr /> - <xed:include uri="webapp:editor/import_editor_form_work-common-generated.xed" ref="work-editor" /> - <hr /> - </xed:bind> - <xed:bind xpath="/mycoreobject/service"> - <xed:include uri="webapp:editor/import_editor_form_common.xed" ref="status-ltr" /> - <xed:bind xpath="servdates" /> - <xed:bind xpath="servflags" /> - <xed:bind xpath="servacls" /> - </xed:bind> - <hr /> - </fieldset> - <div class="dpt-editor-buttons"> - <xed:choose> - <xed:when test="contains(/mycoreobject/@ID, '_00000000')"> - <button type="submit" class="btn-success" xed:target="servlet" xed:href="CreateObjectServlet"> - <xed:output i18n="module.dptbase.common.editor.button.save" /> - </button> - </xed:when> - <xed:otherwise> - <button type="submit" class="btn-success" xed:target="servlet" xed:href="UpdateObjectServlet"> - <xed:output i18n="module.dptbase.common.editor.button.save" /> - </button> - </xed:otherwise> - </xed:choose> - <button type="submit" class="btn-cancel" xed:target="cancel"> - <xed:output i18n="module.dptbase.common.editor.button.cancel" /> - </button> - </div> - <xed:include uri="webapp:editor/import_editor_common_cleanup-rules.xed" ref="cleanup-rules" /> - </xed:when> - <xed:otherwise> - <i18n key="module.dptbase.common.metaData.accessDenied" /> - </xed:otherwise> - </xed:choose> - </xed:form> - </div> - </html:section> - </section> -</MyCoReWebPage> diff --git a/src/main/resources/META-INF/resources/editor_form_commit-work.xed b/src/main/resources/META-INF/resources/editor_form_commit-work.xed index acade55e55cebaccc360413f48e3e9fca4e9a322..9aed3be930ecfe06de835a078d43afeb273bf2f2 100644 --- a/src/main/resources/META-INF/resources/editor_form_commit-work.xed +++ b/src/main/resources/META-INF/resources/editor_form_commit-work.xed @@ -1,34 +1,177 @@ <?xml version="1.0" encoding="UTF-8"?> - -<!DOCTYPE MyCoReWebPage> -<MyCoReWebPage> - - <section i18n="module.dptbase.work.commit.label" xml:lang="all"> - <div class="row" id="editor-form-work"> - <div class="col-md-12"> - <div class="dpt_frame-ltr"> - <h1> - <i18n key="module.dptbase.work.commit.label"/> - </h1> - <div class="dpt_editor_form" id="js_lpz_common"> - <center> - <xed:form xmlns:xed="http://www.mycore.de/xeditor" method="post" role="form" class="form-horizontal"> +<!-- + Warning: This file was generated automatically by the maven-datamodel-editor-plugin. Do not change! + --> +<MyCoReWebPage xmlns:html="http://mycore.de/XSL/html"> + <section i18n="module.dptbase.work.editor.commit.label" xml:lang="all"> + <html:section> + <div class="container" id="editor-form-work"> + <h1> + <i18n key="module.dptbase.work.editor.commit.label" /> + </h1> + <xed:form xmlns:xed="http://www.mycore.de/xeditor" method="post" class="dpt-editor-form"> + <xed:choose> + <xed:when test="not($CurrentUser = 'guest')"> + <xed:source uri="xslStyle:mycoreobject_preprocessor:notnull:mcrobject:{$id}" /> + <xed:cancel url="/receive/{$id}" /> + <xed:cancel url="/index.html" /> + <p class="dpt_editor_info"> + <xed:output i18n="module.dptbase.common.editor.headMessage" /> + </p> + <ul class="nav nav-pills nav-fill nav-pills-top"> + <li class="nav-item"> + <a class="nav-link active" href="#work-editor-general" data-toggle="tab"> + <xed:output i18n="module.dptbase.work.editor.tab.general" /> + </a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#work-editor-content" data-toggle="tab"> + <xed:output i18n="module.dptbase.work.editor.tab.content" /> + </a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#work-editor-relations" data-toggle="tab"> + <xed:output i18n="module.dptbase.work.editor.tab.relations" /> + </a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#work-editor-agent" data-toggle="tab"> + <xed:output i18n="module.dptbase.work.editor.tab.agent" /> + </a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#work-editor-admin" data-toggle="tab"> + <xed:output i18n="module.dptbase.work.editor.tab.admin" /> + </a> + </li> + </ul> + <div class="tab-content" style="margin-top:15px;"> + <xed:bind xpath="/mycoreobject/@ID" initially="{$origin}_work_00000000" /> + <xed:bind xpath="/mycoreobject/@label" /> + <xed:bind xpath="/mycoreobject/@version" /> + <xed:bind xpath="/mycoreobject/structure" /> + <xed:bind xpath="/mycoreobject/metadata"> + <div class="tab-pane active" id="work-editor-general"> + <fieldset> + <xed:include uri="webapp:editor/import_editor_form_work-title.xed" ref="preferredTitle" /> + <hr /> + <xed:include uri="webapp:editor/import_editor_form_work-common.xed" ref="work-alphabet" /> + <hr /> + <xed:include uri="webapp:editor/import_editor_form_work-common.xed" ref="work-language" /> + <hr /> + <xed:include uri="webapp:editor/import_editor_form_work-common.xed" ref="work-variantTitle" /> + <hr /> + <xed:include uri="webapp:editor/import_editor_form_work-common.xed" ref="work-recordSource" /> + <hr /> + <xed:include uri="webapp:editor/import_editor_form_work-common.xed" ref="work-identifier" /> + <hr /> + </fieldset> + </div> + <div class="tab-pane" id="work-editor-content"> + <fieldset> + <xed:include uri="webapp:editor/import_editor_form_work-common.xed" ref="work-subject" /> + <hr /> + <xed:include uri="webapp:editor/import_editor_form_work-common.xed" ref="work-date" /> + <hr /> + <xed:include uri="webapp:editor/import_editor_form_work-common.xed" ref="work-place" /> + <hr /> + <xed:include uri="webapp:editor/import_editor_form_work-common.xed" ref="work-placeIdentifier" /> + <hr /> + <xed:include uri="webapp:editor/import_editor_form_work-common.xed" ref="work-bibReference" /> + <hr /> + <xed:include uri="webapp:editor/import_editor_form_work-common.xed" ref="work-content" /> + <hr /> + <xed:include uri="webapp:editor/import_editor_form_work-common.xed" ref="work-note" /> + <hr /> + <xed:include uri="webapp:editor/import_editor_form_work-common.xed" ref="work-internalRemark" /> + <hr /> + </fieldset> + </div> + <div class="tab-pane" id="work-editor-relations" data-referrer="searchclass=work_subselect"> + <fieldset> + <xed:include uri="webapp:editor/import_editor_form_work-common.xed" ref="work-relation" /> + <hr /> + <xed:include uri="webapp:editor/import_editor_form_work-common.xed" ref="work-externalLink" /> + <hr /> + </fieldset> + </div> + <div class="tab-pane" id="work-editor-agent" data-referrer="searchclass=agent_subselect"> + <fieldset> + <xed:include uri="webapp:editor/import_editor_form_work-common.xed" ref="work-person" /> + <hr /> + </fieldset> + </div> + <div class="tab-pane" id="work-editor-admin"> + <fieldset> + <xed:include uri="webapp:editor/import_editor_form_work-common.xed" ref="work-editor" /> + <hr /> + <xed:include uri="webapp:editor/import_editor_status.xed" ref="status" /> + <hr /> + <xed:include uri="webapp:editor/import_editor_form_work-common.xed" ref="work-recordType" /> + <hr /> + </fieldset> + </div> + </xed:bind> + <xed:bind xpath="/mycoreobject/service"> + <xed:bind xpath="servdates" /> + <xed:bind xpath="servflags" /> + <xed:bind xpath="servacls" /> + </xed:bind> + <hr /> + </div> + <ul class="nav nav-pills nav-fill nav-pills-bottom"> + <li class="nav-item"> + <a class="nav-link active" href="#work-editor-general" data-toggle="tab"> + <xed:output i18n="module.dptbase.work.editor.tab.general" /> + </a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#work-editor-content" data-toggle="tab"> + <xed:output i18n="module.dptbase.work.editor.tab.content" /> + </a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#work-editor-relations" data-toggle="tab"> + <xed:output i18n="module.dptbase.work.editor.tab.relations" /> + </a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#work-editor-agent" data-toggle="tab"> + <xed:output i18n="module.dptbase.work.editor.tab.agent" /> + </a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#work-editor-admin" data-toggle="tab"> + <xed:output i18n="module.dptbase.work.editor.tab.admin" /> + </a> + </li> + </ul> + <div class="dpt-editor-buttons"> <xed:choose> - <xed:when test="not($CurrentUser = 'guest')"> - <xed:source uri="xslStyle:mycoreobject_preprocessor:notnull:mcrobject:{$id}"/> - <xed:include uri="webapp:editor/import_editor_form_work-ltr.xed"/> + <xed:when test="contains(/mycoreobject/@ID, '_00000000')"> + <button type="submit" class="btn-success" xed:target="servlet" xed:href="CreateObjectServlet"> + <xed:output i18n="module.dptbase.common.editor.button.save" /> + </button> </xed:when> <xed:otherwise> - <i18n key="module.dptbase.common.metaData.accessDenied"/> + <button type="submit" class="btn-success" xed:target="servlet" xed:href="UpdateObjectServlet"> + <xed:output i18n="module.dptbase.common.editor.button.save" /> + </button> </xed:otherwise> </xed:choose> - </xed:form> - </center> - </div> - </div> + <button type="submit" class="btn-cancel" xed:target="cancel"> + <xed:output i18n="module.dptbase.common.editor.button.cancel" /> + </button> + </div> + <xed:include uri="webapp:editor/import_editor_common_cleanup-rules.xed" ref="cleanup-rules" /> + <script type="text/javascript" src="/js/dptbase-editor-tab.js" /> + </xed:when> + <xed:otherwise> + <i18n key="module.dptbase.common.metaData.accessDenied" /> + </xed:otherwise> + </xed:choose> + </xed:form> </div> - </div> - <script type="text/javascript" src="/js/work-editor.js"/> + </html:section> </section> - </MyCoReWebPage> diff --git a/src/main/resources/META-INF/resources/editor_form_copy-work.xed b/src/main/resources/META-INF/resources/editor_form_copy-work.xed index 664ef3a027510417b40f83ec85e6f3cd4fab527f..d88ae5572e40958f038abe69b08315d18a1335c3 100644 --- a/src/main/resources/META-INF/resources/editor_form_copy-work.xed +++ b/src/main/resources/META-INF/resources/editor_form_copy-work.xed @@ -1,33 +1,177 @@ <?xml version="1.0" encoding="UTF-8"?> - -<!DOCTYPE MyCoReWebPage> -<MyCoReWebPage> - - <section i18n="module.dptbase.work.commit.label" xml:lang="all"> - <div class="row" id="editor-form-work"> - <div class="col-md-12"> - <div class="dpt_frame-ltr"> - <h1> - <i18n key="module.dptbase.work.commit.label"/> - </h1> - <div class="dpt_editor_form" id="js_lpz_common"> - <center> - <xed:form xmlns:xed="http://www.mycore.de/xeditor" method="post" role="form" class="form-horizontal"> +<!-- + Warning: This file was generated automatically by the maven-datamodel-editor-plugin. Do not change! + --> +<MyCoReWebPage xmlns:html="http://mycore.de/XSL/html"> + <section i18n="module.dptbase.work.editor.commit.label" xml:lang="all"> + <html:section> + <div class="container" id="editor-form-work"> + <h1> + <i18n key="module.dptbase.work.editor.commit.label" /> + </h1> + <xed:form xmlns:xed="http://www.mycore.de/xeditor" method="post" class="dpt-editor-form"> + <xed:choose> + <xed:when test="not($CurrentUser = 'guest')"> + <xed:source uri="xslStyle:mycoreobject_copyof:notnull:mcrobject:{$id}" /> + <xed:cancel url="/receive/{$id}" /> + <xed:cancel url="/index.html" /> + <p class="dpt_editor_info"> + <xed:output i18n="module.dptbase.common.editor.headMessage" /> + </p> + <ul class="nav nav-pills nav-fill nav-pills-top"> + <li class="nav-item"> + <a class="nav-link active" href="#work-editor-general" data-toggle="tab"> + <xed:output i18n="module.dptbase.work.editor.tab.general" /> + </a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#work-editor-content" data-toggle="tab"> + <xed:output i18n="module.dptbase.work.editor.tab.content" /> + </a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#work-editor-relations" data-toggle="tab"> + <xed:output i18n="module.dptbase.work.editor.tab.relations" /> + </a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#work-editor-agent" data-toggle="tab"> + <xed:output i18n="module.dptbase.work.editor.tab.agent" /> + </a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#work-editor-admin" data-toggle="tab"> + <xed:output i18n="module.dptbase.work.editor.tab.admin" /> + </a> + </li> + </ul> + <div class="tab-content" style="margin-top:15px;"> + <xed:bind xpath="/mycoreobject/@ID" initially="{$origin}_work_00000000" /> + <xed:bind xpath="/mycoreobject/@label" /> + <xed:bind xpath="/mycoreobject/@version" /> + <xed:bind xpath="/mycoreobject/structure" /> + <xed:bind xpath="/mycoreobject/metadata"> + <div class="tab-pane active" id="work-editor-general"> + <fieldset> + <xed:include uri="webapp:editor/import_editor_form_work-title.xed" ref="preferredTitle" /> + <hr /> + <xed:include uri="webapp:editor/import_editor_form_work-common.xed" ref="work-alphabet" /> + <hr /> + <xed:include uri="webapp:editor/import_editor_form_work-common.xed" ref="work-language" /> + <hr /> + <xed:include uri="webapp:editor/import_editor_form_work-common.xed" ref="work-variantTitle" /> + <hr /> + <xed:include uri="webapp:editor/import_editor_form_work-common.xed" ref="work-recordSource" /> + <hr /> + <xed:include uri="webapp:editor/import_editor_form_work-common.xed" ref="work-identifier" /> + <hr /> + </fieldset> + </div> + <div class="tab-pane" id="work-editor-content"> + <fieldset> + <xed:include uri="webapp:editor/import_editor_form_work-common.xed" ref="work-subject" /> + <hr /> + <xed:include uri="webapp:editor/import_editor_form_work-common.xed" ref="work-date" /> + <hr /> + <xed:include uri="webapp:editor/import_editor_form_work-common.xed" ref="work-place" /> + <hr /> + <xed:include uri="webapp:editor/import_editor_form_work-common.xed" ref="work-placeIdentifier" /> + <hr /> + <xed:include uri="webapp:editor/import_editor_form_work-common.xed" ref="work-bibReference" /> + <hr /> + <xed:include uri="webapp:editor/import_editor_form_work-common.xed" ref="work-content" /> + <hr /> + <xed:include uri="webapp:editor/import_editor_form_work-common.xed" ref="work-note" /> + <hr /> + <xed:include uri="webapp:editor/import_editor_form_work-common.xed" ref="work-internalRemark" /> + <hr /> + </fieldset> + </div> + <div class="tab-pane" id="work-editor-relations" data-referrer="searchclass=work_subselect"> + <fieldset> + <xed:include uri="webapp:editor/import_editor_form_work-common.xed" ref="work-relation" /> + <hr /> + <xed:include uri="webapp:editor/import_editor_form_work-common.xed" ref="work-externalLink" /> + <hr /> + </fieldset> + </div> + <div class="tab-pane" id="work-editor-agent" data-referrer="searchclass=agent_subselect"> + <fieldset> + <xed:include uri="webapp:editor/import_editor_form_work-common.xed" ref="work-person" /> + <hr /> + </fieldset> + </div> + <div class="tab-pane" id="work-editor-admin"> + <fieldset> + <xed:include uri="webapp:editor/import_editor_form_work-common.xed" ref="work-editor" /> + <hr /> + <xed:include uri="webapp:editor/import_editor_status.xed" ref="status" /> + <hr /> + <xed:include uri="webapp:editor/import_editor_form_work-common.xed" ref="work-recordType" /> + <hr /> + </fieldset> + </div> + </xed:bind> + <xed:bind xpath="/mycoreobject/service"> + <xed:bind xpath="servdates" /> + <xed:bind xpath="servflags" /> + <xed:bind xpath="servacls" /> + </xed:bind> + <hr /> + </div> + <ul class="nav nav-pills nav-fill nav-pills-bottom"> + <li class="nav-item"> + <a class="nav-link active" href="#work-editor-general" data-toggle="tab"> + <xed:output i18n="module.dptbase.work.editor.tab.general" /> + </a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#work-editor-content" data-toggle="tab"> + <xed:output i18n="module.dptbase.work.editor.tab.content" /> + </a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#work-editor-relations" data-toggle="tab"> + <xed:output i18n="module.dptbase.work.editor.tab.relations" /> + </a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#work-editor-agent" data-toggle="tab"> + <xed:output i18n="module.dptbase.work.editor.tab.agent" /> + </a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#work-editor-admin" data-toggle="tab"> + <xed:output i18n="module.dptbase.work.editor.tab.admin" /> + </a> + </li> + </ul> + <div class="dpt-editor-buttons"> <xed:choose> - <xed:when test="not($CurrentUser = 'guest')"> - <xed:source uri="xslStyle:mycoreobject_copyof:notnull:mcrobject:{$id}"/> - <xed:include uri="webapp:editor/import_editor_form_work-ltr.xed"/> + <xed:when test="contains(/mycoreobject/@ID, '_00000000')"> + <button type="submit" class="btn-success" xed:target="servlet" xed:href="CreateObjectServlet"> + <xed:output i18n="module.dptbase.common.editor.button.save" /> + </button> </xed:when> <xed:otherwise> - <i18n key="module.dptbase.common.metaData.accessDenied"/> + <button type="submit" class="btn-success" xed:target="servlet" xed:href="UpdateObjectServlet"> + <xed:output i18n="module.dptbase.common.editor.button.save" /> + </button> </xed:otherwise> </xed:choose> - </xed:form> - </center> - </div> - </div> + <button type="submit" class="btn-cancel" xed:target="cancel"> + <xed:output i18n="module.dptbase.common.editor.button.cancel" /> + </button> + </div> + <xed:include uri="webapp:editor/import_editor_common_cleanup-rules.xed" ref="cleanup-rules" /> + <script type="text/javascript" src="/js/dptbase-editor-tab.js" /> + </xed:when> + <xed:otherwise> + <i18n key="module.dptbase.common.metaData.accessDenied" /> + </xed:otherwise> + </xed:choose> + </xed:form> </div> - </div> - <script type="text/javascript" src="/js/work-editor.js"/> + </html:section> </section> </MyCoReWebPage> diff --git a/src/main/resources/META-INF/resources/js/transliterations-work.js b/src/main/resources/META-INF/resources/js/transliterations-work.js index af47f0c948e662e76a8d3cdc2104087fc42d92f5..05b4f47eda66d43997e03d945fcfa8c6336c679d 100644 --- a/src/main/resources/META-INF/resources/js/transliterations-work.js +++ b/src/main/resources/META-INF/resources/js/transliterations-work.js @@ -1,39 +1,25 @@ -$(document).ready(function () { - console.log("document ready"); - +document.addEventListener('DOMContentLoaded', function () { const in2ara = "/servlets/TransliterationServlet?method=in2ara&input="; const in2dmg = "/servlets/TransliterationServlet?method=in2dmg&input=" const in2loc = "/servlets/TransliterationServlet?method=in2loc&input=" const in2rak = "/servlets/TransliterationServlet?method=in2rak&input=" - const input = $("#transliteration-source"); - const rak = $("#preferred_title_din"); - const dmg = $("#preferred_title_dmg"); - const loc = $("#preferred_title_int"); - const ara = $("#preferred_title_orig"); - - if (input.val() === "") { - ara.val(); - dmg.val(); - loc.val(); - rak.val(); - } - - input.on("input", function () { - console.log("eingegeben: " + input.val()); - if (input.val() !== "") { - $.get(in2ara + input.val(), function (data) { - ara.val(data[input.val()]) - }); - $.get(in2dmg + input.val(), function (data) { - dmg.val(data[input.val()]) - }); - $.get(in2loc + input.val(), function (data) { - loc.val(data[input.val()]) - }); - $.get(in2rak + input.val(), function (data) { - rak.val(data[input.val()]) - }); + document.getElementById("transliteration-source").addEventListener('input', function () { + const transliterationInput = this.value; + if (transliterationInput !== "") { + updateTransliterationValue(in2rak + transliterationInput, document.getElementById("preferred-title-din")); + updateTransliterationValue(in2dmg + transliterationInput, document.getElementById("preferred-title-dmg")); + updateTransliterationValue(in2loc + transliterationInput, document.getElementById("preferred-title-int")); + updateTransliterationValue(in2ara + transliterationInput, document.getElementById("preferred-title-orig")); } }); }); + +function updateTransliterationValue(url, element) { + if (element) { + fetch(url) + .then(response => response.json()) + .then(data => element.value = Object.values(data)[0]) + .catch(error => console.error('Fehler:', error)); + } +} \ No newline at end of file diff --git a/src/main/resources/META-INF/resources/js/transliterations-work2.js b/src/main/resources/META-INF/resources/js/transliterations-work2.js deleted file mode 100644 index 45c6fa36d8d1b78b47c3bbf0eb97ff3c452e44d3..0000000000000000000000000000000000000000 --- a/src/main/resources/META-INF/resources/js/transliterations-work2.js +++ /dev/null @@ -1,43 +0,0 @@ -document.addEventListener('DOMContentLoaded', function () { - const in2ara = "/servlets/TransliterationServlet?method=in2ara&input="; - const in2dmg = "/servlets/TransliterationServlet?method=in2dmg&input=" - const in2loc = "/servlets/TransliterationServlet?method=in2loc&input=" - const in2rak = "/servlets/TransliterationServlet?method=in2rak&input=" - - document.getElementById("transliteration-source").addEventListener('input', function () { - const transliterationInput = this.value; - if (transliterationInput !== "") { - updateTransliterationValues(in2rak + transliterationInput, getInputForTransliteration("din")); - updateTransliterationValues(in2dmg + transliterationInput, getInputForTransliteration("dmg")); - updateTransliterationValues(in2loc + transliterationInput, getInputForTransliteration("int")); - updateTransliterationValues(in2ara + transliterationInput, getInputForTransliteration("orig")); - } - }); -}); - -function getInputForTransliteration(transliteration) { - const selects = document.querySelectorAll('select[name^="/mycoreobject/metadata[1]/def.preferredTitle[1]"][name$="/@type"]'); - const inputs = Array(); - - selects.forEach(function (select) { - if (select.value === transliteration) { - const inputName = select.name.split('/@type')[0]; - inputs.push(document.querySelector('input[name="' + inputName + '"]')); - } - }); - - return inputs; -} - -function updateTransliterationValues(url, elements) { - if (elements) { - fetch(url) - .then(response => response.json()) - .then(data => { - elements.forEach(current => { - current.value = Object.values(data)[0]; - }); - }) - .catch(error => console.error('Fehler:', error)); - } -} diff --git a/src/main/resources/META-INF/resources/js/work-editor.js b/src/main/resources/META-INF/resources/js/work-editor.js deleted file mode 100644 index 098a25e713e73194bc31fc19eda6c051f2f0deac..0000000000000000000000000000000000000000 --- a/src/main/resources/META-INF/resources/js/work-editor.js +++ /dev/null @@ -1,96 +0,0 @@ -$(document).ready( - function () { - initTabs(); - displayActiveTab(); - } -) - -/** - * Initialises the top and bottom tab menus by adding necessary classes and click listeners. - */ -function initTabs() { - const tabsTop = $(".nav-pills"); - const tabsBottom = tabsTop.clone().insertAfter(".tab-content"); - - tabsTop.addClass("nav-pills-top"); - tabsBottom.addClass("nav-pills-bottom") - - // add click listeners for top/bottom tab bars - $('.nav-pills-top a[data-toggle="tab"]').on('click', function () { - // click on top: set active tab for bottom - activeTab("bottom", $(this).attr('href')); - scroll(0); - }) - - $('.nav-pills-bottom a[data-toggle="tab"]').on('click', function () { - // click on bottom: set active tab for top - activeTab("top", $(this).attr('href')); - scroll(0); - }); -} - -/** - * Evaluates the environment and displays the active tab. - * - * This method checks for the URL parameter rep-xx and identifies and displays the tab that this parameter is - * present at. If the parameter does not exist, the first tab is displayed. - */ -function displayActiveTab() { - // check if we have a rep-parameter and scroll to the actual field - const href = window.location.href; - const repParam = href.indexOf("#rep-"); - // check if we come from a subselect - const referrer = document.referrer; - - if (referrer.includes("searchclass=work_subselect")) { - clickTab("tab1"); - } else if (referrer.includes("searchclass=agent_subselect")) { - clickTab("tab2"); - } else if (-1 === repParam) {// no rep parameter, no subselect: set first tab item as active - clickTab("tab1"); - } else {// rep parameter: identify tab and scroll to field - const element = $(href.substr(repParam)); - - // first use tabId from tr/td elements in editor table - let tabId = element.parent().parent().parent().parent().parent().attr("id"); - // if this is undefined, try parent tabId as used in editor form / person tab - if (tabId === undefined) { - tabId = element.parent().attr("id"); - } - - // if tab exists -> emulate click on tab-link and scroll to editor form position - if (tabId !== undefined && tabId.startsWith("tab")) { - clickTab(tabId); - scroll(element.offset().top); - } - } -} - -/** - * Sets the active tab. - * @param location the tab location: one of top or bottom - * @param href the tab id (tab1, tab2, ...) - */ -function activeTab(location, href) { - const tabClass = ".nav-pills-" + location; - - $(tabClass + ' a.active').removeClass('active'); - $(tabClass + ' a[href="' + href + '"]').addClass('active'); -} - -/** - * Scrolls to the given position in the document. - * @param position the position to scroll to - */ -function scroll(position) { - $("html, body").scrollTop(position); -} - -/** - * Emulates a click on the tab with the given Id - * @param tabId the tab Id - */ -function clickTab(tabId) { - const link = $('a[href="#' + tabId + '"]'); - link.click(); -} \ No newline at end of file diff --git a/src/main/resources/config/dptbase-work/messages_de.properties b/src/main/resources/config/dptbase-work/messages_de.properties index 7bf83ed158664dd5ecf5a72da04446b4c26744ec..10b310eab411cb5c02685fe4702a68bec3e910a8 100644 --- a/src/main/resources/config/dptbase-work/messages_de.properties +++ b/src/main/resources/config/dptbase-work/messages_de.properties @@ -140,3 +140,10 @@ module.dptbase.work.preferredTitle.dmg = Umschrift DMG module.dptbase.work.preferredTitle.int = Umschrift LoC module.dptbase.work.preferredTitle.orig = Originalschriftlich module.dptbase.work.variantTitle.original = Originalschriftlich + +# for work editor +module.dptbase.work.editor.tab.general = Allgemein +module.dptbase.work.editor.tab.content = Inhalt +module.dptbase.work.editor.tab.relations = Beziehungen +module.dptbase.work.editor.tab.agent = Personen +module.dptbase.work.editor.tab.admin = Verwaltung diff --git a/src/main/resources/config/dptbase-work/messages_en.properties b/src/main/resources/config/dptbase-work/messages_en.properties index 0a3c6e7f698fadf6c4ed61835cd1939e8da35a18..1e0634fa8a58b644bf3489c2baed7d40ea1748cc 100644 --- a/src/main/resources/config/dptbase-work/messages_en.properties +++ b/src/main/resources/config/dptbase-work/messages_en.properties @@ -135,3 +135,10 @@ module.dptbase.work.preferredTitle.dmg = Romanisation DMG module.dptbase.work.preferredTitle.int = Romanisation LoC module.dptbase.work.preferredTitle.orig = Original Script module.dptbase.work.variantTitle.original = Original Script + +# for work editor +module.dptbase.work.editor.tab.general = Common +module.dptbase.work.editor.tab.content = Content +module.dptbase.work.editor.tab.relations = Relations +module.dptbase.work.editor.tab.agent = Agents +module.dptbase.work.editor.tab.admin = Administration diff --git a/src/main/resources/config/dptbase-work/mycore.properties b/src/main/resources/config/dptbase-work/mycore.properties index 0cb0684959a5a0301685cd30d5b78e65f48273ac..84d3fc593625561fa3a3e5a2c7cadaaa01b07952 100644 --- a/src/main/resources/config/dptbase-work/mycore.properties +++ b/src/main/resources/config/dptbase-work/mycore.properties @@ -1,4 +1,3 @@ - # Module work MCR.Metadata.Type.work=true @@ -35,9 +34,6 @@ MCR.URIResolver.xslIncludes.mycoreobjectSinglePageFo=%MCR.URIResolver.xslIncludes.mycoreobjectSinglePageFo%,work2fo.xsl,work-common.xsl MCR.URIResolver.xslIncludes.mycoreobjectInventoryFo=%MCR.URIResolver.xslIncludes.mycoreobjectInventoryFo%,work2fo.xsl,work-common.xsl -# XEditor Template - MCR.URIResolver.xslIncludes.xeditorTemplates=%MCR.URIResolver.xslIncludes.xeditorTemplates%,xeditor-work.xsl - # NEO4J Configuration MCR.Neo4J.NodeAttribute.work.descriptor=/mycoreobject/metadata/def.preferredTitle MCR.Neo4J.NodeAttribute.work.link.1=/mycoreobject/metadata/def.person diff --git a/src/main/resources/xslt/work-common.xsl b/src/main/resources/xslt/work-common.xsl index f8ab91c559c2561421b4cbfd0139285dfcaef78b..2c99c4b164fe1418cd01f630ae8a5c18e15e0a97 100644 --- a/src/main/resources/xslt/work-common.xsl +++ b/src/main/resources/xslt/work-common.xsl @@ -9,53 +9,6 @@ <xd:author>Michael Becker</xd:author> </xd:doc> - <xd:doc> - Generates a node-set of incoming links to the work identified by the given Id - - <xd:param name="id" type="string">the Id of the work to evaluate incoming links for</xd:param> - </xd:doc> - <xsl:template name="incomingRelations"> - <xsl:param name="id"/> - - <xsl:variable name="query"> - <xsl:call-template name="solrQuery"> - <xsl:with-param name="objectType" select="'work'"/> - <xsl:with-param name="filterQuery" select="concat('work_relation', ':', $id, '*')"/> - <xsl:with-param name="fieldList" select="'id,work_relation'"/> - <xsl:with-param name="sort" select="'work_preferredTitle+asc'"/> - <xsl:with-param name="rows" select="'500'"/> - <xsl:with-param name="group" select="'true'"/> - <xsl:with-param name="groupField" select="'returnId'"/> - </xsl:call-template> - </xsl:variable> - - <xsl:variable name="result" - select="document($query)/response/lst[@name='grouped']/lst/arr[@name='groups']"/> - - <xsl:if test="$result/lst/result/doc/str[@name='id']"> - <!-- prepare nodes for template --> - <xsl:variable name="nodes"> - <xsl:for-each select="$result/lst/result/doc"> - <xsl:variable name="sourceId" select="str[@name='id']"/> - <xsl:variable name="source" select="document(concat('mcrobject:', $sourceId))/mycoreobject"/> - <xsl:variable name="title" select="$source/metadata/def.preferredTitle/preferredTitle[1]"/> - - <xsl:for-each select="arr[@name='work_relation']/str"> - <xsl:variable name="type" select="substring-after(., '#')"/> - <xsl:variable name="work_relation_id" select="substring-before(text(), '#')"/> - - <xsl:if test="$work_relation_id = $id"> - <link xlink:title="{$title}" xlink:href="{$sourceId}" type="{$type}"/> - </xsl:if> - </xsl:for-each> - </xsl:for-each> - </xsl:variable> - - <xsl:copy-of select="$nodes"/> - </xsl:if> - </xsl:template> - - <xd:doc> Evaluates the writing direction of the given alphabet and returns 'ltr' or 'rtl as a result. diff --git a/src/main/resources/xslt/xeditor-work.xsl b/src/main/resources/xslt/xeditor-work.xsl deleted file mode 100644 index d8c2a52a0e84b15f7ac227bc250d42a9843e44d3..0000000000000000000000000000000000000000 --- a/src/main/resources/xslt/xeditor-work.xsl +++ /dev/null @@ -1,1018 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<xsl:stylesheet version="1.0" - xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - xmlns:xed="http://www.mycore.de/xeditor" - xmlns:dptbase="https://www.urz.uni-leipzig.de/dptbase" - xmlns:xlink="http://www.w3.org/1999/xlink" - xmlns:xd="http://www.pnp-software.com/XSLTdoc" - exclude-result-prefixes="xsl dptbase xlink xd"> - - <xsl:include href="resource:xsl/copynodes.xsl"/> - - <!-- - Creates a single line text input. - - Call attributes: - @tag: metadata tag, e.g. mss01, preferredName etc. - @i18n: I18N-prefix for generating messages, e.g. module.dptbase.work.preferredTitle - @classid: if set, the template typeSelect is called adding a select box for the input type - @defaultClass: default class for typeSelect template - @required: 'true' or 'false' - @dir: direction (ltr or rtl) - @min: minimum amount of input fields - @max: maximum amount of input fields - @textLangSelect: flag to determine if text language selection fields are be shown (true or false) - @appLangSelect: flag to determine if application language selection fields are shown (true or false) - @type: predefined type for inputs (can be empty) - @id: id of the element (can be empty) - --> - <xsl:template match="dptbase:input"> - <tr> - <xsl:call-template name="printLabelColumnEditor"> - <xsl:with-param name="id" select="@tag"/> - <xsl:with-param name="dir" select="@dir"/> - <xsl:with-param name="required" select="@required"/> - <xsl:with-param name="i18n" select="@i18n"/> - </xsl:call-template> - - <xsl:call-template name="printInputFieldColumn"> - <xsl:with-param name="node" select="concat('def.', @tag)"/> - <xsl:with-param name="subnode" select="@tag"/> - <xsl:with-param name="i18n" select="@i18n"/> - <xsl:with-param name="classid" select="@classid"/> - <xsl:with-param name="defaultClass" select="@defaultClass"/> - <xsl:with-param name="dir" select="@dir"/> - <xsl:with-param name="min" select="number(@min)"/> - <xsl:with-param name="max" select="number(@max)"/> - <xsl:with-param name="required" select="@required"/> - <xsl:with-param name="textLangSelect" select="@textLangSelect"/> - <xsl:with-param name="appLangSelect" select="@appLangSelect"/> - <xsl:with-param name="type" select="@type"/> - <xsl:with-param name="id" select="@id"/> - </xsl:call-template> - </tr> - </xsl:template> - - <!-- - Template for a fixed text that is not displayed - - Call attributes: - @tag: metadata tag, e.g. mss01, preferredName etc. - @value: the fixed text - --> - <xsl:template match="dptbase:fixedText"> - <xsl:variable name="node" select="concat('def.', @tag)"/> - <xsl:variable name="subnode" select="@tag"/> - <xsl:variable name="value" select="@value"/> - - <xed:bind xpath="{$node}"> - <xed:bind xpath="@class" default="MCRMetaLangText"/> - <xed:bind xpath="{$subnode}" default="{$value}"/> - </xed:bind> - </xsl:template> - - <!-- - Creates a multiple text input. - - Call attributes: - @tag: metadata tag, e.g. mss01, preferredName etc. - @i18n: I18N-prefix for generating messages, e.g. module.dptbase.work.preferredTitle - @required: 'true' or 'false' - @dir: direction (ltr or rtl) - @min: minimum amount of input fields - @max: maximum amount of input fields - @textLangSelect: flag to determine if text language selection fields are be shown (true or false) - @appLangSelect: flag to determine if application language selection fields are shown (true or false) - --> - <xsl:template match="dptbase:text"> - <tr> - <xsl:call-template name="printLabelColumnEditor"> - <xsl:with-param name="id" select="@tag"/> - <xsl:with-param name="dir" select="@dir"/> - <xsl:with-param name="required" select="@required"/> - <xsl:with-param name="i18n" select="@i18n"/> - </xsl:call-template> - - <xsl:call-template name="printTextAreaColumn"> - <xsl:with-param name="node" select="concat('def.', @tag)"/> - <xsl:with-param name="subnode" select="@tag"/> - <xsl:with-param name="i18n" select="@i18n"/> - <xsl:with-param name="classid" select="@classid"/> - <xsl:with-param name="defaultClass" select="@defaultClass"/> - <xsl:with-param name="dir" select="@dir"/> - <xsl:with-param name="min" select="number(@min)"/> - <xsl:with-param name="max" select="number(@max)"/> - <xsl:with-param name="required" select="@required"/> - <xsl:with-param name="textLangSelect" select="@textLangSelect"/> - <xsl:with-param name="appLangSelect" select="@appLangSelect"/> - </xsl:call-template> - </tr> - </xsl:template> - - <!-- - Create a classification selection. - - Call attributes: - @tag: metadata tag, e.g. sec04, recordSource - @classid: Id of the classification - @i18n: I18N-prefix for generating messages, e.g. module.dptbase.work.preferredTitle - @required: 'true' or 'false' - @dir: direction (ltr or rtl) - @min: minimum amount of select fields - @max: maximum amount of select fields - --> - <xsl:template match="dptbase:classification"> - <tr> - <xsl:call-template name="printLabelColumnEditor"> - <xsl:with-param name="id" select="@tag"/> - <xsl:with-param name="dir" select="@dir"/> - <xsl:with-param name="required" select="@required"/> - <xsl:with-param name="i18n" select="@i18n"/> - </xsl:call-template> - - <xsl:call-template name="printClassificationColumn"> - <xsl:with-param name="node" select="concat('def.', @tag)"/> - <xsl:with-param name="subnode" select="@tag"/> - <xsl:with-param name="i18n" select="@i18n"/> - <xsl:with-param name="classid" select="@classid"/> - <xsl:with-param name="dir" select="@dir"/> - <xsl:with-param name="min" select="number(@min)"/> - <xsl:with-param name="max" select="number(@max)"/> - <xsl:with-param name="required" select="@required"/> - </xsl:call-template> - </tr> - </xsl:template> - - <!-- - Create a link input. - - Call attributes: - @tag: metadata tag, e.g. sec04, recordSource - @i18n: I18N-prefix for generating messages, e.g. module.dptbase.work.preferredTitle - @required: 'true' or 'false' - @dir: direction (ltr or rtl) - @min: minimum amount of input fields - @max: maximum amount of input fields - --> - <xsl:template match="dptbase:link"> - <tr> - <xsl:call-template name="printLabelColumnEditor"> - <xsl:with-param name="id" select="@tag"/> - <xsl:with-param name="dir" select="@dir"/> - <xsl:with-param name="required" select="@required"/> - <xsl:with-param name="i18n" select="@i18n"/> - </xsl:call-template> - - <xsl:call-template name="printLinkColumn"> - <xsl:with-param name="node" select="concat('def.', @tag)"/> - <xsl:with-param name="subnode" select="@tag"/> - <xsl:with-param name="dir" select="@dir"/> - <xsl:with-param name="min" select="@min"/> - <xsl:with-param name="max" select="@max"/> - <xsl:with-param name="i18n" select="@i18n"/> - </xsl:call-template> - </tr> - </xsl:template> - - <!-- - Create a link to an internal Id with type to select. - - Call attributes: - @tag: metadata tag, e.g. sec04, relation - @classid: Id of the classification used for the types - @active: 'true' or 'false' to determine if the classification has active and passive elements and only active - elements are to be shown - @type: the target type of the link, e.g. manuscript, secentry - @i18n: I18N-prefix for generating messages, e.g. module.dptbase.work.preferredTitle - @required: 'true' or 'false' - @dir: direction (ltr or rtl) - @min: minimum amount of select fields - @max: maximum amount of select fields - --> - <xsl:template match="dptbase:typedLinkId"> - <tr> - <xsl:call-template name="printLabelColumnEditor"> - <xsl:with-param name="id" select="@tag"/> - <xsl:with-param name="dir" select="@dir"/> - <xsl:with-param name="required" select="@required"/> - <xsl:with-param name="i18n" select="@i18n"/> - </xsl:call-template> - - <xsl:call-template name="printTypedLinkIdColumn"> - <xsl:with-param name="node" select="concat('def.', @tag)"/> - <xsl:with-param name="subnode" select="@tag"/> - <xsl:with-param name="type" select="@type"/> - <xsl:with-param name="classid" select="@classid"/> - <xsl:with-param name="active" select="@active"/> - <xsl:with-param name="i18n" select="@i18n"/> - <xsl:with-param name="min" select="number(@min)"/> - <xsl:with-param name="max" select="number(@max)"/> - <xsl:with-param name="dir" select="@dir"/> - </xsl:call-template> - </tr> - </xsl:template> - - <!-- - Create a history date input. - - Call attributes: - @tag: metadata tag, e.g. sec04, recordSource - @i18n: I18N-prefix for generating messages, e.g. module.dptbase.work.preferredTitle - @required: 'true' or 'false' - @dir: direction (ltr or rtl) - @min: minimum amount of input fields - @max: maximum amount of input fields - --> - <xsl:template match="dptbase:historydate"> - <tr> - <xsl:call-template name="printLabelColumnEditor"> - <xsl:with-param name="id" select="@tag"/> - <xsl:with-param name="dir" select="@dir"/> - <xsl:with-param name="required" select="@required"/> - <xsl:with-param name="i18n" select="@i18n"/> - </xsl:call-template> - - <xsl:call-template name="printHistoryDateColumn"> - <xsl:with-param name="node" select="concat('def.', @tag)"/> - <xsl:with-param name="subnode" select="@tag"/> - <xsl:with-param name="dir" select="@dir"/> - <xsl:with-param name="min" select="@min"/> - <xsl:with-param name="max" select="@max"/> - <xsl:with-param name="i18n" select="@i18n"/> - </xsl:call-template> - </tr> - </xsl:template> - - <!-- - Creates a person reference input - - Call attributes: - @tag: metadata tag, e.g. mss10, person - @i18n: I18N-prefix for generating messages, e.g. module.dptbase.work.person - @required: 'true' or 'false' - @dir: direction (ltr or rtl) - @min: minimum amount of person fields - @max: maximum amount of person fields - --> - <xsl:template match="dptbase:personreference"> - <xsl:call-template name="printPersonReferenceFields"> - <xsl:with-param name="node" select="concat('def.', @tag)"/> - <xsl:with-param name="subnode" select="@tag"/> - <xsl:with-param name="dir" select="@dir"/> - <xsl:with-param name="min" select="@min"/> - <xsl:with-param name="max" select="@max"/> - </xsl:call-template> - </xsl:template> - - <xsl:template name="printPersonReferenceFields"> - <xsl:param name="node"/> - <xsl:param name="subnode"/> - <xsl:param name="min"/> - <xsl:param name="max"/> - <xsl:param name="dir"/> - - <xed:bind xpath="{$node}"> - <xed:bind xpath="@class" default="MCRMetaPersonReference"/> - - <xed:repeat xpath="{$subnode}" min="{$min}" max="{$max}"> - <tr> - <td class="dpt_editor_name-{$dir}"/> - <td class="dpt_editor_value-{$dir}"> - <xsl:call-template name="printAdditionalControls"> - <xsl:with-param name="min" select="$min"/> - <xsl:with-param name="max" select="$max"/> - <xsl:with-param name="i18n_app_remove" select="'module.mymss.agent.add'"/> - </xsl:call-template> - </td> - </tr> - - <!-- ################ PROPERTY ####################### --> - <tr> - <td class="dpt_editor_name-{$dir}"> - <label for="person_property"> - <xed:output i18n="module.mymss.agent.property2.label"/> - </label> - </td> - <td class="dpt_editor_value-{$dir}"> - <xed:repeat xpath="property[@classid='MyMssFunctionOfPerson']" min="1" max="5"> - <p> - <xed:controls>append remove up down</xed:controls> - </p> - <p> - <xed:bind xpath="@categid"> - <select class="dpt_editor_select" id="person_property"> - <option value=""> - <xed:output i18n="module.dptbase.common.editor.choose"/> - </option> - <xed:include - uri="xslStyle:items2options:classification:editor[Text]:-1:children:MyMssFunctionOfPerson" - cacheable="false"/> - </select> - </xed:bind> - </p> - </xed:repeat> - </td> - </tr> - <!-- ################ NAME ####################### --> - <tr> - <td class="dpt_editor_name-{$dir}"> - <label for="person_name"> - <xed:output i18n="module.mymss.agent.name.label"/> - </label> - </td> - <td class="dpt_editor_value-{$dir}"> - <xed:repeat xpath="personname" min="1" max="5"> - <p style="text-align:left"> - <xed:include uri="webapp:editor/import_editor_form_common.xed" ref="language_text"/> - <xed:include uri="webapp:editor/import_editor_form_common.xed" ref="type_original"/> - <xed:bind xpath="@categid"> - <select class="dpt_editor_select"> - <option value=""> - <xed:output i18n="module.dptbase.common.editor.choose"/> - </option> - <xed:include uri="xslStyle:items2options:classification:editor[Text]:-1:children:MyMssTypeOfName" - cacheable="false"/> - </select> - </xed:bind> - <xed:controls>append remove up down</xed:controls> - </p> - <p> - <textarea type="text" class="dpt_editor_inputarea" id="person_name" maxlength="4096" height="7"/> - </p> - </xed:repeat> - </td> - </tr> - <!-- ################ LINK ####################### --> - <tr> - <td class="dpt_editor_name-{$dir}"> - <label for="person_link"> - <xed:output i18n="module.mymss.agent.link.label"/> - </label> - </td> - <td class="dpt_editor_value-{$dir}"> - <xed:bind xpath="link[@xlink:type='locator']"> - <xed:bind xpath="@xlink:label"/> - <p> - <button type="submit" style="padding-top:0px; width:350px;" - id="person_link" - class="dpt_editor_button dpt_editor_button_default" xed:target="subselect" - xed:href="/indexpage?searchclass=agent_subselect"> - <xed:output i18n="module.mymss.agent.link.choose"/> - </button> - <xed:controls>remove</xed:controls> - </p> - <xed:if test="@xlink:title"> - <p> - <xed:output value="@xlink:title"/> - ( - <xed:output value="@xlink:href"/> - )   - </p> - </xed:if> - </xed:bind> - </td> - </tr> - <!-- ################ REMARK ####################### --> - <tr> - <td class="dpt_editor_name-{$dir}"> - <label for="person_remark"> - <xed:output i18n="module.mymss.agent.remark.label"/> - </label> - </td> - <td class="dpt_editor_value-{$dir}"> - <xed:repeat xpath="remark" min="1" max="5"> - <p> - <xed:include uri="webapp:editor/import_editor_form_common.xed" ref="language_text"/> - <xed:include uri="webapp:editor/import_editor_form_common.xed" ref="type_original"/> - <xed:controls>append remove up down</xed:controls> - </p> - <p> - <textarea type="text" class="dpt_editor_inputarea" id="person_remark" maxlength="4096" height="7"/> - </p> - </xed:repeat> - </td> - </tr> - <tr> - <td class="dpt_editor_name-{$dir}" colspan="2"> - <hr/> - </td> - </tr> - <xed:display-validation-message/> - <xed:validate display="here" - test="(((string-length(personname/text()) > 0 and string-length(personname/@categid) > 0) or link/@xlink:href) - and string-length(property/@categid) > 0) or - (string-length(personname/text()) = 0 and not(link/@xlink:href) and string-length(remark/text()) = 0)"> - <xed:output i18n="module.mymss.agent.cond"/> - </xed:validate> - <br/> - </xed:repeat> - </xed:bind> - </xsl:template> - - <!-- - Creates input for selecting the status of an object. - - Call attributes: - @dir: direction (ltr or rtl) - --> - <xsl:template match="dptbase:statusOfWorkflow"> - <xed:bind xpath="/mycoreobject/service"> - <tr> - <xsl:call-template name="printLabelColumnEditor"> - <xsl:with-param name="dir" select="@dir"/> - <xsl:with-param name="i18n" select="'module.dptbase.common.status'"/> - <xsl:with-param name="required" select="true()"/> - <xsl:with-param name="id" select="'status'"/> - </xsl:call-template> - - <xsl:call-template name="printStatusOfWorkflowSelect"> - <xsl:with-param name="dir" select="@dir"/> - </xsl:call-template> - </tr> - </xed:bind> - </xsl:template> - - <!-- - Prints a label column. - - Parameters - $dir: direction (ltr or rtl) - $i18n: I18N prefix, e.g. module.dptbase.work.preferredTitle - .label is added for display - id: id of the field the label is for - $required: 'true' or 'false' (if 'true', an asterisk is added to the label) - --> - <xsl:template name="printLabelColumnEditor"> - <xsl:param name="dir"/> - <xsl:param name="i18n"/> - <xsl:param name="id"/> - <xsl:param name="required"/> - - <td class="dpt_editor_name-{$dir}"> - <label for="{$id}"> - <xed:output i18n="{$i18n}.label"/> - <xsl:if test="$required='true'"> - <xed:output value="' (*)'"/> - </xsl:if> - </label> - </td> - </xsl:template> - - <!-- - Prints a column for single line text input. - - Parameters - $node: name of the node, e.g. def.mss01 - $subnode: name of the subnode, e.g. mss01 - $dir: direction, either ltr or rtl - $min: minimum amount of input fields - $max: maximum amount of input fields - $required: 'true' or 'false' - $textLangSelect: determines, if the template textLanguageSelect is called (true or false) - $appLangSelect: determines, if the template appLangSelect is called (true or false) - $classid: if set, the template typeSelect is called adding a select box for the input type - $defaultClass: default class for typeSelect template - $type: predefined type for the input - used in xpath binding $subnode[@type=$type] if set (can be empty) - $id: id of the input element (can be empty) - --> - <xsl:template name="printInputFieldColumn"> - <xsl:param name="node"/> - <xsl:param name="subnode"/> - <xsl:param name="i18n"/> - <xsl:param name="dir"/> - <xsl:param name="min"/> - <xsl:param name="max"/> - <xsl:param name="required"/> - <xsl:param name="textLangSelect"/> - <xsl:param name="appLangSelect"/> - <xsl:param name="classid"/> - <xsl:param name="defaultClass"/> - <xsl:param name="type" select="''"/> - <xsl:param name="id" select="''"/> - - <xsl:variable name="xpath_subnode"> - <xsl:choose> - <xsl:when test="string-length($type)>0"> - <xsl:value-of select="concat($subnode, '[@type="', $type, '"]')"/> - </xsl:when> - <xsl:otherwise> - <xsl:value-of select="$subnode"/> - </xsl:otherwise> - </xsl:choose> - </xsl:variable> - - <xsl:variable name="placeholder" select="document(concat('i18n:', $i18n, '.help'))/i18n/text()"/> - - <td class="dpt_editor_value-{$dir}"> - <xed:bind xpath="{$node}"> - <xed:bind xpath="@class" default="MCRMetaLangText"/> - - <xed:repeat xpath="{$xpath_subnode}" min="{$min}" max="{$max}"> - <xsl:call-template name="printAdditionalControls"> - <xsl:with-param name="textLangSelect" select="$textLangSelect"/> - <xsl:with-param name="appLangSelect" select="$appLangSelect"/> - <xsl:with-param name="typeId" select="$classid"/> - <xsl:with-param name="defaultType" select="$defaultClass"/> - <xsl:with-param name="min" select="$min"/> - <xsl:with-param name="max" select="$max"/> - <xsl:with-param name="i18n" select="$i18n"/> - </xsl:call-template> - - <p> - <input type="text" class="dpt_editor_inputfield" id="{$subnode}" maxlength="256" - placeholder="{$placeholder}"> - <xsl:if test="string-length($id) > 0"> - <xsl:attribute name="id"> - <xsl:value-of select="$id"/> - </xsl:attribute> - </xsl:if> - </input> - - <xsl:if test="$required"> - <xsl:call-template name="validationMessage"> - <xsl:with-param name="i18n" select="$i18n"/> - </xsl:call-template> - </xsl:if> - </p> - </xed:repeat> - </xed:bind> - </td> - </xsl:template> - - <!-- - Prints a column for a text area input. - - Parameters - $node: name of the node, e.g. def.mss01 - $subnode: name of the subnode, e.g. mss01 - $dir: direction, either ltr or rtl - $min: minimum amount of input fields - $max: maximum amount of input fields - $required: 'true' or 'false' - $textLangSelect: determines, if the template textLanguageSelect is called (true or false) - $appLangSelect: determines, if the template appLangSelect is called (true or false) - $classid: if set, the template typeSelect is called adding a select box for the input type - $defaultClass: default class for typeSelect template - --> - <xsl:template name="printTextAreaColumn"> - <xsl:param name="node"/> - <xsl:param name="subnode"/> - <xsl:param name="i18n"/> - <xsl:param name="dir"/> - <xsl:param name="min"/> - <xsl:param name="max"/> - <xsl:param name="required"/> - <xsl:param name="textLangSelect"/> - <xsl:param name="appLangSelect"/> - <xsl:param name="classid"/> - <xsl:param name="defaultClass"/> - - <xsl:variable name="placeholder" select="document(concat('i18n:', $i18n, '.help'))/i18n/text()"/> - - <td class="dpt_editor_value-{$dir}"> - <xed:bind xpath="{$node}"> - <xed:bind xpath="@class" default="MCRMetaLangText"/> - <xed:repeat xpath="{$subnode}" min="{$min}" max="{$max}"> - <xsl:call-template name="printAdditionalControls"> - <xsl:with-param name="textLangSelect" select="$textLangSelect"/> - <xsl:with-param name="appLangSelect" select="$appLangSelect"/> - <xsl:with-param name="typeId" select="$classid"/> - <xsl:with-param name="defaultType" select="$defaultClass"/> - <xsl:with-param name="min" select="$min"/> - <xsl:with-param name="max" select="$max"/> - <xsl:with-param name="i18n" select="$i18n"/> - </xsl:call-template> - - <p> - <textarea type="text" class="dpt_editor_inputarea" id="{$subnode}" maxlength="4096" height="7" - placeholder="{$placeholder}"/> - - <xsl:if test="$required"> - <xsl:call-template name="validationMessage"> - <xsl:with-param name="i18n" select="$i18n"/> - </xsl:call-template> - </xsl:if> - </p> - </xed:repeat> - </xed:bind> - </td> - </xsl:template> - - <!-- - Prints a column for selecting from a classification - - Parameters - $node: name of the node, e.g. def.mss01 - $subnode: name of the subnode, e.g. mss01 - $classid: the classification id - $dir: direction, either ltr or rtl - $min: minimum amount of select fields - $max: maximum amount of select fields - $required: 'true' or 'false' - --> - <xsl:template name="printClassificationColumn"> - <xsl:param name="node"/> - <xsl:param name="subnode"/> - <xsl:param name="classid"/> - <xsl:param name="i18n"/> - <xsl:param name="dir"/> - <xsl:param name="min"/> - <xsl:param name="max"/> - <xsl:param name="required"/> - - <xsl:variable name="title" select="document(concat('i18n:', $i18n, '.help'))/i18n/text()"/> - - <td class="dpt_editor_value-{$dir}"> - <xed:bind xpath="{$node}"> - <xed:bind xpath="@class" default="MCRMetaClassification"/> - - <xed:repeat xpath="{$subnode}" min="{$min}" max="{$max}"> - <xsl:call-template name="printAdditionalControls"> - <xsl:with-param name="min" select="$min"/> - <xsl:with-param name="max" select="$max"/> - </xsl:call-template> - - <p> - <xed:bind xpath="@classid" default="{$classid}"/> - <xed:bind xpath="@categid"> - <select class="dpt_editor_select" id="{$subnode}" title="{$title}"> - <option value=""> - <xed:output i18n="module.dptbase.common.editor.choose"/> - </option> - <xed:include uri="xslStyle:items2options:classification:editor[Text]:-1:children:{$classid}" - cacheable="false"/> - </select> - <xsl:if test="$required"> - <xsl:call-template name="validationMessage"> - <xsl:with-param name="i18n" select="$i18n"/> - </xsl:call-template> - </xsl:if> - </xed:bind> - </p> - </xed:repeat> - </xed:bind> - </td> - </xsl:template> - - <xsl:template name="printLinkColumn"> - <xsl:param name="node"/> - <xsl:param name="subnode"/> - <xsl:param name="dir"/> - <xsl:param name="i18n"/> - <xsl:param name="min"/> - <xsl:param name="max"/> - - <xsl:variable name="placeholderTitle" select="document(concat('i18n:', $i18n, '.title'))/i18n/text()"/> - <xsl:variable name="placeholderURL" select="document(concat('i18n:', $i18n, '.url'))/i18n/text()"/> - - - <td class="dpt_editor_value-{$dir}"> - <xed:bind xpath="{$node}[@class='MCRMetaLink']"> - <xed:repeat xpath="{$subnode}" min="{$min}" max="{$max}"> - <xed:bind xpath="@xlink:type" default="locator"/> - <xed:bind xpath="@inherited" default="0"/> - <xsl:if test="$max > $min and $max > 1"> - <p> - <xed:controls>append remove up down</xed:controls> - </p> - </xsl:if> - <p> - <xed:bind xpath="@xlink:title"> - <input type="text" class="dpt_editor_inputfield" maxlength="512" placeholder="{$placeholderTitle}" - id="{$subnode}"/> - </xed:bind> - </p> - <p> - <xed:bind xpath="@xlink:href"> - <input type="text" class="dpt_editor_inputfield" maxlength="512" placeholder="{$placeholderURL}"/> - </xed:bind> - </p> - </xed:repeat> - </xed:bind> - </td> - </xsl:template> - - <!-- - Prints a typed link select to an internal object. - --> - <xsl:template name="printTypedLinkIdColumn"> - <xsl:param name="node"/> - <xsl:param name="subnode"/> - <xsl:param name="classid"/> - <xsl:param name="active"/> - <xsl:param name="type"/> - <xsl:param name="i18n"/> - <xsl:param name="dir"/> - <xsl:param name="min"/> - <xsl:param name="max"/> - - <xsl:variable name="title" select="document(concat('i18n:', $i18n, '.typesel'))/i18n/text()"/> - - <xsl:variable name="itemsUri"> - <xsl:choose> - <xsl:when test="$active = 'true'"> - <xsl:value-of - select="concat('xslStyle:active-items2options:classification:editor[Text]:-1:children:', $classid)"/> - </xsl:when> - <xsl:otherwise> - <xsl:value-of select="concat('xslStyle:items2options:classification:editor[Text]:-1:children:', $classid)"/> - </xsl:otherwise> - </xsl:choose> - </xsl:variable> - - <td class="dpt_editor_value-{$dir}"> - <xed:bind xpath="{$node}"> - <xed:bind xpath="@class" default="MCRMetaLinkID"/> - <xed:repeat xpath="{$subnode}" min="{$min}" max="{$max}"> - <xed:bind xpath="@xlink:type" default="locator"/> - <xed:bind xpath="@xlink:label"/> - <xsl:if test="$max > $min and $max > 1"> - <p> - <xed:controls>append remove up down</xed:controls> - </p> - </xsl:if> - <p> - <xed:bind xpath="@type"> - <select class="dpt_editor_select" id="{$subnode}" title="{$title}"> - <option value=""> - <xed:output i18n="module.dptbase.common.editor.choose"/> - </option> - <xed:include uri="{$itemsUri}" cacheable="false"/> - </select> - </xed:bind> - </p> - <p> - <button type="submit" style="padding-top:0px; width:350px;" - class="dpt_editor_button dpt_editor_button_default" xed:target="subselect" - xed:href="/indexpage?searchclass={$type}_subselect"> - <xed:output i18n="{$i18n}.choose"/> - </button> - <xed:controls>remove</xed:controls> - </p> - <xed:if test="@xlink:title"> - <p> - <xed:output value="@xlink:title"/> - ( - <xed:output value="@xlink:href"/> - ) - </p> - </xed:if> - </xed:repeat> - </xed:bind> - </td> - </xsl:template> - - <xsl:template name="printHistoryDateColumn"> - <xsl:param name="node"/> - <xsl:param name="subnode"/> - <xsl:param name="min"/> - <xsl:param name="max"/> - <xsl:param name="i18n"/> - <xsl:param name="dir"/> - - <xsl:variable name="placeholderText" select="document(concat('i18n:', $i18n, '.hint1'))/i18n/text()"/> - <xsl:variable name="placeholderFrom" select="document(concat('i18n:', $i18n, '.hint3'))/i18n/text()"/> - <xsl:variable name="placeholderTo" select="document(concat('i18n:', $i18n, '.hint4'))/i18n/text()"/> - - <td class="dpt_editor_value-{$dir}"> - <xed:bind xpath="{$node}"> - <xed:bind xpath="@class" default="MCRMetaHistoryDate"/> - <xed:bind xpath="@notinherit" default="true"/> - <xed:bind xpath="@heritable" default="false"/> - <xed:repeat xpath="{$subnode}" min="{$min}" max="{$max}"> - <xed:bind xpath="@inherited" default="0"/> - <xed:bind xpath="@type" default="entry"/> - <xsl:if test="$max > $min and $max > 1"> - <p> - <xed:controls>append remove up down</xed:controls> - </p> - </xsl:if> - <xed:repeat xpath="text"> - <p> - <xsl:call-template name="appLanguageSelect"/> - <xed:controls>append remove up down</xed:controls> - <br/> - <input type="text" class="dpt_editor_inputarea" id="{$subnode}" maxlength="128" - placeholder="{$placeholderText}"/> - </p> - </xed:repeat> - <p> - <xed:include uri="webapp:editor/import_editor_form_common.xed" ref="date_calendar"/> - </p> - <xed:bind xpath="von"> - <p> - <input type="text" class="dpt_editor_inputfield" id="daterange" maxlength="128" - placeholder="{$placeholderFrom}"/> - </p> - </xed:bind> - <xed:bind xpath="bis"> - <p> - <input type="text" class="dpt_editor_inputfield" id="daterange" maxlength="128" - placeholder="{$placeholderTo}"/> - </p> - </xed:bind> - <xed:bind xpath="ivon"/> - <xed:bind xpath="ibis"/> - </xed:repeat> - </xed:bind> - </td> - </xsl:template> - - <xd:doc> - Prints a dropdown select menu with content languages. - </xd:doc> - <xsl:template name="textLanguageSelect"> - <xed:bind xpath="@xml:lang"> - <select class="dpt_editor_language"> - <option value="de"> - <xed:output i18n="module.dptbase.common.editor.slang.de"/> - </option> - <option value="en"> - <xed:output i18n="module.dptbase.common.editor.slang.en"/> - </option> - <option value="ar"> - <xed:output i18n="module.dptbase.common.editor.slang.ar"/> - </option> - <option value="fa"> - <xed:output i18n="module.dptbase.common.editor.slang.fa"/> - </option> - <option value="he"> - <xed:output i18n="module.dptbase.common.editor.slang.he"/> - </option> - <option value="la"> - <xed:output i18n="module.dptbase.common.editor.slang.la"/> - </option> - <option value="zh"> - <xed:output i18n="module.dptbase.common.editor.slang.zh"/> - </option> - <option value="ota"> - <xed:output i18n="module.dptbase.common.editor.slang.ota"/> - </option> - <option value="pi"> - <xed:output i18n="module.dptbase.common.editor.slang.pi"/> - </option> - <option value="sa"> - <xed:output i18n="module.dptbase.common.editor.slang.sa"/> - </option> - <option value="syc"> - <xed:output i18n="module.dptbase.common.editor.slang.syc"/> - </option> - <option value="ug"> - <xed:output i18n="module.dptbase.common.editor.slang.ug"/> - </option> - <option value="sog"> - <xed:output i18n="module.dptbase.common.editor.slang.sog"/> - </option> - <option value="gez"> - <xed:output i18n="module.dptbase.common.editor.slang.gez"/> - </option> - <option value="ru"> - <xed:output i18n="module.dptbase.common.editor.slang.ru"/> - </option> - <option value="es"> - <xed:output i18n="module.dptbase.common.editor.slang.es"/> - </option> - <option value="tur"> - <xed:output i18n="module.dptbase.common.editor.slang.tur"/> - </option> - <option value="it"> - <xed:output i18n="module.dptbase.common.editor.slang.it"/> - </option> - <option value="hye"> - <xed:output i18n="module.dptbase.common.editor.slang.hye"/> - </option> - </select> - </xed:bind> - </xsl:template> - - <xsl:template name="typeOriginal"> - <xed:bind xpath="@type"> - <select class="dpt_editor_type"> - <option value=""> - <xed:output i18n="module.dptbase.common.editor.choose"/> - </option> - <option value="original"> - <xed:output i18n="module.mymss.common.texttype.original"/> - </option> - </select> - </xed:bind> - </xsl:template> - - <xsl:template name="typeSelect"> - <xsl:param name="classid"/> - <xsl:param name="default"/> - <xsl:param name="i18n"/> - - <xsl:variable name="title" select="document(concat('i18n:', $i18n, '.typesel'))/i18n/text()"/> - - <xed:bind xpath="@type" initially="{$default}"> - <select class="dpt_editor_select" title="{$title}"> - <option value=""> - <xed:output i18n="module.dptbase.common.editor.choose"/> - </option> - <xed:include uri="xslStyle:items2options:classification:editor[Text]:-1:children:{$classid}" - cacheable="false"/> - </select> - </xed:bind> - </xsl:template> - - <xsl:template name="appLanguageSelect"> - <xed:bind xpath="@xml:lang"> - <select class="dpt_editor_language"> - <option value="de"> - <xed:output i18n="module.dptbase.common.editor.slang.de"/> - </option> - <option value="en"> - <xed:output i18n="module.dptbase.common.editor.slang.en"/> - </option> - <option value="ar"> - <xed:output i18n="module.dptbase.common.editor.slang.ar"/> - </option> - </select> - </xed:bind> - </xsl:template> - - <xsl:template name="calendarSelect"> - <xed:bind xpath="calendar"> - <select class="dpt_editor_calendar" default="gregorian"> - <option value="gregorian"> - <xed:output i18n="module.dptbase.common.editor.calendar.gregorian"/> - </option> - <option value="islamic"> - <xed:output i18n="module.dptbase.common.editor.calendar.islamic"/> - </option> - </select> - </xed:bind> - </xsl:template> - - <!-- - Prints additional controls and select boxes according to the given parameters. - --> - <xsl:template name="printAdditionalControls"> - <xsl:param name="textLangSelect" select="false()"/> - <xsl:param name="appLangSelect" select="false()"/> - <xsl:param name="typeId" select="false()"/> - <xsl:param name="defaultType" select="false()"/> - <xsl:param name="min" select="1"/> - <xsl:param name="max" select="1"/> - <xsl:param name="i18n" select="false()"/> - <xsl:param name="i18n_app_remove" select="''"/> - - <xsl:if test="$textLangSelect or $appLangSelect or $typeId or ($max > $min and $max >1)"> - <p> - <xsl:if test="$textLangSelect"> - <xsl:call-template name="textLanguageSelect"/> - <xsl:call-template name="typeOriginal"/> - </xsl:if> - <xsl:if test="$appLangSelect"> - <xsl:call-template name="appLanguageSelect"/> - </xsl:if> - <xsl:if test="$typeId"> - <xsl:call-template name="typeSelect"> - <xsl:with-param name="classid" select="$typeId"/> - <xsl:with-param name="default" select="$defaultType"/> - <xsl:with-param name="i18n" select="$i18n"/> - </xsl:call-template> - </xsl:if> - <xsl:if test="$max > $min and $max > 1"> - <xsl:if test="string-length($i18n_app_remove) > 0"> - <xed:output i18n="{$i18n_app_remove}"/> - </xsl:if> - <xed:controls>append remove up down</xed:controls> - </xsl:if> - </p> - </xsl:if> - </xsl:template> - - <xsl:template name="validationMessage"> - <xsl:param name="i18n"/> - - <xsl:variable name="validation_message" select="concat($i18n, '.cond')"/> - - <xed:display-validation-message/> - <xed:validate display="local" required="true"> - <xed:output i18n="{$validation_message}"/> - </xed:validate> - </xsl:template> - - <xsl:template name="printStatusOfWorkflowSelect"> - <xsl:param name="dir"/> - - <td class="dpt_editor_value-{$dir}"> - <xed:bind xpath="servstates[@class='MCRMetaClassification']"> - <xed:bind xpath="@notinherit" default="true"/> - <xed:bind xpath="@heritable" default="false"/> - <xed:bind xpath="servstate"> - <xed:bind xpath="@classid" default="statusOfWorkflow"/> - <p> - <xed:bind xpath="@categid"> - <select class="form-control dpt_editor_select-{$dir}"> - <xed:include uri="xslStyle:items2options:classification:editor:-1:children:statusOfWorkflow" - cacheable="false"/> - </select> - </xed:bind> - </p> - </xed:bind> - </xed:bind> - </td> - </xsl:template> -</xsl:stylesheet>