Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Stud.IP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jan-Hendrik Willms
Stud.IP
Commits
c662a4c6
Commit
c662a4c6
authored
2 years ago
by
David Siegfried
Committed by
Jan-Hendrik Willms
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
render template widget correctly, fixes #1115, re #1102
Merge request
studip/studip!666
parent
98231d32
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/classes/sidebar/ResourceTreeWidget.class.php
+1
-6
1 addition, 6 deletions
lib/classes/sidebar/ResourceTreeWidget.class.php
lib/classes/sidebar/SidebarWidget.php
+1
-6
1 addition, 6 deletions
lib/classes/sidebar/SidebarWidget.php
with
2 additions
and
12 deletions
lib/classes/sidebar/ResourceTreeWidget.class.php
+
1
−
6
View file @
c662a4c6
...
...
@@ -116,12 +116,7 @@ class ResourceTreeWidget extends SidebarWidget
$variables
[
'max_open_depth'
]
=
0
;
$variables
[
'layout_css_classes'
]
=
$this
->
layout_css_classes
;
$template
=
$GLOBALS
[
'template_factory'
]
->
open
(
$this
->
template
);
$template
->
set_attributes
(
$variables
);
$template
->
set_layout
(
'sidebar/widget-layout'
);
return
$template
->
render
();
return
parent
::
render
(
$variables
);
}
public
function
setCurrentResource
(
Resource
$resource
)
...
...
This diff is collapsed.
Click to expand it.
lib/classes/sidebar/SidebarWidget.php
+
1
−
6
View file @
c662a4c6
...
...
@@ -9,16 +9,13 @@
*/
class
SidebarWidget
extends
Widget
{
protected
$id
=
''
;
protected
$additional_attributes
=
[];
public
function
__construct
()
{
$this
->
layout
=
'sidebar/widget-layout.php'
;
}
/**
* Sets the ID of the HTML element that represents the widget.
*
...
...
@@ -30,7 +27,6 @@ class SidebarWidget extends Widget
$this
->
id
=
$id
;
}
/**
* Returns the ID of this widget, if it is set.
*
...
...
@@ -38,7 +34,7 @@ class SidebarWidget extends Widget
*/
public
function
getId
()
:
string
{
return
$this
->
id
;
return
$this
->
id
??
''
;
}
/**
...
...
@@ -101,7 +97,6 @@ class SidebarWidget extends Widget
unset
(
$this
->
additional_attributes
[
$key
]);
}
/**
* Renders the widget.
* The widget will only be rendered if it contains at least one element.
...
...
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