Skip to content

Commit

Permalink
assets/buttons: increas max width templates/mapy_filter_and_sort: mv …
Browse files Browse the repository at this point in the history
…map switch to first line to match budgeting fixes #5170
  • Loading branch information
philli-m committed Jul 10, 2023
1 parent 55b2eab commit 075e7ac
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 29 deletions.
Original file line number Diff line number Diff line change
@@ -1,34 +1,33 @@
{% load i18n contrib_tags %}

<div class="control-bar">
{% if mode == 'map' %}
{% combined_url_parameter request.GET mode='list' as url_par %}
<div class="btn-group__container control-bar__item">
<div class="btn-group" role="group">
<a class="btn btn--light" href="{{ url_par }}" aria-label="{% translate 'View as list' %}">
<i class="fa fa-list" aria-hidden="true"></i>
<span>{% translate 'List' %}</span>
</a><div class="btn switch--btn active" aria-label="{% translate 'View as map' %}">
<i class="fa fa-map" aria-hidden="true"></i>
<span>{% translate 'Map' %}</span>
</div>
</div>
</div>
{% else %}
{% combined_url_parameter request.GET mode='map' as url_par %}
<div class="btn-group__container control-bar__item">
<div class="btn-group" role="group">
<div class="btn switch--btn active" aria-label="{% translate 'View as list' %}">
<i class="fa fa-list" aria-hidden="true"></i>
<span>{% translate 'List' %}</span>
</div><a class="btn btn--light" href="{{ url_par }}" aria-label="{% translate 'View as map' %}">
<i class="fa fa-map" aria-hidden="true"></i>
<span>{% translate 'Map' %}</span>
</a>
</div>
{% if mode == 'map' %}
{% combined_url_parameter request.GET mode='list' as url_par %}
<div class="btn-group__container control-bar__item">
<div class="btn-group" role="group">
<a class="btn btn--light" href="{{ url_par }}" aria-label="{% translate 'View as list' %}">
<i class="fa fa-list" aria-hidden="true"></i>
<span>{% translate 'List' %}</span>
</a><div class="btn switch--btn active" aria-label="{% translate 'View as map' %}">
<i class="fa fa-map" aria-hidden="true"></i>
<span>{% translate 'Map' %}</span>
</div>
{% endif %}

</div>
</div>
{% else %}
{% combined_url_parameter request.GET mode='map' as url_par %}
<div class="btn-group__container control-bar__item">
<div class="btn-group" role="group">
<div class="btn switch--btn active" aria-label="{% translate 'View as list' %}">
<i class="fa fa-list" aria-hidden="true"></i>
<span>{% translate 'List' %}</span>
</div><a class="btn btn--light" href="{{ url_par }}" aria-label="{% translate 'View as map' %}">
<i class="fa fa-map" aria-hidden="true"></i>
<span>{% translate 'Map' %}</span>
</a>
</div>
</div>
{% endif %}
<div class="control-bar">
{% for field in filter.form %}
{% if field.name != 'ordering' %}
{{ field }}
Expand Down
2 changes: 1 addition & 1 deletion meinberlin/assets/scss/components/_button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@

.btn--select {
@include text-truncate;
max-width: 15em;
max-width: 17rem;

// leave space for caret
padding-right: 2.2em;
Expand Down

0 comments on commit 075e7ac

Please sign in to comment.