Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Y
yii2-widgets2-module
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
hrzg
yii2-widgets2-module
Commits
584fc3f3
Commit
584fc3f3
authored
Jul 20, 2016
by
Tobias Munk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added DOM ids for cells and widgets; fixed test views
parent
b2282a7b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
6 deletions
+8
-6
index.php
src/views/default/index.php
+2
-2
index.twig
src/views/test/index.twig
+2
-2
Cell.php
src/widgets/Cell.php
+4
-2
No files found.
src/views/default/index.php
View file @
584fc3f3
...
...
@@ -65,8 +65,8 @@ use yii\helpers\Html;
<?=
Html
::
a
(
'Test page index'
,
[
'test/index'
],
[
'class'
=>
'btn btn-default'
])
?>
<?=
Html
::
a
(
'Test page-1 (with parameter)'
,
[
'test/with-param'
,
'
i
d'
=>
'page-1'
],
[
'class'
=>
'btn btn-default'
])
?>
<?=
Html
::
a
(
'Test page-1 (with parameter)'
,
[
'test/with-param'
,
'
pageI
d'
=>
'page-1'
],
[
'class'
=>
'btn btn-default'
])
?>
<?=
Html
::
a
(
'Test page-2 (with parameter)'
,
[
'test/with-param'
,
'
i
d'
=>
'page-2'
],
[
'class'
=>
'btn btn-default'
])
?>
<?=
Html
::
a
(
'Test page-2 (with parameter)'
,
[
'test/with-param'
,
'
pageI
d'
=>
'page-2'
],
[
'class'
=>
'btn btn-default'
])
?>
<?php
\insolita\wgadminlte\Box
::
end
()
?>
src/views/test/index.twig
View file @
584fc3f3
{{
use
(
'hrzg/widget/widgets'
)
}}
{{
widget_container
_widget
(
{
id
:
'header'
}
)
}}
{{
cell
_widget
(
{
id
:
'header'
}
)
}}
<div
class=
"container-fluid"
>
{{
widget_container
_widget
(
{
id
:
'container'
}
)
}}
{{
cell
_widget
(
{
id
:
'container'
}
)
}}
</div>
\ No newline at end of file
src/widgets/Cell.php
View file @
584fc3f3
...
...
@@ -101,7 +101,9 @@ class Cell extends Widget
{
$html
=
Html
::
beginTag
(
'div'
,
[
'class'
=>
self
::
CSS_PREFIX
.
'-'
.
$this
->
id
.
' '
.
self
::
CSS_PREFIX
.
'-widget-container'
]
[
'id'
=>
'cell-'
.
$this
->
id
,
'class'
=>
self
::
CSS_PREFIX
.
'-'
.
$this
->
id
.
' '
.
self
::
CSS_PREFIX
.
'-widget-container'
]
);
if
(
\Yii
::
$app
->
user
->
can
(
'widgets'
))
{
...
...
@@ -116,7 +118,7 @@ class Cell extends Widget
if
(
$properties
)
{
$class
->
setProperties
(
$properties
);
}
$html
.=
Html
::
beginTag
(
'div'
,
[
'class'
=>
'hrzg-widget-widget'
]);
$html
.=
Html
::
beginTag
(
'div'
,
[
'
id'
=>
'widget-'
.
(
$widget
->
name_id
?:
$widget
->
id
),
'
class'
=>
'hrzg-widget-widget'
]);
if
(
\Yii
::
$app
->
user
->
can
(
'widgets'
))
{
$html
.=
$this
->
generateWidgetControls
(
$widget
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment