From 5c085098b2a51c1cfbc6c63da4d5fbccaea65d15 Mon Sep 17 00:00:00 2001 From: KoKsPfLaNzE Date: Sun, 1 Nov 2015 17:36:31 +0100 Subject: [PATCH] added table-responsive in bootstrapTable/layout, for big tables on mobile views --- .../renderer/bootstrapTable/layout.phtml | 230 +++++++++--------- 1 file changed, 116 insertions(+), 114 deletions(-) diff --git a/view/zfc-datagrid/renderer/bootstrapTable/layout.phtml b/view/zfc-datagrid/renderer/bootstrapTable/layout.phtml index 6c81fc49..930dd2eb 100644 --- a/view/zfc-datagrid/renderer/bootstrapTable/layout.phtml +++ b/view/zfc-datagrid/renderer/bootstrapTable/layout.phtml @@ -48,137 +48,139 @@ if($this->rowClickAction !== null){ partial($this->templateToolbar);?> - - - - '; - } - - foreach($this->columns as $col){ - /* @var $col \ZfcDatagrid\Column\AbstractColumn */ - $classes = array(); - $styles = array(); - - $id = $col->getUniqueId(); - - $label = ''; - if($col->getLabel() != ''){ - $label = $this->translate($col->getLabel()); - } - - $width = $col->getWidth(); - if($width != ''){ - $styles[] = 'width: '.$this->escapehtmlattr($width).'%'; - } - - - if($col->isHidden() === true){ - $classes[] = 'hidden'; - } - if($col->getType() instanceof Type\Number){ - $styles[] = 'text-align: right'; - } - ?> - - - - - - isUserFilterEnabled === true):?> +
+
- - isUserSortEnabled() === true): - if($col->isSortActive() === true && $col->getSortActiveDirection() === 'ASC'){ - $direction = 'DESC'; - } else{ - $direction = 'ASC'; - } - ?> - - escapeHtml($label); ?> - - - escapeHtml($label); ?> - - - isSortActive() === true){ - if($col->getSortActiveDirection() === 'ASC'):?> - - - - -
+ '; + echo ''; } + foreach($this->columns as $col){ /* @var $col \ZfcDatagrid\Column\AbstractColumn */ - $classes = array(); + $styles = array(); + + $id = $col->getUniqueId(); + + $label = ''; + if($col->getLabel() != ''){ + $label = $this->translate($col->getLabel()); + } + + $width = $col->getWidth(); + if($width != ''){ + $styles[] = 'width: '.$this->escapehtmlattr($width).'%'; + } + + if($col->isHidden() === true){ $classes[] = 'hidden'; } - - $htmlFilter = ''; - if ($col->isUserFilterEnabled() === true) { - - if ($col->hasFilterSelectOptions() === true) { - $htmlFilter = ' + ?> + - - - - - - data as $row): ?> - bootstrapTableRow($row, $this->columns, $this->rowClickAction, $this->rowStyles, $hasMassActions); ?> - - -
+ + isUserSortEnabled() === true): + if($col->isSortActive() === true && $col->getSortActiveDirection() === 'ASC'){ + $direction = 'DESC'; + } else{ + $direction = 'ASC'; } - $htmlFilter .= ''; + ?> + + escapeHtml($label); ?> + + + escapeHtml($label); ?> + - } else if ($col->getType() instanceof \ZfcDatagrid\Column\Type\DateTime){ - $htmlFilter = ''; - } else { - $htmlFilter = ''; + isSortActive() === true){ + if($col->getSortActiveDirection() === 'ASC'):?> + + + + - - -
+ + + isUserFilterEnabled === true):?> + + '; + } + foreach($this->columns as $col){ + /* @var $col \ZfcDatagrid\Column\AbstractColumn */ + + $classes = array(); + if($col->isHidden() === true){ + $classes[] = 'hidden'; + } + + $htmlFilter = ''; + if ($col->isUserFilterEnabled() === true) { + + if ($col->hasFilterSelectOptions() === true) { + $htmlFilter = ''; + + } else if ($col->getType() instanceof \ZfcDatagrid\Column\Type\DateTime){ + $htmlFilter = ''; + } else { + $htmlFilter = ''; + } + } + ?> + + + + + + + + + + + data as $row): ?> + bootstrapTableRow($row, $this->columns, $this->rowClickAction, $this->rowStyles, $hasMassActions); ?> + + + + partial('zfc-datagrid/renderer/bootstrapTable/footer'); ?>