From a70e8dee4d13f7e4c5884d0a3fca9ea2e505ab9d Mon Sep 17 00:00:00 2001 From: Waseem Daher Date: Mon, 17 Sep 2012 14:59:26 -0400 Subject: [PATCH] Refactor our different pages into separate templates. They are all included by index.html in different divs. (imported from commit bd8b485516007075d33c2614b1de9f08999e927c) --- templates/zephyr/home.html | 92 ++++++++++++++++++++++++ templates/zephyr/index.html | 106 +++------------------------- templates/zephyr/search.html | 1 + templates/zephyr/subscriptions.html | 11 --- zephyr/static/js/zephyr.js | 2 +- 5 files changed, 103 insertions(+), 109 deletions(-) create mode 100644 templates/zephyr/home.html create mode 100644 templates/zephyr/search.html diff --git a/templates/zephyr/home.html b/templates/zephyr/home.html new file mode 100644 index 0000000000..f081c458d7 --- /dev/null +++ b/templates/zephyr/home.html @@ -0,0 +1,92 @@ +
+
+

+ + + +
+

+
+
+ + +
+
+
+
+
+ +
+ + +
+
+
+
+
+ + {% csrf_token %} + + + + + + + + +
+

+ + + +
+ + + +

+
+ +
+ + +
+
+
+
+
+
+
+
+
+ + {% csrf_token %} + + + + + + + + + + + + + +
+ +
+ + +
+
+
+
+
+
+
diff --git a/templates/zephyr/index.html b/templates/zephyr/index.html index d2a0633bb4..6c272310d6 100644 --- a/templates/zephyr/index.html +++ b/templates/zephyr/index.html @@ -51,7 +51,7 @@ var people_list = {{ people }}; {{ user_profile.email }} (not you?)
  • Home
  • -
  • Manage subscriptions
  • +
  • Manage subscriptions
  • View starred messages
  • Search
  • Invite a friend
  • @@ -61,104 +61,16 @@ var people_list = {{ people }};
    - -
    -
    -
    -

    - - - -
    -

    -
    -
    - - -
    -
    -
    -
    +
    + {% include "zephyr/home.html" %}
    - -
    - - -
    -
    -
    -
    -
    - - {% csrf_token %} - - - - - - - - -
    -

    - - - -
    - - - -

    -
    - -
    - - -
    -
    -
    -
    -
    -
    -
    -
    -
    - - {% csrf_token %} - - - - - - - - - - - - - -
    - -
    - - -
    -
    -
    -
    -
    -
    +
    + {% include "zephyr/subscriptions.html" %}
    -
    -
    + +
    diff --git a/templates/zephyr/search.html b/templates/zephyr/search.html new file mode 100644 index 0000000000..22c96f63a3 --- /dev/null +++ b/templates/zephyr/search.html @@ -0,0 +1 @@ +

    Search!

    diff --git a/templates/zephyr/subscriptions.html b/templates/zephyr/subscriptions.html index 39282b4909..04ca25f0af 100644 --- a/templates/zephyr/subscriptions.html +++ b/templates/zephyr/subscriptions.html @@ -1,12 +1,3 @@ -{% extends "zephyr/base.html" %} - -{% block nav %} -
  • Log out
  • -
  • Manage subscriptions
  • -{% endblock %} - -{% block content %} - @@ -46,5 +37,3 @@ autofocus('#new_subscriptions'); - -{% endblock %} diff --git a/zephyr/static/js/zephyr.js b/zephyr/static/js/zephyr.js index 1dd8583e95..a74f11ea8c 100644 --- a/zephyr/static/js/zephyr.js +++ b/zephyr/static/js/zephyr.js @@ -72,7 +72,7 @@ function sub(zephyr_class) { function compose_button() { $('#sidebar a[href="#home"]').tab('show'); - show_compose(); + show_compose('class', $("#class")); } function hide_compose() {