blob: 56bfcf140571821af6e3d5484b9a92cfcda28de3 [file] [log] [blame]
Nils Diewald44e1edb2015-04-08 19:12:15 +00001% my $match = stash('match') || {};
Nils Diewald4347ee92015-05-04 20:32:48 +00002% my $id = $match->{corpusID} . '-' . $match->{docID} . '.' . $match->{textID} . '#' . $match->{ID};
Nils Diewaldfccfbcb2015-04-29 20:48:19 +00003<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
Nils Diewald4347ee92015-05-04 20:32:48 +00008 data-available-info="cnx/c=spans corenlp/ne=tokens corenlp/p=tokens mate/l=tokens mate/m=tokens mate/p=tokens opennlp/p=tokens tt/l=tokens tt/p=tokens xip/c=spans"
Nils Diewaldfccfbcb2015-04-29 20:48:19 +00009 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} : '' %>\
Nils Diewaldc46003b2015-05-07 15:55:35 +000019<% if ($match->{title} || $match->{author}) { %>;<% } %> \
Nils Diewaldfccfbcb2015-04-29 20:48:19 +000020<%= loc('pubOn') %> <%= $match->{pubDate} %> \
21(<%= $id %>)\
Nils Diewald996aa552014-12-02 03:26:44 +000022</p>
Nils Diewald4af3f0b2014-06-25 01:43:17 +000023</li>