mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Variation matrix: CSS sugar
This commit is contained in:
@@ -49,4 +49,19 @@ td > .form-group > .checkbox {
|
||||
|
||||
.container ul.nav-pills {
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
.variation-matrix {
|
||||
td .form-group, .checkbox {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
@media (min-width: @screen-sm-min) {
|
||||
.variation-matrix > tbody > tr > td {
|
||||
line-height: 34px;
|
||||
|
||||
input[type=checkbox] {
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,42 +2,48 @@
|
||||
{% load i18n %}
|
||||
{% load bootstrap3 %}
|
||||
{% block inside %}
|
||||
<form action="" method="post">
|
||||
{% csrf_token %}
|
||||
{% for major in forms %}
|
||||
<form action="" method="post">
|
||||
{% csrf_token %}
|
||||
{% for major in forms %}
|
||||
{% if major.row %}
|
||||
<h3>{{ major.row }}</h3>
|
||||
<h3>{{ major.row }}</h3>
|
||||
{% endif %}
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
{% for val in properties.1.values.all %}
|
||||
<th>{{ val.value }}</th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for sub in major.forms %}
|
||||
<tr>
|
||||
<td>{{ sub.row.value }}</td>
|
||||
{% for form in sub.forms %}
|
||||
<td>
|
||||
{% bootstrap_field form.active layout='inline' %}
|
||||
{% bootstrap_field form.default_price layout='inline' %}
|
||||
{{ form.default_price.errors }}
|
||||
</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endfor %}
|
||||
<div class="form-group submit-group">
|
||||
<table class="table variation-matrix">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
{% for val in properties.1.values.all %}
|
||||
<th>{{ val.value }}</th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for sub in major.forms %}
|
||||
<tr>
|
||||
<td>{{ sub.row.value }}</td>
|
||||
{% for form in sub.forms %}
|
||||
<td>
|
||||
<div class="row">
|
||||
<div class="col-sm-5">
|
||||
{% bootstrap_field form.active layout='inline' %}
|
||||
</div>
|
||||
<div class="col-sm-7">
|
||||
{% bootstrap_field form.default_price layout='inline' %}
|
||||
</div>
|
||||
</div>
|
||||
{{ form.default_price.errors }}
|
||||
</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endfor %}
|
||||
<div class="form-group submit-group">
|
||||
<button type="submit" class="btn btn-primary btn-save">
|
||||
{% trans "Save" %}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user