This commit is contained in:
2020-06-23 23:18:50 +00:00
parent d1f48d41de
commit 4e5a4a1ca4
6 changed files with 81 additions and 6 deletions

2
.vscode/launch.json vendored
View File

@@ -45,7 +45,7 @@
//"AYANOVA_LOG_LEVEL": "Debug",
"AYANOVA_DEFAULT_TRANSLATION": "en",
//TRANSLATION MUST BE en for Integration TESTING
//"AYANOVA_PERMANENTLY_ERASE_DATABASE": "true",
"AYANOVA_PERMANENTLY_ERASE_DATABASE": "true",
"AYANOVA_DB_CONNECTION": "Server=localhost;Username=postgres;Password=raven;Database=AyaNova;",
"AYANOVA_USE_URLS": "http://*:7575;",
"AYANOVA_FOLDER_USER_FILES": "c:\\temp\\RavenTestData\\userfiles",

View File

@@ -0,0 +1,71 @@
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
using AyaNova.Biz;
namespace AyaNova.DataList
{
internal class TranslationDataList : AyaDataList
{
public TranslationDataList()
{
DefaultListObjectType = AyaType.Translation;
SQLFrom = "from atranslation";
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
//Default ListView
dynamic dlistView = new JArray();
dynamic cm = new JObject();
cm.fld = "name";
dlistView.Add(cm);
cm = new JObject();
cm.fld = "stock";
dlistView.Add(cm);
cm = new JObject();
cm.fld = "cjkindex";
dlistView.Add(cm);
DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None);
//NOTE: Due to the join, all the sql id and name fields that can conflict with the joined (in this case User) table need to be specified completely
FieldDefinitions = new List<AyaDataListFieldDefinition>();
//DPRECATED FieldDefinitions.Add(new AyaDataListFieldDefinition { FieldKey = "df", AyaObjectType = (int)AyaType.User, SqlIdColumnName = "auser.id" });
FieldDefinitions.Add(new AyaDataListFieldDefinition
{
TKey = "Translation",
FieldKey = "name",
AyaObjectType = (int)AyaType.Translation,
UiFieldDataType = (int)UiFieldDataType.Text,
SqlIdColumnName = "atranslation.id",
SqlValueColumnName = "atranslation.name",
IsRowId = true
});
FieldDefinitions.Add(new AyaDataListFieldDefinition
{
TKey = "GlobalCJKIndex",
FieldKey = "cjkindex",
UiFieldDataType = (int)UiFieldDataType.Bool,
SqlValueColumnName = "atranslation.cjkindex"
});
FieldDefinitions.Add(new AyaDataListFieldDefinition
{
TKey = "ReadOnly",
FieldKey = "stock",
UiFieldDataType = (int)UiFieldDataType.Bool,
SqlValueColumnName = "atranslation.stock"
});
}
}//eoc
}//eons

View File

@@ -1837,5 +1837,6 @@
"CopyDbId":"Datenbank-ID kopieren",
"LastLogin":"Letzte Anmeldezeit",
"Import":"Importieren",
"Export":"Exportieren"
"Export":"Exportieren",
"ReadOnly":"Schreibgeschützt"
}

View File

@@ -234,7 +234,7 @@
"UiFieldDataTypesInteger": "Integer",
"GlobalAllowScheduleConflicts": "Allow Schedule Conflicts",
"GlobalAllowScheduleConflictsDescription": "If the user assigning schedules wants to be notified that a scheduled user overlaps, they should set this to FALSE. If it is common to overlap schedules, it is suggested to set to TRUE",
"GlobalCJKIndex": "Use CJK Index",
"GlobalCJKIndex": "CJK Index",
"GlobalCJKIndexDescription": "Only set to TRUE if entry of Chinese, Japanese or Korean characters into fields and labels",
"GlobalCoordinateStyle": "Coordinate display style",
"GlobalCoordinateStyleDescription": "Determines how geographic co-ordinates are displayed",
@@ -1837,7 +1837,8 @@
"CopyDbId":"Copy database id",
"LastLogin":"Last login",
"Import":"Import",
"Export":"Export"
"Export":"Export",
"ReadOnly":"Read only"
}

View File

@@ -1837,5 +1837,6 @@
"CopyDbId":"Copiar ID de base de datos",
"LastLogin":"Última hora de inicio de sesión",
"Import":"Importar",
"Export":"Exportar"
"Export":"Exportar",
"ReadOnly":"Sólo lectura"
}

View File

@@ -1837,5 +1837,6 @@
"CopyDbId":"Copier l'ID de la base de données",
"LastLogin":"Dernière connexion",
"Import":"Importer",
"Export":"Exporter"
"Export":"Exporter",
"ReadOnly":"Lecture seule"
}