Skip to content
This repository was archived by the owner on Jan 3, 2024. It is now read-only.

Commit 6c12866

Browse files
committed
Tidied up the readme a bit, also broke up the doc blocks and added missing return types
1 parent 8012868 commit 6c12866

File tree

7 files changed

+23
-7
lines changed

7 files changed

+23
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ composer require 'davidyell/nice-admin-bake-scripts:dev-master'
2323
```
2424

2525
## Setup
26-
In your `src/config/bootstrap.php` you'll need to load the plugin with `Plugin::load('NiceAdminBakeTheme');`
26+
In your `config/bootstrap.php` you'll need to load the plugin with `Plugin::load('NiceAdminBakeTheme');`
2727

2828
In your admin layout, you'll need to include the theme and javascript.
2929

src/Template/Bake/Element/Controller/add.ctp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ $compact = ["'" . $singularName . "'"];
1818
/**
1919
* Add method
2020
*
21-
* @return void Redirects on successful add, renders view otherwise.
21+
* @return \Cake\Network\Response|void Redirects on successful add, renders view otherwise.
2222
*/
2323
public function add()
2424
{

src/Template/Bake/Element/Controller/edit.ctp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ $compact = ["'" . $singularName . "'"];
2222
* Edit method
2323
*
2424
* @param string|null $id <%= $singularHumanName %> id.
25-
* @return void Redirects on successful edit, renders view otherwise.
25+
*
26+
* @return \Cake\Network\Response|void Redirects on successful edit, renders view otherwise.
27+
*
2628
* @throws \Cake\Network\Exception\NotFoundException When record not found.
2729
*/
2830
public function edit($id = null)

src/Template/Bake/Element/Controller/view.ctp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ $allAssociations = array_merge(
2424
* View method
2525
*
2626
* @param string|null $id <%= $singularHumanName %> id.
27+
*
2728
* @return void
29+
*
2830
* @throws \Cake\Network\Exception\NotFoundException When record not found.
2931
*/
3032
public function view($id = null)

src/Template/Bake/Model/table.ctp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class <%= $name %>Table extends Table
3535
* Initialize method
3636
*
3737
* @param array $config The configuration for the Table.
38+
*
3839
* @return void
3940
*/
4041
public function initialize(array $config)
@@ -72,6 +73,7 @@ class <%= $name %>Table extends Table
7273
* Default validation rules.
7374
*
7475
* @param \Cake\Validation\Validator $validator Validator instance.
76+
*
7577
* @return \Cake\Validation\Validator
7678
*/
7779
public function validationDefault(Validator $validator)
@@ -144,6 +146,7 @@ endforeach;
144146
* application integrity.
145147
*
146148
* @param \Cake\ORM\RulesChecker $rules The rules object to be modified.
149+
*
147150
* @return \Cake\ORM\RulesChecker
148151
*/
149152
public function buildRules(RulesChecker $rules)

src/Template/Element/navigation.ctp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<div class="user">
2-
<?= $this->Gravatar->avatar($this->request->session()->read('Auth.User.email'), 40);?>
2+
<?php
3+
$hash = md5(strtolower(trim($this->request->session()->read('Auth.User.email'))));
4+
echo "<img class='$class' src='http://www.gravatar.com/avatar/$hash?s=$size&d=mm'>";
5+
?>
36
<p>
47
<?= $this->request->session()->read('Auth.User.first_name') . ' ' . $this->request->session()->read('Auth.User.last_name')?><br>
58
<span class="status online"><i class="glyphicon glyphicon-ok-sign"></i></span> Online

src/Template/Element/top-navigation.ctp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,15 @@
1111
</div>
1212
<div id="navbar" class="navbar-collapse collapse">
1313
<ul class="nav navbar-nav navbar-right">
14-
<li <?php echo ($this->request->controller == 'Dashboards')? "class='active'" : '';?>><?php echo $this->Html->link('<i class="glyphicon glyphicon-home"></i> Dashboard', ['controller' => 'Dashboards', 'action' => 'home', 'plugin' => false], ['escape' => false]); ?></li>
15-
<li <?php echo (isset($this->request->params['pass'][0]) && $this->request->params['pass'][0] == 'help')? "class='active'" : '';?>><?php echo $this->Html->link('<i class="glyphicon glyphicon-question-sign"></i> Help', ['controller' => 'Pages', 'action' => 'display', 'help', 'prefix' => 'admin', 'plugin' => false], ['escape' => false]); ?></li>
16-
<li><?php echo $this->Html->link('<i class="glyphicon glyphicon-off"></i> Logout', ['controller' => 'Users', 'action' => 'logout', 'plugin' => false, 'prefix' => false], ['escape' => false]); ?></li>
14+
<li <?php echo ($this->request->controller == 'Dashboards')? "class='active'" : '';?>>
15+
<?php echo $this->Html->link('<i class="glyphicon glyphicon-home"></i> Dashboard', ['controller' => 'Dashboards', 'action' => 'home', 'plugin' => false], ['escape' => false]); ?>
16+
</li>
17+
<li <?php echo (isset($this->request->params['pass'][0]) && $this->request->params['pass'][0] == 'help')? "class='active'" : '';?>>
18+
<?php echo $this->Html->link('<i class="glyphicon glyphicon-question-sign"></i> Help', ['controller' => 'Pages', 'action' => 'display', 'help', 'prefix' => 'admin', 'plugin' => false], ['escape' => false]); ?>
19+
</li>
20+
<li>
21+
<?php echo $this->Html->link('<i class="glyphicon glyphicon-off"></i> Logout', ['controller' => 'Users', 'action' => 'logout', 'plugin' => false, 'prefix' => false], ['escape' => false]); ?>
22+
</li>
1723
</ul>
1824
</div>
1925
</div>

0 commit comments

Comments
 (0)