From 0cdba05f09201b6db129ebaa787e960be9ecb851 Mon Sep 17 00:00:00 2001 From: Alvin Li Date: Fri, 16 Aug 2013 01:20:52 +0800 Subject: * updated 'indicator/templates/indicator/NewDeleteIndex.html': o page_condition: "all", "category", "search" o make use of django templates to generate contents * updated 'indicator.views': GET, POST methods for NewDeleteIndex page * indicator.search_indexes: changed 'categories' to 'categories_id' --- .../templates/indicator/NewDeleteIndex.html | 327 +++------------------ .../apps/indicator/templates/indicator/test.html | 14 +- 2 files changed, 61 insertions(+), 280 deletions(-) (limited to '97suifangqa/apps/indicator/templates') diff --git a/97suifangqa/apps/indicator/templates/indicator/NewDeleteIndex.html b/97suifangqa/apps/indicator/templates/indicator/NewDeleteIndex.html index 8fd3e4c..c2a219a 100644 --- a/97suifangqa/apps/indicator/templates/indicator/NewDeleteIndex.html +++ b/97suifangqa/apps/indicator/templates/indicator/NewDeleteIndex.html @@ -79,7 +79,7 @@
-
+
所有指标
A
@@ -110,10 +110,13 @@
Z
+ {# display all indicators if in 'all' condition #} + {# NOTE: 'indicators' is in 'P[inyin] dict format #} + {% if page_condition == "all" %}
- {# display all indicator by letter index #} + {# display all indicators by letter index #} {% for l in letters %} - {% with l_inds=indicators_pdict|dict_get:l %} + {% with l_inds=indicators|dict_get:l %} {% if l_inds|length >= 1 %}
{{ l|upper }}
@@ -128,267 +131,56 @@
{% endif %} {% endwith %} - {% endfor %} - {# end: display all indicator #} - - {% comment %}{# vim: {{{ #} - -
-
A
-
-
乙肝病毒表面抗原
-
两对半
-
-
-
-
-
-
B
-
-
乙肝病毒表面抗原
-
两对半
-
-
-
-
-
-
C
-
-
乙肝病毒表面抗原
-
两对半
-
-
-
-
-
-
D
-
-
乙肝病毒表面抗原
-
两对半
-
-
-
-
-
-
E
-
-
乙肝病毒表面抗原
-
两对半
-
-
-
-
-
-
F
-
-
乙肝病毒表面抗原
-
两对半
-
-
-
-
-
-
G
-
-
乙肝病毒表面抗原
-
两对半
-
-
-
-
-
-
H
-
-
乙肝病毒表面抗原
-
两对半
-
-
-
-
-
-
I
-
-
乙肝病毒表面抗原
-
两对半
-
-
-
-
-
-
J
-
-
乙肝病毒表面抗原
-
两对半
-
-
-
-
-
-
K
-
-
乙肝病毒表面抗原
-
两对半
-
-
-
-
-
-
L
-
-
乙肝病毒表面抗原
-
两对半
-
-
-
-
-
-
M
-
-
乙肝病毒表面抗原
-
两对半
-
-
-
-
-
-
N
-
-
乙肝病毒表面抗原
-
两对半
-
-
-
-
-
-
O
-
-
乙肝病毒表面抗原
-
两对半
-
-
-
-
-
-
P
-
-
乙肝病毒表面抗原
-
两对半
-
-
-
-
-
-
Q
-
-
乙肝病毒表面抗原
-
两对半
-
-
-
-
-
-
R
-
-
乙肝病毒表面抗原
-
两对半
-
-
-
-
-
-
S
-
-
乙肝病毒表面抗原
-
两对半
-
-
-
-
-
-
T
-
-
乙肝病毒表面抗原
-
两对半
-
-
-
-
-
-
U
-
-
乙肝病毒表面抗原
-
两对半
-
-
-
-
-
-
V
-
-
乙肝病毒表面抗原
-
两对半
-
-
-
-
-
-
W
-
-
乙肝病毒表面抗原
-
两对半
-
-
-
-
-
-
X
-
-
乙肝病毒表面抗原
-
两对半
-
-
-
-
-
-
Y
-
-
乙肝病毒表面抗原
-
两对半
-
-
-
-
-
-
Z
-
-
乙肝病毒表面抗原
-
两对半
+ {% endfor %} {# end: display all indicators #} +
+ {% endif %} {# end: page_condition == all #} +
+ + + + {# page_condition == "category" #} +
+
+
{{ selected_category.name }}
+
仿真化验单
+
+
+ +
+ {% for ind in indicators %} +
+
{{ ind.name }}
+
-
- - {% endcomment %}{# vim: }}} #} + {% endfor %} +
+
-
-
- - +
+ + +
diff --git a/97suifangqa/apps/indicator/templates/indicator/test.html b/97suifangqa/apps/indicator/templates/indicator/test.html index 65340b9..d7b349f 100644 --- a/97suifangqa/apps/indicator/templates/indicator/test.html +++ b/97suifangqa/apps/indicator/templates/indicator/test.html @@ -13,7 +13,12 @@
  • {{ l }}
    • {% for i in indicators %} -
    • id: {{ i|dict_get:"id" }}; name: {{ i|dict_get:"name" }}
    • +
    • + id: {{ i|dict_get:"id" }}; + name: {{ i|dict_get:"name" }}; + category_id: {{ i|dict_get:"categories_id"|first }}; + category_name: {{ i|dict_get:"categories_name"|first }}; +
    • {% endfor %}
    {% endif %} @@ -27,6 +32,13 @@
  • id: {{ fi|dict_get:"id" }}; name: {{ fi|dict_get:"name" }}
  • {% endfor %} + +

    ul 3

    +
      + {% for i in list %} +
    • i
    • + {% endfor %} +
    -- cgit v1.2.2