mirror of
https://github.com/godotengine/godot-asset-library.git
synced 2025-12-31 21:48:29 +03:00
fix edit table layout
This commit is contained in:
@@ -256,12 +256,24 @@ footer {
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.pagination-stats {
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
||||
.table-bordered.table-edit > tbody > tr > th {
|
||||
width: 1%;
|
||||
white-space: nowrap;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.table-bordered.table-edit img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
@media(prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--base-color-text: hsla(200, 00%, 100%, 0.85);
|
||||
@@ -477,22 +489,37 @@ footer {
|
||||
.asset-footer {
|
||||
border-color: var(--primary-background-color)
|
||||
}
|
||||
|
||||
|
||||
.table-bordered {
|
||||
border: 2px solid var(--secondary-background-color);
|
||||
}
|
||||
|
||||
.table-bordered > thead > tr > th,
|
||||
.table-bordered > tbody > tr > td,
|
||||
.table-bordered > tbody > tr > th {
|
||||
.table-bordered:not(.table-edit) > tbody > tr > td,
|
||||
.table-bordered:not(.table-edit) > tbody > tr > th {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.table-bordered thead {
|
||||
.table-bordered thead > tr > th {
|
||||
border: none;
|
||||
border-bottom: 2px solid var(--default-background-color);
|
||||
}
|
||||
|
||||
.table-striped > tbody > tr:nth-of-type(2n+1) {
|
||||
background-color: var(--secondary-background-color);
|
||||
}
|
||||
|
||||
.table-bordered.table-edit > tbody > tr > td,
|
||||
.table-bordered.table-edit > tbody > tr > th {
|
||||
border-color: var(--secondary-background-color);
|
||||
}
|
||||
|
||||
.table-bordered.table-edit > thead > tr > th:first-child {
|
||||
border-bottom: 1px solid var(--secondary-background-color);
|
||||
}
|
||||
|
||||
.table-bordered.table-edit > tbody > tr > th {
|
||||
background-color: var(--primary-background-color);
|
||||
border-right: 2px solid var(--default-background-color);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
<!-- Bootstrap -->
|
||||
<link href="<?php echo raw($basepath) ?>/assets/css/bootstrap-3.4.1.min.css" rel="stylesheet">
|
||||
<link href="<?php echo raw($basepath) ?>/assets/css/base.css?6" rel="stylesheet">
|
||||
<link href="<?php echo raw($basepath) ?>/assets/css/base.css?7" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
@@ -90,23 +90,25 @@ $preview_field_names = [
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<table class="table table-bordered">
|
||||
<tbody>
|
||||
<table class="table table-bordered table-striped table-edit">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Property</th>
|
||||
<th></th>
|
||||
<?php if(isset($data['original'])) { ?>
|
||||
<th style="min-width: 50%" class="text-center">Old/Current</th>
|
||||
<?php } ?>
|
||||
<th style="min-width: 50%" class="text-center">New/Edit</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($field_names as $field => $name) { ?>
|
||||
<tr>
|
||||
<td>
|
||||
<th scope="row">
|
||||
<?php echo raw($name) ?>
|
||||
</td>
|
||||
</th>
|
||||
<?php if(isset($data['original']) && $data[$field] === null) { ?>
|
||||
|
||||
<td colspan="2" class="text-center active">
|
||||
<td colspan="2" class="text-center">
|
||||
<?php output_field($data['original'][$field], $field, $categories) ?>
|
||||
</td>
|
||||
|
||||
@@ -126,18 +128,25 @@ $preview_field_names = [
|
||||
<?php } ?>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php foreach($data['previews'] as $i => $preview) if(isset($preview['edit_preview_id'])) { ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php foreach($data['previews'] as $i => $preview) if(isset($preview['edit_preview_id'])) { ?>
|
||||
<table class="table table-bordered table-striped table-edit">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3" class="text-center">
|
||||
<th></th>
|
||||
<th colspan="2" class="text-center">
|
||||
Preview
|
||||
<span class="label label-danger"><?php output_field(ucfirst($preview['operation']), 'preview_operation') ?></span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($preview_field_names as $field => $name) { ?>
|
||||
<tr>
|
||||
<td>
|
||||
<th scope="row">
|
||||
<?php echo raw($name) ?>
|
||||
</td>
|
||||
</th>
|
||||
<?php if(isset($preview['original']) && $preview['operation'] != "remove" && ($preview[$field] === null || $preview[$field] === $preview['original'][$field])) { ?>
|
||||
|
||||
<td colspan="2" class="text-center active">
|
||||
@@ -169,9 +178,9 @@ $preview_field_names = [
|
||||
<?php } ?>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php } ?>
|
||||
<?php if(isset($user)) { ?>
|
||||
<?php if($user['type'] >= $constants['user_type']['moderator']) { ?>
|
||||
<?php if($data['status'] == 'new') { ?>
|
||||
@@ -191,7 +200,7 @@ $preview_field_names = [
|
||||
|
||||
<?php if($data['asset_id'] == -1) { ?>
|
||||
<label class="control-label col-md-2" for="support_level">Support level:</label>
|
||||
|
||||
|
||||
<div class="col-md-10">
|
||||
<select id="support_level" name="support_level" class="form-control btn btn-default">
|
||||
<?php foreach($constants['support_level'] as $id => $name) if(is_int($id)) { ?>
|
||||
@@ -215,7 +224,7 @@ $preview_field_names = [
|
||||
<div class="form-group col-md-11">
|
||||
<div class="input-group col-md-12">
|
||||
<label class="control-label col-md-2" for="reason" required>Reason:</label>
|
||||
|
||||
|
||||
<div class="col-md-10">
|
||||
<textarea class="form-control" id="reason" name="reason" rows="4"></textarea>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user