Server IP : 103.233.192.212 / Your IP : 52.14.145.78 Web Server : Apache/2 System : Linux sv1.inde.co.th 3.10.0-1160.36.2.el7.x86_64 #1 SMP Wed Jul 21 11:57:15 UTC 2021 x86_64 User : sumpatuan ( 1058) PHP Version : 5.5.38 Disable Function : symlink,shell_exec,exec,proc_close,proc_open,popen,system,dl,putenv,passthru,escapeshellarg,escapeshellcmd,pcntl_exec,proc_get_status,proc_nice,proc_terminate,pclose,ini_alter,virtual,openlog,ini_restore MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/sumpatuan/public_html/backup/protected/extensions/bootstrap/widgets/ |
Upload File : |
<?php /** * TbDetailView class file. * @author Christoffer Niska <ChristofferNiska@gmail.com> * @copyright Copyright © Christoffer Niska 2011- * @license http://www.opensource.org/licenses/bsd-license.php New BSD License * @package bootstrap.widgets */ Yii::import('zii.widgets.CDetailView'); /** * Bootstrap Zii detail view. */ class TbDetailView extends CDetailView { // Table types. const TYPE_STRIPED = 'striped'; const TYPE_BORDERED = 'bordered'; const TYPE_CONDENSED = 'condensed'; /** * @var string|array the table type. * Valid values are 'striped', 'bordered' and/or 'condensed'. */ public $type = array(self::TYPE_STRIPED, self::TYPE_CONDENSED); /** * @var string the URL of the CSS file used by this detail view. * Defaults to false, meaning that no CSS will be included. */ public $cssFile = false; /** * Initializes the widget. */ public function init() { parent::init(); $classes = array('table'); if (isset($this->type)) { if (is_string($this->type)) $this->type = explode(' ', $this->type); $validTypes = array(self::TYPE_STRIPED, self::TYPE_BORDERED, self::TYPE_CONDENSED); if (!empty($this->type)) { foreach ($this->type as $type) { if (in_array($type, $validTypes)) $classes[] = 'table-'.$type; } } } if (!empty($classes)) { $classes = implode(' ', $classes); if (isset($this->htmlOptions['class'])) $this->htmlOptions['class'] .= ' '.$classes; else $this->htmlOptions['class'] = $classes; } } }