diff --git a/vasl_templates/webapp/data/default-template-pack/nationalities.json b/vasl_templates/webapp/data/default-template-pack/nationalities.json index b5d7e99..bce4f54 100644 --- a/vasl_templates/webapp/data/default-template-pack/nationalities.json +++ b/vasl_templates/webapp/data/default-template-pack/nationalities.json @@ -56,6 +56,10 @@ "yugoslavian": { "display_name": "Yugoslavian", "ob_colors": [ "#a3ecd1","#82e3bd", "#61d8a6" ] +}, +"danish": { + "display_name": "Danish", + "ob_colors": [ "#a3ecd1","#82e3bd", "#61d8a6" ] } } diff --git a/vasl_templates/webapp/data/ordnance/danish.json b/vasl_templates/webapp/data/ordnance/danish.json new file mode 100644 index 0000000..56bffe5 --- /dev/null +++ b/vasl_templates/webapp/data/ordnance/danish.json @@ -0,0 +1,9 @@ +[ + +{ "name": "Machinecannon 20mm M-35", + "capabilities": [ "NT", "QSU\u20201", "R2", "IFE=B10" ], + "note_number": "19\u2020", + "notes": [ "De", "T\u20201" ] +} + +] diff --git a/vasl_templates/webapp/data/vehicles/danish.json b/vasl_templates/webapp/data/vehicles/danish.json new file mode 100644 index 0000000..2ada72d --- /dev/null +++ b/vasl_templates/webapp/data/vehicles/danish.json @@ -0,0 +1,9 @@ +[ + +{ "name": "Nimbus", + "CS#": [ null, "\u2020" ], + "capabilities": [ "M8\u2020" ], + "note_number": "24\u2020" +} + +] diff --git a/vasl_templates/webapp/static/images/flags/danish.png b/vasl_templates/webapp/static/images/flags/danish.png new file mode 100644 index 0000000..6133139 Binary files /dev/null and b/vasl_templates/webapp/static/images/flags/danish.png differ diff --git a/vasl_templates/webapp/static/snippets.js b/vasl_templates/webapp/static/snippets.js index e1bbb87..8da5d7f 100644 --- a/vasl_templates/webapp/static/snippets.js +++ b/vasl_templates/webapp/static/snippets.js @@ -480,12 +480,19 @@ function has_ref( val ) function make_crew_survival( entry ) { + function make_cs_string( prefix, val ) { + if ( val.length === 2 && val[0] === null && val[1] === "\u2020" ) + return "\u2020" ; + else + return prefix + " " + val ; + } + // check if the vehicle has a crew survival field var crew_survival = null ; if ( "CS#" in entry ) - crew_survival = "CS " + entry["CS#"] ; + crew_survival = make_cs_string( "CS", entry["CS#"] ) ; else if ( "cs#" in entry ) - crew_survival = "cs " + entry["cs#"] ; + crew_survival = make_cs_string( "cs", entry["cs#"] ) ; if ( crew_survival === null ) return null ; diff --git a/vasl_templates/webapp/tests/fixtures/vo-reports/ordnance/danish/1940.txt b/vasl_templates/webapp/tests/fixtures/vo-reports/ordnance/danish/1940.txt new file mode 100644 index 0000000..bfee8ee --- /dev/null +++ b/vasl_templates/webapp/tests/fixtures/vo-reports/ordnance/danish/1940.txt @@ -0,0 +1,5 @@ +=== ordnance/danish/1940 === + +Name Capabilities (effective) # Notes +----------------------- --------------------- --------------------- --- ----------------- +Machinecannon 20mm M-35 NT QSU†[1] R2 IFE=B10 NT QSU†[1] R2 IFE=B10 19† De T†1 diff --git a/vasl_templates/webapp/tests/fixtures/vo-reports/ordnance/danish/1941.txt b/vasl_templates/webapp/tests/fixtures/vo-reports/ordnance/danish/1941.txt new file mode 100644 index 0000000..77325be --- /dev/null +++ b/vasl_templates/webapp/tests/fixtures/vo-reports/ordnance/danish/1941.txt @@ -0,0 +1,5 @@ +=== ordnance/danish/1941 === + +Name Capabilities (effective) # Notes +----------------------- --------------------- --------------------- --- ----------------- +Machinecannon 20mm M-35 NT QSU†[1] R2 IFE=B10 NT QSU†[1] R2 IFE=B10 19† De T†1 diff --git a/vasl_templates/webapp/tests/fixtures/vo-reports/ordnance/danish/1942.txt b/vasl_templates/webapp/tests/fixtures/vo-reports/ordnance/danish/1942.txt new file mode 100644 index 0000000..454d5d7 --- /dev/null +++ b/vasl_templates/webapp/tests/fixtures/vo-reports/ordnance/danish/1942.txt @@ -0,0 +1,5 @@ +=== ordnance/danish/1942 === + +Name Capabilities (effective) # Notes +----------------------- --------------------- --------------------- --- ----------------- +Machinecannon 20mm M-35 NT QSU†[1] R2 IFE=B10 NT QSU†[1] R2 IFE=B10 19† De T†1 diff --git a/vasl_templates/webapp/tests/fixtures/vo-reports/ordnance/danish/1943.txt b/vasl_templates/webapp/tests/fixtures/vo-reports/ordnance/danish/1943.txt new file mode 100644 index 0000000..b96f71f --- /dev/null +++ b/vasl_templates/webapp/tests/fixtures/vo-reports/ordnance/danish/1943.txt @@ -0,0 +1,5 @@ +=== ordnance/danish/1943 === + +Name Capabilities (effective) # Notes +----------------------- --------------------- --------------------- --- ----------------- +Machinecannon 20mm M-35 NT QSU†[1] R2 IFE=B10 NT QSU†[1] R2 IFE=B10 19† De T†1 diff --git a/vasl_templates/webapp/tests/fixtures/vo-reports/ordnance/danish/1944.txt b/vasl_templates/webapp/tests/fixtures/vo-reports/ordnance/danish/1944.txt new file mode 100644 index 0000000..e92add0 --- /dev/null +++ b/vasl_templates/webapp/tests/fixtures/vo-reports/ordnance/danish/1944.txt @@ -0,0 +1,5 @@ +=== ordnance/danish/1944 === + +Name Capabilities (effective) # Notes +----------------------- --------------------- --------------------- --- ----------------- +Machinecannon 20mm M-35 NT QSU†[1] R2 IFE=B10 NT QSU†[1] R2 IFE=B10 19† De T†1 diff --git a/vasl_templates/webapp/tests/fixtures/vo-reports/ordnance/danish/1945.txt b/vasl_templates/webapp/tests/fixtures/vo-reports/ordnance/danish/1945.txt new file mode 100644 index 0000000..6b8b1f5 --- /dev/null +++ b/vasl_templates/webapp/tests/fixtures/vo-reports/ordnance/danish/1945.txt @@ -0,0 +1,5 @@ +=== ordnance/danish/1945 === + +Name Capabilities (effective) # Notes +----------------------- --------------------- --------------------- --- ----------------- +Machinecannon 20mm M-35 NT QSU†[1] R2 IFE=B10 NT QSU†[1] R2 IFE=B10 19† De T†1 diff --git a/vasl_templates/webapp/tests/fixtures/vo-reports/vehicles/danish/1940.txt b/vasl_templates/webapp/tests/fixtures/vo-reports/vehicles/danish/1940.txt new file mode 100644 index 0000000..a4b3794 --- /dev/null +++ b/vasl_templates/webapp/tests/fixtures/vo-reports/vehicles/danish/1940.txt @@ -0,0 +1,5 @@ +=== vehicles/danish/1940 === + +Name Radio IF Crew survival Capabilities (effective) # Notes +------ ------- ---- --------------- -------------- ------------- --- ------- +Nimbus n/a yes † M8† M8† 24† n/a diff --git a/vasl_templates/webapp/tests/fixtures/vo-reports/vehicles/danish/1941.txt b/vasl_templates/webapp/tests/fixtures/vo-reports/vehicles/danish/1941.txt new file mode 100644 index 0000000..28ba143 --- /dev/null +++ b/vasl_templates/webapp/tests/fixtures/vo-reports/vehicles/danish/1941.txt @@ -0,0 +1,5 @@ +=== vehicles/danish/1941 === + +Name Radio IF Crew survival Capabilities (effective) # Notes +------ ------- ---- --------------- -------------- ------------- --- ------- +Nimbus n/a yes † M8† M8† 24† n/a diff --git a/vasl_templates/webapp/tests/fixtures/vo-reports/vehicles/danish/1942.txt b/vasl_templates/webapp/tests/fixtures/vo-reports/vehicles/danish/1942.txt new file mode 100644 index 0000000..eca5bc2 --- /dev/null +++ b/vasl_templates/webapp/tests/fixtures/vo-reports/vehicles/danish/1942.txt @@ -0,0 +1,5 @@ +=== vehicles/danish/1942 === + +Name Radio IF Crew survival Capabilities (effective) # Notes +------ ------- ---- --------------- -------------- ------------- --- ------- +Nimbus n/a yes † M8† M8† 24† n/a diff --git a/vasl_templates/webapp/tests/fixtures/vo-reports/vehicles/danish/1943.txt b/vasl_templates/webapp/tests/fixtures/vo-reports/vehicles/danish/1943.txt new file mode 100644 index 0000000..57ac211 --- /dev/null +++ b/vasl_templates/webapp/tests/fixtures/vo-reports/vehicles/danish/1943.txt @@ -0,0 +1,5 @@ +=== vehicles/danish/1943 === + +Name Radio IF Crew survival Capabilities (effective) # Notes +------ ------- ---- --------------- -------------- ------------- --- ------- +Nimbus n/a yes † M8† M8† 24† n/a diff --git a/vasl_templates/webapp/tests/fixtures/vo-reports/vehicles/danish/1944.txt b/vasl_templates/webapp/tests/fixtures/vo-reports/vehicles/danish/1944.txt new file mode 100644 index 0000000..8e1aacc --- /dev/null +++ b/vasl_templates/webapp/tests/fixtures/vo-reports/vehicles/danish/1944.txt @@ -0,0 +1,5 @@ +=== vehicles/danish/1944 === + +Name Radio IF Crew survival Capabilities (effective) # Notes +------ ------- ---- --------------- -------------- ------------- --- ------- +Nimbus n/a yes † M8† M8† 24† n/a diff --git a/vasl_templates/webapp/tests/fixtures/vo-reports/vehicles/danish/1945.txt b/vasl_templates/webapp/tests/fixtures/vo-reports/vehicles/danish/1945.txt new file mode 100644 index 0000000..2384e14 --- /dev/null +++ b/vasl_templates/webapp/tests/fixtures/vo-reports/vehicles/danish/1945.txt @@ -0,0 +1,5 @@ +=== vehicles/danish/1945 === + +Name Radio IF Crew survival Capabilities (effective) # Notes +------ ------- ---- --------------- -------------- ------------- --- ------- +Nimbus n/a yes † M8† M8† 24† n/a diff --git a/vasl_templates/webapp/tests/test_vo_reports.py b/vasl_templates/webapp/tests/test_vo_reports.py index c9e4db6..0e663d8 100644 --- a/vasl_templates/webapp/tests/test_vo_reports.py +++ b/vasl_templates/webapp/tests/test_vo_reports.py @@ -38,7 +38,7 @@ def test_vo_reports( webapp, webdriver ): # check each vehicle/ordnance report nationalities = [ "german", "russian", "american", "british", "italian", "japanese", "chinese", "french", - "polish", "belgian","yugoslavian" + "polish", "belgian","yugoslavian","danish" ] for nat in nationalities: for vo_type in ["vehicles","ordnance"]: