{% load i18n %}

{% if sidebar %}

    <div class="form-group">
        <div class="pull-right">
            <button type="button" ng-click="service.next()" ng-disabled="!service.questionset.next"
                    class="btn btn-default btn-xs">
                {% trans 'Skip' %}
            </button>
        </div>
        <div>
            <button type="button" ng-click="service.prev()" ng-disabled="!service.questionset.prev"
                    class="btn btn-default btn-xs">
                {% trans 'Back' %}
            </button>
        </div>
    </div>

{% else %}

    <div class="form-group questions-buttons">
        <div class="pull-right">
            <div ng-hide="service.project.read_only || service.questionset.elements.length < 1">
                <button type="button" ng-click="service.save(false)" class="btn btn-default">
                    {% trans 'Save' %}
                </button>
                <button type="button" ng-click="service.save(true)" class="btn btn-primary">
                    {% trans 'Save and proceed' %}</span>
                </button>
            </div>
            <div ng-show="service.project.read_only || service.questionset.elements.length < 1">
                <button type="button" ng-click="service.next()" class="btn btn-primary">
                    {% trans 'Proceed' %}</span>
                </button>
            </div>
        </div>

        <div>
            <button type="button" ng-click="service.prev()" ng-disabled="!service.questionset.prev"
                    class="btn btn-default">
                {% trans 'Back' %}
            </button>
            <button type="button" ng-click="service.next()" ng-disabled="!service.questionset.next"
                    class="btn btn-default">
                {% trans 'Skip' %}
            </button>
        </div>
    </div>

{% endif %}
