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`.
13 lines
258 B
Ruby
13 lines
258 B
Ruby
class Admin::SiteCustomization::Pages::EditComponent < ApplicationComponent
|
|
include Header
|
|
attr_reader :page
|
|
|
|
def initialize(page)
|
|
@page = page
|
|
end
|
|
|
|
def title
|
|
t("admin.site_customization.pages.edit.title", page_title: page.title)
|
|
end
|
|
end
|