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: (credential:) -%>
<%# Cross-link + quota provenance for the credential currently SELECTED in the
    neighbouring select (§7b.1: packages are the shop window, credentials the
    stock room — both directions link). Rendered server-side from the saved
    value; the quota badge is information, never a validation error, and a
    package deliberately may mix metered and unmetered credentials. %>
<% if credential.present? %>
  <p class="mt-1 text-sm text-gray-500 flex flex-wrap items-center gap-x-3 gap-y-1">
    <%= link_to admin_ai_credential_path(credential), class: "underline hover:text-gray-700" do %>
      <i class="bi bi-box-arrow-up-right mr-1"></i><%= t('views.admin.ai_packages.form.credential_link', name: credential.display_label) %>
    <% end %>
    <% unless credential.included_in_quota? %>
      <span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-blue-100 text-blue-800">
        <i class="bi bi-info-circle mr-1"></i><%= t('views.admin.ai_packages.form.badge_not_metered') %>
      </span>
    <% end %>
  </p>
<% end %>