Skip to content

Self-hosted project management for devs and their clients: tickets, time tracking, docs and meetings, with an AI assistant that cites its sources. AGPL-3.0.

1.1 KB
Raw Blame
<%# locals: (version:, proxy:) %>
<%# The text case (D3 of doc/dateivorschau_plan.md, case 3): the version's text
    version, escaped, wrapped. Without one: "derzeit nicht verfügbar" with a
    reload of the lane's frame, because the extraction runs after the upload and
    the same empty value stands for a fresh file, a failed read and a scanned
    PDF alike; no reliable processing status tells them apart, so no promise. %>
<% pv = 'views.organisations.documents.preview' %>
<% if version.plain_text_version.present? %>
  <pre class="whitespace-pre-wrap break-words font-mono text-[13px] leading-relaxed text-cream-800" data-preview-text><%= version.plain_text_version %></pre>
<% else %>
  <p class="text-sm text-cream-700" data-preview-text-missing><%= t("#{pv}.text_unavailable") %></p>
  <div class="mt-3 flex flex-wrap items-center gap-3">
    <button type="button" class="<%= text_action_classes %>" data-action="preview-embed#refresh"><%= t("#{pv}.refresh") %></button>
    <% if proxy %>
      <a href="<%= proxy %>" download class="<%= text_action_classes %>"><%= t("#{pv}.download") %></a>
    <% end %>
  </div>
<% end %>