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.3 KB
Raw Blame
<%= render(Primer::OpenProject::SubHeader.new) do |subheader|
      subheader.with_segmented_control("aria-label": I18n.t(:label_filter_plural)) do |control|
        control.with_item(
          tag: :a,
          icon: :unread,
          href: notifications_path(facet: nil, **current_filters),
          label: t("notifications.facets.unread"),
          title: t("notifications.facets.unread_title"),
          selected: @facet != "all"
        )
        control.with_item(
          tag: :a,
          icon: :read,
          href: notifications_path(facet: "all", **current_filters),
          label: t("notifications.facets.all"),
          title: t("notifications.facets.all_title"),
          selected: @facet == "all"
        )
      end

      subheader.with_action_button(
        tag: :a,
        href: mark_all_read_notifications_path(**current_filters),
        data: { turbo_method: :post, turbo_confirm: I18n.t("js.notifications.center.mark_all_read_confirmation") },
        size: :medium,
        leading_icon: :"op-read-all",
        label: I18n.t("js.notifications.center.mark_all_read"),
        disabled: !unread_notifications?,
        test_selector: "mark-all-as-read-button"
      ) do
        I18n.t("js.notifications.center.mark_all_read")
      end
    end %>