+
+ <
+ Showing
+ {{model.data.length}}
+ rows
+ >
+
{
+ const table = $clone[0];
+ slotTable.appendChild(table);
+ this.registerColumns();
+
+ const header = this.element.querySelector('thead > tr');
+ const columns = header.querySelectorAll('th');
+ const tbody = this.element.querySelector('tbody');
+ if (tbody) {
+ const noSearch = this.$compile(`
+
+ Enter a new search |
+
+ `)($scope);
+ tbody.appendChild(noSearch[0]);
+
+ const noRows = this.$compile(`
+
+ No data |
+
+ `)($scope);
+ tbody.appendChild(noRows[0]);
+ }
+ }, null, 'table');
+ }
+
saveViewConfig() {
const userViewModel = this.$.userViewModel;
const [viewConfig] = userViewModel.data;
@@ -155,17 +184,6 @@ export default class SmartTable extends Component {
}
}
- // Creo que se puede hacer directamente desde ng-transclude
- transclude() {
- const slotTable = this.element.querySelector('#table');
- this.$transclude(($clone, $scope) => {
- const table = $clone[0];
- $scope.hasChanges = this.hasChanges;
- slotTable.appendChild(table);
- this.registerColumns();
- }, null, 'table');
- }
-
orderHandler(element) {
const field = element.getAttribute('field');
const existingCriteria = this.sortCriteria.find(criteria => {
diff --git a/front/core/components/smart-table/locale/es.yml b/front/core/components/smart-table/locale/es.yml
index a681d8be56..b5cc554ee0 100644
--- a/front/core/components/smart-table/locale/es.yml
+++ b/front/core/components/smart-table/locale/es.yml
@@ -3,4 +3,6 @@ Add new row: AƱadir nueva fila
Undo: Deshacer
Save data: Guardar datos
Shown columns: Columnas visibles
-Check the columns you want to see: Marca las columnas que quieres ver
\ No newline at end of file
+Check the columns you want to see: Marca las columnas que quieres ver
+Showing: Mostrando
+rows: filas
\ No newline at end of file
diff --git a/front/core/components/smart-table/style.scss b/front/core/components/smart-table/style.scss
index 0207ce0807..b1e93486e2 100644
--- a/front/core/components/smart-table/style.scss
+++ b/front/core/components/smart-table/style.scss
@@ -38,9 +38,14 @@ smart-table {
@extend %clickable;
}
+ .totalRows {
+ color: $color-font-secondary;
+ }
+
.actions-left,
.actions-right {
display: flex;
+ align-items: center;
.button-group {
display: flex;