1. Christoffer Niska
  2. yii-bootstrap
Issue #37 resolved

fix for BootDetailView.php

manuel_84
created an issue

in BootDetailView you forced itemCssClass to be null, but forgetting that this class is called in itemTemplate

please add this to fix the output of "<tr class>" with this widget

{{{

!php

/**
 * @var string the template used to render a single attribute. Defaults to a table row.
 * These tokens are recognized: "{class}", "{label}" and "{value}". They will be replaced
 * with the CSS class name for the item, the label and the attribute value, respectively.
 * @see itemCssClass
 */
public $itemTemplate="<tr><th>{label}</th><td>{value}</td></tr>\n";

}}}

or if you want to let the user use custom css add a check in run() like

{{{

!php

if (!count($this->itemCssClass) > 0) $this->itemTemplate="<tr><th>{label}</th><td>{value}</td></tr>\n"; }}}

Comments (8)

  1. manuel_84 reporter
    • changed status to new

    I was and I am using the dev branch and I still see this issue

    with empty 'itemCssClass' the output of the table will be

    ...
    <tr class>
    ...
    
  2. Log in to comment