Skip to content

Commit d1f5e71

Browse files
committed
modified example
1 parent d0a8776 commit d1f5e71

20 files changed

Lines changed: 521 additions & 909 deletions

View/BoostCake/bootstrap2.ctp

Lines changed: 22 additions & 468 deletions
Large diffs are not rendered by default.

View/BoostCake/bootstrap3.ctp

Lines changed: 17 additions & 441 deletions
Large diffs are not rendered by default.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
// View
3+
echo $this->Session->flash();
4+
5+
// Controller
6+
$this->Session->setFlash(__('Alert notice message testing...'), 'alert', array(
7+
'plugin' => 'BoostCake',
8+
));
9+
10+
$this->Session->setFlash(__('Alert success message testing...'), 'alert', array(
11+
'plugin' => 'BoostCake',
12+
'class' => 'alert-success'
13+
));
14+
15+
$this->Session->setFlash(__('Alert error message testing...'), 'alert', array(
16+
'plugin' => 'BoostCake',
17+
'class' => 'alert-error'
18+
));
19+
?>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php echo $this->Paginator->pagination(array(
2+
'div' => 'pagination pagination-centered'
3+
)); ?>
4+
5+
<?php echo $this->Paginator->pagination(array(
6+
'div' => 'pagination pagination-right'
7+
)); ?>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php echo $this->Form->create('BoostCake', array(
2+
'inputDefaults' => array(
3+
'div' => false,
4+
'wrapInput' => false
5+
),
6+
'class' => 'well'
7+
)); ?>
8+
<fieldset>
9+
<legend>Legend</legend>
10+
<?php echo $this->Form->input('text', array(
11+
'label' => 'Label name',
12+
'placeholder' => 'Type something…',
13+
'after' => '<span class="help-block">Example block-level help text here.</span>'
14+
)); ?>
15+
<?php echo $this->Form->input('checkbox', array(
16+
'label' => 'Check me out'
17+
)); ?>
18+
<?php echo $this->Form->submit('Submit', array(
19+
'div' => false,
20+
'class' => 'btn'
21+
)); ?>
22+
</fieldset>
23+
<?php echo $this->Form->end(); ?>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php echo $this->Form->create('BoostCake', array(
2+
'inputDefaults' => array(
3+
'div' => 'control-group',
4+
'label' => array(
5+
'class' => 'control-label'
6+
),
7+
'wrapInput' => 'controls'
8+
),
9+
'class' => 'well form-horizontal'
10+
)); ?>
11+
<?php echo $this->Form->input('email', array(
12+
'placeholder' => 'Email'
13+
)); ?>
14+
<?php echo $this->Form->input('password', array(
15+
'placeholder' => 'Password'
16+
)); ?>
17+
<?php echo $this->Form->input('remember', array(
18+
'label' => 'Remember me',
19+
'afterInput' => $this->Form->submit('Sign in', array(
20+
'class' => 'btn'
21+
))
22+
)); ?>
23+
<?php echo $this->Form->end(); ?>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php echo $this->Form->create('BoostCake', array(
2+
'inputDefaults' => array(
3+
'div' => false,
4+
'label' => false,
5+
'wrapInput' => false
6+
),
7+
'class' => 'well form-inline'
8+
)); ?>
9+
<?php echo $this->Form->input('email', array(
10+
'class' => 'input-small',
11+
'placeholder' => 'Email'
12+
)); ?>
13+
<?php echo $this->Form->input('password', array(
14+
'class' => 'input-small',
15+
'placeholder' => 'Password'
16+
)); ?>
17+
<?php echo $this->Form->input('remember', array(
18+
'label' => array(
19+
'text' => 'Remember me',
20+
'class' => 'checkbox'
21+
),
22+
'checkboxDiv' => false
23+
)); ?>
24+
<?php echo $this->Form->submit('Sign in', array(
25+
'div' => false,
26+
'class' => 'btn'
27+
)); ?>
28+
<?php echo $this->Form->end(); ?>
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
<?php echo $this->Form->create('BoostCake', array(
2+
'inputDefaults' => array(
3+
'div' => 'control-group',
4+
'label' => array(
5+
'class' => 'control-label'
6+
),
7+
'wrapInput' => 'controls'
8+
),
9+
'class' => 'well form-horizontal'
10+
)); ?>
11+
<?php echo $this->Form->input('select', array(
12+
'label' => array(
13+
'text' => 'Select Nested Options'
14+
),
15+
'empty' => '選択してください',
16+
'options' => array(
17+
'東京' => array(
18+
1 => '渋谷',
19+
2 => '秋葉原'
20+
),
21+
'大阪' => array(
22+
3 => '梅田',
23+
4 => '難波'
24+
)
25+
),
26+
)); ?>
27+
<?php echo $this->Form->input('select', array(
28+
'label' => array(
29+
'text' => 'Select Nested Options Checkbox'
30+
),
31+
'class' => 'checkbox inline',
32+
'multiple' => 'checkbox',
33+
'options' => array(
34+
'東京' => array(
35+
1 => '渋谷',
36+
2 => '秋葉原'
37+
),
38+
'大阪' => array(
39+
3 => '梅田',
40+
4 => '難波'
41+
)
42+
)
43+
)); ?>
44+
<?php echo $this->Form->input('radio', array(
45+
'type' => 'radio',
46+
'before' => '<label class="control-label">Radio</label>',
47+
'legend' => false,
48+
'options' => array(
49+
1 => 'Option one is this and that—be sure to include why it\'s great',
50+
2 => 'Option two can be something else and selecting it will deselect option one'
51+
)
52+
)); ?>
53+
<?php echo $this->Form->input('username', array(
54+
'placeholder' => 'Username',
55+
'div' => 'control-group',
56+
'label' => array(
57+
'text' => 'Prepend',
58+
),
59+
'beforeInput' => '<div class="input-prepend"><span class="add-on">@</span>',
60+
'afterInput' => '</div>'
61+
)); ?>
62+
<?php echo $this->Form->input('price', array(
63+
'label' => array(
64+
'text' => 'Append',
65+
),
66+
'beforeInput' => '<div class="input-append">',
67+
'afterInput' => '<span class="add-on">.00</span></div>'
68+
)); ?>
69+
<?php echo $this->Form->input('price_error', array(
70+
'label' => array(
71+
'text' => 'Append Error',
72+
),
73+
'beforeInput' => '<div class="input-append">',
74+
'afterInput' => '<span class="add-on">.00</span></div>'
75+
)); ?>
76+
<?php echo $this->Form->input('password', array(
77+
'label' => array(
78+
'text' => 'Show Error Message'
79+
),
80+
'placeholder' => 'Password',
81+
)); ?>
82+
<?php echo $this->Form->input('password', array(
83+
'label' => array(
84+
'text' => 'Hide Error Message'
85+
),
86+
'placeholder' => 'Password',
87+
'errorMessage' => false
88+
)); ?>
89+
<?php echo $this->Form->input('checkbox', array(
90+
'label' => array('class' => null),
91+
'afterInput' => '<span class="help-block">Checkbox Bootstrap Style</span>'
92+
)); ?>
93+
<?php echo $this->Form->input('checkbox', array(
94+
'div' => false,
95+
'label' => false,
96+
'before' => '<label class="control-label">Checkbox</label>',
97+
'wrapInput' => 'controls',
98+
'afterInput' => '<span class="help-block">Checkbox CakePHP Style</span>'
99+
)); ?>
100+
<div class="form-actions">
101+
<?php echo $this->Form->submit('Save changes', array(
102+
'div' => false,
103+
'class' => 'btn btn-primary'
104+
)); ?>
105+
<button type="button" class="btn">Cancel</button>
106+
</div>
107+
<?php echo $this->Form->end(); ?>

View/Elements/bootstrap2/pager.ctp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?php echo $this->Paginator->pager(); ?>
2+
3+
<?php echo $this->Paginator->pager(array(
4+
'prev' => '← Older',
5+
'next' => 'Newer →'
6+
)); ?>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php echo $this->Form->create('BoostCake', array(
2+
'inputDefaults' => array(
3+
'div' => false,
4+
'wrapInput' => false
5+
),
6+
'class' => 'well form-search'
7+
)); ?>
8+
<?php echo $this->Form->input('text', array(
9+
'label' => false,
10+
'class' => 'input-medium search-query',
11+
)); ?>
12+
<?php echo $this->Form->submit('Search', array(
13+
'div' => false,
14+
'class' => 'btn'
15+
)); ?>
16+
<?php echo $this->Form->end(); ?>

0 commit comments

Comments
 (0)