Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
Yii Bootstrap 3
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Common
Yii Bootstrap 3
Commits
95b58207
Commit
95b58207
authored
Feb 09, 2012
by
Crisu83
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds a BootDetailView example to the demo.
parent
130dd139
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
1 deletion
+22
-1
index.php
demo/protected/views/site/index.php
+14
-1
BootDetailView.php
widgets/BootDetailView.php
+8
-0
No files found.
demo/protected/views/site/index.php
View file @
95b58207
...
@@ -317,7 +317,20 @@ Yii::app()->user->setFlash('error', '<strong>Oh snap!</strong> Change a few thin
...
@@ -317,7 +317,20 @@ Yii::app()->user->setFlash('error', '<strong>Oh snap!</strong> Change a few thin
<h2>
BootDetailView
</h2>
<h2>
BootDetailView
</h2>
<p>
@todo
</p>
<?php
$this
->
widget
(
'bootstrap.widgets.BootDetailView'
,
array
(
'data'
=>
array
(
'id'
=>
1
,
'firstName'
=>
'Mark'
,
'lastName'
=>
'Otto'
,
'language'
=>
'CSS'
),
'attributes'
=>
array
(
'firstName'
,
'lastName'
,
'language'
),
));
?>
<h4>
Source code
</h4>
<?php
echo
$parser
->
safeTransform
(
"~~~
[php]
<?php
\$
this->widget('bootstrap.widgets.BootDetailView', array(
'data'=>array('id'=>1, 'firstName'=>'Mark', 'lastName'=>'Otto', 'language'=>'CSS'),
'attributes'=>array('firstName', 'lastName', 'language'),
)); ?>
~~~"
);
?>
<a
class=
"top"
href=
"#top"
>
Back to top
↑
</a>
<a
class=
"top"
href=
"#top"
>
Back to top
↑
</a>
...
...
widgets/BootDetailView.php
View file @
95b58207
...
@@ -16,6 +16,14 @@ Yii::import('zii.widgets.CDetailView');
...
@@ -16,6 +16,14 @@ Yii::import('zii.widgets.CDetailView');
class
BootDetailView
extends
CDetailView
class
BootDetailView
extends
CDetailView
{
{
/**
/**
* @var string the template used to render a single attribute. Defaults to a table row.
*/
public
$itemTemplate
=
"<tr class=
\"
{
class
}
\"
><th style=
\"
width: 160px
\"
>
{
label}</th><td>{value
}
</td></tr>
\n
"
;
/**
* @var array the CSS class names for the items displaying attribute values.
*/
public
$itemCssClass
=
array
();
/**
* @var array the HTML attributes for the container.
* @var array the HTML attributes for the container.
*/
*/
public
$htmlOptions
=
array
(
'class'
=>
'table table-striped table-condensed detail-view'
);
public
$htmlOptions
=
array
(
'class'
=>
'table table-striped table-condensed detail-view'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment