Skip to content

Commit 35b7737

Browse files
committed
configures service views for new document type schema
1 parent c1c595e commit 35b7737

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/views/services/annotate.html.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
<li class="list-group-item">
5050
<div class="row">
5151
<div class="col-lg-6">
52-
<a href="#doc_<%= doc.id %>"><%= doc.name %></a>
52+
<a href="#doc_<%= doc.id %>"><%= doc.document_type ? doc.document_type.name : doc.name %></a>
5353
</div>
5454
<% if doc.ota_sourced %>
5555
<div class="col-lg-6 text-right small">
@@ -61,7 +61,7 @@
6161
<% end %>
6262
<% if policy(@service).create? %>
6363
<li style="list-style-type: none; padding-top: 1rem;">
64-
<%= link_to "Add a document", new_document_path(service: @service), title: "Add a new document to crawl", class: "btn btn-primary" %>
64+
<%= link_to "Add a document", new_service_document_path(@service), title: "Add a new document to crawl", class: "btn btn-primary" %>
6565
</li>
6666
<% end %>
6767
</ul>
@@ -72,7 +72,7 @@
7272
<div class="docAnchor" id="doc_<%= doc.id %>">
7373
<div class="panel panel-default">
7474
<div class="panel-heading pb-2">
75-
<h3><%= link_to doc.name, document_path(doc) %></h3>
75+
<h3><%= link_to doc.document_type ? doc.document_type.name : doc.name, document_path(doc) %></h3>
7676
<% if policy(doc).restore_points? %>
7777
<% if doc.snippets[:points_needing_restoration].present? %>
7878
<%= link_to("Restore quotes", document_restore_points_path(doc), method: :post, class: 'btn btn-sm btn-warning') %>

0 commit comments

Comments
 (0)