Commit 3d59b19a authored by Carsten Brandt's avatar Carsten Brandt

added classes to grid, list and detail view

to allow specific styling
also fixed an issue with gridview sort indicator css.

fixes #1000
parent d84aac09
...@@ -60,6 +60,10 @@ a.desc:after { ...@@ -60,6 +60,10 @@ a.desc:after {
content: "\e156"; content: "\e156";
} }
.grid-view th {
white-space: nowrap;
}
.hint-block { .hint-block {
display: block; display: block;
margin-top: 5px; margin-top: 5px;
......
...@@ -60,6 +60,10 @@ a.desc:after { ...@@ -60,6 +60,10 @@ a.desc:after {
content: "\e156"; content: "\e156";
} }
.grid-view th {
white-space: nowrap;
}
.hint-block { .hint-block {
display: block; display: block;
margin-top: 5px; margin-top: 5px;
......
...@@ -60,6 +60,10 @@ a.desc:after { ...@@ -60,6 +60,10 @@ a.desc:after {
content: "\e156"; content: "\e156";
} }
.grid-view th {
white-space: nowrap;
}
.hint-block { .hint-block {
display: block; display: block;
margin-top: 5px; margin-top: 5px;
......
...@@ -48,6 +48,11 @@ class GridView extends BaseListView ...@@ -48,6 +48,11 @@ class GridView extends BaseListView
* @var array the HTML attributes for the grid table element * @var array the HTML attributes for the grid table element
*/ */
public $tableOptions = ['class' => 'table table-striped table-bordered']; public $tableOptions = ['class' => 'table table-striped table-bordered'];
/**
* @var array the HTML attributes for the container tag of the grid view.
* The "tag" element specifies the tag name of the container element and defaults to "div".
*/
public $options = ['class' => 'grid-view'];
/** /**
* @var array the HTML attributes for the table header row * @var array the HTML attributes for the table header row
*/ */
......
...@@ -90,7 +90,7 @@ class DetailView extends Widget ...@@ -90,7 +90,7 @@ class DetailView extends Widget
* @var array the HTML attributes for the container tag of this widget. The "tag" option specifies * @var array the HTML attributes for the container tag of this widget. The "tag" option specifies
* what container tag should be used. It defaults to "table" if not set. * what container tag should be used. It defaults to "table" if not set.
*/ */
public $options = ['class' => 'table table-striped table-bordered']; public $options = ['class' => 'table table-striped table-bordered detail-view'];
/** /**
* @var array|Formatter the formatter used to format model attribute values into displayable texts. * @var array|Formatter the formatter used to format model attribute values into displayable texts.
* This can be either an instance of [[Formatter]] or an configuration array for creating the [[Formatter]] * This can be either an instance of [[Formatter]] or an configuration array for creating the [[Formatter]]
......
...@@ -52,6 +52,11 @@ class ListView extends BaseListView ...@@ -52,6 +52,11 @@ class ListView extends BaseListView
* @var string the HTML code to be displayed between any two consecutive items. * @var string the HTML code to be displayed between any two consecutive items.
*/ */
public $separator = "\n"; public $separator = "\n";
/**
* @var array the HTML attributes for the container tag of the list view.
* The "tag" element specifies the tag name of the container element and defaults to "div".
*/
public $options = ['class' => 'list-view'];
/** /**
......
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