You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
79 lines
2.1 KiB
79 lines
2.1 KiB
12 years ago
|
<?php
|
||
|
|
||
|
use yii\helpers\Html;
|
||
|
use yii\gii\CodeFile;
|
||
|
|
||
|
/**
|
||
11 years ago
|
* @var \yii\web\View $this
|
||
|
* @var \yii\gii\Generator $generator
|
||
12 years ago
|
* @var CodeFile[] $files
|
||
|
* @var array $answers
|
||
|
*/
|
||
|
?>
|
||
|
<div class="default-view-files">
|
||
|
<p>Click on the above <code>Generate</code> button to generate the files selected below:</p>
|
||
|
|
||
|
<table class="table table-bordered table-striped table-condensed">
|
||
|
<thead>
|
||
|
<tr>
|
||
|
<th class="file">Code File</th>
|
||
|
<th class="action">Action</th>
|
||
|
<th>
|
||
|
<?php
|
||
|
foreach ($files as $file) {
|
||
|
if ($file->operation !== CodeFile::OP_SKIP) {
|
||
|
echo '<input type="checkbox" id="check-all">';
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
?>
|
||
|
</th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody>
|
||
|
<?php foreach ($files as $file): ?>
|
||
11 years ago
|
<tr class="<?= $file->operation ?>">
|
||
12 years ago
|
<td class="file">
|
||
11 years ago
|
<?= Html::a(Html::encode($file->getRelativePath()), ['preview', 'file' => $file->id], ['class' => 'preview-code', 'data-title' => $file->getRelativePath()]) ?>
|
||
12 years ago
|
<?php if ($file->operation === CodeFile::OP_OVERWRITE): ?>
|
||
11 years ago
|
<?= Html::a('diff', ['diff', 'file' => $file->id], ['class' => 'diff-code label label-warning', 'data-title' => $file->getRelativePath()]) ?>
|
||
12 years ago
|
<?php endif; ?>
|
||
|
</td>
|
||
|
<td class="action">
|
||
|
<?php
|
||
|
if ($file->operation === CodeFile::OP_SKIP) {
|
||
|
echo 'unchanged';
|
||
|
} else {
|
||
|
echo $file->operation;
|
||
|
}
|
||
|
?>
|
||
|
</td>
|
||
|
<td class="check">
|
||
|
<?php
|
||
|
if ($file->operation === CodeFile::OP_SKIP) {
|
||
|
echo ' ';
|
||
|
} else {
|
||
11 years ago
|
echo Html::checkBox("answers[{$file->id}]", isset($answers) ? isset($answers[$file->id]) : ($file->operation === CodeFile::OP_CREATE));
|
||
12 years ago
|
}
|
||
|
?>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<?php endforeach; ?>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
|
||
12 years ago
|
<div class="modal fade" id="preview-modal" tabindex="-1" role="dialog">
|
||
12 years ago
|
<div class="modal-dialog">
|
||
|
<div class="modal-content">
|
||
|
<div class="modal-header">
|
||
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||
|
<h4 class="modal-title">Modal title</h4>
|
||
|
</div>
|
||
|
<div class="modal-body">
|
||
|
<p>Please wait ...</p>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|