Locatizations.
[wolnelektury.git] / src / club / templates / club / schedule.html
index 7ae714e..5bb7733 100644 (file)
-{% extends "base/base.html" %}
+{% extends "base_simple.html" %}
+{% load i18n %}
 
 
-{% block titleextra %}Towarzystwo Przyjaciół Wolnych Lektur{% endblock %}
+{% block titleextra %}{% trans "Wolne Lektury potrzebują Twojej pomocy!" %}{% endblock %}
 
 
 {% block body %}
-<div class="white-box normal-text">
-
-<h1>
-Cieszymy się, że jesteś z nami! Dziękujemy za wsparcie!
-</h1>
-<p>
-Od <strong>{{ schedule.started_at.date }}</strong>
-{% if schedule.expires_at %}
-  do <strong>{{ schedule.expires_at.date }}</strong>
-{% endif %}
-wspierasz nas kwotą {{ schedule.amount }} zł{% if schedule.monthly %} miesięcznie{% endif %}{% if schedule.yearly %} rocznie{% endif %}.
-</p>
+
+  <h1>
+    {% trans "Cieszymy się, że jesteś z nami! Dziękujemy za wsparcie!" %}
+  </h1>
+  <div class="white-box normal-text">
+    <p>
+
+
+    {% if schedule.payed_at %}
+      {% trans "Kwota" %}:
+      {{ schedule.amount }} zł
+
+      <br>
+
+      {% trans "Pierwsza wpłata" %}:
+      {{ schedule.payed_at.date }}
+
+      <br>
+
+      {% if schedule.is_expired %}
+        <strong style="color: red">
+          {% trans "Status darczyńcy nieaktywny od" %}
+          {{ schedule.expires_at.date }}
+        </strong>
+      {% else %}
+        <strong style="color: green">
+          {% trans "Status darczyńcy aktywny" %}
+          {% if schedule.get_payment_method.expiration_reliable %}
+            {% trans "do" %}
+            {{ schedule.expires_at.date }}
+          {% endif %}
+        </strong>
+      {% endif %}
+
+      <br>
+
+  {% endif %}
+
+
 
 {% if schedule.is_active %}
   {% if schedule.is_recurring %}
      {% if schedule.is_cancelled %}
-         <p><strong>Płatność anulowana.</strong></p>
+         <p><strong>{% trans "Płatność anulowana." %}</strong></p>
          <p>
-           <a style="background:#018189;color:white;border-radius: 10px;padding:1em 2em" href="/towarzystwo/dolacz/">Wpłać ponownie</a>
+           <a style="background:#018189;color:white;border-radius: 10px;padding:1em 2em" href="/pomagam/">{% trans "Wpłać ponownie" %}</a>
          </p>
      {% else %}
-       <form class="wlform" method='post' action="{% url 'club_cancel' schedule.key %}">
-        {% csrf_token %}
-       <button type="submit" class="submit" style="font-size: .9em">Anuluj kolejną płatność</button>
-       </form>
+         {% if schedule.get_payment_method.updateable %}
+           <form method='post' action='' class="wlform">
+             {% csrf_token %}
+             <button type="submit" class="submit">
+               {% trans "Zaktualizuj dane płatności" %}
+             </button>
+           </form>
+           <br>
+         {% endif %}
+
+         {% if schedule.get_payment_method.cancellable %}
+           <form class="wlform" method='post' action="{% url 'club_cancel' schedule.key %}">
+             {% csrf_token %}
+            <button type="submit" class="submit" style="font-size: .9em">{% trans "Zrezygnuj z kolejnych płatności" %}</button>
+           </form>
+         {% endif %}
      {% endif %}
   {% else %}
      <form class="wlform" method='post' action=''>
        {% csrf_token %}
-       <button type="submit" class="submit">Dorzuć się ponownie</button>
+       <button type="submit" class="submit">{% trans "Dorzuć się ponownie" %}</button>
      </form>
   {% endif %}
 
 
 {% else %}
- {% if schedule.is_expired %}
-   Członkostwo wygasło.
-   <form method='post' action='' class="wlform">
+  {% if schedule.is_expired %}
+
+    <form method='post' action='' class="wlform">
+      {% csrf_token %}
+      <button type="submit" class="submit">
+        {% if schedule.is_recurring %}
+          {% trans "Zaktualizuj dane płatności" %}
+        {% else %}
+          {% trans "Dorzuć się ponownie" %}
+        {% endif %}
+      </button>
+    </form>
+
+    {% if schedule.get_payment_method.cancellable %}
+      <br>
+      <form class="wlform" method='post' action="{% url 'club_cancel' schedule.key %}">
         {% csrf_token %}
-       <button type="submit" class="submit">Dorzuć się ponownie</button>
-   </form>
+       <button type="submit" class="submit" style="font-size: .9em">{% trans "Zrezygnuj z kolejnych płatności" %}</button>
+      </form>
+    {% endif %}
 
 
  {% else %}
   {% if not schedule.payed_at %}
-   <p>Płatność nie została jeszcze wykonana.</p>
+   <p>{% trans "Płatność nie została jeszcze wykonana." %}</p>
    {% if schedule.payuorder_set.exists %}
-     Czekamy na potwierdzenie płatności.
+     {% trans "Czekamy na potwierdzenie płatności." %}
    {% else %}
 
-     <form method='post' action=''>
+     <form method='post' action='' class="wlform">
         {% csrf_token %}
-       <button type="submit" class="submit">Dorzuć się</button>
+       <button type="submit" class="submit">{% trans "Dokończ płatność" %}</button>
      </form>
 
    {% endif %}
@@ -66,34 +120,35 @@ wspierasz nas kwotą {{ schedule.amount }} zł{% if schedule.monthly %} miesięc
 {% endif %}
 
 
-<hr style="margin: 2em 0;">
+{% if not schedule.membership %}
 
+  <hr style="margin: 2em 0;">
 
-<h2>Towarzystwo Przyjaciół Wolnych Lektur</h2>
+  <h2>{% trans "Powiązanie z kontem użytkownika" %}</h2>
 
 
-{% if schedule.membership %}
   <p>
-  Należysz już do Towarzystwa Przyjaciół Wolnych Lektur!</p>
-{% else %}
-
-<p>
-Twoje wsparcie upoważnia Cię do członkostwa w Towarzystwie Przyjaciół Wolnych Lektur.
-Aby w pełni z niego korzystać, zapisz się do Towarzystwa swoim kontem użytkownika na Wolnych Lekturach.
-</p>
-
-
-<p>
-<a style="background:#018189;color:white;border-radius: 10px;padding:1em 2em;" href="{% url 'club_claim' schedule.key %}">Zapisz się</a>
+    {% blocktrans trimmed %}
+      Twoje wsparcie upoważnia Cię do przedpremierowego dostępu do publikacji.
+      Aby z niego korzystać, powiąż darowiznę ze swoim kontem użytkownika na Wolnych Lekturach.
+    {% endblocktrans %}
+  </p>
+
+
+<p style="margin-top:2em;">
+  <a style="background:#018189;color:white;border-radius: 10px;padding:1em 2em;" href="{% url 'club_claim' schedule.key %}">
+    {% if request.user.is_authenticated %}
+      {% blocktrans trimmed with user=request.user.username %}
+        Powiąż darowiznę z kontem <strong>{{ user }}</strong>
+      {% endblocktrans %}
+    {% else %}
+      {% trans "Zaloguj się i powiąż darowiznę z kontem" %}
+    {% endif %}
+  </a>
 </p>
 {% endif %}
 
 
-
-
-       
-<a href="">
-
 </div>
 
 {% endblock %}