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.
65 lines
1.5 KiB
65 lines
1.5 KiB
12 years ago
|
<?php
|
||
|
|
||
|
use yii\gii\Generator;
|
||
|
use yii\helpers\Html;
|
||
|
use yii\gii\CodeFile;
|
||
|
|
||
|
/**
|
||
|
* @var $this \yii\base\View
|
||
|
* @var $generator \yii\gii\Generator
|
||
|
* @var CodeFile[] $files
|
||
|
*/
|
||
|
?>
|
||
|
<table class="table table-bordered table-striped table-condensed code-files">
|
||
|
<thead>
|
||
|
<tr>
|
||
|
<th class="file">Code File</th>
|
||
|
<th class="action">Action</th>
|
||
|
<th class="check">
|
||
|
<?php
|
||
|
$count = 0;
|
||
|
foreach ($files as $file) {
|
||
|
if ($file->operation !== CodeFile::OP_SKIP) {
|
||
|
$count++;
|
||
|
}
|
||
|
}
|
||
|
if ($count > 1) {
|
||
|
echo '<input type="checkbox" name="checkAll" id="check-all" />';
|
||
|
}
|
||
|
?>
|
||
|
</th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody>
|
||
|
<?php foreach ($files as $i => $file): ?>
|
||
|
<tr class="<?php echo $file->operation; ?>">
|
||
|
<td class="file">
|
||
|
<?php echo Html::a(Html::encode($file->getRelativePath()), array('code', 'file' => $i), array('class' => 'view-code', 'rel' => $file->path)); ?>
|
||
|
<?php if ($file->operation === CodeFile::OP_OVERWRITE): ?>
|
||
|
(<?php echo Html::a('diff', array('diff', 'file' => $i), array('class' => 'view-code', 'rel' => $file->path)); ?>)
|
||
|
<?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 {
|
||
|
$key = md5($file->path);
|
||
|
echo Html::checkBox("answers[$key]");
|
||
|
}
|
||
|
?>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<?php endforeach; ?>
|
||
|
</tbody>
|
||
|
</table>
|