Skip to content

Commit

Permalink
fix all cmd, ready to release new version
Browse files Browse the repository at this point in the history
  • Loading branch information
aviggngyv committed Nov 5, 2017
1 parent f2bb58a commit c4ee636
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 19 deletions.
1 change: 1 addition & 0 deletions core/command/ContentTypeCreateCmd.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ protected function execute(InputInterface $input, OutputInterface $output) {
'--core' => '1.x',
'--package' => 'Custom',
'--module-file' => 'yes',
'--dependencies' => '',
'isContentType' => TRUE,
);

Expand Down
2 changes: 1 addition & 1 deletion core/command/ModuleCreateCmd.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ protected function execute(InputInterface $input, OutputInterface $output) {
$core = $input->getOption('core');
$package = $input->getOption('package');
$moduleFile = $input->getOption('module-file');
$dependencies = explode(',', $input->getOption('dependencies'));
$dependencies = $input->getOption('dependencies') == '' ? '' : explode(',', $input->getOption('dependencies'));
$isContentType = $input->getArgument('isContentType');

$dir .= '/'.$machineName;
Expand Down
16 changes: 8 additions & 8 deletions core/command/templates/ct-add.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
<label class="layui-form-label"><?php print $field['lable']; ?></label>
<div class="layui-input-block">
<select name="<?php echo $field['name']; ?>">
<?php foreach ($field['html_type_option'] as $h):?>
<option value="<?php echo $h['value']; ?>"><?php echo $h['lable']; ?></option>
<?php endforeach;?>
</select>
<?php foreach ($field['html_type_option'] as $h):?>
<option value="<?php echo $h['value']; ?>"><?php echo $h['lable']; ?></option>
<?php endforeach;?>
</select>
</div>
</div>
<?php elseif($field['html_type'] == 'textarea'): ?>
Expand All @@ -50,10 +50,10 @@
<div class="layui-form-item">
<label class="layui-form-label"><?php print $field['lable']; ?></label>
<div class="layui-input-block">
<?php foreach ($field['html_type_option'] as $h):?>
<input type="radio" name="<?php echo $field['name']; ?>" value="<?php echo $h['value']; ?>" title="<?php echo $h['lable']; ?>">
<?php endforeach;?>
</div>
<?php foreach ($field['html_type_option'] as $h):?>
<input type="radio" name="<?php echo $field['name']; ?>" value="<?php echo $h['value']; ?>" title="<?php echo $h['lable']; ?>">
<?php endforeach;?>
</div>
</div>
<?php elseif($field['html_type'] == 'file' || $field['html_type'] == 'image'): ?>

Expand Down
11 changes: 2 additions & 9 deletions core/command/templates/ct-install.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,6 @@
'not null' => TRUE,
'description' => 'ID of <?php print $type; ?>.',
),
'title' => array(
'type' => 'varchar',
'length' => 60,
'not null' => TRUE,
'default' => '',
'description' => '<?php print $type; ?> title.',
),
<?php foreach($fields as $field): ?>
<?php if($field['type'] == 'int'): ?>
'<?php print $field['name']; ?>' => array(
Expand All @@ -45,7 +38,7 @@
'description' => '<?php print $type; ?> <?php print $field['name']; ?>.',
),
<?php else: ?>
'<?php print $field['name']; ?>' => array(
'<?php print $field['name']; ?>' => array(
'type' => 'varchar',
'length' => <?php print $field['type_setting']['length']; ?>,
'not null' => <?php print $field['type_setting']['notnull']; ?>,
Expand All @@ -54,7 +47,7 @@
),
<?php endif; ?>
<?php endforeach; ?>
'uid' => array(
'uid' => array(
'type' => 'varchar',
'length' => 60,
'not null' => TRUE,
Expand Down
2 changes: 1 addition & 1 deletion core/command/templates/ctcontroller.php.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<?php foreach($fields as $field): ?>
'<?php print $field['name']; ?>' => $<?php print $field['name']; ?>,
<?php endforeach; ?>
'uid' => $user->uid,
'uid' => $user->uid,
'created' => time(),
'updated' => time(),
))
Expand Down

0 comments on commit c4ee636

Please sign in to comment.