diff --git a/asset/lean-console/lean-console-bw.css b/asset/lean-console/lean-console-bw.css index 2164983..62b4a4e 100644 --- a/asset/lean-console/lean-console-bw.css +++ b/asset/lean-console/lean-console-bw.css @@ -38,7 +38,7 @@ summary {cursor:pointer;} #body-footer {background: #fff;color: #333;height: 30px;line-height: 30px;font-size: 0.8rem;padding: 0 0.5rem;text-align: right;border-top:1px solid #ebedee;} /* Sidebar */ -#main-nav {background:#373737;width:240px;color:#fff;font-family:consolas, courier new, monospace;font-size:0.9rem;position:fixed;top:0;bottom:0;overflow-y:scroll;padding-bottom:2rem;border-right: 2px solid #333;} +#main-nav {background:#373737;width:240px;color:#fff;font-family:consolas, courier new, monospace;font-size:0.9rem;position:fixed;top:0;bottom:0;overflow-y:auto;padding-bottom:2rem;border-right: 2px solid #333;} #main-nav .app-title {font-size:1.3rem; text-align:center;padding:1.8rem 0} #main-nav .app-title:before {content:"🔳"; margin-right:10px} #main-nav label {color: #a4a4a4;text-transform:uppercase ; display:block;padding:0.8rem 1rem;font-size:1.15em;} diff --git a/meta/i18n/en/lean.storage.json b/meta/i18n/en/lean.storage.json index 22fc75c..11770ce 100644 --- a/meta/i18n/en/lean.storage.json +++ b/meta/i18n/en/lean.storage.json @@ -15,6 +15,7 @@ "fields": "{$count} fields", "name": "Table Name", "actions": "Actions", + "count": "Entries", "table-fields" : "Fields in table", "create": "Create table", "createAll": "Create all tables", diff --git a/view/lean-console/page/storage/database.phtml b/view/lean-console/page/storage/database.phtml index 19d6f89..6c6d95c 100644 --- a/view/lean-console/page/storage/database.phtml +++ b/view/lean-console/page/storage/database.phtml @@ -34,18 +34,19 @@
-
{% _ 'database.table.name' %}
-
{% _ 'database.table.table-fields' %}
-
{% _ 'database.table.query' %}
-
{% _ 'database.table.actions' %}
+
{% _ 'database.table.name' %}
+
{% _ 'database.table.table-fields' %}
+
{% _ 'database.table.query' %}
+
{% _ 'database.table.count' %}
+
{% _ 'database.table.actions' %}
{% ui:form.post "database.migrate", current_url() %} {% foreach array_filter($migrations->entities, fn($e) => $e->databaseAdapter() === $connection) as $entity => $item %}
-
📄 {{ $item->tableName() }}
-
{% _ "database.table.fields", [ 'count' => count( $item->fieldList() ) ] %}
-
+
📄 {{ $item->tableName() }}
+
{% _ "database.table.fields", [ 'count' => count( $item->fieldList() ) ] %}
+
{% if $context->definition[$entity]['table']->modifier->query ?? false %} {{= implode('

',(array) $context->definition[$entity]['table']->modifier->query) }}
{% else %} @@ -53,7 +54,13 @@ {% endif %}
-
+
+ {% if $context->definition[$entity]['table']->modifier->type !== ModifierTypeEnum::Create %} + {{ $entity::repository()->count() }} + {% endif %} +
+ +
{% switch $context->definition[$entity]['table']->modifier->type ?? false %} {% case ModifierTypeEnum::Create %} {% php $createAll[] = $entity %}