Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
b7fddd8d
Commit
b7fddd8d
authored
Feb 20, 2014
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added LinkPager::$linkOptions
fixes #2367
parent
ac3ac5d1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
view.php
extensions/gii/generators/crud/templates/views/view.php
+4
-2
LinkPager.php
framework/widgets/LinkPager.php
+7
-1
No files found.
extensions/gii/generators/crud/templates/views/view.php
View file @
b7fddd8d
...
@@ -33,8 +33,10 @@ $this->params['breadcrumbs'][] = $this->title;
...
@@ -33,8 +33,10 @@ $this->params['breadcrumbs'][] = $this->title;
<?=
"<?= "
?>
Html::a('Update', ['update',
<?=
$urlParams
?>
], ['class' => 'btn btn-primary']) ?>
<?=
"<?= "
?>
Html::a('Update', ['update',
<?=
$urlParams
?>
], ['class' => 'btn btn-primary']) ?>
<?=
"<?php "
?>
echo Html::a('Delete', ['delete',
<?=
$urlParams
?>
], [
<?=
"<?php "
?>
echo Html::a('Delete', ['delete',
<?=
$urlParams
?>
], [
'class' => 'btn btn-danger',
'class' => 'btn btn-danger',
'data-confirm' => Yii::t('app', 'Are you sure to delete this item?'),
'data' => [
'data-method' => 'post',
'confirm' => Yii::t('app', 'Are you sure to delete this item?'),
'method' => 'post',
],
]); ?>
]); ?>
</p>
</p>
...
...
framework/widgets/LinkPager.php
View file @
b7fddd8d
...
@@ -38,6 +38,10 @@ class LinkPager extends Widget
...
@@ -38,6 +38,10 @@ class LinkPager extends Widget
*/
*/
public
$options
=
[
'class'
=>
'pagination'
];
public
$options
=
[
'class'
=>
'pagination'
];
/**
/**
* @var array HTML attributes for the link in a pager container tag.
*/
public
$linkOptions
=
[];
/**
* @var string the CSS class for the "first" page button.
* @var string the CSS class for the "first" page button.
*/
*/
public
$firstPageCssClass
=
'first'
;
public
$firstPageCssClass
=
'first'
;
...
@@ -172,7 +176,9 @@ class LinkPager extends Widget
...
@@ -172,7 +176,9 @@ class LinkPager extends Widget
Html
::
addCssClass
(
$options
,
$this
->
disabledPageCssClass
);
Html
::
addCssClass
(
$options
,
$this
->
disabledPageCssClass
);
return
Html
::
tag
(
'li'
,
Html
::
tag
(
'span'
,
$label
),
$options
);
return
Html
::
tag
(
'li'
,
Html
::
tag
(
'span'
,
$label
),
$options
);
}
}
return
Html
::
tag
(
'li'
,
Html
::
a
(
$label
,
$this
->
pagination
->
createUrl
(
$page
),
[
'data-page'
=>
$page
]),
$options
);
$linkOptions
=
$this
->
linkOptions
;
$linkOptions
[
'data-page'
]
=
$page
;
return
Html
::
tag
(
'li'
,
Html
::
a
(
$label
,
$this
->
pagination
->
createUrl
(
$page
),
$linkOptions
),
$options
);
}
}
/**
/**
...
...
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