Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
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
drupal
Commits
7dd3f314
Commit
7dd3f314
authored
12 years ago
by
Daniel Wehner
Committed by
Tim Plunkett
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#1331272
by dawehner | mototribe: Added Global: View Area sorting.
parent
b1102f73
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
handlers/views_handler_area_view.inc
+1
-1
1 addition, 1 deletion
handlers/views_handler_area_view.inc
views.module
+6
-1
6 additions, 1 deletion
views.module
with
7 additions
and
2 deletions
handlers/views_handler_area_view.inc
+
1
−
1
View file @
7dd3f314
...
@@ -30,7 +30,7 @@ function options_form(&$form, &$form_state) {
...
@@ -30,7 +30,7 @@ function options_form(&$form, &$form_state) {
$view_display
=
$this
->
view
->
name
.
':'
.
$this
->
view
->
current_display
;
$view_display
=
$this
->
view
->
name
.
':'
.
$this
->
view
->
current_display
;
$options
=
array
(
''
=>
t
(
'-Select-'
));
$options
=
array
(
''
=>
t
(
'-Select-'
));
$options
+=
views_get_views_as_options
(
FALSE
,
'all'
,
$view_display
);
$options
+=
views_get_views_as_options
(
FALSE
,
'all'
,
$view_display
,
FALSE
,
TRUE
);
$form
[
'view_to_insert'
]
=
array
(
$form
[
'view_to_insert'
]
=
array
(
'#type'
=>
'select'
,
'#type'
=>
'select'
,
'#title'
=>
t
(
'View to insert'
),
'#title'
=>
t
(
'View to insert'
),
...
...
This diff is collapsed.
Click to expand it.
views.module
+
6
−
1
View file @
7dd3f314
...
@@ -1486,12 +1486,14 @@ function views_get_disabled_views() {
...
@@ -1486,12 +1486,14 @@ function views_get_disabled_views() {
* @param bool $optgroup
* @param bool $optgroup
* If TRUE, returns an array with optgroups for each view (will be ignored for
* If TRUE, returns an array with optgroups for each view (will be ignored for
* $views_only = TRUE). Can be used by select
* $views_only = TRUE). Can be used by select
* @param bool $sort
* If TRUE, the list of views is sorted ascending.
*
*
* @return array
* @return array
* an associative array for use in select.
* an associative array for use in select.
* - key: view name and display id separated by ':', or the view name only
* - key: view name and display id separated by ':', or the view name only
*/
*/
function
views_get_views_as_options
(
$views_only
=
FALSE
,
$filter
=
'all'
,
$exclude_view
=
NULL
,
$optgroup
=
FALSE
)
{
function
views_get_views_as_options
(
$views_only
=
FALSE
,
$filter
=
'all'
,
$exclude_view
=
NULL
,
$optgroup
=
FALSE
,
$sort
=
FALSE
)
{
// Filter the big views array.
// Filter the big views array.
switch
(
$filter
)
{
switch
(
$filter
)
{
...
@@ -1538,6 +1540,9 @@ function views_get_views_as_options($views_only = FALSE, $filter = 'all', $exclu
...
@@ -1538,6 +1540,9 @@ function views_get_views_as_options($views_only = FALSE, $filter = 'all', $exclu
}
}
}
}
}
}
if
(
$sort
)
{
ksort
(
$options
);
}
return
$options
;
return
$options
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment