 {% load i18n %}
<div id="feedback" feedback email="{{user.email|default_if_none:''}}">
  <a href="" ng-click="openFeedback()">
    {% trans "Napište nám"%}
  </a>
</div>
<script type="text/ng-template" id="feedback_modal.html">
    <div class="modal-header">
        <h3 class="modal-title">{% trans "Napište nám"%}</h3>
    </div>
    <div class="modal-body">
        <label>
          {% trans "Feedback text label"%}
        </label>
        <textarea ng-model="feedback.text" class="form-control" rows="8" ></textarea>
        <label>
          {% trans "Vaše emailová adresa (nepovinné)"%}
        </label>
        <input type="text" ng-model="feedback.email" class="form-control"/>
        <br>
        {%verbatim%}
        <alert ng-repeat="alert in alerts" type="{{alert.type}}"
        close="closeAlert($index)">{{alert.msg}}</alert>
        {%endverbatim%}
    </div>
    <div class="modal-footer">
        <button ng-disabled="sending" class="btn btn-primary" ng-click="send()">
          {% trans "Odeslat"%}
        </button>
        <button class="btn btn-danger" ng-click="cancel()">
          {% trans "Zavřít"%}
        </button>
    </div>
</script>

<div rating-modal ></div>
<script type="text/ng-template" id="rating_modal.html">
    <div class="modal-header text-center">
        <h3 class="modal-title">{% trans "Jak těžké jsou kladené otázky?"%}</h3>
          {% trans "Svou odpovědí nám pomáháte přizpůsobovat obtížnost otázek."%}
    </div>
    <div class="rating modal-body">
      <div class=" text-center" ng-hide="answer">
        <a class="btn btn-lg btn-success" ng-click="vote(1)">
          {% trans "Příliš lehké"%}
        </a>
        <a class="btn btn-lg btn-primary" ng-click="vote(2)">
          {% trans "Tak akorát"%}
        </a>
        <a class="btn btn-lg btn-danger" ng-click="vote(3)">
          {% trans "Příliš těžké"%}
        </a>
      <a class="pull-right" href="" ng-click="cancel()">
        {% trans "Nevím / nechci odpovídat"%}
      </a>
      <div class="clearfix"></div>
      </div>
      {%verbatim%}
      <alert ng-repeat="alert in alerts" type="{{alert.type}}"
      close="closeAlert($index)">{{alert.msg}}</alert>
      {%endverbatim%}
    </div>
    <div class="modal-footer" ng-show="answer">
        <button class="btn btn-danger" ng-click="cancel()">
          {% trans "Zavřít"%}
        </button>
    </div>
</script>
