HCE Project DC service web UI  0.2
Hierarchical Cluster Engine DC service web UI
 All Classes Namespaces Files Functions Variables Pages
tables.php
Go to the documentation of this file.
1 <?php
2 /* @var $this SiteController */
3 
4 $this->pageTitle=Yii::app()->name . ' - Tables - CGridview and HTML';
5 $this->breadcrumbs=array(
6  'Tables - CGridview and HTML',
7 );
8 ?>
9 <?php
10 $gridDataProvider = new CArrayDataProvider(array(
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>'),
14 ));
15 ?>
16 
17 <div class="page-header">
18  <h1>Tables <small>CGridview and HTML</small></h1>
19 </div>
20 
21 <div class="row-fluid">
22  <div class="span6">
23  <?php
24  $this->beginWidget('zii.widgets.CPortlet', array(
25  'title'=>"CGridview - Row hovering",
26  ));
27 
28  ?>
29  <?php $this->widget('zii.widgets.grid.CGridView', array(
30  /*'type'=>'striped bordered condensed',*/
31  'itemsCssClass'=>'table table-hover',
32  'dataProvider'=>$gridDataProvider,
33  'template'=>"{items}",
34  'columns'=>array(
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'),
40 
41  ),
42  )); ?>
43 <?php $this->endWidget();?>
44  </div>
45  <div class="span6">
46  <?php
47  $this->beginWidget('zii.widgets.CPortlet', array(
48  'title'=>"CGridview - Striped rows",
49  ));
50 
51  ?>
52 
53  <?php $this->widget('zii.widgets.grid.CGridView', array(
54  /*'type'=>'striped bordered condensed',*/
55  'itemsCssClass'=>'table table-striped',
56  'dataProvider'=>$gridDataProvider,
57  'template'=>"{items}",
58  'columns'=>array(
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'),
64 
65  ),
66  )); ?>
67 
68  <?php $this->endWidget();?>
69  </div>
70 </div>
71 
72 <div class="row-fluid">
73  <div class="span6">
74  <?php
75  $this->beginWidget('zii.widgets.CPortlet', array(
76  'title'=>"CGridview - Bordered",
77  ));
78 
79  ?>
80 
81  <?php $this->widget('zii.widgets.grid.CGridView', array(
82  /*'type'=>'striped bordered condensed',*/
83  'itemsCssClass'=>'table table-bordered',
84  'dataProvider'=>$gridDataProvider,
85  'template'=>"{items}",
86  'columns'=>array(
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'),
92 
93  ),
94  )); ?>
95  <?php $this->endWidget();?>
96  </div>
97  <div class="span6">
98 
99  <?php
100  $this->beginWidget('zii.widgets.CPortlet', array(
101  'title'=>"CGridview - Striped, bordered and with row hovering",
102  ));
103 
104  ?>
105 
106  <?php $this->widget('zii.widgets.grid.CGridView', array(
107  /*'type'=>'striped bordered condensed',*/
108  'itemsCssClass'=>'table table-striped table-bordered table-hover',
109  'dataProvider'=>$gridDataProvider,
110  'template'=>"{items}",
111  'columns'=>array(
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'),
117 
118  ),
119  )); ?>
120  <?php $this->endWidget();?>
121  </div>
122 </div>
123 
124 <?php
125  $this->beginWidget('zii.widgets.CPortlet', array(
126  'title'=>'CGridView - Striped, bordered, row hovering and condensed',
127  ));
128 
129 ?>
130 
131 <?php $this->widget('zii.widgets.grid.CGridView', array(
132  /*'type'=>'striped bordered condensed',*/
133  'itemsCssClass'=>'table table-hover table-striped table-bordered table-condensed',
134  'dataProvider'=>$gridDataProvider,
135  'template'=>"{items}",
136  'columns'=>array(
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'),
142 
143  ),
144  )); ?>
145 <?php
146 $this->endWidget();
147 ?>
148 
149 
150 <div class="row-fluid">
151  <div class="span6">
152  <?php
153  $this->beginWidget('zii.widgets.CPortlet', array(
154  'title'=>"HTML Table - Row hovering",
155  ));
156 
157  ?>
158  <table class="table table-hover">
159  <caption>Table Caption</caption>
160  <thead>
161  <tr>
162  <th>Browser</th>
163  <th>Users</th>
164  </tr>
165  </thead>
166  <tbody>
167  <tr>
168  <td>Internet Explorer</td>
169  <td>60%</td>
170  </tr>
171  <tr>
172  <td>Firefox</td>
173  <td>20%</td>
174  </tr>
175  <tr>
176  <td>Google Chrome</td>
177  <td>10%</td>
178  </tr>
179  <tr>
180  <td>Safari</td>
181  <td>5%</td>
182  </tr>
183  <tr>
184  <td>Opera</td>
185  <td>5%</td>
186  </tr>
187  </tbody>
188  </table>
189  <?php $this->endWidget();?>
190  </div>
191  <div class="span6">
192 
193  <?php
194  $this->beginWidget('zii.widgets.CPortlet', array(
195  'title'=>"HTML Table - Striped rows",
196  ));
197 
198  ?>
199 
200  <table class="table table-striped">
201  <caption>Table Caption</caption>
202  <thead>
203  <tr>
204  <th>Browser</th>
205  <th>Users</th>
206  </tr>
207  </thead>
208  <tbody>
209  <tr>
210  <td>Internet Explorer</td>
211  <td>60%</td>
212  </tr>
213  <tr>
214  <td>Firefox</td>
215  <td>20%</td>
216  </tr>
217  <tr>
218  <td>Google Chrome</td>
219  <td>10%</td>
220  </tr>
221  <tr>
222  <td>Safari</td>
223  <td>5%</td>
224  </tr>
225  <tr>
226  <td>Opera</td>
227  <td>5%</td>
228  </tr>
229  </tbody>
230  </table>
231  <?php $this->endWidget();?>
232  </div>
233 </div>
234 
235 
236 <div class="row-fluid">
237  <div class="span6">
238  <?php
239  $this->beginWidget('zii.widgets.CPortlet', array(
240  'title'=>"HTML Table - Bordered",
241  ));
242 
243  ?>
244 
245  <table class="table table-bordered">
246  <caption>Table Caption</caption>
247  <thead>
248  <tr>
249  <th>Browser</th>
250  <th>Users</th>
251  </tr>
252  </thead>
253  <tbody>
254  <tr>
255  <td>Internet Explorer</td>
256  <td>60%</td>
257  </tr>
258  <tr>
259  <td>Firefox</td>
260  <td>20%</td>
261  </tr>
262  <tr>
263  <td>Google Chrome</td>
264  <td>10%</td>
265  </tr>
266  <tr>
267  <td>Safari</td>
268  <td>5%</td>
269  </tr>
270  <tr>
271  <td>Opera</td>
272  <td>5%</td>
273  </tr>
274  </tbody>
275  </table>
276  <?php $this->endWidget();?>
277  </div>
278  <div class="span6">
279  <?php
280  $this->beginWidget('zii.widgets.CPortlet', array(
281  'title'=>"HTML Table - Striped, bordered and with row hovering",
282  ));
283 
284  ?>
285  <table class="table table-striped table-hover table-bordered">
286  <caption>Table Caption</caption>
287  <thead>
288  <tr>
289  <th>Browser</th>
290  <th>Users</th>
291  </tr>
292  </thead>
293  <tbody>
294  <tr>
295  <td>Internet Explorer</td>
296  <td>60%</td>
297  </tr>
298  <tr>
299  <td>Firefox</td>
300  <td>20%</td>
301  </tr>
302  <tr>
303  <td>Google Chrome</td>
304  <td>10%</td>
305  </tr>
306  <tr>
307  <td>Safari</td>
308  <td>5%</td>
309  </tr>
310  <tr>
311  <td>Opera</td>
312  <td>5%</td>
313  </tr>
314  </tbody>
315  </table>
316  <?php $this->endWidget();?>
317  </div>
318 </div>
319 
320 <?php
321  $this->beginWidget('zii.widgets.CPortlet', array(
322  'title'=>'HTML Table - Striped, bordered, row hovering and condensed',
323  ));
324 
325 ?>
326 
327 <table class="table table-striped table-hover table-bordered table-condensed">
328  <caption>Table Caption</caption>
329  <thead>
330  <tr>
331  <th>Browser</th>
332  <th>Users</th>
333  </tr>
334  </thead>
335  <tbody>
336  <tr>
337  <td>Internet Explorer</td>
338  <td>60%</td>
339  </tr>
340  <tr>
341  <td>Firefox</td>
342  <td>20%</td>
343  </tr>
344  <tr>
345  <td>Google Chrome</td>
346  <td>10%</td>
347  </tr>
348  <tr>
349  <td>Safari</td>
350  <td>5%</td>
351  </tr>
352  <tr>
353  <td>Opera</td>
354  <td>5%</td>
355  </tr>
356  </tbody>
357  </table>
358 <?php
359 $this->endWidget();
360 ?>