Class: ActiveAdmin::Views::Pages::Show
Defined Under Namespace
Modules: DefaultMainContent
Instance Method Summary
collapse
#default_attribute_table_rows, #default_main_content
Methods inherited from Base
#build, #html_title
Instance Method Details
#attributes_table(*args, &block) ⇒ Object
28
29
30
31
32
33
34
35
36
37
38
|
# File 'lib/active_admin/views/pages/show.rb', line 28
def attributes_table(*args, &block)
opts = args.
table_title = if opts.has_key?(:title)
render_or_call_method_or_proc_on(resource, opts[:title])
else
ActiveAdmin::Localizers.resource(active_admin_config).t(:details)
end
panel(table_title) do
attributes_table_for resource, *args, &block
end
end
|
#config ⇒ Object
7
8
9
|
# File 'lib/active_admin/views/pages/show.rb', line 7
def config
active_admin_config.get_page_presenter(:show) || super
end
|
#default_title ⇒ Object
42
43
44
|
# File 'lib/active_admin/views/pages/show.rb', line 42
def default_title
display_name(resource)
end
|
#main_content ⇒ Object
19
20
21
22
23
24
25
26
|
# File 'lib/active_admin/views/pages/show.rb', line 19
def main_content
if config.block
instance_exec resource, &config.block
else
default_main_content
end
end
|
#title ⇒ Object
11
12
13
14
15
16
17
|
# File 'lib/active_admin/views/pages/show.rb', line 11
def title
if config[:title]
render_or_call_method_or_proc_on(resource, config[:title])
else
assigns[:page_title] || default_title
end
end
|