Skip to content

Commit

Permalink
fix: Align the Tools button
Browse files Browse the repository at this point in the history
  • Loading branch information
hussainshaikh12 authored and nijel committed Oct 23, 2023
1 parent 8eb2504 commit 144ce6e
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions weblate/templates/translate.html
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,18 @@ <h4 class="panel-title">
{% crispy form %}
</div>
<div class="panel-footer">
{% with flag_actions=unit.get_flag_actions %}
{% if locked %}
<p class="text-danger">{% trans "This translation is currently locked." %}</p>
{% elif not user_can_translate and not user_can_edit_flags %}
<p class="text-danger">{{ user_can_translate.reason }}</p>
{% elif not user_can_translate and user_can_edit_flags and not unit.translation.component.is_glossary %}
<p class="text-danger">{% trans "Insufficient privileges for saving translations." %}</p>
{% endif %}
<div>
{% with flag_actions=unit.get_flag_actions %}
{% if user_can_delete or user_can_edit_flags and flag_actions or user_can_add_unit or user_can_translate and unit.translation.component.is_multivalue %}
<div class="btn-group pull-right flip">
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" id="unit_tools_dropdown">
<button type="button" class="btn btn-primary dropdown-toggle btn-spaced" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" id="unit_tools_dropdown">
{% trans "Tools" %} <span class="caret"></span>
</button>
<ul class="dropdown-menu">
Expand All @@ -188,13 +196,6 @@ <h4 class="panel-title">
</div>
{% endif %}
{% endwith %}
{% if locked %}
<p class="text-danger">{% trans "This translation is currently locked." %}</p>
{% elif not user_can_translate and not user_can_edit_flags %}
<p class="text-danger">{{ user_can_translate.reason }}</p>
{% elif not user_can_translate and user_can_edit_flags and not unit.translation.component.is_glossary %}
<p class="text-danger">{% trans "Insufficient privileges for saving translations." %}</p>
{% endif %}
<button class="btn btn-primary" type="submit" name="save" tabindex="150"
{% if locked %}
disabled="disabled"
Expand Down Expand Up @@ -222,6 +223,7 @@ <h4 class="panel-title">
>{% icon "suggest.svg" %} {% trans "Suggest" %}</button>
{% endif %}
<a class="btn btn-warning btn-spaced" href="{{ next_unit_url }}" rel="next" tabindex="153">{% if LANGUAGE_BIDI %}{% icon "rewind.svg" %}{% else %}{% icon "fast-forward.svg" %}{% endif %} {% trans "Skip" %}</a>
</div>
</div>
</div>
</form>
Expand Down

0 comments on commit 144ce6e

Please sign in to comment.