From 9d07e8a26657542c98535abb7812d83a98839918 Mon Sep 17 00:00:00 2001 From: Alvin Li Date: Sun, 18 Aug 2013 00:52:06 +0800 Subject: * improved 'indicator.views.follow_indicator()', renamed to 'indicator_fanduf()' due to name conflict * finished 'search' function for page indicator NewDeleteIndex.html * added 'apps/utils/search_tools.py': some tools to process search results * renamed 'sciblog/templatetags/tools.py' to 'get_range.py' * added 'format_data()' to indicator.tools': to format data of record/confine, make it properly display in html page; * 'indicator/javascripts/new_delete_index.js': added global 'var added_indexes_id' to track the already added indexes * added 'indicator/templatetags/divisible_by.py' filter to check if a number can be extactly divide by another number; * fixed the 'index_card_fir/index_card_sec' problem of 'act_card_container' of page 'SheetDefault.html' * indicator/static/css/new_delete_index.css: added 'index_search_error' and 'index_error' * fixed 'unit.dump' problems in 'indicator.models' * 'indicator.tools': o added 'RI_TYPES', 'RI_WEIGHTS' o added 'type' in the return value of 'calc_indicator_weight()' and 'recommend_indicator()' * added field 'followedHistories' in 'indicator.models.UserIndicator' * moved 'follow_indicator()' and 'unfollow_indicator()' from 'indicator.views' to 'indicator.tools' TODO: * highcharts: draw chart for indicator records; * add/edit data, and submit (page format design) * followed indicator submit buttion --- .../templates/indicator/NewDeleteIndex.html | 110 ++----- .../templates/indicator/SheetDefault.html | 361 ++++++++++----------- .../apps/indicator/templates/indicator/index.html | 2 +- .../templates/indicator/popup/DeleteCardTip.html | 4 +- 4 files changed, 209 insertions(+), 268 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 c2a219a..f4e9a18 100644 --- a/97suifangqa/apps/indicator/templates/indicator/NewDeleteIndex.html +++ b/97suifangqa/apps/indicator/templates/indicator/NewDeleteIndex.html @@ -52,19 +52,8 @@
- - -
+ @@ -146,6 +135,7 @@
+ {% if page_condition == "category" %}
{% for ind in indicators %}
@@ -156,6 +146,7 @@
{% endfor %}
+ {% endif %} {# end: page_condition == "category" #}
@@ -164,36 +155,42 @@
搜索指标
-
仿真化验单
+
+ {% if page_condition == "search" %}
{# 'indicators': list made up by the dumps of indicator #} - {% for ind in indicators %} - -
-
{{ ind|dict_get:"name" }}
-
- {{ ind|dict_get:"categories_name"|first }} + {# check if search keyword empty & if search result empty #} + {% if search_kw_empty %} + {# search keyword empty #} +
+
您未输入搜索关键词
+
+
-
-
-
- {% endfor %} -
-
乙肝病毒S蛋白定量
-
血常规
-
-
-
-
-
乙肝病毒表面抗体
-
血常规
-
-
-
+ {% elif search_result_empty %} + {# search result empty #} +
+
未搜索到符合的结果
+
+
+
+ {% else %} + {% for ind in indicators %} +
+
{{ ind|dict_get:"name" }}
+ +
+
+
+ {% endfor %} + {% endif %}
+ {% endif %} {# end: page_condition == "search" #}
@@ -219,49 +216,6 @@
{% endfor %} - - {% comment %}{# vim: {{{ #} -
-
V-谷丙氨酰转氨酶
-
-
-
-
-
总胆红素
-
-
-
-
-
乙肝病毒表面抗原
-
-
-
-
-
乙肝病毒表面抗体
-
-
-
-
-
乙肝病毒e抗体
-
-
-
-
-
乙肝病毒核算定量(PCR)
-
-
-
-
-
乙肝病毒基因型C型
-
-
-
-
-
乙肝病毒型混合型
-
-
-
- {% endcomment %}{# vim: }}} #} diff --git a/97suifangqa/apps/indicator/templates/indicator/SheetDefault.html b/97suifangqa/apps/indicator/templates/indicator/SheetDefault.html index 56d0e6a..88a8d82 100644 --- a/97suifangqa/apps/indicator/templates/indicator/SheetDefault.html +++ b/97suifangqa/apps/indicator/templates/indicator/SheetDefault.html @@ -1,5 +1,7 @@ {% extends "base.html" %} {% load static from staticfiles %} +{% load dict_get %} +{% load divisible_by %} {% block title %} 指标状态 | 随访工具 | 97 随访 @@ -33,200 +35,183 @@ var static_url = "{{ STATIC_URL }}"; var indicator_url = "/indicator/"; + + + {% endblock %} {% block page %} - -
-
-
指标状态
- -
-
以下可能是您感兴趣的指标,您可以点击卡片右上角“X”,取消关注。
-
-
- - - -
-
乙肝病毒核算定量 (PCR)1
-
- 参考范围 - 100 x 10^4 拷贝 /mL -
-
- - - -
-
-
- x 10^ - -
-
-
-
-
- 拷贝 /mL -
-
-
-
-
-
-
-
-
点击右上角的按钮可以编辑数据
- - - - - -
- - -
-
乙肝病毒核算定量 (PCR)2
-
- 参考范围 - 100 x 10^4 拷贝 /mL -
-
- - - -
-
-
- x 10^ - -
-
-
-
-
- 拷贝 /mL -
-
-
-
-
-
-
-
-
点击右上角的按钮可以编辑数据
- - - -
- -
-
乙肝病毒核算定量 (PCR)3
-
- 参考范围 - 100 x 10^4 拷贝 /mL -
-
-
98 x 10^4 拷贝 /mL
- - -
-
-
- x 10^ - -
-
-
-
-
- 拷贝 /mL -
-
-
-
-
这是2013-07-01 化验单上的记录
-
-
-
-
- -
-
- - - -
- -
-
乙肝病毒核算定量 (PCR)4
-
- - -
- - -
-
- - -
-
-
-
-
- - - - - - -
日期时间记录
-
-
-
- -
+ +
+
+
指标状态
+ + +
+
以下可能是您感兴趣的指标,您可以点击卡片右上角“X”,取消关注。
+
+
+ + + + {% for ind in indicators %} +
+
{{ ind|dict_get:"name" }}
+
+ {{ ind|dict_get:"ref_text" }} + {{ ind|dict_get:"ref_value"|safe }} + {{ ind|dict_get:"std_unit_symbol" }} +
+ {% if ind|dict_get:"record_empty" %} {# vim: {{{ #} + {# if no record, then hide 'last_edit_data' #} + +
+ + + +
+
+
+ + x 10^ + +
+
+
+
+
+
{{ ind|dict_get:"std_unit_symbol" }}
+
+
+
+ +
+
+
+
+
+
点击右上角的按钮开始添加数据
+ {# vim: }}} #} + {% else %} {# record_empty == False; vim: {{{ #} + {# indicator has records #} + +
+
+ {{ ind|dict_get:"last_record"|dict_get:"value_str" }} + {{ ind|dict_get:"std_unit_symbol" }} +
+ + +
+
+
+ + x 10^ + +
+
+
+
+
+
{{ ind|dict_get:"std_unit_symbol" }}
+
+
+
+
+
+ 记录日期: {{ ind|dict_get:"last_record"|dict_get:"date" }} +
+
+
+
+
+ +
+ +
+ {% endif %} {# end: record_empty; vim: }}} #} + + + + {% comment %} + thickbox插件: + 方便父级页面与子级弹出层的MVC隔离, + 方便子级弹出层的复杂需求,如:搜索、分页… + height参数为弹出层页面高度+2, + width参数为弹出层页面宽度+2, + card_id参数为 "卡片id" + {% endcomment %} + +
+ {% endfor %} {# end: indicators #} + + +
+
乙肝病毒核算定量 (PCR)4
+
+ + +
+ + +
+
+ + +
+
+
+
+
+ + + + + + +
日期时间记录
+
+
+ +
+
+ + + {% if indicators|length|divisible_by:"2" %} + {# number of followed indicators: even #} +
+ {% else %} + -
-
+
+ +
+
{% endblock page %} {# vim: set ts=2 sw=2 tw=0 fenc=utf-8 ft=htmldjango.html: #} diff --git a/97suifangqa/apps/indicator/templates/indicator/index.html b/97suifangqa/apps/indicator/templates/indicator/index.html index 7c280f7..408ce67 100644 --- a/97suifangqa/apps/indicator/templates/indicator/index.html +++ b/97suifangqa/apps/indicator/templates/indicator/index.html @@ -8,7 +8,7 @@ {% block body %} {% endblock %} diff --git a/97suifangqa/apps/indicator/templates/indicator/popup/DeleteCardTip.html b/97suifangqa/apps/indicator/templates/indicator/popup/DeleteCardTip.html index 7424930..c978f8a 100644 --- a/97suifangqa/apps/indicator/templates/indicator/popup/DeleteCardTip.html +++ b/97suifangqa/apps/indicator/templates/indicator/popup/DeleteCardTip.html @@ -24,7 +24,9 @@
提示
-
取消关注指标后,该指标卡片将从本页面消失,您确定需要取消关注?
+
+ 取消关注指标后,该指标卡片将从本页面消失,您确定需要取消关注? +
取消关注 继续关注 -- cgit v1.2.2