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
<div class="container mx-auto px-4 py-8">
<!-- Header -->
<div class="flex items-start justify-between mb-8">
<div>
<h1 class="text-3xl font-bold mb-2"><%= t('views.admin.prompt_personas.index.title') %></h1>
<p class="text-gray-600"><%= t('views.admin.prompt_personas.index.subtitle') %></p>
</div>
<%= link_to new_admin_prompt_persona_path,
class: "inline-flex items-center px-4 py-2 border-2 border-black rounded-lg bg-black text-white hover:shadow-[2px_2px_0_0_#000000] transition-all" do %>
<i class="bi bi-plus mr-2"></i>
<%= t('views.admin.prompt_personas.index.add') %>
<% end %>
</div>
<div class="bg-white border-2 border-black rounded-lg shadow-[2px_2px_0_0_#000000] overflow-hidden">
<div class="px-4 py-3 border-b-2 border-black bg-gray-50">
<h2 class="text-lg font-bold"><%= t('views.admin.prompt_personas.index.table_title') %></h2>
</div>
<div class="overflow-x-auto">
<table class="w-full">
<thead class="bg-gray-100 border-b-2 border-black">
<tr>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"><%= t('views.admin.prompt_personas.index.th_key') %></th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"><%= t('views.admin.prompt_personas.index.th_label') %></th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"><%= t('views.admin.prompt_personas.index.th_position') %></th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"><%= t('views.admin.prompt_personas.index.th_status') %></th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"><%= t('views.admin.prompt_personas.index.th_type') %></th>
<th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider"><%= t('views.admin.prompt_personas.index.th_actions') %></th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<% @prompt_personas.each do |persona| %>
<tr class="hover:bg-gray-50 transition-colors">
<td class="px-6 py-4 whitespace-nowrap text-sm font-mono font-medium text-gray-900"><%= persona.key %></td>
<td class="px-6 py-4 text-sm text-gray-700">
<%= render 'prompt_personas/label_cell', persona: persona %>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-700 tabular-nums"><%= persona.position %></td>
<td class="px-6 py-4 whitespace-nowrap">
<% if persona.active? %>
<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800">
<i class="bi bi-check-circle mr-1"></i><%= t('views.admin.prompt_personas.index.status_active') %>
</span>
<% else %>
<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-gray-100 text-gray-600">
<i class="bi bi-pause-circle mr-1"></i><%= t('views.admin.prompt_personas.index.status_inactive') %>
</span>
<% end %>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<% if persona.system? %>
<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-purple-100 text-purple-800 border border-purple-300">
<i class="bi bi-shield-lock mr-1"></i><%= t('views.admin.prompt_personas.index.type_system') %>
</span>
<% else %>
<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-blue-100 text-blue-800">
<%= t('views.admin.prompt_personas.index.type_custom') %>
</span>
<% end %>
</td>
<td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
<div class="flex items-center justify-end space-x-2">
<%= link_to edit_admin_prompt_persona_path(persona),
class: "inline-flex items-center px-2 py-1 border-2 border-black rounded-lg hover:shadow-[2px_2px_0_0_#000000] transition-all",
title: t('views.admin.prompt_personas.index.edit') do %>
<i class="bi bi-pencil"></i>
<% end %>
<% if persona.system? %>
<span class="inline-flex items-center px-2 py-1 text-gray-400" title="<%= t('views.admin.prompt_personas.index.system_locked_note') %>">
<i class="bi bi-lock"></i>
</span>
<% else %>
<%= link_to admin_prompt_persona_path(persona),
data: { turbo_method: :delete, turbo_confirm: t('views.admin.prompt_personas.index.confirm_delete', key: persona.key) },
class: "inline-flex items-center px-2 py-1 border-2 border-black rounded-lg bg-red-100 hover:bg-red-200 hover:shadow-[2px_2px_0_0_#000000] transition-all",
title: t('views.admin.prompt_personas.index.delete') do %>
<i class="bi bi-trash"></i>
<% end %>
<% end %>
</div>
</td>
</tr>
<% end %>
</tbody>
</table>
</div>
<% if @prompt_personas.empty? %>
<div class="px-4 py-12 text-center">
<i class="bi bi-people text-gray-400 text-4xl mb-4"></i>
<h3 class="text-lg font-bold text-gray-900 mb-2"><%= t('views.admin.prompt_personas.index.empty_title') %></h3>
<p class="text-gray-500 mb-4"><%= t('views.admin.prompt_personas.index.empty_description') %></p>
<%= link_to new_admin_prompt_persona_path,
class: "inline-flex items-center px-4 py-2 border-2 border-black rounded-lg bg-black text-white hover:shadow-[2px_2px_0_0_#000000] transition-all" do %>
<i class="bi bi-plus mr-2"></i>
<%= t('views.admin.prompt_personas.index.empty_add_first') %>
<% end %>
</div>
<% end %>
</div>
</div>