Christoffer Niska avatar Christoffer Niska committed f1a61d6

Adds a BootDetailView example to the demo.

Comments (0)

Files changed (2)


-			<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 \$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 &uarr;</a>


 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.
 	public $htmlOptions = array('class'=>'table table-striped table-condensed detail-view');
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.