Skip to content
Snippets Groups Projects
Commit cfa37993 authored by S.Listl's avatar S.Listl
Browse files

Attribute tree

parent c3514a6a
No related branches found
No related tags found
No related merge requests found
......@@ -194,6 +194,7 @@
</entityProvider>
<entityField>
<name>FULL_ATTRIBUTE_NAME</name>
<state>READONLY</state>
<valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/full_attribute_name/valueProcess.js</valueProcess>
</entityField>
<entityParameter>
......@@ -227,6 +228,17 @@
<expose v="true" />
<description>PARAMETER</description>
</entityParameter>
<entityField>
<name>USAGELIST</name>
<title>Usages</title>
<state>READONLY</state>
<valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/usagelist/valueProcess.js</valueProcess>
</entityField>
<entityField>
<name>NAME_WITH_TYPE</name>
<title>Name</title>
<valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/name_with_type/valueProcess.js</valueProcess>
</entityField>
</entityFields>
<recordContainers>
<dbRecordContainer>
......
import("system.translate");
import("system.result");
import("system.vars");
import("Attribute_lib");
import("Keyword_lib");
import("KeywordRegistry_basic")
var name = vars.get("$field.ATTRIBUTE_NAME");
var type = vars.get("$field.ATTRIBUTE_TYPE");
if (type.trim() != $AttributeTypes.COMBOVALUE)
name += " (" + translate.text("Type") + ": " + KeywordUtils.getViewValue($KeywordRegistry.attributeType(), type) + ")";
result.string(name);
\ No newline at end of file
import("system.translate");
import("system.result");
import("system.db");
import("system.vars");
import("Sql_lib");
var usages = db.array(db.COLUMN, SqlCondition.begin()
.andPrepare("AB_ATTRIBUTEUSAGE.AB_ATTRIBUTE_ID", vars.get("$field.AB_ATTRIBUTEID"))
.buildSql("select OBJECT_TYPE from AB_ATTRIBUTEUSAGE"));
var usageStr = translate.text("Usage");
result.string(usages.length ? usageStr + ": " + usages.join(", ") : "\u00A0"); // \u00A0 -> space character that doesn't get trimmed
\ No newline at end of file
......@@ -2448,6 +2448,9 @@
<entry>
<key>Object tree</key>
</entry>
<entry>
<key>New Appointment</key>
</entry>
</keyValueMap>
<font name="Dialog" style="0" size="11" />
<sqlModels>
......
......@@ -2472,6 +2472,9 @@
<entry>
<key>Object tree</key>
</entry>
<entry>
<key>New Appointment</key>
</entry>
</keyValueMap>
<font name="Dialog" style="0" size="11" />
</language>
......@@ -14,8 +14,8 @@
<name>AttributesTreetable</name>
<parentField>ATTRIBUTE_PARENT_ID</parentField>
<favoriteActionGroup1>AttributeActions</favoriteActionGroup1>
<titleField>ATTRIBUTE_NAME</titleField>
<descriptionField>ATTRIBUTE_TYPE</descriptionField>
<titleField>NAME_WITH_TYPE</titleField>
<descriptionField>USAGELIST</descriptionField>
<entityField>#ENTITY</entityField>
</treetableViewTemplate>
<tableViewTemplate>
......
......@@ -14,8 +14,21 @@
<subtitleField>ATTRIBUTE_TYPE</subtitleField>
<entityField>#ENTITY</entityField>
</cardViewTemplate>
<genericViewTemplate>
<name>Details</name>
<showDrawer v="true" />
<drawerCaption>Details</drawerCaption>
<entityField>#ENTITY</entityField>
<fields>
<entityFieldLink>
<name>70953962-9472-484b-ac95-567d2249f42e</name>
<entityField>ATTRIBUTE_ACTIVE</entityField>
</entityFieldLink>
</fields>
</genericViewTemplate>
<genericViewTemplate>
<name>Info</name>
<editMode v="false" />
<showDrawer v="true" />
<entityField>#ENTITY</entityField>
<title></title>
......@@ -28,10 +41,6 @@
<name>7e64cd02-e91e-4845-bc77-256a4945670e</name>
<entityField>KEYWORD_CONTAINER</entityField>
</entityFieldLink>
<entityFieldLink>
<name>e00bfeb1-7003-4d5a-b71a-c6921e255c9d</name>
<entityField>ATTRIBUTE_ACTIVE</entityField>
</entityFieldLink>
<entityFieldLink>
<name>00a51564-0eca-43f9-8235-b811df1dbafd</name>
<entityField>ATTRIBUTE_LEVEL</entityField>
......
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