Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

977 B
Raw Blame
<%=
  render(Primer::OpenProject::SidePanel::Section.new) do |section|
    section.with_title { t(:label_information) }

    component_wrapper do
      flex_layout do |details_container|
        if user_is_allowed_to_see_email
          details_container.with_row(font_weight: :bold) do
            User.human_attribute_name(:mail)
          end

          details_container.with_row do
            mail_to(escape_javascript(@user.mail), nil, encode: "javascript")
          end
        end

        visible_custom_fields.each do |custom_field|
          details_container.with_row(mt: 2, font_weight: :bold, test_selector: "user-custom-field") do
            custom_field.name
          end

          details_container.with_row do
            value = @user.formatted_custom_value_for(custom_field)
            if value.is_a?(Array)
              safe_join(value, ", ")
            else
              value
            end
          end
        end
      end
    end
  end
%>