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.2 KB
Raw Blame
<% if @actor %>
  <div class="actor-info">
    <span class="actor-name"><%= @actor.full_name %></span> added a new document
    <% if @document %>
      <strong><%= @document.name %></strong>
    <% end %>
  </div>
<% end %>

<% if @document %>
  <p>
    <strong>Document:</strong> <%= @document.name %><br>
    <% if @document.respond_to?(:project) && @document.project %>
      <strong>Project:</strong> <%= @document.project.name %><br>
    <% end %>
    <% if @document.respond_to?(:file_size) && @document.file_size %>
      <strong>Size:</strong> <%= number_to_human_size(@document.file_size) %><br>
    <% end %>
    <% if @document.respond_to?(:content_type) && @document.content_type %>
      <strong>Type:</strong> <%= @document.content_type %>
    <% end %>
  </p>
<% end %>

<% if @document&.respond_to?(:description) && @document.description.present? %>
  <div style="margin: 16px 0; padding: 16px; background-color: #f0fdf4; border-radius: 6px; border-left: 3px solid #059669;">
    <strong>Description:</strong><br>
    <%= simple_format(@document.description.truncate(200)) %>
  </div>
<% end %>

<a href="<%= @action_url %>" class="action-button" style="background-color: #059669;">View Document</a>