Commit 27a7020c authored by Sven Franck's avatar Sven Franck

refactor "no records found/no auth" handler, set in property_dict

parent f61fd7f4
......@@ -20,28 +20,20 @@
"text_i18n":"validation_dict.requires_auth",
"children": [
{
"generate": "widget",
"type": "controlgroup",
"property_dict": {"direction": "horizontal"},
"children": [{
"type": "a",
"direct":{"className":"translate action", "href":"#global-popup"},
"attributes":{
"data-i18n":"global_dict.common_dict.login",
"data-action":"login",
"data-icon":"lock",
"data-rel": "popup"
},
"logic": {"text":"Login"}
}, {
"type": "a",
"direct": {"className":"translate ui-btn-slapos-black", "href": "#person::new"},
"attributes": {
"data-i18n": "global_dict.common_dict.register",
"data-icon": "edit"
},
"logic": {"text":"Register"}
}]
"href": "#global-popup",
"class_list": "translate action",
"action": "login",
"rel": "popup",
"text": "Login",
"text_i18n": "global_dict.common_dict.login",
"icon": "lock"
},
{
"href":"#person::new",
"class_list": "translate ui-btn-slapos-black",
"text":"Register",
"text_i18n": "global_dict.common_dict.register",
"icon": "edit"
}
]
}
......
......@@ -152,6 +152,12 @@ html table.ui-table thead th, html table.ui-table thead td {
padding: 0;
}
/* no items */
.ui-table tr td.ui-no-result {
text-align: center;
font-weight: bold;
}
/* table caption (will be inside a controlbar but belongs here) */
html .ui-table-caption {
padding: 0.25em 0;
......@@ -230,13 +236,18 @@ html table.ui-table tr td .ui-controlgroup {
margin: 0;
text-align: center;
}
html table.ui-table tr td.ui-no-result .ui-controlgroup {
margin: 1em 0;
}
html table.ui-table tr td .ui-controlgroup .ui-controlgroup-controls {
width: auto;
}
/* why? a button should be a button
html table.ui-table tr td a.ui-btn {
border: 0 none;
background: transparent;
}
*/
html table.ui-table tr td a.ui-btn:after {
margin-top: -10px;
}
......@@ -276,8 +287,10 @@ html table tbody th .ui-checkbox .ui-btn,
html table tbody th .ui-checkbox .ui-btn:hover,
html table tbody th .ui-radio .ui-btn,
html table tbody th .ui-radio .ui-btn:hover,
/* why? white is white and black is black...
html table tbody td .ui-controlgroup-controls .ui-btn,
html table tbody td .ui-controlgroup-controls .ui-btn:hover {
html table tbody td .ui-controlgroup-controls .ui-btn:hover */
{
background-color: transparent;
background-image: none;
}
......
......@@ -731,8 +731,8 @@ html body div.ui-slider-track.ui-body-slapos-black .ui-btn-active,
html .ui-page-theme-slapos-black .ui-table-wrapper .ui-btn:active,
html .ui-page-theme-slapos-black .ui-table-wrapper .ui.btn.ui-btn-active,
/* Table rows on hover */
html table.ui-table tbody tr:hover td,
html table.ui-table tbody tr:hover th,
html table.ui-table tbody tr:hover td:not(.ui-no-result),
html table.ui-table tbody tr:hover th:not(.ui-no-result),
/* Controlbar */
html .ui-page-theme-slapos-black .ui-controlbar .ui-btn:active,
html .ui-page-theme-slapos-black .ui-controlbar .ui-btn.ui-btn-active,
......
......@@ -77,37 +77,5 @@
}
]
}
],
"placeholder_dict": {
"no_items": {
"text":"No items found.",
"text_i18n":"validation_dict.no_items_found",
"children": [{
"generate": "widget",
"type": "controlgroup",
"property_dict": {"direction": "horizontal"},
"children": [
{
"type": "a",
"direct": {
"href":"#",
"className": "translate "
},
"attributes": {
"data-icon":"chevron-sign-left",
"data-i18n":"global_dict.pagination_dict.back"
},
"logic": {"Text": "Back"}
}, {
"type": "a",
"direct": {"className":"translate ui-btn-slapos-black", "href": "#person::new"},
"attributes": {
"data-i18n": "page_dict.person.create",
"data-icon": "edit"
},
"logic": {"text":"Create person"}
}]
}]
}
}
]
}
......@@ -6,6 +6,10 @@
"form": true,
"id": "invoice_overview",
"property_dict": {
"no_items": {
"message":"No invoices found",
"message_i18n":"page_dict.invoices.nodata"
},
"dynamic_children": [3],
"requires_authentication": true,
"wrap_gadget": 2,
......
......@@ -6,6 +6,10 @@
"form": true,
"id": "computer_overview",
"property_dict": {
"no_items": {
"message":"No servers associated with this network.",
"message_i18n":"page_dict.networks.nodata"
},
"initial_query_url_identifier": "group",
"dynamic_children": [0],
"requires_authentication": true,
......@@ -45,13 +49,6 @@
"bottom_grid": 1
},
"children": []
}],
"placeholder_dict": {
"no_items": {
"text":"No servers associated with this network.",
"text_i18n":"page_dict.networks.no_servers",
"children": []
}
}
}]
}
......@@ -6,6 +6,10 @@
"form": true,
"id": "network_overview",
"property_dict": {
"no_items": {
"message": "No networks found.",
"message_i18n": "page_dict.networks.nonet"
},
"dynamic_children": [4],
"requires_authentication": true,
"depends_on": "login_state",
......@@ -83,38 +87,6 @@
"bottom_grid": 1
},
"children": []
}],
"placeholder_dict": {
"no_items": {
"text":"No items found.",
"text_i18n":"validation_dict.no_items_found",
"children": [{
"generate": "widget",
"type": "controlgroup",
"property_dict": {"direction": "horizontal"},
"children": [
{
"type": "a",
"direct": {
"href":"#",
"className": "translate "
},
"attributes": {
"data-icon":"chevron-sign-left",
"data-i18n":"global_dict.pagination_dict.back"
},
"logic": {"Text": "Back"}
}, {
"type": "a",
"direct": {"className":"translate ui-btn-slapos-black", "href": "#networks::new"},
"attributes": {
"data-i18n": "page_dict.network.add",
"data-icon": "edit"
},
"logic": {"text":"Add new network"}
}]
}]
}
}
}]
}
......@@ -6,6 +6,19 @@
"form": true,
"id": "user_sample",
"property_dict": {
"no_items": {
"message": "No person found",
"message_i18n": "page_dict.person.nodata",
"children": [
{
"href": "#person::new",
"text": "Create person",
"text_i18n": "page_dict.person.create",
"class_list": "translate ui-btn-slapos-black",
"icon": "edit"
}
]
},
"dynamic_children": [0],
"requires_authentication": true,
"depends_on": "login_state",
......@@ -75,37 +88,5 @@
}
]
}
],
"placeholder_dict": {
"no_items": {
"text":"No items found.",
"text_i18n":"validation_dict.no_items_found",
"children": [{
"generate": "widget",
"type": "controlgroup",
"property_dict": {"direction": "horizontal"},
"children": [
{
"type": "a",
"direct": {
"href":"#",
"className": "translate "
},
"attributes": {
"data-icon":"chevron-sign-left",
"data-i18n":"global_dict.pagination_dict.back"
},
"logic": {"Text": "Back"}
}, {
"type": "a",
"direct": {"className":"translate ui-btn-slapos-black", "href": "#person::new"},
"attributes": {
"data-i18n": "page_dict.person.create",
"data-icon": "edit"
},
"logic": {"text":"Create person"}
}]
}]
}
}
]
}
......@@ -6,6 +6,18 @@
"form": true,
"id": "service_overview",
"property_dict": {
"no_items": {
"message":"No Software installed.",
"message_i18n":"page_dict.servers.no_software",
"children": [
{
"href": "#software::new",
"text": "Add Software",
"text_i18n": "page_dict.servers.add_software",
"class_list": "translate ui-btn-slapos-black"
}
]
},
"initial_query_url_identifier": "reference_computer",
"dynamic_children": [0],
"wrap_gadget": 2,
......@@ -53,27 +65,6 @@
{"type": "a", "direct": {"href": "#software::add", "className": "ui-btn-slapos-black"}, "attributes": {"data-i18n":"page_dict.servers.add_software"}, "logic": {"text":"Install Software"}}
]
}]
}],
"placeholder_dict": {
"no_items": {
"text":"No Software installed.",
"text_i18n":"page_dict.servers.no_software",
"children": [
{
"generate": "widget",
"type": "controlgroup",
"property_dict": {"direction": "horizontal"},
"children": [{
"type": "a",
"direct": {"className":"translate ui-btn-slapos-black", "href": "#software::new"},
"attributes": {
"data-i18n": "page_dict.servers.add_software"
},
"logic": {"text":"Add Software"}
}
]
}
]
}
}
]
}
This diff is collapsed.
......@@ -85,7 +85,8 @@
"title": "Account Info",
"create": "Create Person",
"register": "Register",
"subtitle": "Registration/Invoicing Info"
"subtitle": "Registration/Invoicing Info",
"nodata": "No Person found"
},
"invoices": {
"title": "Invoices",
......@@ -93,7 +94,8 @@
"download": "Download",
"add": "Create new invoice",
"overview": "Invoice Overview",
"search": "Search Invoices"
"search": "Search Invoices",
"nodata": "No invoices found"
},
"servers": {
"no_software": "No software installed.",
......@@ -132,7 +134,8 @@
"search": "Search available services"
},
"networks": {
"no_servers": "No servers associated with this network.",
"nonet": "No networks found.",
"nodata": "No servers associated with this network.",
"title": "Networks",
"subtitle": "Network Administration",
"networks": "Created Networks",
......
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