Files
grecia/app/components/admin/site_customization/pages/new_component.rb
Javi Martín fc4940ccb6 Move edit page and new page views to components
This way we can simplify setting the title and styling the link in the
header. We're also fixing the unnecessary padding introduced by the
`column` classes, which caused the header not to be aligned with the
rest of the elements surrounding it. We're still keeping it the margin
used in the `row` classes so it's aligned with the rest of the form;
ideally, we would remove the `row` classes in the rest of the form and
in the whole admin section, but this isn't something we can tackle right
now.

Note that, in the CSS, the `margin-left: auto` property needs to be
included after `@include regular-button` because that mixin overwrites
the `margin-left` property. Since we're modifying this code, we're
making it compatible with RTL text, using `$global-left` instead of
`left`.
2024-04-17 17:29:36 +02:00

13 lines
232 B
Ruby

class Admin::SiteCustomization::Pages::NewComponent < ApplicationComponent
include Header
attr_reader :page
def initialize(page)
@page = page
end
def title
t("admin.site_customization.pages.new.title")
end
end