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
cf0fecee
Commit
cf0fecee
authored
Jul 13, 2016
by
Tobias Munk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated UI
parent
fa78df08
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
15 deletions
+34
-15
view.php
src/views/crud/widget-template/view.php
+10
-2
_form.php
src/views/crud/widget/_form.php
+1
-1
view.php
src/views/crud/widget/view.php
+17
-8
index.php
src/views/default/index.php
+6
-4
No files found.
src/views/crud/widget-template/view.php
View file @
cf0fecee
...
...
@@ -67,8 +67,16 @@ $this->params['breadcrumbs'][] = Yii::t('app', 'View');
'id'
,
'name'
,
'php_class'
,
'json_schema:ntext'
,
'twig_template:ntext'
,
[
'attribute'
=>
'json_schema'
,
'format'
=>
'html'
,
'value'
=>
'<pre class="pre-x-scrollable">'
.
Html
::
encode
(
$model
->
json_schema
)
.
'</pre>'
],
[
'attribute'
=>
'twig_template'
,
'format'
=>
'html'
,
'value'
=>
'<pre>'
.
Html
::
encode
(
$model
->
twig_template
)
.
'</pre>'
],
],
]);
?>
...
...
src/views/crud/widget/_form.php
View file @
cf0fecee
...
...
@@ -47,7 +47,7 @@ var widgets = {
console.log($(elem).val());
if (!lastTemplateId || confirm('Reset values and update template?')) {
lastTemplateId = $(elem).val();
url = '/
de/
widgets/crud/widget/create?Widget[widget_template_id]='+$('#widgetcontent-widget_template_id').val();
url = '/widgets/crud/widget/create?Widget[widget_template_id]='+$('#widgetcontent-widget_template_id').val();
//alert(url);
$.pjax.reload({url: url, container: '#pjax-widget-form'});
} else {
...
...
src/views/crud/widget/view.php
View file @
cf0fecee
...
...
@@ -44,15 +44,15 @@ $this->params['breadcrumbs'][] = \Yii::t('app', 'View');
<div
class=
"clearfix crud-navigation"
>
<!-- menu buttons -->
<div
class=
'pull-left'
>
<?php
echo
Html
::
a
(
'<span class="glyphicon glyphicon-pencil"></span> '
.
Yii
::
t
(
'app'
,
'Edit'
),
<?php
echo
Html
::
a
(
'<span class="glyphicon glyphicon-pencil"></span> '
.
\
Yii
::
t
(
'app'
,
'Edit'
),
[
'update'
,
'id'
=>
$model
->
id
],
[
'class'
=>
'btn btn-info'
])
?>
<?php
echo
Html
::
a
(
'<span class="glyphicon glyphicon-copy"></span> '
.
Yii
::
t
(
'app'
,
'Copy'
),
<?php
echo
Html
::
a
(
'<span class="glyphicon glyphicon-copy"></span> '
.
\
Yii
::
t
(
'app'
,
'Copy'
),
[
'create'
,
'id'
=>
$model
->
id
,
'Widget'
=>
$copyParams
],
[
'class'
=>
'btn btn-success'
])
?>
<?php
echo
Html
::
a
(
'<span class="glyphicon glyphicon-plus"></span> '
.
Yii
::
t
(
'app'
,
'New'
),
[
'create'
],
<?php
echo
Html
::
a
(
'<span class="glyphicon glyphicon-plus"></span> '
.
\
Yii
::
t
(
'app'
,
'New'
),
[
'create'
],
[
'class'
=>
'btn btn-success'
])
?>
</div>
<div
class=
"pull-right"
>
<?php
echo
Html
::
a
(
'<span class="glyphicon glyphicon-list"></span> '
.
Yii
::
t
(
'app'
,
'Full list'
),
[
'index'
],
<?php
echo
Html
::
a
(
'<span class="glyphicon glyphicon-list"></span> '
.
\
Yii
::
t
(
'app'
,
'Full list'
),
[
'index'
],
[
'class'
=>
'btn btn-default'
])
?>
</div>
...
...
@@ -64,12 +64,21 @@ $this->params['breadcrumbs'][] = \Yii::t('app', 'View');
<?php
echo
DetailView
::
widget
([
'options'
=>
[
'class'
=>
'table table-striped table-bordered detail-view'
],
'model'
=>
$model
,
'attributes'
=>
[
'id'
,
'status'
,
'widget_template_id'
,
'default_properties_json:ntext'
,
[
'attribute'
=>
'widget_template_id'
,
'format'
=>
'raw'
,
'value'
=>
\yii\helpers\Html
::
a
(
$model
->
template
->
name
,
[
'crud/widget-template/view'
,
'id'
=>
$model
->
widget_template_id
])
],
[
'attribute'
=>
'default_properties_json'
,
'format'
=>
'raw'
,
'value'
=>
"<pre><code>"
.
Html
::
encode
(
$model
->
default_properties_json
)
.
"</code></pre>"
,
],
'name_id'
,
'container_id'
,
'rank'
,
...
...
@@ -88,11 +97,11 @@ $this->params['breadcrumbs'][] = \Yii::t('app', 'View');
<hr/>
<?php
echo
Html
::
a
(
'<span class="glyphicon glyphicon-trash"></span> '
.
Yii
::
t
(
'app'
,
'Delete'
),
<?php
echo
Html
::
a
(
'<span class="glyphicon glyphicon-trash"></span> '
.
\
Yii
::
t
(
'app'
,
'Delete'
),
[
'delete'
,
'id'
=>
$model
->
id
],
[
'class'
=>
'btn btn-danger'
,
'data-confirm'
=>
''
.
Yii
::
t
(
'app'
,
'Are you sure to delete this item?'
)
.
''
,
'data-confirm'
=>
''
.
\
Yii
::
t
(
'app'
,
'Are you sure to delete this item?'
)
.
''
,
'data-method'
=>
'post'
,
]);
?>
<?php
$this
->
endBlock
();
?>
...
...
src/views/default/index.php
View file @
cf0fecee
...
...
@@ -17,7 +17,7 @@ use yii\helpers\Html;
<?=
\insolita\wgadminlte\SmallBox
::
widget
(
[
'head'
=>
WidgetContent
::
find
()
->
count
(),
'footer'
=>
'Contents'
,
'footer'
=>
'
Widget
Contents'
,
'footer_link'
=>
[
'crud/widget'
],
]
)
?>
...
...
@@ -53,6 +53,7 @@ use yii\helpers\Html;
<h4>
Example
</h4>
<p>
<code>
{"hrzg\\widget\\widgets\\TwigTemplate": "Twig layout"}
</code></p>
<?=
Html
::
a
(
'Open settings'
,
[
'/settings'
],
[
'class'
=>
'btn btn-default'
])
?>
<?=
Html
::
a
(
'Online documentation'
,
'https://git.hrzg.de/hrzg/yii2-widgets2-module'
,
[
'class'
=>
'btn btn-info'
])
?>
...
...
@@ -62,9 +63,10 @@ use yii\helpers\Html;
<?php
\insolita\wgadminlte\Box
::
begin
()
?>
<?=
Html
::
a
(
'Test page index'
,
[
'test/index'
],
[
'class'
=>
'btn btn-warning'
])
?>
<?=
Html
::
a
(
'Test page index'
,
[
'test/index'
],
[
'class'
=>
'btn btn-default'
])
?>
<?=
Html
::
a
(
'Test page-1 (with parameter)'
,
[
'test/with-param'
,
'id'
=>
'page-1'
],
[
'class'
=>
'btn btn-default'
])
?>
<?=
Html
::
a
(
'Test page-1 (with parameter)'
,
[
'test/with-param'
,
'id'
=>
'page-1'
],
[
'class'
=>
'btn btn-warning'
])
?>
<?=
Html
::
a
(
'Test page-2 (with parameter)'
,
[
'test/with-param'
,
'id'
=>
'page-2'
],
[
'class'
=>
'btn btn-warning'
])
?>
<?=
Html
::
a
(
'Test page-2 (with parameter)'
,
[
'test/with-param'
,
'id'
=>
'page-2'
],
[
'class'
=>
'btn btn-default'
])
?>
<?php
\insolita\wgadminlte\Box
::
end
()
?>
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