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.5 KB
Raw Blame

<div class="labor-layout-view">
  <%# Back link closes the round-trip: default → project settings (where the
      repositories card lives); origin=documentation → back to the documentation
      area the user came from. Enum-driven, so no free-form return path. %>
  <% if @origin == documentation_origin %>
    <% back_url = organisation_project_documentation_index_path(@current_organisation, @project) %>
    <% back_label = t('views.organisations.project_repositories.index.back_documentation') %>
  <% else %>
    <% back_url = edit_organisation_project_path(@current_organisation, @project) %>
    <% back_label = t('views.organisations.project_repositories.index.back_settings') %>
  <% end %>

  <%= render NeoTitleBoxComponent.new(
    title: t('views.organisations.project_repositories.index.title'),
    subtitle: @project.name,
    variant: :project
  ) do |component| %>
    <% component.with_right_content do %>
      <%= render Neo::Buttons::HeaderButtonComponent.new(
        variant: :secondary,
        icon: "arrow-left",
        label: back_label,
        url: back_url
      ) %>
    <% end %>
  <% end %>

  <div class="mt-6 max-w-3xl">
    <%= render Neo::Repository::ConnectComponent.new(
      project: @project,
      repositories: @repositories,
      new_repository: ProjectRepository.new(project: @project, organisation: @current_organisation,
                                            provider: 'github'),
      current_organisation: @current_organisation,
      origin: @origin
    ) %>
  </div>
</div>