blob: f3b54743bf0daf6bd564506854cca6ecf30fdaab [file] [log] [blame]
% my $match = stash('match') || {};
% my $id = $match->{corpusID} . '-' . $match->{docID} . '.' . $match->{textID} . '#' . $match->{ID};
<li data-corpus-id="<%= $match->{corpusID} %>"
data-doc-id="<%= $match->{docID} %>"
data-text-id="<%= $match->{textID} %>"
data-match-id="<%= $match->{ID} %>"
%# TODO: This needs to be retrieved per match
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"
id="<%= $id %>"\
<% if (current_route eq 'match') { %> class="active"<% } =%>>
<div>
<div class="flag"></div>
%# --- Snippet
<div class="snippet<%= $match->{startMore} ? ' startMore' : '' %><%= $match->{endMore} ? ' endMore' : '' %>"><%== $match->{snippet} %></div>
</div>
%# -- Reference string
<p class="ref">\
<% if ($match->{title}) { %><strong><%= $match->{title} %></strong><% }; %>\
<%= $match->{author} ? ' ' . loc('by') . ' ' . $match->{author} : '' %>\
<% if ($match->{title} || $match->{author}) { %>;<% } %> \
<%= loc('pubOn') %> <%= $match->{pubDate} %> \
(<%= $id %>)\
%# Add textClass
</p>
</li>