blob: 43f172d9f5c0c3458c003dab3b6d913bdcf42b5d [file] [log] [blame]
Nils Diewald4af3f0b2014-06-25 01:43:17 +00001%# ID, title, corpusID, author, pubDate, textClass
Nils Diewald44e1edb2015-04-08 19:12:15 +00002% my $match = stash('match') || {};
Nils Diewald996aa552014-12-02 03:26:44 +00003<li data-corpus-id="<%= $match->{corpusID} %>" \
4data-doc-id="<%= $match->{docID} %>" \
5data-match-id="<%= $match->{ID} %>" \
6id="<%= $match->{corpusID} %>-<%= $match->{docID} %>-<%= $match->{ID} %>"\
7<% if (current_route eq 'match') { %> class="active"<% } =%>
8>
9%#
10%# -- Match information (snippet, morph table, tree information etc.)
Nils Diewald4af3f0b2014-06-25 01:43:17 +000011 <div>
Nils Diewald791b5902014-12-04 04:47:24 +000012 <div class="snippet<%= $match->{startMore} ? ' startMore' : '' %><%= $match->{endMore} ? ' endMore' : '' %>"><%== $match->{snippet} %></div>
Nils Diewald4af3f0b2014-06-25 01:43:17 +000013 <div class="tokenInfo"></div>
Nils Diewald8f4b5da2014-12-03 22:13:39 +000014%# <div class="treeInfo"></div>
Nils Diewald4af3f0b2014-06-25 01:43:17 +000015 </div>
Nils Diewald996aa552014-12-02 03:26:44 +000016%#
17%# -- Reference string
18 <p>\
Nils Diewalde8ead6b2014-11-07 05:00:17 +000019% if ($match->{title}) {
Nils Diewald996aa552014-12-02 03:26:44 +000020<strong><%= $match->{title} %></strong>\
Nils Diewalde8ead6b2014-11-07 05:00:17 +000021% };
Nils Diewald996aa552014-12-02 03:26:44 +000022<%= $match->{author} ? ' by ' . $match->{author} : '' %><% if ($match->{title} || $match->{author}) { %>;<% } =%>
23 published on <%= date_format $match->{pubDate} %>\
24 as <%= $match->{docID} %> (<%= $match->{corpusID} %>)\
25</p>
26%#
27%# -- Action buttons
Nils Diewald4af3f0b2014-06-25 01:43:17 +000028 <ul class="action right">
29% if (current_route ne 'match') {
Nils Diewald996aa552014-12-02 03:26:44 +000030 <li class="close" title="Close"><a href="#"><i class="fa fa-toggle-up"></i></a></li>
31%# <li class="open" title="Open in new tab"><%= link_to 'match', { corpus_id => $match->{corpusID}, doc_id => $match->{docID}, match_id => $match->{ID} }, target => '_blank', begin %><i class="fa fa-external-link-square"></i><% end %></li>
Nils Diewald77812322014-11-12 18:44:51 +000032 <li class="open" title="Open in new tab"><a href="#<%= $match->{corpusID} %>-<%= $match->{docID} %>-<%= $match->{ID} %>" target="_blank"><i class="fa fa-external-link-square"></i></a></li>
Nils Diewald996aa552014-12-02 03:26:44 +000033% };
Nils Diewald4af3f0b2014-06-25 01:43:17 +000034 <li onclick="showTable(this)" title="Annotations"><i class="fa fa-info-circle"></i></li>
Nils Diewald8f4b5da2014-12-03 22:13:39 +000035%# <li onclick="showTree(this, 'xip', 'c')" title="Tree Visualizations"><i class="fa fa-sitemap"></i></li>
Nils Diewald4af3f0b2014-06-25 01:43:17 +000036%# <li title="Remember"><i class="fa fa-star-o"></i></li>
37 </ul>
38</li>