525
|
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>
|
526
|
5 <metal:block metal:define-macro="html_head" tal:condition="python:'annotator' in viewLayers">
|
525
|
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>
|
528
|
26 <!-- <script
|
|
27 tal:attributes="src string:$rootUrl/template/annotator_files/lib/plugin/annotateitpermissions.js"></script> -->
|
525
|
28 <script tal:attributes="src string:$rootUrl/template/annotator_files/lib/plugin/auth.js"></script>
|
528
|
29 <!-- <script tal:attributes="src string:$rootUrl/template/annotator_files/lib/plugin/tags.js"></script> -->
|
525
|
30 <script
|
|
31 tal:attributes="src string:$rootUrl/template/annotator_files/lib/plugin/unsupported.js"></script>
|
528
|
32 <!-- <script
|
|
33 tal:attributes="src string:$rootUrl/template/annotator_files/lib/plugin/filter.js"></script> -->
|
|
34
|
|
35 <script type="text/javascript"
|
546
|
36 tal:define="annUrl python:'%s?url=%s&pn=%s'%(rootUrl,docinfo['url'],pageinfo['pn']);
|
|
37 global annUser python:here.getAuthenticatedUser(anon='anonymous');
|
|
38 global annGroup python:request.get('annotator_group', None);
|
|
39 permUser python:test(annGroup, 'group:%s'%annGroup, annUser);"
|
|
40 tal:content="structure string:var annotatorPageUrl='$annUrl'; var annotatorUser='$annUser'; var permissionUser='$permUser';"></script>
|
525
|
41
|
|
42 <script type="text/javascript">
|
|
43 // <!--
|
|
44 $(document).ready(function() {
|
|
45 // annotator
|
|
46 var elem = $('div.pageContent').get(0);
|
528
|
47 var uri = annotatorPageUrl;
|
525
|
48 var devAnnotator = new Annotator(elem).addPlugin('Auth', {
|
528
|
49 tokenUrl : 'template/token?user='+annotatorUser
|
525
|
50 }).addPlugin('Permissions', {
|
546
|
51 user : permissionUser,
|
525
|
52 userString : function(user) {
|
|
53 if (user && user.name) {
|
|
54 return user.name;
|
|
55 }
|
|
56 return user;
|
|
57 },
|
|
58 userId : function(user) {
|
|
59 if (user && user.id) {
|
|
60 return user.id;
|
|
61 }
|
|
62 return user;
|
|
63 }
|
|
64 }).addPlugin('Store', {
|
546
|
65 //prefix: 'http://tuxserve03.mpiwg-berlin.mpg.de/AnnotationManager/annotator',
|
|
66 prefix: 'http://r583-1.mpiwg-berlin.mpg.de:18080/AnnotationManager/annotator',
|
525
|
67 annotationData : {
|
|
68 'uri' : uri
|
|
69 },
|
|
70 loadFromSearch : {
|
|
71 'limit' : 20,
|
|
72 'uri' : uri
|
|
73 }
|
|
74 });
|
|
75 });
|
|
76 // -->
|
|
77 </script>
|
|
78
|
|
79 </metal:block>
|
|
80 </head>
|
|
81 <body>
|
|
82 <!-- right-side options -->
|
|
83 <div class="col buttons">
|
|
84 <!-- LAYER DISPLAY OPTION -->
|
|
85 <ul>
|
|
86 <li metal:define-macro="layer_select_li">
|
|
87 <input type="checkbox" class="autosubmit" name="viewLayer" value="annotator"
|
|
88 tal:attributes="checked python:'annotator' in viewLayers" /> Annotations
|
|
89 </li>
|
|
90 </ul>
|
|
91 </div>
|
|
92
|
526
|
93 <metal:block metal:define-macro="options_box" tal:condition="python:'annotator' in viewLayers">
|
525
|
94 <!-- BEGIN ANNOTATIONS -->
|
546
|
95 <div class="options">
|
525
|
96 <h4>Annotations</h4>
|
546
|
97 <p>
|
|
98 User "<span tal:replace="annUser" />"<span tal:condition="annGroup" tal:content="string: ($annGroup)"/>.
|
|
99 </p>
|
|
100 <!-- TODO: login button -->
|
|
101 <form class="autosubmit" tal:attributes="action viewerUrl">
|
|
102 <input type="hidden" tal:define="params python:here.getParams(params={'annotator_group':None});" tal:repeat="param params"
|
|
103 tal:attributes="name param; value python:params[param]" />
|
|
104 <p>
|
|
105 In group
|
|
106 <select class="autosubmit" name="annotator_group">
|
|
107 <option value="" tal:attributes="selected not:annGroup;"> </option>
|
|
108 <option
|
|
109 tal:repeat="group python:here.getAnnotatorGroupsForUser(user=annUser,annotationServerUrl='http://localhost:18080/AnnotationManager')"
|
|
110 tal:attributes="value group/id; selected python:group['id']==annGroup;" tal:content="group/name" />
|
|
111 </select> <br />
|
|
112 <input type="submit" value="Go!" />
|
|
113 </p>
|
|
114 </form>
|
525
|
115 </div>
|
|
116 <!-- END ANNOTATIONS -->
|
|
117 </metal:block>
|
|
118
|
|
119 </body>
|
|
120
|
|
121 </html>
|