Skip to content

Commit

Permalink
simplify table of fleet numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
jclgoodwin committed May 23, 2024
1 parent 0e29ae9 commit 7ee7ea3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
4 changes: 0 additions & 4 deletions frontend/css/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -769,10 +769,6 @@ table {
overflow: hidden;
}

.number {
text-align: right;
}

.trivia {
display: none; // we'll show it at bigger screen widths
}
Expand Down
19 changes: 5 additions & 14 deletions vehicles/templates/operator_vehicles.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,20 +73,11 @@ <h1>{% firstof parent object %}</h1>
<tbody>
{% for vehicle in vehicles %}
<tr id="{{ vehicle.slug }}">
{% if form %}
<td>{% if vehicle.is_editable %}<input type="checkbox" name="vehicle" value="{{ vehicle.id }}">{% endif %}</td>
{% endif %}
{% if not vehicle.fleet_code and not vehicle.fleet_number and not vehicle.reg %}
<td colspan="2">
<a href="{{ vehicle.get_absolute_url }}">{{ vehicle }}</a>
</td>
{% else %}
<td class="number tabular">
{% if vehicle.fleet_code or vehicle.fleet_number %}
<a href="{{ vehicle.get_absolute_url }}">{% firstof vehicle.fleet_code vehicle.fleet_number %}</a>
{% endif %}
</td>
<td>{% if vehicle.reg %}<a href="{{ vehicle.get_absolute_url }}"{% if vehicle.has_uk_reg %} class="reg"{% endif %}>{{ vehicle.get_reg }}</a>{% endif %}</td>
<td class="tabular"{% if not vehicle.reg %} colspan="2"{% endif %}>
<a href="{{ vehicle.get_absolute_url }}">{% firstof vehicle.fleet_code vehicle.fleet_number vehicle.code %}</a>
</td>
{% if vehicle.reg %}
<td><a href="{{ vehicle.get_absolute_url }}"{% if vehicle.has_uk_reg %} class="reg"{% endif %}>{{ vehicle.get_reg }}</a></td>
{% endif %}
{% if not parent %}<td class="last-seen">
{{ vehicle.last_seen.service }}
Expand Down

0 comments on commit 7ee7ea3

Please sign in to comment.