Commit eb354604 authored by Sven Franck's avatar Sven Franck

moved listbox caption generation to inside gadget generator

parent 4379be2d
...@@ -15,7 +15,12 @@ ...@@ -15,7 +15,12 @@
"link": true, "link": true,
"link_identifier": "_id", "link_identifier": "_id",
"editable": null, "editable": null,
"sortable": true "sortable": true,
"caption": {
"slot": 1,
"text": "Created Servers",
"text_i18n": "portal_type_dict.computer_dict.text_dict.created_servers"
}
}, },
"scheme": [ "scheme": [
{ {
...@@ -56,11 +61,6 @@ ...@@ -56,11 +61,6 @@
"data-icon": "edit" "data-icon": "edit"
}, },
"logic": {"text":"Add server"} "logic": {"text":"Add server"}
}, {
"generate": "widget",
"type": "controlbar",
"property_dict": {"slot": 1},
"children": [{"type": "p", "direct": {"className": "ui-table-caption translate"},"attributes": {"data-i18n":"portal_type_dict.computer_dict.text_dict.created_servers"},"logic": {"text":"Created Servers"}}]
}, { }, {
"generate": "widget", "generate": "widget",
"type": "controlbar", "type": "controlbar",
......
...@@ -16,7 +16,12 @@ ...@@ -16,7 +16,12 @@
"wrap_gadget": 2, "wrap_gadget": 2,
"sortable": true, "sortable": true,
"mergeable": true, "mergeable": true,
"action_menu": true "action_menu": true,
"caption": {
"slot": 1,
"text": "Invoice Overview",
"text_i18n": "portal_type_dict.invoice_dict.text_dict.overview"
}
}, },
"scheme": [ "scheme": [
{ {
...@@ -40,13 +45,7 @@ ...@@ -40,13 +45,7 @@
] ]
} }
], ],
"children": [ "children": [{
{
"generate": "widget",
"type": "controlbar",
"property_dict": {"slot": 1},
"children": [{"type": "p", "direct": {"className": "ui-table-caption translate"},"attributes": {"data-i18n":"portal_type_dict.invoice_dict.text_dict.overview"},"logic": {"text":"Invoice Overview"}}]
}, {
"generate": "widget", "generate": "widget",
"type": "controlbar", "type": "controlbar",
"property_dict": {"slot": 2}, "property_dict": {"slot": 2},
......
...@@ -12,12 +12,17 @@ ...@@ -12,12 +12,17 @@
"message_i18n":"portal_type_dict.network_dict.text_dict.nodata" "message_i18n":"portal_type_dict.network_dict.text_dict.nodata"
}, },
"initial_query_url_identifier": "group", "initial_query_url_identifier": "group",
"dynamic_children": [0], "dynamic_children": [1],
"requires_authentication": true, "requires_authentication": true,
"depends_on": "login_state", "depends_on": "login_state",
"wrap_gadget": 2, "wrap_gadget": 2,
"link": true, "link": true,
"link_identifier": "id" "link_identifier": "id",
"caption": {
"slot": 1,
"text": "Associated Servers",
"text_i18n": "portal_type_dict.network_dict.text_dict.associated_servers"
}
}, },
"scheme": [ "scheme": [
{ {
......
...@@ -16,7 +16,12 @@ ...@@ -16,7 +16,12 @@
"depends_on": "login_state", "depends_on": "login_state",
"wrap_gadget": 2, "wrap_gadget": 2,
"link": true, "link": true,
"link_identifier": "_id" "link_identifier": "_id",
"caption": {
"slot": 1,
"text": "Created Networks",
"text_i18n": "portal_type_dict.network_dict.text_dict.created_networks"
}
}, },
"scheme": [ "scheme": [
{ {
...@@ -41,11 +46,6 @@ ...@@ -41,11 +46,6 @@
"data-icon": "edit" "data-icon": "edit"
}, },
"logic": {"text":"Add network"} "logic": {"text":"Add network"}
}, {
"generate": "widget",
"type": "controlbar",
"property_dict": {"slot": 1},
"children": [{"type": "p", "direct": {"className": "ui-table-caption translate"},"attributes": {"data-i18n":"portal_type_dict.network_dict.text_dict.created_networks"},"logic": {"text":"Created Networks"}}]
}, { }, {
"generate": "widget", "generate": "widget",
"type": "controlbar", "type": "controlbar",
......
...@@ -11,7 +11,12 @@ ...@@ -11,7 +11,12 @@
"dynamic_children": [2], "dynamic_children": [2],
"wrap_gadget": 2, "wrap_gadget": 2,
"link": true, "link": true,
"link_identifier": "_id" "link_identifier": "_id",
"caption": {
"slot": 1,
"text": "Available Releases",
"text_i18n": "portal_type_dict.release_dict.text_dict.available_releases"
}
}, },
"scheme": [ "scheme": [
{ {
......
...@@ -8,7 +8,12 @@ ...@@ -8,7 +8,12 @@
"property_dict": { "property_dict": {
"initial_query_url_identifier": "_id", "initial_query_url_identifier": "_id",
"dynamic_children": [1], "dynamic_children": [1],
"wrap_gadget": 2 "wrap_gadget": 2,
"caption": {
"slot": 1,
"text": "Connection parameters",
"text_i18n": "portal_type_dict.service_dict.text_dict.connection_param"
}
}, },
"scheme": [ "scheme": [
{ {
...@@ -29,11 +34,6 @@ ...@@ -29,11 +34,6 @@
} }
], ],
"children": [{ "children": [{
"generate": "widget",
"type": "controlbar",
"property_dict": {"slot": 1},
"children": [{"type": "p", "direct": {"className": "ui-table-caption translate"},"attributes": {"data-i18n":"portal_type_dict.service_dict.text_dict.connection_param"},"logic": {"text":"Connection parameters"}}]
}, {
"generate": "widget", "generate": "widget",
"type": "table", "type": "table",
"class_list": "table-stroke ui-responsive", "class_list": "table-stroke ui-responsive",
......
...@@ -11,7 +11,12 @@ ...@@ -11,7 +11,12 @@
"dynamic_children": [4], "dynamic_children": [4],
"wrap_gadget": 2, "wrap_gadget": 2,
"link": true, "link": true,
"link_identifier": "_id" "link_identifier": "_id",
"caption": {
"slot": 1,
"text": "Installed Services",
"text_i18n": "portal_type_dict.service_dict.text_dict.installed_services"
}
}, },
"scheme": [ "scheme": [
{ {
...@@ -41,11 +46,6 @@ ...@@ -41,11 +46,6 @@
"data-icon": "edit" "data-icon": "edit"
}, },
"logic": {"text":"Install new service"} "logic": {"text":"Install new service"}
},{
"generate": "widget",
"type": "controlbar",
"property_dict": {"slot": 1},
"children": [{"type": "p", "direct": {"className": "ui-table-caption translate"},"attributes": {"data-i18n":"portal_type_dict.service_dict.text_dict.installed_services"},"logic": {"text":"Installed Services"}}]
}, { }, {
"generate": "widget", "generate": "widget",
"type": "controlbar", "type": "controlbar",
......
...@@ -9,7 +9,12 @@ ...@@ -9,7 +9,12 @@
"initial_query_url_identifier": "_id", "initial_query_url_identifier": "_id",
"dynamic_children": [1], "dynamic_children": [1],
"wrap_gadget": 2, "wrap_gadget": 2,
"submit_to": "#services" "submit_to": "#services",
"caption": {
"slot": 1,
"text": "Installations",
"text_i18n": "portal_type_dict.service_dict.text_dict.installations"
}
}, },
"scheme": [ "scheme": [
{ {
...@@ -32,11 +37,6 @@ ...@@ -32,11 +37,6 @@
} }
], ],
"children": [{ "children": [{
"generate": "widget",
"type": "controlbar",
"property_dict": {"slot": 1},
"children": [{"type": "p", "direct": {"className": "ui-table-caption translate"},"attributes": {"data-i18n":"portal_type_dict.service_dict.text_dict.installations"},"logic": {"text":"Installations"}}]
}, {
"generate": "widget", "generate": "widget",
"type": "table", "type": "table",
"class_list": "table-stroke ui-responsive", "class_list": "table-stroke ui-responsive",
......
...@@ -23,7 +23,12 @@ ...@@ -23,7 +23,12 @@
"dynamic_children": [0], "dynamic_children": [0],
"wrap_gadget": 2, "wrap_gadget": 2,
"linkable": true, "linkable": true,
"link_identifier": "id" "link_identifier": "id",
"caption": {
"slot": 1,
"text": "Installed Services",
"text_i18n":"portal_type_dict.software_dict.text_dict.no_software"
}
}, },
"scheme":[ "scheme":[
{ {
......
...@@ -1406,6 +1406,21 @@ ...@@ -1406,6 +1406,21 @@
} }
} }
// add caption
if (spec.property_dict.caption) {
spec.children.push({
"generate":"widget",
"type": "controlbar",
"property_dict": {"slot": spec.property_dict.caption.slot || 1},
"children": [{
"type": "p",
"direct": {"className": "ui-table-caption translate"},
"attributes": {"data-i18n": spec.property_dict.caption.text_i18n || null},
"logic": {"text": spec.property_dict.caption.text}
}]
})
}
// loop over dynamic data and generate table // loop over dynamic data and generate table
for (i = 0; i < spec.children.length; i += 1) { for (i = 0; i < spec.children.length; i += 1) {
element = spec.children[i]; element = spec.children[i];
......
...@@ -96,7 +96,8 @@ ...@@ -96,7 +96,8 @@
"delete": "Delete", "delete": "Delete",
"submit": "Submit", "submit": "Submit",
"cancel": "Cancel", "cancel": "Cancel",
"nodata": "No servers associated with this network." "nodata": "No servers associated with this network.",
"associated_servers": "Associated Servers"
}, },
"field_dict": { "field_dict": {
"title": { "title": {
...@@ -229,7 +230,8 @@ ...@@ -229,7 +230,8 @@
"ssl_off": "Revoke SSL", "ssl_off": "Revoke SSL",
"delete": "Delete", "delete": "Delete",
"server_instance": "Server Instance", "server_instance": "Server Instance",
"instance_configuration": "Instance Configuration" "instance_configuration": "Instance Configuration",
"installed_services": "Installed Services"
}, },
"field_dict": { "field_dict": {
"network": { "network": {
...@@ -763,7 +765,8 @@ ...@@ -763,7 +765,8 @@
"16": "16", "16": "16",
"32": "32", "32": "32",
"64": "64", "64": "64",
"128": "128" "128": "128",
"no_software": "No services installed"
}, },
"field_dict": { "field_dict": {
"id": { "id": {
...@@ -817,7 +820,8 @@ ...@@ -817,7 +820,8 @@
"16": "16", "16": "16",
"32": "32", "32": "32",
"64": "64", "64": "64",
"search": "Search available releases" "search": "Search available releases",
"available_releases": "Available Releases"
}, },
"field_dict": { "field_dict": {
"title": { "title": {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment