Skip to content

Commit

Permalink
url in ui (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
vswamidass-sfdc authored Nov 6, 2024
1 parent f85f59f commit 959446c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions app/views/documents/_document.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,22 @@
</div>
<% end %>
</div>
<div class="flex justify-between items-center p-4 bg-gray-200">
<div class="flex justify-between items-center py-2 pl-4 bg-gray-200">
<div class="w-full">
<p class="text-xs text-gray-600 mt-1">
<%= render partial: 'shared/meta_info', locals: { email: document.user.email, created_at: document.created_at, updated_at: document.updated_at } %>
<%= "| Synced #{time_ago_in_words(document.synced_at)} ago" if document.synced_at.present? %>
</p>
<% if document.url %>
<div class="flex items-center space-x-1 text-xs mt-2">
<span class="text-stone-500">Related URL:</span>
<%= link_to document.url, document.url, class:"text-sky-500 hover:underline", target:"_source" %>
</div>
<% end %>
<% if document.source_url %>
<div class="flex items-center space-x-3 text-xs mt-2">
<span>Source:</span>
<%= link_to document.source_url, document.source_url, class:"text-blue-600 underline", target:"_source" %>
<span class="text-stone-500">Source:</span>
<%= link_to document.source_url, document.source_url, class:"text-sky-500 hover:underline", target:"_source" %>
<% if document.source_type == 'quip' %>
<%= image_tag 'quip_logo.png', alt: 'Quip Logo', class: 'h-6' %>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-5 <%= "text-green-600" if document.last_sync_result == "SUCCESS" %> <%= "text-red-600" if document.last_sync_result == "FAILED" %>">
Expand Down

0 comments on commit 959446c

Please sign in to comment.