Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
views_bootstrap
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
views_bootstrap
Merge requests
!26
adds grid class field
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
adds grid class field
issue/views_bootstrap-3024039:3024039-grid-row-parent-class
into
5.4.x
Overview
0
Commits
1
Pipelines
4
Changes
2
Merged
Shelane French
requested to merge
issue/views_bootstrap-3024039:3024039-grid-row-parent-class
into
5.4.x
1 year ago
Overview
0
Commits
1
Pipelines
4
Changes
2
Expand
Closes
#3024039
0
0
Merge request reports
Compare
5.4.x
version 2
6c670967
1 year ago
version 1
f397f64d
1 year ago
5.4.x (base)
and
latest version
latest version
6c670967
1 commit,
1 year ago
version 2
6c670967
1 commit,
1 year ago
version 1
f397f64d
1 commit,
1 year ago
2 files
+
22
−
14
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
src/Plugin/views/style/ViewsBootstrapGrid.php
+
14
−
13
Options
@@ -41,22 +41,11 @@ class ViewsBootstrapGrid extends StylePluginBase {
protected
function
defineOptions
()
{
$options
=
parent
::
defineOptions
();
$options
[
'grid_class'
]
=
[
'default'
=>
''
];
foreach
(
ViewsBootstrap
::
getBreakpoints
()
as
$breakpoint
)
{
$breakpoint_option
=
"col_
$breakpoint
"
;
$options
[
$breakpoint_option
]
=
[
'default'
=>
'none'
];
}
$options
[
'col_class_custom'
]
=
[
'default'
=>
''
];
$options
[
'col_class_default'
]
=
[
'default'
=>
TRUE
];
$options
[
'row_class_custom'
]
=
[
'default'
=>
''
];
$options
[
'row_class_default'
]
=
[
'default'
=>
TRUE
];
$options
[
'default'
]
=
[
'default'
=>
''
];
$options
[
'info'
]
=
[
'default'
=>
[]];
$options
[
'override'
]
=
[
'default'
=>
TRUE
];
$options
[
'sticky'
]
=
[
'default'
=>
FALSE
];
$options
[
'order'
]
=
[
'default'
=>
'asc'
];
$options
[
'caption'
]
=
[
'default'
=>
''
];
$options
[
'summary'
]
=
[
'default'
=>
''
];
$options
[
'description'
]
=
[
'default'
=>
''
];
return
$options
;
}
@@ -66,13 +55,25 @@ class ViewsBootstrapGrid extends StylePluginBase {
public
function
buildOptionsForm
(
&
$form
,
FormStateInterface
$form_state
)
{
parent
::
buildOptionsForm
(
$form
,
$form_state
);
$form
[
'grid_class'
]
=
[
'#title'
=>
$this
->
t
(
'Grid row custom class'
),
'#description'
=>
$this
->
t
(
'Additional classes to provide on the grid row. Separated by a space.'
),
'#type'
=>
'textfield'
,
'#size'
=>
'30'
,
'#default_value'
=>
$this
->
options
[
'grid_class'
],
'#weight'
=>
1
,
];
$form
[
'row_class'
][
'#title'
]
=
$this
->
t
(
'Custom column class'
);
$form
[
'row_class'
][
'#weight'
]
=
2
;
foreach
(
ViewsBootstrap
::
getBreakpoints
()
as
$breakpoint
)
{
$breakpoint_option
=
"col_
$breakpoint
"
;
$prefix
=
'col'
.
(
$breakpoint
!=
'xs'
?
'-'
.
$breakpoint
:
''
);
$form
[
$breakpoint_option
]
=
[
'#type'
=>
'select'
,
'#title'
=>
$this
->
t
(
"Column width of items at @breakpoint breakpoint"
,
[
'@breakpoint'
=>
$breakpoint
]),
'#default_value'
=>
isset
(
$this
->
options
[
$breakpoint_option
]
)
?
$this
->
options
[
$breakpoint_option
]
:
NULL
,
'#default_value'
=>
$this
->
options
[
$breakpoint_option
]
?
?
NULL
,
'#description'
=>
$this
->
t
(
"Set the number of columns each item should take up at the @breakpoint breakpoint and higher."
,
[
'@breakpoint'
=>
$breakpoint
]),
'#options'
=>
[
'none'
=>
$this
->
t
(
'None (or inherit from previous)'
),
Loading