Skip to content
Snippets Groups Projects
Commit 3efb75c1 authored by Tom Lutzenberger's avatar Tom Lutzenberger Committed by Johannes Goderbauer
Browse files

#1048996: Implement enhanced Keyword Sorting (WiP)

Implementation of KeywordCategory entity
parent fd20badc
No related branches found
No related tags found
No related merge requests found
Showing
with 429 additions and 0 deletions
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
<changeSet author="t.lutzenberger" id="d0da3801-e570-40ab-97ec-9f7946f7229c">
<createTable tableName="AB_KEYWORD_CATEGORY">
<column name="AB_KEYWORD_CATEGORYID" type="CHAR(36)">
<constraints primaryKey="true" primaryKeyName="PK_KEYWORDCATEGORY_KEYWORDCATEGORYID"/>
</column>
<column name="NAME" type="VARCHAR(80)">
<constraints nullable="false"/>
</column>
<column name="SORTINGBY" type="INTEGER">
<constraints nullable="false"/>
</column>
<column name="SORTINGDIRECTION" type="INTEGER">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
</databaseChangeLog>
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
<include relativeToChangelogFile="true" file="add_keywordCategory.xml"/>
<include relativeToChangelogFile="true" file="update_keywordEntry.xml"/>
</databaseChangeLog>
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
<changeSet author="t.lutzenberger" id="58652a09-7d8e-4a9d-995e-04eb8bcbc7cf">
<addColumn tableName="AB_KEYWORD_ENTRY">
<column name="AB_KEYWORD_CATEGORY_ID" type="CHAR(36)"/>
</addColumn>
</changeSet>
</databaseChangeLog>
......@@ -13,4 +13,5 @@
<include relativeToChangelogFile="true" file="alter_VisitrecommendationpriorityDatatype.xml"/>
<include relativeToChangelogFile="true" file="alter_KeywordTitlesForTranslation.xml"/>
<include relativeToChangelogFile="true" file="alter_CommrestrictionsEmployeeInvolved.xml"/>
<include relativeToChangelogFile="true" file="Keywords/changelog.xml"/>
</databaseChangeLog>
......@@ -6592,6 +6592,20 @@
<title>Keyword entry Id</title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>AB_KEYWORD_CATEGORY_ID</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="1" />
<size v="36" />
<scale v="0" />
<notNull v="false" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
</entityFields>
</entityDb>
<entityDb>
......@@ -16751,6 +16765,82 @@
</entityFieldDb>
</entityFields>
</entityDb>
<entityDb>
<name>AB_KEYWORD_CATEGORY</name>
<dbName></dbName>
<idColumn>AB_KEYWORD_CATEGORYID</idColumn>
<idGeneratorType v="0" />
<idGeneratorInterval v="1" />
<documentation></documentation>
<title></title>
<description></description>
<auditSyncConfig>
<name>auditSyncConfig</name>
<auditMode v="0" />
<syncActive v="false" />
<syncComplete v="true" />
<syncDirection v="1" />
<syncIds></syncIds>
</auditSyncConfig>
<entityFields>
<entityFieldDb>
<name>SORTINGBY</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="4" />
<size v="10" />
<scale v="0" />
<notNull v="true" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>AB_KEYWORD_CATEGORYID</name>
<dbName></dbName>
<primaryKey v="true" />
<columnType v="1" />
<size v="36" />
<scale v="0" />
<notNull v="true" />
<isUnique v="true" />
<index v="true" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>SORTINGDIRECTION</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="4" />
<size v="10" />
<scale v="0" />
<notNull v="true" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>NAME</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="12" />
<size v="80" />
<scale v="0" />
<notNull v="true" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
</entityFields>
</entityDb>
</entities>
</entityGroup>
</aliasDefDb>
......
......@@ -289,6 +289,10 @@
<name>KeywordEntry</name>
<kind v="10077" />
</entityNode>
<entityNode>
<name>KeywordCategory</name>
<kind v="10077" />
</entityNode>
<entityNode>
<name>KeywordAttribute</name>
<kind v="10077" />
......
<?xml version="1.0" encoding="UTF-8"?>
<entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.17" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.17">
<name>KeywordCategory_entity</name>
<majorModelMode>DISTRIBUTED</majorModelMode>
<icon>VAADIN:FILE_TREE_SMALL</icon>
<title>Keyword Category</title>
<contentTitleProcess>%aditoprj%/entity/KeywordCategory_entity/contentTitleProcess.js</contentTitleProcess>
<iconId>VAADIN:FILE_TREE_SMALL</iconId>
<recordContainer>db</recordContainer>
<entityFields>
<entityProvider>
<name>#PROVIDER</name>
<usePermissions v="false" />
</entityProvider>
<entityProvider>
<name>#PROVIDER_AGGREGATES</name>
<useAggregates v="true" />
</entityProvider>
<entityField>
<name>AB_KEYWORD_CATEGORYID</name>
<valueProcess>%aditoprj%/entity/KeywordCategory_entity/entityfields/ab_keyword_categoryid/valueProcess.js</valueProcess>
</entityField>
<entityField>
<name>NAME</name>
<title>Category Name</title>
<mandatory v="true" />
</entityField>
<entityField>
<name>SORTINGBY</name>
<title>Sorting by</title>
<contentType>TEXT</contentType>
<mandatory v="true" />
<dropDownProcess>%aditoprj%/entity/KeywordCategory_entity/entityfields/sortingby/dropDownProcess.js</dropDownProcess>
<valueProcess>%aditoprj%/entity/KeywordCategory_entity/entityfields/sortingby/valueProcess.js</valueProcess>
</entityField>
<entityField>
<name>SORTINGDIRECTION</name>
<title>Sorting direction</title>
<contentType>TEXT</contentType>
<mandatory v="true" />
<dropDownProcess>%aditoprj%/entity/KeywordCategory_entity/entityfields/sortingdirection/dropDownProcess.js</dropDownProcess>
<valueProcess>%aditoprj%/entity/KeywordCategory_entity/entityfields/sortingdirection/valueProcess.js</valueProcess>
</entityField>
<entityProvider>
<name>AllKeywordCategoryProvider</name>
<lookupIdfield>AB_KEYWORD_CATEGORYID</lookupIdfield>
<sortingField>NAME</sortingField>
<dependencies>
<entityDependency>
<name>d93010a7-5c20-4144-8efb-8eb43c69b7b1</name>
<entityName>KeywordEntry_entity</entityName>
<fieldName>KeywordCategoryConsumer</fieldName>
<isConsumer v="false" />
</entityDependency>
</dependencies>
</entityProvider>
</entityFields>
<recordContainers>
<dbRecordContainer>
<name>db</name>
<alias>Data_alias</alias>
<isPageable v="true" />
<orderClauseProcess>%aditoprj%/entity/KeywordCategory_entity/recordcontainers/db/orderClauseProcess.js</orderClauseProcess>
<linkInformation>
<linkInformation>
<name>bd5b5591-863e-4e4d-8ac0-339112c7cbb8</name>
<tableName>AB_KEYWORD_CATEGORY</tableName>
<primaryKey>AB_KEYWORD_CATEGORYID</primaryKey>
<isUIDTable v="true" />
<readonly v="false" />
</linkInformation>
</linkInformation>
<recordFieldMappings>
<dbRecordFieldMapping>
<name>NAME.value</name>
<recordfield>AB_KEYWORD_CATEGORY.NAME</recordfield>
<isFilterable v="true" />
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>AB_KEYWORD_CATEGORYID.value</name>
<recordfield>AB_KEYWORD_CATEGORY.AB_KEYWORD_CATEGORYID</recordfield>
<isFilterable v="false" />
<isLookupFilter v="false" />
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>SORTINGBY.value</name>
<recordfield>AB_KEYWORD_CATEGORY.SORTINGBY</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>SORTINGDIRECTION.value</name>
<recordfield>AB_KEYWORD_CATEGORY.SORTINGDIRECTION</recordfield>
</dbRecordFieldMapping>
</recordFieldMappings>
</dbRecordContainer>
</recordContainers>
</entity>
import("system.result");
import("system.vars");
result.string(vars.get("$field.NAME"));
\ No newline at end of file
import("system.neon");
import("system.result");
import("system.util");
import("system.vars");
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.get("$this.value") == null) {
result.string(util.getNewUUID());
}
import("system.result");
import("system.translate");
result.object([
["0", translate.text("by name")],
["1", translate.text("by sorting")]
]);
\ No newline at end of file
import("system.neon");
import("system.result");
import("system.vars");
if(vars.get("$this.value") == null && vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
{
result.string("0");
}
\ No newline at end of file
import("system.result");
import("system.translate");
result.object([
["0", translate.text("ascending")],
["1", translate.text("descending")]
]);
\ No newline at end of file
import("system.neon");
import("system.result");
import("system.vars");
if(vars.get("$this.value") == null && vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
{
result.string("0");
}
\ No newline at end of file
import("system.db");
import("system.result");
result.object({
"AB_KEYWORD_CATEGORY.NAME": db.ASCENDING
});
\ No newline at end of file
......@@ -63,6 +63,11 @@
<name>TITLE</name>
<title>Title (original language)</title>
<mandatory v="true" />
<onValueChangeTypes>
<element>MASK</element>
<element>PROCESS</element>
<element>PROCESS_SETVALUE</element>
</onValueChangeTypes>
</entityField>
<entityField>
<name>SORTING</name>
......@@ -654,6 +659,22 @@
<name>#PROVIDER_AGGREGATES</name>
<useAggregates v="true" />
</entityProvider>
<entityField>
<name>AB_KEYWORD_CATEGORY_ID</name>
<title>Container new</title>
<consumer>KeywordCategoryConsumer</consumer>
<groupable v="true" />
<mandatory v="true" />
<displayValueProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/ab_keyword_category_id/displayValueProcess.js</displayValueProcess>
</entityField>
<entityConsumer>
<name>KeywordCategoryConsumer</name>
<dependency>
<name>dependency</name>
<entityName>KeywordCategory_entity</entityName>
<fieldName>AllKeywordCategoryProvider</fieldName>
</dependency>
</entityConsumer>
</entityFields>
<recordContainers>
<dbRecordContainer>
......@@ -711,6 +732,10 @@
<isFilterable v="true" />
<isLookupFilter v="true" />
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>AB_KEYWORD_CATEGORY_ID.value</name>
<recordfield>AB_KEYWORD_ENTRY.AB_KEYWORD_CATEGORY_ID</recordfield>
</dbRecordFieldMapping>
</recordFieldMappings>
</dbRecordContainer>
</recordContainers>
......
import("system.result");
import("system.vars");
import("Sql_lib");
var containerId = vars.get("$field.AB_KEYWORD_CATEGORY_ID");
if(containerId == "") {
result.string("<unknown>");
} else {
var containerName = newSelect("AB_KEYWORD_CATEGORY.NAME")
.from("AB_KEYWORD_CATEGORY")
.where("AB_KEYWORD_CATEGORY.AB_KEYWORD_CATEGORYID", containerId)
.cell();
result.string(containerName);
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<neonContext xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonContext/1.1.1">
<name>KeywordCategory</name>
<title>Keyword Category</title>
<majorModelMode>DISTRIBUTED</majorModelMode>
<filterView>KeywordCategoryFilter_view</filterView>
<editView>KeywordCategoryEdit_view</editView>
<previewView>KeywordCategoryPreview_view</previewView>
<entity>KeywordCategory_entity</entity>
<references>
<neonViewReference>
<name>1e20d23b-c7d2-4218-ab81-2e4358eae7bc</name>
<view>KeywordCategoryFilter_view</view>
</neonViewReference>
<neonViewReference>
<name>1daa1f4f-f6d3-4ce7-b83b-2b3617bc2136</name>
<view>KeywordCategoryEdit_view</view>
</neonViewReference>
<neonViewReference>
<name>bc8a8d1d-d5fe-4518-a487-a2530820c78d</name>
<view>KeywordCategoryPreview_view</view>
</neonViewReference>
</references>
</neonContext>
<?xml version="1.0" encoding="UTF-8"?>
<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.6">
<name>KeywordCategoryEdit_view</name>
<majorModelMode>DISTRIBUTED</majorModelMode>
<size>SMALL</size>
<layout>
<noneLayout>
<name>layout</name>
</noneLayout>
</layout>
<children>
<genericViewTemplate>
<name>CategoryEdit</name>
<editMode v="true" />
<entityField>#ENTITY</entityField>
<fields>
<entityFieldLink>
<name>baf076dd-1119-4604-82da-47b462428b46</name>
<entityField>NAME</entityField>
</entityFieldLink>
<entityFieldLink>
<name>4ab1775f-9ab2-4c41-a9a7-e366df2a85cb</name>
<entityField>SORTINGBY</entityField>
</entityFieldLink>
<entityFieldLink>
<name>6f01e1b2-15fb-4734-a14e-e788aa8096f2</name>
<entityField>SORTINGDIRECTION</entityField>
</entityFieldLink>
</fields>
</genericViewTemplate>
</children>
</neonView>
<?xml version="1.0" encoding="UTF-8"?>
<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.6">
<name>KeywordCategoryFilter_view</name>
<majorModelMode>DISTRIBUTED</majorModelMode>
<filterable v="true" />
<layout>
<boxLayout>
<name>layout</name>
</boxLayout>
</layout>
<children>
<tableViewTemplate>
<name>CategoryTable</name>
<entityField>#ENTITY</entityField>
<columns>
<neonTableColumn>
<name>b5f0f090-3dd8-4407-a1a0-7eff8391017e</name>
<entityField>NAME</entityField>
</neonTableColumn>
<neonTableColumn>
<name>aeb1a10f-0d69-4943-b0d8-0c4395d9b9db</name>
<entityField>SORTINGBY</entityField>
</neonTableColumn>
<neonTableColumn>
<name>10b78f77-574f-4113-bc67-397419dd579b</name>
<entityField>SORTINGDIRECTION</entityField>
</neonTableColumn>
</columns>
</tableViewTemplate>
</children>
</neonView>
<?xml version="1.0" encoding="UTF-8"?>
<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.6">
<name>KeywordCategoryPreview_view</name>
<majorModelMode>DISTRIBUTED</majorModelMode>
<layout>
<headerFooterLayout>
<name>layout</name>
<header>header</header>
</headerFooterLayout>
</layout>
<children>
<cardViewTemplate>
<name>header</name>
<titleField>#CONTENTTITLE</titleField>
<subtitleField>SORTINGBY</subtitleField>
<descriptionField>SORTINGDIRECTION</descriptionField>
<entityField>#ENTITY</entityField>
</cardViewTemplate>
</children>
</neonView>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment