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.0 KB
Raw Blame
<%=
  component_wrapper do
    render(Primer::OpenProject::SidePanel::Section.new) do |section|
      section.with_title { t(:label_attachment_plural) }
      section.with_description do
        if @meeting.templated?
          I18n.t("meeting.attachments.template")
        else
          I18n.t("meeting.attachments.text")
        end
      end
      section.with_counter(count: @meeting.attachments.count)

      section.with_footer_button(
        color: :accent,
        id: "meetings-add-attachments",
        classes: "hide-when-print"
      ) do |button|
        button.with_leading_visual_icon(icon: "op-add-attachment")
        t("js.label_add_attachments")
      end

      resource = ::API::V3::Meetings::MeetingRepresenter.new(@meeting, current_user: User.current, embed_links: false)
      helpers.list_attachments(
        resource,
        inputs: {
          allowUploading: true,
          showTimestamp: false,
          externalUploadButton: "#meetings-add-attachments"
        }
      )
    end
  end
%>