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
47563781
Commit
47563781
authored
Nov 10, 2016
by
Tobias Munk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed message catalog to widgets
parent
226a84e5
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
80 additions
and
80 deletions
+80
-80
Widget.php
src/models/crud/base/Widget.php
+34
-34
WidgetTemplate.php
src/models/crud/base/WidgetTemplate.php
+10
-10
_form.php
src/views/crud/widget-template/_form.php
+1
-1
_search.php
src/views/crud/widget-template/_search.php
+2
-2
create.php
src/views/crud/widget-template/create.php
+2
-2
index.php
src/views/crud/widget-template/index.php
+3
-3
update.php
src/views/crud/widget-template/update.php
+3
-3
view.php
src/views/crud/widget-template/view.php
+7
-7
_form.php
src/views/crud/widget/_form.php
+1
-1
_search.php
src/views/crud/widget/_search.php
+2
-2
create.php
src/views/crud/widget/create.php
+2
-2
index.php
src/views/crud/widget/index.php
+3
-3
update.php
src/views/crud/widget/update.php
+3
-3
view.php
src/views/crud/widget/view.php
+7
-7
No files found.
src/models/crud/base/Widget.php
View file @
47563781
...
...
@@ -56,9 +56,9 @@ abstract class Widget extends \yii\db\ActiveRecord
public
function
getAliasModel
(
$plural
=
false
)
{
if
(
$plural
)
{
return
Yii
::
t
(
'
app
'
,
'Widgets'
);
return
Yii
::
t
(
'
widgets
'
,
'Widgets'
);
}
else
{
return
Yii
::
t
(
'
app
'
,
'Widget'
);
return
Yii
::
t
(
'
widgets
'
,
'Widget'
);
}
}
...
...
@@ -86,22 +86,22 @@ abstract class Widget extends \yii\db\ActiveRecord
public
function
attributeLabels
()
{
return
[
'id'
=>
Yii
::
t
(
'
app
'
,
'ID'
),
'status'
=>
Yii
::
t
(
'
app
'
,
'Status'
),
'widget_template_id'
=>
Yii
::
t
(
'
app
'
,
'Template'
),
'default_properties_json'
=>
Yii
::
t
(
'
app
'
,
'Widget Properties'
),
'name_id'
=>
Yii
::
t
(
'
app
'
,
'Name ID'
),
'container_id'
=>
Yii
::
t
(
'
app
'
,
'Container ID'
),
'rank'
=>
Yii
::
t
(
'
app
'
,
'Rank'
),
'route'
=>
Yii
::
t
(
'
app
'
,
'Route'
),
'request_param'
=>
Yii
::
t
(
'
app
'
,
'Request Param'
),
'access_owner'
=>
Yii
::
t
(
'
app
'
,
'Access Owner'
),
'access_domain'
=>
Yii
::
t
(
'
app
'
,
'Access Domain'
),
'access_read'
=>
Yii
::
t
(
'
app
'
,
'Access Read'
),
'access_update'
=>
Yii
::
t
(
'
app
'
,
'Access Update'
),
'access_delete'
=>
Yii
::
t
(
'
app
'
,
'Access Delete'
),
'created_at'
=>
Yii
::
t
(
'
app
'
,
'Created At'
),
'updated_at'
=>
Yii
::
t
(
'
app
'
,
'Updated At'
),
'id'
=>
Yii
::
t
(
'
widgets
'
,
'ID'
),
'status'
=>
Yii
::
t
(
'
widgets
'
,
'Status'
),
'widget_template_id'
=>
Yii
::
t
(
'
widgets
'
,
'Template'
),
'default_properties_json'
=>
Yii
::
t
(
'
widgets
'
,
'Widget Properties'
),
'name_id'
=>
Yii
::
t
(
'
widgets
'
,
'Name ID'
),
'container_id'
=>
Yii
::
t
(
'
widgets
'
,
'Container ID'
),
'rank'
=>
Yii
::
t
(
'
widgets
'
,
'Rank'
),
'route'
=>
Yii
::
t
(
'
widgets
'
,
'Route'
),
'request_param'
=>
Yii
::
t
(
'
widgets
'
,
'Request Param'
),
'access_owner'
=>
Yii
::
t
(
'
widgets
'
,
'Access Owner'
),
'access_domain'
=>
Yii
::
t
(
'
widgets
'
,
'Access Domain'
),
'access_read'
=>
Yii
::
t
(
'
widgets
'
,
'Access Read'
),
'access_update'
=>
Yii
::
t
(
'
widgets
'
,
'Access Update'
),
'access_delete'
=>
Yii
::
t
(
'
widgets
'
,
'Access Delete'
),
'created_at'
=>
Yii
::
t
(
'
widgets
'
,
'Created At'
),
'updated_at'
=>
Yii
::
t
(
'
widgets
'
,
'Updated At'
),
];
}
...
...
@@ -113,22 +113,22 @@ abstract class Widget extends \yii\db\ActiveRecord
return array_merge(
parent::attributeHints(),
[
'id' => Yii::t('
app
', 'ID'),
'status' => Yii::t('
app
', 'Status'),
'widget_template_id' => Yii::t('
app
', 'Class Name'),
'default_properties_json' => Yii::t('
app
', 'Default Properties Json'),
'name_id' => Yii::t('
app
', 'Name Id'),
'container_id' => Yii::t('
app
', 'Container Id'),
'rank' => Yii::t('
app
', 'Rank'),
'route' => Yii::t('
app
', 'Route'),
'request_param' => Yii::t('
app
', 'Request Param'),
'access_owner' => Yii::t('
app
', 'Access Owner'),
'access_domain' => Yii::t('
app
', 'Access Domain'),
'access_read' => Yii::t('
app
', 'Access Read'),
'access_update' => Yii::t('
app
', 'Access Update'),
'access_delete' => Yii::t('
app
', 'Access Delete'),
'created_at' => Yii::t('
app
', 'Created At'),
'updated_at' => Yii::t('
app
', 'Updated At'),
'id' => Yii::t('
widgets
', 'ID'),
'status' => Yii::t('
widgets
', 'Status'),
'widget_template_id' => Yii::t('
widgets
', 'Class Name'),
'default_properties_json' => Yii::t('
widgets
', 'Default Properties Json'),
'name_id' => Yii::t('
widgets
', 'Name Id'),
'container_id' => Yii::t('
widgets
', 'Container Id'),
'rank' => Yii::t('
widgets
', 'Rank'),
'route' => Yii::t('
widgets
', 'Route'),
'request_param' => Yii::t('
widgets
', 'Request Param'),
'access_owner' => Yii::t('
widgets
', 'Access Owner'),
'access_domain' => Yii::t('
widgets
', 'Access Domain'),
'access_read' => Yii::t('
widgets
', 'Access Read'),
'access_update' => Yii::t('
widgets
', 'Access Update'),
'access_delete' => Yii::t('
widgets
', 'Access Delete'),
'created_at' => Yii::t('
widgets
', 'Created At'),
'updated_at' => Yii::t('
widgets
', 'Updated At'),
]);
}*/
}
src/models/crud/base/WidgetTemplate.php
View file @
47563781
...
...
@@ -43,9 +43,9 @@ abstract class WidgetTemplate extends \yii\db\ActiveRecord
public
function
getAliasModel
(
$plural
=
false
)
{
if
(
$plural
)
{
return
Yii
::
t
(
'
app
'
,
'WidgetTemplates'
);
return
Yii
::
t
(
'
widgets
'
,
'WidgetTemplates'
);
}
else
{
return
Yii
::
t
(
'
app
'
,
'WidgetTemplate'
);
return
Yii
::
t
(
'
widgets
'
,
'WidgetTemplate'
);
}
}
...
...
@@ -67,10 +67,10 @@ abstract class WidgetTemplate extends \yii\db\ActiveRecord
public
function
attributeLabels
()
{
return
[
'id'
=>
Yii
::
t
(
'
app
'
,
'ID'
),
'name'
=>
Yii
::
t
(
'
app
'
,
'Name'
),
'json_schema'
=>
Yii
::
t
(
'
app
'
,
'Json Schema'
),
'twig_template'
=>
Yii
::
t
(
'
app
'
,
'Twig Template'
),
'id'
=>
Yii
::
t
(
'
widgets
'
,
'ID'
),
'name'
=>
Yii
::
t
(
'
widgets
'
,
'Name'
),
'json_schema'
=>
Yii
::
t
(
'
widgets
'
,
'Json Schema'
),
'twig_template'
=>
Yii
::
t
(
'
widgets
'
,
'Twig Template'
),
];
}
...
...
@@ -82,10 +82,10 @@ abstract class WidgetTemplate extends \yii\db\ActiveRecord
return
array_merge
(
parent
::
attributeHints
(),
[
'id'
=>
Yii
::
t
(
'
app
'
,
'ID'
),
'name'
=>
Yii
::
t
(
'
app
'
,
'Name'
),
'json_schema'
=>
Yii
::
t
(
'
app
'
,
'Json Schema'
),
'twig_template'
=>
Yii
::
t
(
'
app
'
,
'Template'
),
'id'
=>
Yii
::
t
(
'
widgets
'
,
'ID'
),
'name'
=>
Yii
::
t
(
'
widgets
'
,
'Name'
),
'json_schema'
=>
Yii
::
t
(
'
widgets
'
,
'Json Schema'
),
'twig_template'
=>
Yii
::
t
(
'
widgets
'
,
'Template'
),
]);
}
}
src/views/crud/widget-template/_form.php
View file @
47563781
...
...
@@ -67,7 +67,7 @@ use yii\helpers\Html;
<?php
echo
Html
::
submitButton
(
'<span class="glyphicon glyphicon-check"></span> '
.
(
$model
->
isNewRecord
?
Yii
::
t
(
'
app'
,
'Create'
)
:
Yii
::
t
(
'app
'
,
'Save'
)),
(
$model
->
isNewRecord
?
Yii
::
t
(
'
widgets'
,
'Create'
)
:
Yii
::
t
(
'widgets
'
,
'Save'
)),
[
'id'
=>
'save-'
.
$model
->
formName
(),
'class'
=>
'btn btn-success'
,
...
...
src/views/crud/widget-template/_search.php
View file @
47563781
...
...
@@ -30,8 +30,8 @@ use yii\widgets\ActiveForm;
<div
class=
"form-group"
>
<?php
echo
Html
::
submitButton
(
Yii
::
t
(
'
app
'
,
'Search'
),
[
'class'
=>
'btn btn-primary'
])
?>
<?php
echo
Html
::
resetButton
(
Yii
::
t
(
'
app
'
,
'Reset'
),
[
'class'
=>
'btn btn-default'
])
?>
<?php
echo
Html
::
submitButton
(
Yii
::
t
(
'
widgets
'
,
'Search'
),
[
'class'
=>
'btn btn-primary'
])
?>
<?php
echo
Html
::
resetButton
(
Yii
::
t
(
'
widgets
'
,
'Reset'
),
[
'class'
=>
'btn btn-default'
])
?>
</div>
<?php
ActiveForm
::
end
();
?>
...
...
src/views/crud/widget-template/create.php
View file @
47563781
...
...
@@ -9,7 +9,7 @@ use yii\helpers\Html;
* @var yii\web\View $this
* @var hrzg\widget\models\crud\WidgetTemplate $model
*/
$this
->
title
=
Yii
::
t
(
'
app
'
,
'Create'
);
$this
->
title
=
Yii
::
t
(
'
widgets
'
,
'Create'
);
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
$model
->
getAliasModel
(
true
),
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
?>
...
...
@@ -27,7 +27,7 @@ $this->params['breadcrumbs'][] = $this->title;
<div
class=
"clearfix crud-navigation"
>
<div
class=
"pull-left"
>
<?php
echo
Html
::
a
(
Yii
::
t
(
'
app
'
,
'Cancel'
),
Yii
::
t
(
'
widgets
'
,
'Cancel'
),
\yii\helpers\Url
::
previous
(),
[
'class'
=>
'btn btn-default'
])
?>
</div>
...
...
src/views/crud/widget-template/index.php
View file @
47563781
...
...
@@ -38,7 +38,7 @@ $this->params['breadcrumbs'][] = $this->title;
</h1>
<div
class=
"clearfix crud-navigation"
>
<div
class=
"pull-left"
>
<?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
(
'
widgets
'
,
'New'
),
[
'create'
],
[
'class'
=>
'btn btn-success'
])
?>
</div>
...
...
@@ -53,8 +53,8 @@ $this->params['breadcrumbs'][] = $this->title;
'dataProvider'
=>
$dataProvider
,
'pager'
=>
[
'class'
=>
yii\widgets\LinkPager
::
className
(),
'firstPageLabel'
=>
Yii
::
t
(
'
app
'
,
'First'
),
'lastPageLabel'
=>
Yii
::
t
(
'
app
'
,
'Last'
),
'firstPageLabel'
=>
Yii
::
t
(
'
widgets
'
,
'First'
),
'lastPageLabel'
=>
Yii
::
t
(
'
widgets
'
,
'Last'
),
],
'filterModel'
=>
$searchModel
,
'tableOptions'
=>
[
'class'
=>
'table table-striped table-bordered table-hover'
],
...
...
src/views/crud/widget-template/update.php
View file @
47563781
...
...
@@ -9,10 +9,10 @@ use yii\helpers\Html;
* @var yii\web\View $this
* @var hrzg\widget\models\crud\WidgetTemplate $model
*/
$this
->
title
=
$model
->
getAliasModel
()
.
$model
->
name
.
', '
.
Yii
::
t
(
'
app
'
,
'Edit'
);
$this
->
title
=
$model
->
getAliasModel
()
.
$model
->
name
.
', '
.
Yii
::
t
(
'
widgets
'
,
'Edit'
);
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
$model
->
getAliasModel
(
true
),
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
(
string
)
$model
->
name
,
'url'
=>
[
'view'
,
'id'
=>
$model
->
id
]];
$this
->
params
[
'breadcrumbs'
][]
=
Yii
::
t
(
'
app
'
,
'Edit'
);
$this
->
params
[
'breadcrumbs'
][]
=
Yii
::
t
(
'
widgets
'
,
'Edit'
);
?>
<div
class=
"giiant-crud widget-template-update"
>
...
...
@@ -25,7 +25,7 @@ $this->params['breadcrumbs'][] = Yii::t('app', 'Edit');
</h1>
<div
class=
"crud-navigation"
>
<?php
echo
Html
::
a
(
'<span class="glyphicon glyphicon-eye-open"></span> '
.
Yii
::
t
(
'
app
'
,
'View'
),
<?php
echo
Html
::
a
(
'<span class="glyphicon glyphicon-eye-open"></span> '
.
Yii
::
t
(
'
widgets
'
,
'View'
),
[
'view'
,
'id'
=>
$model
->
id
],
[
'class'
=>
'btn btn-default'
])
?>
</div>
...
...
src/views/crud/widget-template/view.php
View file @
47563781
...
...
@@ -16,7 +16,7 @@ $copyParams = $model->attributes;
$this
->
title
=
$model
->
getAliasModel
()
.
$model
->
name
;
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
$model
->
getAliasModel
(
true
),
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
(
string
)
$model
->
name
,
'url'
=>
[
'view'
,
'id'
=>
$model
->
id
]];
$this
->
params
[
'breadcrumbs'
][]
=
Yii
::
t
(
'
app
'
,
'View'
);
$this
->
params
[
'breadcrumbs'
][]
=
Yii
::
t
(
'
widgets
'
,
'View'
);
?>
<div
class=
"giiant-crud widget-template-view"
>
...
...
@@ -41,16 +41,16 @@ $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
(
'
widgets
'
,
'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
(
'
widgets
'
,
'Copy'
),
[
'create'
,
'id'
=>
$model
->
id
,
'WidgetTemplate'
=>
$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
(
'
widgets
'
,
'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
(
'
widgets
'
,
'Full list'
),
[
'index'
],
[
'class'
=>
'btn btn-default'
])
?>
</div>
...
...
@@ -83,11 +83,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
(
'
widgets
'
,
'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
(
'
widgets
'
,
'Are you sure to delete this item?'
)
.
''
,
'data-method'
=>
'post'
,
]);
?>
<?php
$this
->
endBlock
();
?>
...
...
src/views/crud/widget/_form.php
View file @
47563781
...
...
@@ -155,7 +155,7 @@ JS;
<?php
echo
Html
::
submitButton
(
'<span class="glyphicon glyphicon-check"></span> '
.
(
$model
->
isNewRecord
?
Yii
::
t
(
'
app'
,
'Create'
)
:
Yii
::
t
(
'app
'
,
'Save'
)),
(
$model
->
isNewRecord
?
Yii
::
t
(
'
widgets'
,
'Create'
)
:
Yii
::
t
(
'widgets
'
,
'Save'
)),
[
'id'
=>
'save-'
.
$model
->
formName
(),
'class'
=>
'btn btn-success'
,
...
...
src/views/crud/widget/_search.php
View file @
47563781
...
...
@@ -53,8 +53,8 @@ use yii\widgets\ActiveForm;
<?
php
// echo $form->field($model, 'updated_at') ?>
<
div
class
="
form
-
group
">
<?php echo Html::submitButton(Yii::t('
app
', 'Search'), ['class' => 'btn btn-primary']) ?>
<?php echo Html::resetButton(Yii::t('
app
', 'Reset'), ['class' => 'btn btn-default']) ?>
<?php echo Html::submitButton(Yii::t('
widgets
', 'Search'), ['class' => 'btn btn-primary']) ?>
<?php echo Html::resetButton(Yii::t('
widgets
', 'Reset'), ['class' => 'btn btn-default']) ?>
</div>
<?php ActiveForm::end(); ?>
...
...
src/views/crud/widget/create.php
View file @
47563781
...
...
@@ -9,7 +9,7 @@ use yii\helpers\Html;
* @var yii\web\View $this
* @var hrzg\widget\models\crud\WidgetContent $model
*/
$this
->
title
=
Yii
::
t
(
'
app
'
,
'Create'
);
$this
->
title
=
Yii
::
t
(
'
widgets
'
,
'Create'
);
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
$model
->
getAliasModel
(
true
),
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
?>
...
...
@@ -26,7 +26,7 @@ $this->params['breadcrumbs'][] = $this->title;
<div
class=
"clearfix crud-navigation"
>
<div
class=
"pull-left"
>
<?php
echo
Html
::
a
(
Yii
::
t
(
'
app
'
,
'Cancel'
),
Yii
::
t
(
'
widgets
'
,
'Cancel'
),
\yii\helpers\Url
::
previous
(),
[
'class'
=>
'btn btn-default'
])
?>
</div>
...
...
src/views/crud/widget/index.php
View file @
47563781
...
...
@@ -37,7 +37,7 @@ $this->params['breadcrumbs'][] = $this->title;
</h1>
<div
class=
"clearfix crud-navigation"
>
<div
class=
"pull-left"
>
<?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
(
'
widgets
'
,
'New'
),
[
'create'
],
[
'class'
=>
'btn btn-success'
])
?>
</div>
...
...
@@ -52,8 +52,8 @@ $this->params['breadcrumbs'][] = $this->title;
'dataProvider'
=>
$dataProvider
,
'pager'
=>
[
'class'
=>
yii\widgets\LinkPager
::
className
(),
'firstPageLabel'
=>
Yii
::
t
(
'
app
'
,
'First'
),
'lastPageLabel'
=>
Yii
::
t
(
'
app
'
,
'Last'
),
'firstPageLabel'
=>
Yii
::
t
(
'
widgets
'
,
'First'
),
'lastPageLabel'
=>
Yii
::
t
(
'
widgets
'
,
'Last'
),
],
'filterModel'
=>
$searchModel
,
'tableOptions'
=>
[
'class'
=>
'table table-striped table-bordered table-hover'
],
...
...
src/views/crud/widget/update.php
View file @
47563781
...
...
@@ -16,10 +16,10 @@ use yii\helpers\Html;
* @var yii\web\View $this
* @var hrzg\widget\models\crud\WidgetContent $model
*/
$this
->
title
=
$model
->
getAliasModel
()
.
$model
->
id
.
', '
.
Yii
::
t
(
'
app
'
,
'Edit'
);
$this
->
title
=
$model
->
getAliasModel
()
.
$model
->
id
.
', '
.
Yii
::
t
(
'
widgets
'
,
'Edit'
);
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
$model
->
getAliasModel
(
true
),
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
(
string
)
$model
->
id
,
'url'
=>
[
'view'
,
'id'
=>
$model
->
id
]];
$this
->
params
[
'breadcrumbs'
][]
=
Yii
::
t
(
'
app
'
,
'Edit'
);
$this
->
params
[
'breadcrumbs'
][]
=
Yii
::
t
(
'
widgets
'
,
'Edit'
);
?>
<div
class=
"giiant-crud widget-update"
>
...
...
@@ -32,7 +32,7 @@ $this->params['breadcrumbs'][] = Yii::t('app', 'Edit');
</h1>
<div
class=
"crud-navigation"
>
<?php
echo
Html
::
a
(
'<span class="glyphicon glyphicon-eye-open"></span> '
.
Yii
::
t
(
'
app
'
,
'View'
),
<?php
echo
Html
::
a
(
'<span class="glyphicon glyphicon-eye-open"></span> '
.
Yii
::
t
(
'
widgets
'
,
'View'
),
[
'view'
,
'id'
=>
$model
->
id
],
[
'class'
=>
'btn btn-default'
])
?>
</div>
...
...
src/views/crud/widget/view.php
View file @
47563781
...
...
@@ -19,7 +19,7 @@ $copyParams = $model->attributes;
$this
->
title
=
$model
->
getAliasModel
()
.
$model
->
id
;
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
$model
->
getAliasModel
(
true
),
'url'
=>
[
'index'
]];
$this
->
params
[
'breadcrumbs'
][]
=
[
'label'
=>
(
string
)
$model
->
id
,
'url'
=>
[
'view'
,
'id'
=>
$model
->
id
]];
$this
->
params
[
'breadcrumbs'
][]
=
\Yii
::
t
(
'
app
'
,
'View'
);
$this
->
params
[
'breadcrumbs'
][]
=
\Yii
::
t
(
'
widgets
'
,
'View'
);
?>
<div
class=
"giiant-crud widget-view"
>
...
...
@@ -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
(
'
widgets
'
,
'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
(
'
widgets
'
,
'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
(
'
widgets
'
,
'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
(
'
widgets
'
,
'Full list'
),
[
'index'
],
[
'class'
=>
'btn btn-default'
])
?>
</div>
...
...
@@ -97,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
(
'
widgets
'
,
'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
(
'
widgets
'
,
'Are you sure to delete this item?'
)
.
''
,
'data-method'
=>
'post'
,
]);
?>
<?php
$this
->
endBlock
();
?>
...
...
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