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.
Ruby agplai-assistantdockerdsgvogdprhotwireissue-trackerjira-alternativeknowledge-basellmmcp-servermeeting-notesopen-sourceproject-managementredmine-alternativeruby-on-railsself-hostedticketingtime-tracking
<figure class="attachment attachment--<%= blob.representable? ? "preview" : "file" %> attachment--<%= blob.filename.extension %>">
<% if blob.representable? %>
<%# Dimensions owned by RichTextEmbeds (D5); RichTextEmbedVariantJob pre-processes DISPLAY_LIMIT. %>
<%# The link is the zoom: neo_rich_text_zoom_controller on the content wrapper opens it in a %>
<%# lightbox, without JS it opens the large variant. Only `href` and `class` survive %>
<%# ActionText's sanitizer (it runs AFTER this partial), so no data attributes here. %>
<%# `title` names the ACTION (tooltip, and the fallback name without JS); the image's %>
<%# `alt` names the picture. Both the filename would say it twice, and the figcaption %>
<%# below prints it a third time. %>
<%= link_to polymorphic_url(blob.representation(resize_to_limit: RichTextEmbeds::ZOOM_LIMIT)),
class: "attachment__zoom", title: t('views.action_text.zoom_open') do %>
<%= image_tag blob.representation(resize_to_limit: local_assigns[:in_gallery] ? RichTextEmbeds::GALLERY_LIMIT : RichTextEmbeds::DISPLAY_LIMIT),
alt: blob.filename.to_s %>
<% end %>
<% end %>
<figcaption class="attachment__caption">
<% if caption = blob.try(:caption) %>
<%= caption %>
<% else %>
<span class="attachment__name"><%= blob.filename %></span>
<span class="attachment__size"><%= number_to_human_size blob.byte_size %></span>
<% end %>
</figcaption>
</figure>