blob: f3b54743bf0daf6bd564506854cca6ecf30fdaab [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>
Akron0669f2f2015-05-28 20:27:09 +020012 <div class="flag"></div>
Nils Diewaldfccfbcb2015-04-29 20:48:19 +000013%# --- Snippet
Nils Diewald791b5902014-12-04 04:47:24 +000014 <div class="snippet<%= $match->{startMore} ? ' startMore' : '' %><%= $match->{endMore} ? ' endMore' : '' %>"><%== $match->{snippet} %></div>
Nils Diewald4af3f0b2014-06-25 01:43:17 +000015 </div>
Nils Diewald996aa552014-12-02 03:26:44 +000016%# -- Reference string
Nils Diewaldfccfbcb2015-04-29 20:48:19 +000017 <p class="ref">\
18<% if ($match->{title}) { %><strong><%= $match->{title} %></strong><% }; %>\
19<%= $match->{author} ? ' ' . loc('by') . ' ' . $match->{author} : '' %>\
Nils Diewaldc46003b2015-05-07 15:55:35 +000020<% if ($match->{title} || $match->{author}) { %>;<% } %> \
Nils Diewaldfccfbcb2015-04-29 20:48:19 +000021<%= loc('pubOn') %> <%= $match->{pubDate} %> \
22(<%= $id %>)\
Nils Diewaldc2826192015-05-07 19:23:44 +000023%# Add textClass
Nils Diewald996aa552014-12-02 03:26:44 +000024</p>
Nils Diewald4af3f0b2014-06-25 01:43:17 +000025</li>