Mercurial > hg > documentViewer
annotate zpt/viewer/layer_image_annotator.zpt @ 630:25295ceb11b1
updated annotation templates to new digilib-annotator version 1.3.5
author | casties |
---|---|
date | Thu, 04 Jun 2015 16:23:29 +0200 |
parents | 98fe8e168c01 |
children |
rev | line source |
---|---|
585 | 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
3 <html xmlns="http://www.w3.org/1999/xhtml"> | |
4 <head> | |
5 <metal:block metal:define-macro="html_head" tal:condition="python:'annotator' in viewLayers"> | |
6 <!-- annotator for digilib --> | |
7 <script type="text/javascript" tal:attributes="src string:$dlBaseUrl/jquery/showdown.js"></script> | |
8 <script type="text/javascript" tal:attributes="src string:$dlBaseUrl/jquery/annotator-dl.js"></script> | |
630
25295ceb11b1
updated annotation templates to new digilib-annotator version 1.3.5
casties
parents:
627
diff
changeset
|
9 <script type="text/javascript" tal:attributes="src string:$dlBaseUrl/jquery/jquery.digilib.vector.js"></script> |
585 | 10 <script type="text/javascript" tal:attributes="src string:$dlBaseUrl/jquery/jquery.digilib.annotator.js"></script> |
11 <link rel="stylesheet" type="text/css" tal:attributes="href string:$dlBaseUrl/jquery/annotator.min.css"/> | |
12 | |
13 <script type="text/javascript" | |
627 | 14 tal:define="global annServerUrl python:here.sslifyUrl('//tuxserve03.mpiwg-berlin.mpg.de/AnnotationManager', app=here); |
585 | 15 global annTokenUrl string:$viewerUrl/template/token/getLoginToken; |
599 | 16 annUrl python:'http://echo.mpiwg-berlin.mpg.de/documents%s?pn=%s'%(docinfo['imagePath'],pageinfo['pn']); |
585 | 17 resUrl python:'http://echo.mpiwg-berlin.mpg.de/documents%s'%(docinfo['documentPath']); |
18 global annUser python:here.getAuthenticatedUser(anon='anonymous'); | |
19 global annGroup python:request.get('annotator_group', None); | |
20 permUser python:test(annGroup, 'group:%s'%annGroup, annUser);" | |
21 tal:content="structure string: | |
598 | 22 dlOpts.digilibFrontendPath='/jquery/digilib-mpiwg.html'; |
586 | 23 dlOpts.annotationServerUrl='$annServerUrl/annotator'; |
585 | 24 dlOpts.annotationTokenUrl='$annTokenUrl'; |
25 dlOpts.annotationUser='$annUser'; | |
630
25295ceb11b1
updated annotation templates to new digilib-annotator version 1.3.5
casties
parents:
627
diff
changeset
|
26 dlOpts.annotatorPlugins=['Auth','GroupPermissions','Markdown','DigilibIntegrator','Store']; |
616 | 27 dlOpts.annotationPageUri='$annUrl'; |
585 | 28 dlOpts.annotatorPluginSettings={'Store':{'annotationData':{'uri':'$annUrl','resource':'$resUrl'},'loadFromSearch':{'uri':'$annUrl'}}, |
29 'Permissions':{'read':[],'update':['$permUser'],'delete':['$permUser'],'admin':['$permUser']}}; | |
30 "></script> | |
31 </metal:block> | |
32 | |
33 </head> | |
34 <body> | |
35 <!-- right-side options --> | |
36 <div class="col buttons"> | |
37 <!-- LAYER DISPLAY OPTION --> | |
38 <ul> | |
39 <li metal:define-macro="layer_select_li"> | |
40 <input type="checkbox" class="autosubmit" name="viewLayer" value="annotator" | |
41 tal:attributes="checked python:'annotator' in viewLayers" /> Annotator | |
42 </li> | |
43 </ul> | |
44 </div> | |
45 | |
46 <metal:block metal:define-macro="options_box" tal:condition="python:'annotator' in viewLayers"> | |
47 <!-- BEGIN ANNOTATIONS --> | |
48 <div class="options"> | |
49 <h4>Annotator</h4> | |
50 <ul> | |
51 <li><a href="javascript:$digilib.digilib('setAnnotationMark')"> <img tal:condition="exists:here/template/annotation-mark.png" | |
52 tal:attributes="src here/template/annotation-mark.png/absolute_url" /> annotate point | |
53 </a></li> | |
630
25295ceb11b1
updated annotation templates to new digilib-annotator version 1.3.5
casties
parents:
627
diff
changeset
|
54 <li><a href="javascript:$digilib.digilib('setAnnotationRect')"> <img tal:condition="exists:here/template/annotation-region.png" |
25295ceb11b1
updated annotation templates to new digilib-annotator version 1.3.5
casties
parents:
627
diff
changeset
|
55 tal:attributes="src here/template/annotation-region.png/absolute_url" /> annotate rectangle |
25295ceb11b1
updated annotation templates to new digilib-annotator version 1.3.5
casties
parents:
627
diff
changeset
|
56 </a></li> |
25295ceb11b1
updated annotation templates to new digilib-annotator version 1.3.5
casties
parents:
627
diff
changeset
|
57 <li><a href="javascript:$digilib.digilib('setAnnotationPolygon')"> <img tal:condition="exists:here/template/annotation-polygon.png" |
25295ceb11b1
updated annotation templates to new digilib-annotator version 1.3.5
casties
parents:
627
diff
changeset
|
58 tal:attributes="src here/template/annotation-polygon.png/absolute_url" /> annotate polygon |
25295ceb11b1
updated annotation templates to new digilib-annotator version 1.3.5
casties
parents:
627
diff
changeset
|
59 </a></li> |
25295ceb11b1
updated annotation templates to new digilib-annotator version 1.3.5
casties
parents:
627
diff
changeset
|
60 <li><a href="javascript:$digilib.digilib('setAnnotationPolyline')"> <img tal:condition="exists:here/template/annotation-polyline.png" |
25295ceb11b1
updated annotation templates to new digilib-annotator version 1.3.5
casties
parents:
627
diff
changeset
|
61 tal:attributes="src here/template/annotation-polyline.png/absolute_url" /> annotate polyline |
585 | 62 </a></li> |
63 </ul> | |
64 <p> | |
65 User "<span tal:replace="annUser" />"<span tal:condition="annGroup" tal:content="string: ($annGroup)"/>. | |
66 </p> | |
67 <!-- TODO: login button --> | |
68 <form class="autosubmit" tal:attributes="action viewerUrl"> | |
69 <input type="hidden" tal:define="params python:here.getParams(params={'annotator_group':None});" tal:repeat="param params" | |
70 tal:attributes="name param; value python:params[param]" /> | |
71 <p> | |
72 In group | |
73 <select class="autosubmit" name="annotator_group"> | |
74 <option value="" tal:attributes="selected not:annGroup;"> </option> | |
75 <option | |
76 tal:repeat="group python:here.getAnnotatorGroupsForUser(user=annUser,annotationServerUrl=annServerUrl)" | |
77 tal:attributes="value group/id; selected python:group['id']==annGroup;" tal:content="group/name" /> | |
78 </select> <br /> | |
79 <input type="submit" value="Go!" /> | |
80 </p> | |
81 </form> | |
82 <p tal:define="std modules/Products.PythonScripts.standard"> | |
587
6000c7e24d8a
new parameter "pf" to specify image file name. (still some issues)
casties
parents:
586
diff
changeset
|
83 <a class="button" tal:attributes="href python:'%s/login/login?came_from=%s'%(viewerUrl,std.url_quote(here.getLink()))">Log in</a> |
585 | 84 </p> |
85 </div> | |
86 <!-- END ANNOTATIONS --> | |
87 </metal:block> | |
88 | |
89 </body> | |
90 | |
91 </html> |