admin display improvements
This commit is contained in:
@@ -3170,8 +3170,8 @@ display:
|
|||||||
click_sort_column: value
|
click_sort_column: value
|
||||||
type: timestamp
|
type: timestamp
|
||||||
settings:
|
settings:
|
||||||
date_format: html_date
|
date_format: custom
|
||||||
custom_date_format: ''
|
custom_date_format: y-m-d
|
||||||
timezone: ''
|
timezone: ''
|
||||||
tooltip:
|
tooltip:
|
||||||
date_format: ''
|
date_format: ''
|
||||||
@@ -3182,6 +3182,7 @@ display:
|
|||||||
past_format: '@interval ago'
|
past_format: '@interval ago'
|
||||||
granularity: 2
|
granularity: 2
|
||||||
refresh: 60
|
refresh: 60
|
||||||
|
description: ''
|
||||||
group_column: value
|
group_column: value
|
||||||
group_columns: { }
|
group_columns: { }
|
||||||
group_rows: true
|
group_rows: true
|
||||||
@@ -3246,8 +3247,8 @@ display:
|
|||||||
click_sort_column: value
|
click_sort_column: value
|
||||||
type: timestamp
|
type: timestamp
|
||||||
settings:
|
settings:
|
||||||
date_format: html_date
|
date_format: custom
|
||||||
custom_date_format: ''
|
custom_date_format: y-m-d
|
||||||
timezone: ''
|
timezone: ''
|
||||||
tooltip:
|
tooltip:
|
||||||
date_format: ''
|
date_format: ''
|
||||||
@@ -3258,6 +3259,7 @@ display:
|
|||||||
past_format: '@interval ago'
|
past_format: '@interval ago'
|
||||||
granularity: 2
|
granularity: 2
|
||||||
refresh: 60
|
refresh: 60
|
||||||
|
description: ''
|
||||||
group_column: value
|
group_column: value
|
||||||
group_columns: { }
|
group_columns: { }
|
||||||
group_rows: true
|
group_rows: true
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
/**
|
||||||
|
* Admin views tables: compact paddings + width constraint.
|
||||||
|
*
|
||||||
|
* Transposed from the retired matminimal theme, adapted for Gin.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* General: compact paddings on all admin views tables. */
|
||||||
|
.views-table th,
|
||||||
|
.views-table td {
|
||||||
|
padding: 0.3rem 0.45rem;
|
||||||
|
}
|
||||||
|
.views-table td {
|
||||||
|
vertical-align: top;
|
||||||
|
overflow-wrap: anywhere;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Hard constraint for the materials admin view: fixed layout forces the
|
||||||
|
table to fit 100% of the available width, whatever the content.
|
||||||
|
Column widths must sum to 100%. */
|
||||||
|
.view-id-admin_nodes .views-table {
|
||||||
|
table-layout: fixed;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.view-id-admin_nodes .views-table th.views-field-views-bulk-operations-bulk-form { width: 2.5%; }
|
||||||
|
.view-id-admin_nodes .views-table th.views-field-title { width: 8%; }
|
||||||
|
.view-id-admin_nodes .views-table th.views-field-field-thesaurus { width: 9%; }
|
||||||
|
.view-id-admin_nodes .views-table th.views-field-field-tags { width: 9%; }
|
||||||
|
.view-id-admin_nodes .views-table th.views-field-field-manufacturer { width: 7%; }
|
||||||
|
.view-id-admin_nodes .views-table th.views-field-field-linked-materials { width: 8%; }
|
||||||
|
.view-id-admin_nodes .views-table th.views-field-field-linked-articles { width: 8%; }
|
||||||
|
.view-id-admin_nodes .views-table th.views-field-field-samples { width: 6%; }
|
||||||
|
.view-id-admin_nodes .views-table th.views-field-field-attachments { width: 6%; }
|
||||||
|
.view-id-admin_nodes .views-table th.views-field-field-workflow { width: 6%; }
|
||||||
|
.view-id-admin_nodes .views-table th.views-field-field-memo { width: 16%; }
|
||||||
|
.view-id-admin_nodes .views-table th.views-field-changed { width: 6%; }
|
||||||
|
.view-id-admin_nodes .views-table th.views-field-created { width: 6%; }
|
||||||
|
.view-id-admin_nodes .views-table th.views-field-field-index { width: 2.5%; }
|
||||||
@@ -3,3 +3,9 @@ term_reference_tree:
|
|||||||
css:
|
css:
|
||||||
theme:
|
theme:
|
||||||
css/term-reference-tree.css: {}
|
css/term-reference-tree.css: {}
|
||||||
|
|
||||||
|
admin_tables:
|
||||||
|
version: 1.0
|
||||||
|
css:
|
||||||
|
theme:
|
||||||
|
css/admin-tables.css: {}
|
||||||
|
|||||||
@@ -23,3 +23,15 @@ function materio_admin_field_widget_single_element_form_alter(array &$element, \
|
|||||||
$element['#attached']['library'][] = 'materio_admin/term_reference_tree';
|
$element['#attached']['library'][] = 'materio_admin/term_reference_tree';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implements hook_page_attachments().
|
||||||
|
*
|
||||||
|
* Loads the general admin table styling on every admin route (compact
|
||||||
|
* paddings + constrained widths, replacing the old matminimal rules).
|
||||||
|
*/
|
||||||
|
function materio_admin_page_attachments(array &$attachments) {
|
||||||
|
if (\Drupal::service('router.admin_context')->isAdminRoute()) {
|
||||||
|
$attachments['#attached']['library'][] = 'materio_admin/admin_tables';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user