4 $this->
pageTitle=Yii::app()->name .
' - Tables - CGridview and HTML';
6 'Tables - CGridview and HTML',
11 array(
'id'=>1,
'firstName'=>
'Mark',
'lastName'=>
'Otto',
'language'=>
'<span class="badge badge-warning">HTML</span>',
'usage'=>
'<span class="inlinebar">1,4,4,7,5,9,10</span>'),
12 array(
'id'=>2,
'firstName'=>
'Jacob',
'lastName'=>
'Thornton',
'language'=>
'<span class="badge badge-important">CSS</span>',
'usage'=>
'<span class="inlinebar">1,4,4,7,5,9,10</span>'),
13 array(
'id'=>3,
'firstName'=>
'Stu',
'lastName'=>
'Dent',
'language'=>
'<span class="badge badge-info">Javascript</span>',
'usage'=>
'<span class="inlinebar">1,4,4,7,5,9,10</span>'),
17 <div
class=
"page-header">
18 <h1>Tables <small>CGridview and HTML</small></h1>
21 <div
class=
"row-fluid">
24 $this->beginWidget(
'zii.widgets.CPortlet', array(
25 'title'=>
"CGridview - Row hovering",
29 <?php $this->widget(
'zii.widgets.grid.CGridView', array(
31 'itemsCssClass'=>
'table table-hover',
33 'template'=>
"{items}",
35 array(
'name'=>
'id',
'header'=>
'#'),
36 array(
'name'=>
'firstName',
'header'=>
'First name'),
37 array(
'name'=>
'lastName',
'header'=>
'Last name'),
38 array(
'name'=>
'language',
'header'=>
'Language',
'type'=>
'raw'),
39 array(
'name'=>
'usage',
'header'=>
'Usage',
'type'=>
'raw'),
43 <?php $this->endWidget();?>
47 $this->beginWidget(
'zii.widgets.CPortlet', array(
48 'title'=>
"CGridview - Striped rows",
53 <?php $this->widget(
'zii.widgets.grid.CGridView', array(
55 'itemsCssClass'=>
'table table-striped',
57 'template'=>
"{items}",
59 array(
'name'=>
'id',
'header'=>
'#'),
60 array(
'name'=>
'firstName',
'header'=>
'First name'),
61 array(
'name'=>
'lastName',
'header'=>
'Last name'),
62 array(
'name'=>
'language',
'header'=>
'Language',
'type'=>
'raw'),
63 array(
'name'=>
'usage',
'header'=>
'Usage',
'type'=>
'raw'),
68 <?php $this->endWidget();?>
72 <div
class=
"row-fluid">
75 $this->beginWidget(
'zii.widgets.CPortlet', array(
76 'title'=>
"CGridview - Bordered",
81 <?php $this->widget(
'zii.widgets.grid.CGridView', array(
83 'itemsCssClass'=>
'table table-bordered',
85 'template'=>
"{items}",
87 array(
'name'=>
'id',
'header'=>
'#'),
88 array(
'name'=>
'firstName',
'header'=>
'First name'),
89 array(
'name'=>
'lastName',
'header'=>
'Last name'),
90 array(
'name'=>
'language',
'header'=>
'Language',
'type'=>
'raw'),
91 array(
'name'=>
'usage',
'header'=>
'Usage',
'type'=>
'raw'),
95 <?php $this->endWidget();?>
100 $this->beginWidget(
'zii.widgets.CPortlet', array(
101 'title'=>
"CGridview - Striped, bordered and with row hovering",
106 <?php $this->widget(
'zii.widgets.grid.CGridView', array(
108 'itemsCssClass'=>
'table table-striped table-bordered table-hover',
110 'template'=>
"{items}",
112 array(
'name'=>
'id',
'header'=>
'#'),
113 array(
'name'=>
'firstName',
'header'=>
'First name'),
114 array(
'name'=>
'lastName',
'header'=>
'Last name'),
115 array(
'name'=>
'language',
'header'=>
'Language',
'type'=>
'raw'),
116 array(
'name'=>
'usage',
'header'=>
'Usage',
'type'=>
'raw'),
120 <?php $this->endWidget();?>
125 $this->beginWidget(
'zii.widgets.CPortlet', array(
126 'title'=>
'CGridView - Striped, bordered, row hovering and condensed',
131 <?php $this->widget(
'zii.widgets.grid.CGridView', array(
133 'itemsCssClass'=>
'table table-hover table-striped table-bordered table-condensed',
135 'template'=>
"{items}",
137 array(
'name'=>
'id',
'header'=>
'#'),
138 array(
'name'=>
'firstName',
'header'=>
'First name'),
139 array(
'name'=>
'lastName',
'header'=>
'Last name'),
140 array(
'name'=>
'language',
'header'=>
'Language',
'type'=>
'raw'),
141 array(
'name'=>
'usage',
'header'=>
'Usage',
'type'=>
'raw'),
150 <div
class=
"row-fluid">
153 $this->beginWidget(
'zii.widgets.CPortlet', array(
154 'title'=>
"HTML Table - Row hovering",
158 <table
class=
"table table-hover">
159 <caption>Table Caption</caption>
168 <td>Internet Explorer</td>
176 <td>Google Chrome</td>
189 <?php $this->endWidget();?>
194 $this->beginWidget(
'zii.widgets.CPortlet', array(
195 'title'=>
"HTML Table - Striped rows",
200 <table
class=
"table table-striped">
201 <caption>Table Caption</caption>
210 <td>Internet Explorer</td>
218 <td>Google Chrome</td>
231 <?php $this->endWidget();?>
236 <div
class=
"row-fluid">
239 $this->beginWidget(
'zii.widgets.CPortlet', array(
240 'title'=>
"HTML Table - Bordered",
245 <table
class=
"table table-bordered">
246 <caption>Table Caption</caption>
255 <td>Internet Explorer</td>
263 <td>Google Chrome</td>
276 <?php $this->endWidget();?>
280 $this->beginWidget(
'zii.widgets.CPortlet', array(
281 'title'=>
"HTML Table - Striped, bordered and with row hovering",
285 <table
class=
"table table-striped table-hover table-bordered">
286 <caption>Table Caption</caption>
295 <td>Internet Explorer</td>
303 <td>Google Chrome</td>
316 <?php $this->endWidget();?>
321 $this->beginWidget(
'zii.widgets.CPortlet', array(
322 'title'=>
'HTML Table - Striped, bordered, row hovering and condensed',
327 <table
class=
"table table-striped table-hover table-bordered table-condensed">
328 <caption>Table Caption</caption>
337 <td>Internet Explorer</td>
345 <td>Google Chrome</td>