X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2Fmodules%2Fcontrib%2Fviews_bootstrap%2Fsrc%2FPlugin%2Fviews%2Fstyle%2FViewsBootstrapTable.php;fp=web%2Fmodules%2Fcontrib%2Fviews_bootstrap%2Fsrc%2FPlugin%2Fviews%2Fstyle%2FViewsBootstrapTable.php;h=0c9a0e18f44ed8e8338e80a08f592cbf443715be;hb=e0411c4e83ba0d079034db83c3f7f55be24a0e35;hp=0000000000000000000000000000000000000000;hpb=2257eb96fa3afedcfba62207e838f49ee9c757e2;p=yaffs-website diff --git a/web/modules/contrib/views_bootstrap/src/Plugin/views/style/ViewsBootstrapTable.php b/web/modules/contrib/views_bootstrap/src/Plugin/views/style/ViewsBootstrapTable.php new file mode 100644 index 000000000..0c9a0e18f --- /dev/null +++ b/web/modules/contrib/views_bootstrap/src/Plugin/views/style/ViewsBootstrapTable.php @@ -0,0 +1,61 @@ + []]; + $options['responsive'] = ['default' => FALSE]; + + return $options; + } + + /** + * Render the given style. + */ + public function buildOptionsForm(&$form, FormStateInterface $form_state) { + parent::buildOptionsForm($form, $form_state); + + $form['responsive'] = [ + '#type' => 'checkbox', + '#title' => $this->t('Responsive'), + '#default_value' => $this->options['responsive'], + '#description' => $this->t('To make a table scroll horizontally on small devices.'), + ]; + + $form['bootstrap_styles'] = [ + '#title' => $this->t('Bootstrap styles'), + '#type' => 'checkboxes', + '#default_value' => $this->options['bootstrap_styles'], + '#options' => [ + 'striped' => $this->t('Striped'), + 'bordered' => $this->t('Bordered'), + 'hover' => $this->t('Hover'), + 'condensed' => $this->t('Condensed'), + ], + ]; + } + +}