Skip to content

Commit

Permalink
remove title from ct cmd template and add get routers
Browse files Browse the repository at this point in the history
  • Loading branch information
aviggngyv committed Nov 3, 2017
1 parent 783f524 commit f2bb58a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 14 deletions.
6 changes: 0 additions & 6 deletions core/command/templates/ct-add.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@
<body>
<div class="pd-20 <?php print $type; ?>-add">
<form class="layui-form" action="">
<div class="layui-form-item">
<label class="layui-form-label">标题</label>
<div class="layui-input-block">
<input type="text" name="title" lay-verify="title" class="layui-input">
</div>
</div>
<?php foreach ($fields as $field): ?>
<?php if($field['html_type'] == 'select'): ?>

Expand Down
6 changes: 0 additions & 6 deletions core/command/templates/ct-edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@
<body>
<div class="pd-20 <?php print $type; ?>-edit">
<form class="layui-form" action="">
<div class="layui-form-item">
<label class="layui-form-label">标题</label>
<div class="layui-input-block">
<input type="text" name="title" lay-verify="title" value="<?php print '<?php echo $'.$type.'->title; ?>'; ?>" class="layui-input">
</div>
</div>
<?php foreach ($fields as $field): ?>
<?php if($field['html_type'] == 'select'): ?>

Expand Down
2 changes: 0 additions & 2 deletions core/command/templates/ctcontroller.php.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@

$<?php print substr($module, 0, 1 ); ?>id = db_insert('<?php print $module; ?>')
->fields(array(
'title' => $title,
<?php foreach($fields as $field): ?>
'<?php print $field['name']; ?>' => $<?php print $field['name']; ?>,
<?php endforeach; ?>
Expand Down Expand Up @@ -86,7 +85,6 @@

db_update('<?php print $module; ?>')
->fields(array(
'title' => $title,
<?php foreach($fields as $field): ?>
'<?php print $field['name']; ?>' => $<?php print $field['name']; ?>,
<?php endforeach; ?>
Expand Down
1 change: 1 addition & 0 deletions core/command/templates/routing-controller.yml.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@
options:
nocache: TRUE
<?php endif; ?>

<?php endforeach; ?>
7 changes: 7 additions & 0 deletions core/lib/Hunter/App/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,13 @@ public function getPermissionsList() {
return $this->permissionList;
}

/**
* {@inheritdoc}
*/
public function getRoutes() {
return $this->routers;
}

/**
* {@inheritdoc}
*/
Expand Down

0 comments on commit f2bb58a

Please sign in to comment.