From 58b77885308c944a029caf5c2d8b5d3263b6f64d Mon Sep 17 00:00:00 2001 From: Alvin Li Date: Sun, 25 Aug 2013 01:25:27 +0800 Subject: * improved the popup page 'EditHistoryData.html': o improvd page styles; o updated related view: 'indicator.views.indicator_edithistorydata()'; o updated related css styles; o added styles 'valid' and 'invalid'; o added 'jquery-ui: datepicker' to select date; o added 'reason_input' field to get the reason for modification; o implemented validation for 'date' and 'reason' field; * added testing record data for testing 'detail_card'; * added 'cursor: pointer' for 'ui-datepicker-trigger'; * small style change to the 'see_more_button' of SheetDefault.html; * added umcompressed 'jquery-1.9.1.js' for backup; * added param 'type' for 'indicator.tools.format_data()'; TODO: EditHistoryData.html: o to show original record data properly; o to add validation for data field o to implement ajax POST data and related view --- .../templates/indicator/SheetDefault.html | 2 +- .../templates/indicator/popup/EditHistoryData.html | 147 ++++++++++++++++----- .../apps/indicator/templates/indicator/test.html | 9 ++ 3 files changed, 123 insertions(+), 35 deletions(-) (limited to '97suifangqa/apps/indicator/templates') diff --git a/97suifangqa/apps/indicator/templates/indicator/SheetDefault.html b/97suifangqa/apps/indicator/templates/indicator/SheetDefault.html index 6b127d3..97f2d62 100644 --- a/97suifangqa/apps/indicator/templates/indicator/SheetDefault.html +++ b/97suifangqa/apps/indicator/templates/indicator/SheetDefault.html @@ -52,7 +52,7 @@ + + + + - - {% endblock %} {% block page %} -
-
-
乙肝病毒核算定量(PCR)
-
-
-
-
- 日期:2013-07-16 - 时间:11:20 -
-
参考范围:100 x 10^4 拷贝 /mL
-
您的记录:100 x 10^4 拷贝 /mL
-
-
- - x 10^ - -
-
-
-
-
- 拷贝 /mL - -
-
-
+
+
+
{{ indicator_obj.name }}
+
+
+
+
+ {{ indicator_dict|dict_get:"ref_text" }} + {{ indicator_dict|dict_get:"ref_value"|safe }} + {% if indicator_dict|dict_get:"std_unit_symbol" %}({{ indicator_dict|dict_get:"std_unit_symbol" }}){% endif %} +
+
+
+ 化验日期 + {{ record_dict|dict_get:"date" }} +
+
+ 结果 + {{ record_dict|dict_get:"value_html"|safe }} + {% if record_dict|dict_get:"unit_symbol" %}({{ record_dict|dict_get:"unit_symbol" }}){% endif %} +
+
+ 状态 + {% if record_dict|dict_get:"is_normal" == None %} + {# 'is_normal': None #} + 未知 + {% elif not record_dict|dict_get:"is_normal" %} + {# 'is_normal': False #} + 异常 + {% else %} + {# 'is_normal': True #} + 正常 + {% endif %} +
+ +
+
+
+
化验日期
+
+ + +
+
+ +
+
修改记录
+ {% if indicator_obj.dataType == indicator_obj.INTEGER_TYPE %} + {# INTEGER_TYPE #} + TODO + {% elif indicator_obj.dataType == indicator_obj.FLOAT_TYPE %} + {# FLOAT_TYPE #} + + {% elif indicator_obj.dataType == indicator_obj.RANGE_TYPE %} + {# RANGE_TYPE #} + + {% elif indicator_obj.dataType == indicator_obj.FLOAT_RANGE_TYPE %} + {# FLOAT_RANGE_TYPE #} + + {% elif indicator_obj.dataType == indicator_obj.PM_TYPE %} + {# PM_TYPE #} + TODO + {% else %} + {# UNKNOWN TYPE #} + ERROR: unknown data type + {% endif %} +
+
{% if record_dict|dict_get:"unit_symbol" %}({{ record_dict|dict_get:"unit_symbol" }}){% endif %}
+
+
修改原因
+ +
+ +
+
+
{% endblock page %} {# vim: set ts=2 sw=2 tw=0 fenc=utf-8 ft=htmldjango.html: #} diff --git a/97suifangqa/apps/indicator/templates/indicator/test.html b/97suifangqa/apps/indicator/templates/indicator/test.html index d7b349f..412eb17 100644 --- a/97suifangqa/apps/indicator/templates/indicator/test.html +++ b/97suifangqa/apps/indicator/templates/indicator/test.html @@ -39,6 +39,15 @@
  • i
  • {% endfor %} + +

    templates 'if' statement

    + {% if boolvar == None %} + None + {% elif not boolvar %} + False + {% else %} + True + {% endif %} -- cgit v1.2.2