Add login_base.html make it easy to override login template
authorKostas Papadimitriou <kpap@grnet.gr>
Thu, 15 Mar 2012 17:49:22 +0000 (19:49 +0200)
committerKostas Papadimitriou <kpap@grnet.gr>
Thu, 15 Mar 2012 17:49:22 +0000 (19:49 +0200)
snf-astakos-app/Changelog
snf-astakos-app/astakos/im/templates/im/login.html
snf-astakos-app/astakos/im/templates/im/login_base.html [new file with mode: 0644]

index 65071e3..fa3272a 100644 (file)
@@ -3,6 +3,7 @@ v0.3.6
 
 - New ASTAKOS_LOGIN_MESSAGES setting to display messages on the login page
   header
+- login_base.html to make it easy override the login.html template
 
 
 v0.3.5
index 8be10cf..b7e1e37 100644 (file)
@@ -1,63 +1 @@
-{% extends 'im/base_two_cols.html'%}
-
-{% block extra_messages %}
-    {% if not messages %}
-        {% for msg_type, msg in LOGIN_MESSAGES.items %}
-            <li class="{{ msg_type }}">{{ msg|safe }}</li>
-        {% endfor %}
-    {% endif %}
-{% endblock %}
-
-{% block signup_class %}hidden{% endblock %}
-{% block page.title %}
-Login
-{% endblock %}
-
-{% block body %}
-<div class="section">
-    <img class="pic" src="{{ IM_STATIC_URL }}images/pictures/login_pic.png" />
-</div>
-{% comment %}{% include "im/services_description.html" %}{% endcomment %}
-{% endblock body %}
-    
-{% block body.right %}
-<div class="section">
-     {% if "local" in im_modules %}
-        <form action="{% url astakos.im.target.local.login %}" method="post"
-            class="login innerlabels">{% csrf_token %}
-            <h2 class="formheader"><span>LOGIN</span></h2>
-            {% include "im/form_render.html" %}
-            <input type="hidden" name="next" value="{{ next }}">
-            <div class="form-row submit">
-                <input type="submit" class="submit altcol" value="SUBMIT" />
-                <a class="extra-link" href="{% url django.contrib.auth.views.password_reset %}">Forgot your password?</a>
-            </div>
-        </form>
-      {% endif %}
-
-          <div class="extralogin">
-              {% for o in im_modules %}
-              <div>
-            {% if o != 'local' %}
-            LOGIN using 
-            <a href="/im/login/{{ o }}{% ifnotequal next "" %}?next={{ next|urlencode }}{% endifnotequal %}" 
-                alt="{{ o|title }}">{{ o }}</a>
-            {% endif %}
-            </div>
-            {% endfor %}
-        </div>
-        {% block body.signup %}
-        {% for o in im_modules %}
-            {% if o != 'local' %}
-            <br />
-            {% endif %}
-        {% endfor %}
-        <div class="bottom">
-            {% block body.login.signup %}
-                new to okeanos ? <a href="{% url astakos.im.views.signup %}">CREATE ACCOUNT</a>
-            {% endblock %}
-            </div>
-        </div>
-        {% endblock %}
-    </div>
-{% endblock %}
+{% extends "im/login_base.html" %}
diff --git a/snf-astakos-app/astakos/im/templates/im/login_base.html b/snf-astakos-app/astakos/im/templates/im/login_base.html
new file mode 100644 (file)
index 0000000..8be10cf
--- /dev/null
@@ -0,0 +1,63 @@
+{% extends 'im/base_two_cols.html'%}
+
+{% block extra_messages %}
+    {% if not messages %}
+        {% for msg_type, msg in LOGIN_MESSAGES.items %}
+            <li class="{{ msg_type }}">{{ msg|safe }}</li>
+        {% endfor %}
+    {% endif %}
+{% endblock %}
+
+{% block signup_class %}hidden{% endblock %}
+{% block page.title %}
+Login
+{% endblock %}
+
+{% block body %}
+<div class="section">
+    <img class="pic" src="{{ IM_STATIC_URL }}images/pictures/login_pic.png" />
+</div>
+{% comment %}{% include "im/services_description.html" %}{% endcomment %}
+{% endblock body %}
+    
+{% block body.right %}
+<div class="section">
+     {% if "local" in im_modules %}
+        <form action="{% url astakos.im.target.local.login %}" method="post"
+            class="login innerlabels">{% csrf_token %}
+            <h2 class="formheader"><span>LOGIN</span></h2>
+            {% include "im/form_render.html" %}
+            <input type="hidden" name="next" value="{{ next }}">
+            <div class="form-row submit">
+                <input type="submit" class="submit altcol" value="SUBMIT" />
+                <a class="extra-link" href="{% url django.contrib.auth.views.password_reset %}">Forgot your password?</a>
+            </div>
+        </form>
+      {% endif %}
+
+          <div class="extralogin">
+              {% for o in im_modules %}
+              <div>
+            {% if o != 'local' %}
+            LOGIN using 
+            <a href="/im/login/{{ o }}{% ifnotequal next "" %}?next={{ next|urlencode }}{% endifnotequal %}" 
+                alt="{{ o|title }}">{{ o }}</a>
+            {% endif %}
+            </div>
+            {% endfor %}
+        </div>
+        {% block body.signup %}
+        {% for o in im_modules %}
+            {% if o != 'local' %}
+            <br />
+            {% endif %}
+        {% endfor %}
+        <div class="bottom">
+            {% block body.login.signup %}
+                new to okeanos ? <a href="{% url astakos.im.views.signup %}">CREATE ACCOUNT</a>
+            {% endblock %}
+            </div>
+        </div>
+        {% endblock %}
+    </div>
+{% endblock %}