Nils Diewald | 44e1edb | 2015-04-08 19:12:15 +0000 | [diff] [blame] | 1 | % my $match = stash('match') || {}; |
Nils Diewald | 4347ee9 | 2015-05-04 20:32:48 +0000 | [diff] [blame] | 2 | % my $id = $match->{corpusID} . '-' . $match->{docID} . '.' . $match->{textID} . '#' . $match->{ID}; |
Nils Diewald | fccfbcb | 2015-04-29 20:48:19 +0000 | [diff] [blame] | 3 | <li data-corpus-id="<%= $match->{corpusID} %>" |
| 4 | data-doc-id="<%= $match->{docID} %>" |
Nils Diewald | 8750783 | 2015-05-01 23:36:41 +0000 | [diff] [blame] | 5 | data-text-id="<%= $match->{textID} %>" |
Nils Diewald | fccfbcb | 2015-04-29 20:48:19 +0000 | [diff] [blame] | 6 | data-match-id="<%= $match->{ID} %>" |
| 7 | %# TODO: This needs to be retrieved per match |
Nils Diewald | 4347ee9 | 2015-05-04 20:32:48 +0000 | [diff] [blame] | 8 | 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 Diewald | fccfbcb | 2015-04-29 20:48:19 +0000 | [diff] [blame] | 9 | id="<%= $id %>"\ |
| 10 | <% if (current_route eq 'match') { %> class="active"<% } =%>> |
Nils Diewald | 4af3f0b | 2014-06-25 01:43:17 +0000 | [diff] [blame] | 11 | <div> |
Nils Diewald | fccfbcb | 2015-04-29 20:48:19 +0000 | [diff] [blame] | 12 | %# --- Snippet |
Nils Diewald | 791b590 | 2014-12-04 04:47:24 +0000 | [diff] [blame] | 13 | <div class="snippet<%= $match->{startMore} ? ' startMore' : '' %><%= $match->{endMore} ? ' endMore' : '' %>"><%== $match->{snippet} %></div> |
Nils Diewald | 4af3f0b | 2014-06-25 01:43:17 +0000 | [diff] [blame] | 14 | </div> |
Nils Diewald | 996aa55 | 2014-12-02 03:26:44 +0000 | [diff] [blame] | 15 | %# -- Reference string |
Nils Diewald | fccfbcb | 2015-04-29 20:48:19 +0000 | [diff] [blame] | 16 | <p class="ref">\ |
| 17 | <% if ($match->{title}) { %><strong><%= $match->{title} %></strong><% }; %>\ |
| 18 | <%= $match->{author} ? ' ' . loc('by') . ' ' . $match->{author} : '' %>\ |
Nils Diewald | c46003b | 2015-05-07 15:55:35 +0000 | [diff] [blame] | 19 | <% if ($match->{title} || $match->{author}) { %>;<% } %> \ |
Nils Diewald | fccfbcb | 2015-04-29 20:48:19 +0000 | [diff] [blame] | 20 | <%= loc('pubOn') %> <%= $match->{pubDate} %> \ |
| 21 | (<%= $id %>)\ |
Nils Diewald | 996aa55 | 2014-12-02 03:26:44 +0000 | [diff] [blame] | 22 | </p> |
Nils Diewald | 4af3f0b | 2014-06-25 01:43:17 +0000 | [diff] [blame] | 23 | </li> |