[Hejes-devel] [1442] dates.html: AkH 11 and 12 references
hejes-devel at nytud.hu
hejes-devel at nytud.hu
Tue Sep 1 13:33:18 CEST 2015
Revision: 1442
Author: mihaltz
Date: 2015-09-01 13:33:18 +0200 (Tue, 01 Sep 2015)
Log Message:
-----------
dates.html: AkH 11 and 12 references
Modified Paths:
--------------
trunk/web2py/applications/helyesiras_webdev/modules/keltezes.py
trunk/web2py/applications/helyesiras_webdev/progress.log
trunk/web2py/applications/helyesiras_webdev/views/default/dates.html
trunk/web2py/applications/helyesiras_webdev/views/default/numerals.html
Modified: trunk/web2py/applications/helyesiras_webdev/modules/keltezes.py
===================================================================
--- trunk/web2py/applications/helyesiras_webdev/modules/keltezes.py 2015-09-01 09:39:39 UTC (rev 1441)
+++ trunk/web2py/applications/helyesiras_webdev/modules/keltezes.py 2015-09-01 11:33:18 UTC (rev 1442)
@@ -11,7 +11,7 @@
def process(inp):
"""Process an ISO date string and return grammatically correct transliteration versions and usage examples + ids of paragraphs in the AKH.
- Returns: ( [(transliteration, id), ...], [(example, id), ...] ), or None if input was not well-formatted ("YYYY-MM-DD").
+ Returns: ( [(transliteration, [ids]), ...], [(example, [ids]), ...] ), or None if input was not well-formatted ("YYYY-MM-DD").
"""
m = DATE.match(inp)
if ( (m) and 0 < int(m.group(1)) and (
Modified: trunk/web2py/applications/helyesiras_webdev/progress.log
===================================================================
--- trunk/web2py/applications/helyesiras_webdev/progress.log 2015-09-01 09:39:39 UTC (rev 1441)
+++ trunk/web2py/applications/helyesiras_webdev/progress.log 2015-09-01 11:33:18 UTC (rev 1442)
@@ -1402,3 +1402,13 @@
[2015-08-31 18:11:55] EDIT helyesiras_webdev/views/default/numerals.html: 0
[2015-08-31 18:17:31] EDIT helyesiras_webdev/views/default/numerals.html: 0
[2015-08-31 18:30:36] EDIT helyesiras_webdev/views/default/numerals.html: 0
+[2015-09-01 11:58:26] EDIT helyesiras_webdev/views/default/dates.html: 16
+[2015-09-01 11:59:58] EDIT helyesiras_webdev/views/default/dates.html: 20
+[2015-09-01 12:01:50] EDIT helyesiras_webdev/views/default/dates.html: -10
+[2015-09-01 12:02:22] EDIT helyesiras_webdev/views/default/dates.html: 0
+[2015-09-01 12:02:28] EDIT helyesiras_webdev/views/default/dates.html: 0
+[2015-09-01 12:23:57] EDIT helyesiras_webdev/views/default/dates.html: 1
+[2015-09-01 12:24:57] EDIT helyesiras_webdev/views/default/dates.html: 0
+[2015-09-01 13:30:15] EDIT helyesiras_webdev/views/default/dates.html: -3
+[2015-09-01 13:30:48] EDIT helyesiras_webdev/views/default/dates.html: 0
+[2015-09-01 13:31:47] EDIT helyesiras_webdev/views/default/numerals.html: -2
Modified: trunk/web2py/applications/helyesiras_webdev/views/default/dates.html
===================================================================
--- trunk/web2py/applications/helyesiras_webdev/views/default/dates.html 2015-09-01 09:39:39 UTC (rev 1441)
+++ trunk/web2py/applications/helyesiras_webdev/views/default/dates.html 2015-09-01 11:33:18 UTC (rev 1442)
@@ -43,16 +43,47 @@
<div class="error2">Hibás dátum!</div>
{{else:}}
<h3 class="labelstyle">'{{=form.vars.date if form.vars.date else request.get_vars['q']}}' a következő módokon írható:</h3>
+
<ul class="result">
-{{for txt, id in result[0]:}}
-<li>{{=txt}} [{{=A(id, _href=URL(c='default', f='akh', anchor=id))}}]</li>
+
+{{for txt, refids in result[0]:}}
+<li>{{=txt}} [{{
+ for i, refid in enumerate(refids):
+ if refid.startswith('AkH11-'):
+ rid = refid[7:]
+ =A(refid, _href=URL(c='default', f='akh', anchor=rid), _target='blank')
+ else:
+ =SPAN(refid, _class='akh12ref')
+ pass
+ if i < len(refids)-1:
+ =', '
+ pass
+ pass}}]
+</li>
{{pass}}
+
</ul>
+
<h3 class="labelstyle">További lehetséges alakok ezzel a dátummal:</h3>
<ul class="result">
-{{for txt, id in result[1]:}}
-<li>{{=txt}} [{{=A(id, _href=URL(c='default', f='akh', anchor=id))}}]</li>
+
+{{for txt, refids in result[1]:}}
+<li>{{=txt}} [{{
+ for i, refid in enumerate(refids):
+ if refid.startswith('AkH11-'):
+ rid = refid[7:]
+ =A(refid, _href=URL(c='default', f='akh', anchor=rid), _target='blank')
+ else:
+ =SPAN(refid, _class='akh12ref')
+ pass
+ if i < len(refids)-1:
+ =', '
+ pass
+ pass}}]
+</li>
{{pass}}
+
+
</ul>
{{pass}}
{{pass}}
Modified: trunk/web2py/applications/helyesiras_webdev/views/default/numerals.html
===================================================================
--- trunk/web2py/applications/helyesiras_webdev/views/default/numerals.html 2015-09-01 09:39:39 UTC (rev 1441)
+++ trunk/web2py/applications/helyesiras_webdev/views/default/numerals.html 2015-09-01 11:33:18 UTC (rev 1442)
@@ -59,9 +59,7 @@
{{for txtform, refids, remark in result:}}
<li>{{=txtform}} [{{
for i, refid in enumerate(refids):
- from util import format_akh_id
- refid = format_akh_id(refid)
- if refid.startswith('AkH.11-'):
+ if refid.startswith('AkH11-'):
rid = refid[7:]
=A(refid, _href=URL(c='default', f='akh', anchor=rid), _target='blank')
else:
More information about the Hejes-devel
mailing list