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.6 KB
Raw Blame
<%# The people directory (Organisations::PeopleController): the list on the
    left, the person, a member without a row, or the form in the lane on the
    right, the shape of "Alle Meetings" without its filter bar. layout-toggle
    and index-page own the address (?person_id=, ?member_id=, ?new=person); a
    save leaves the lane and lands here again with the saved person open. %>
<% content_for :head do %>
  <meta name="turbo-cache-control" content="no-cache">
<% end %>

<% lane_state = if @form_person then :form elsif @lane_person then :detail elsif @lane_member then :member end %>
<% lane_person = @form_person || @lane_person %>

<div class="labor-layout-view people-page <%= 'show-content' if lane_state %> hide-panel"
     <%= tag.attributes(data: people_page_data(viewport_mode: @viewport_mode, selected: @lane_person, member: @lane_member,
                                               form_open: @form_person.present?)) %>>
  <% list = capture do %>
    <%= render 'organisations/people/list_head', counts: @counts %>
    <%= render 'organisations/people/results', entries: @entries, counts: @counts, selected: @lane_person, member: @lane_member %>
  <% end %>
  <% lane = capture do %>
    <%= render 'organisations/people/lane', state: lane_state || :empty, person: lane_person, member: @lane_member,
                                            message: @form_message %>
  <% end %>

  <% if @viewport_mode == 'mobile' %>
    <%= render 'organisations/people/index_mobile', list: list, lane: lane, open: lane_state.present? %>
  <% else %>
    <%= render 'organisations/people/index_desktop', list: list, lane: lane, open: lane_state.present? %>
  <% end %>
</div>