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 --> |
---|
7 | <link rel="stylesheet" type="text/css" |
---|
8 | tal:attributes="href string:$rootUrl/template/annotator_files/css/annotator.css" /> |
---|
9 | |
---|
10 | <script |
---|
11 | tal:attributes="src string:$rootUrl/template/annotator_files/lib/vendor/json2.js"></script> |
---|
12 | <script tal:attributes="src string:$rootUrl/template/annotator_files/lib/extensions.js"></script> |
---|
13 | <script tal:attributes="src string:$rootUrl/template/annotator_files/lib/console.js"></script> |
---|
14 | <script tal:attributes="src string:$rootUrl/template/annotator_files/lib/class.js"></script> |
---|
15 | <script tal:attributes="src string:$rootUrl/template/annotator_files/lib/range.js"></script> |
---|
16 | <script tal:attributes="src string:$rootUrl/template/annotator_files/lib/annotator.js"></script> |
---|
17 | <script tal:attributes="src string:$rootUrl/template/annotator_files/lib/widget.js"></script> |
---|
18 | <script tal:attributes="src string:$rootUrl/template/annotator_files/lib/editor.js"></script> |
---|
19 | <script tal:attributes="src string:$rootUrl/template/annotator_files/lib/viewer.js"></script> |
---|
20 | <script |
---|
21 | tal:attributes="src string:$rootUrl/template/annotator_files/lib/notification.js"></script> |
---|
22 | <script |
---|
23 | tal:attributes="src string:$rootUrl/template/annotator_files/lib/plugin/store.js"></script> |
---|
24 | <script |
---|
25 | tal:attributes="src string:$rootUrl/template/annotator_files/lib/plugin/permissions.js"></script> |
---|
26 | <!-- <script |
---|
27 | tal:attributes="src string:$rootUrl/template/annotator_files/lib/plugin/annotateitpermissions.js"></script> --> |
---|
28 | <script tal:attributes="src string:$rootUrl/template/annotator_files/lib/plugin/auth.js"></script> |
---|
29 | <!-- <script tal:attributes="src string:$rootUrl/template/annotator_files/lib/plugin/tags.js"></script> --> |
---|
30 | <script |
---|
31 | tal:attributes="src string:$rootUrl/template/annotator_files/lib/plugin/unsupported.js"></script> |
---|
32 | <!-- <script |
---|
33 | tal:attributes="src string:$rootUrl/template/annotator_files/lib/plugin/filter.js"></script> --> |
---|
34 | |
---|
35 | <script type="text/javascript" |
---|
36 | tal:define="annUrl python:'%s?url=%s&pn=%s'%(rootUrl,docinfo['url'],pageinfo['pn']); annUser python:here.getAuthenticatedUser(anon='anonymous');" |
---|
37 | tal:content="structure string:var annotatorPageUrl='$annUrl'; var annotatorUser='$annUser';"></script> |
---|
38 | |
---|
39 | <script type="text/javascript"> |
---|
40 | // <!-- |
---|
41 | $(document).ready(function() { |
---|
42 | // annotator |
---|
43 | var elem = $('div.pageContent').get(0); |
---|
44 | var uri = annotatorPageUrl; |
---|
45 | var devAnnotator = new Annotator(elem).addPlugin('Auth', { |
---|
46 | tokenUrl : 'template/token?user='+annotatorUser |
---|
47 | }).addPlugin('Permissions', { |
---|
48 | user : annotatorUser, |
---|
49 | userString : function(user) { |
---|
50 | if (user && user.name) { |
---|
51 | return user.name; |
---|
52 | } |
---|
53 | return user; |
---|
54 | }, |
---|
55 | userId : function(user) { |
---|
56 | if (user && user.id) { |
---|
57 | return user.id; |
---|
58 | } |
---|
59 | return user; |
---|
60 | } |
---|
61 | }).addPlugin('Store', { |
---|
62 | prefix: 'http://virtuoso.mpiwg-berlin.mpg.de:8080/AnnotationManager/annotator', |
---|
63 | annotationData : { |
---|
64 | 'uri' : uri |
---|
65 | }, |
---|
66 | loadFromSearch : { |
---|
67 | 'limit' : 20, |
---|
68 | 'uri' : uri |
---|
69 | } |
---|
70 | }); |
---|
71 | }); |
---|
72 | // --> |
---|
73 | </script> |
---|
74 | |
---|
75 | </metal:block> |
---|
76 | </head> |
---|
77 | <body> |
---|
78 | <!-- right-side options --> |
---|
79 | <div class="col buttons"> |
---|
80 | <!-- LAYER DISPLAY OPTION --> |
---|
81 | <ul> |
---|
82 | <li metal:define-macro="layer_select_li"> |
---|
83 | <input type="checkbox" class="autosubmit" name="viewLayer" value="annotator" |
---|
84 | tal:attributes="checked python:'annotator' in viewLayers" /> Annotations |
---|
85 | </li> |
---|
86 | </ul> |
---|
87 | </div> |
---|
88 | |
---|
89 | <metal:block metal:define-macro="options_box" tal:condition="python:'annotator' in viewLayers"> |
---|
90 | <!-- BEGIN ANNOTATIONS --> |
---|
91 | <div class="options" tal:define="annUser python:here.getAuthenticatedUser(anon='anonymous')"> |
---|
92 | <h4>Annotations</h4> |
---|
93 | <div>You are user "<span tal:replace="annUser"/>"</div> |
---|
94 | </div> |
---|
95 | <!-- END ANNOTATIONS --> |
---|
96 | </metal:block> |
---|
97 | |
---|
98 | </body> |
---|
99 | |
---|
100 | </html> |
---|