blob: d6e3794b5185bdc8c6b35f77a489278a03a63b04 [file] [log] [blame]
Nils Diewald44e1edb2015-04-08 19:12:15 +00001% my $match = stash('match') || {};
Nils Diewaldfccfbcb2015-04-29 20:48:19 +00002% my $id = $match->{corpusID} . '-' . $match->{docID} . '-' . $match->{ID};
3<li data-corpus-id="<%= $match->{corpusID} %>"
4 data-doc-id="<%= $match->{docID} %>"
Nils Diewald87507832015-05-01 23:36:41 +00005 data-text-id="<%= $match->{textID} %>"
Nils Diewaldfccfbcb2015-04-29 20:48:19 +00006 data-match-id="<%= $match->{ID} %>"
7 %# TODO: This needs to be retrieved per match
8 data-available-info="base/s=spans corenlp/c=spans corenlp/ne=tokens corenlp/p=tokens corenlp/s=spans glemm/l=tokens mate/l=tokens mate/m=tokens mate/p=tokens opennlp/p=tokens opennlp/s=spans tt/l=tokens tt/p=tokens tt/s=spans xip/c=spans"
9 id="<%= $id %>"\
10<% if (current_route eq 'match') { %> class="active"<% } =%>>
Nils Diewald4af3f0b2014-06-25 01:43:17 +000011 <div>
Nils Diewaldfccfbcb2015-04-29 20:48:19 +000012%# --- Snippet
Nils Diewald791b5902014-12-04 04:47:24 +000013 <div class="snippet<%= $match->{startMore} ? ' startMore' : '' %><%= $match->{endMore} ? ' endMore' : '' %>"><%== $match->{snippet} %></div>
Nils Diewald4af3f0b2014-06-25 01:43:17 +000014 </div>
Nils Diewald996aa552014-12-02 03:26:44 +000015%# -- Reference string
Nils Diewaldfccfbcb2015-04-29 20:48:19 +000016 <p class="ref">\
17<% if ($match->{title}) { %><strong><%= $match->{title} %></strong><% }; %>\
18<%= $match->{author} ? ' ' . loc('by') . ' ' . $match->{author} : '' %>\
19<% if ($match->{title} || $match->{author}) { %>;<% } =%> \
20<%= loc('pubOn') %> <%= $match->{pubDate} %> \
21(<%= $id %>)\
Nils Diewald996aa552014-12-02 03:26:44 +000022</p>
Nils Diewald4af3f0b2014-06-25 01:43:17 +000023</li>