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

1.1 KB
Raw Blame
<%=
  render(Primer::Alpha::Dialog.new(id: dialog_id, title:, size: :large)) do |dialog|
    dialog.with_header(variant: :large)

    dialog.with_body do
      concat(
        render(Primer::Box.new(mt: 1, classes: "op-uc-container op-uc-container__no-permalinks")) do
          helpers.format_text(@attribute_help_text, :help_text)
        end
      )

      if has_attachments?
        concat render(Primer::Beta::Heading.new(tag: :h4)) { I18n.t(:label_attachment_plural) }
        concat helpers.list_attachments(
          resource_representer,
          inputs: { allowUploading: false, allowRemoval: false }
        )
      end
    end

    dialog.with_footer(show_divider: true) do
      if allowed_to_edit?
        concat(
          render(Primer::Beta::Button.new(tag: :a, href: edit_button_href)) do |button|
            button.with_leading_visual_icon(icon: :pencil)
            I18n.t(:button_edit)
          end
        )
      end

      concat(
        render(Primer::Beta::Button.new(data: { close_dialog_id: dialog_id })) { I18n.t(:button_close) }
      )
    end
  end
%>