4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/generators/vue_crud/templates/example/users_controller.rb', line 4
def info
@info = {
:url_prefix => '/admin/users',
:titles => {
:display_name => 'user',
:title => 'User',
:subtitle => 'manage user',
:title_attribute_model_prefix => 'profile_attributes',
:title_attribute => 'company_name'
},
:structure => {:profile_attributes => {}, :service_ids => []},
:model_attributes => [
{:visible => true, :editable => false, :model_prefix => '', :name => 'first_service', :display_name => 'First services', :type => 'img', :input_class => '', :data_attribute => ''},
{:visible => true, :editable => false, :model_prefix => '', :name => 'id', :display_name => 'ID', :type => 'text', :input_class => '', :data_attribute => ''},
{:visible => true, :editable => true, :model_prefix => '', :name => 'email', :display_name => 'Email', :type => 'email', :input_class => '', :data_attribute => ''},
{:visible => false, :editable => true, :model_prefix => '', :name => 'password', :display_name => 'Password', :type => 'password', :input_class => '', :data_attribute => ''},
{:visible => false, :editable => true, :model_prefix => '', :name => 'password_confirmation', :display_name => 'Password confirmation', :type => 'password', :input_class => '', :data_attribute => ''},
{:visible => true, :editable => true, :model_prefix => 'profile_attributes', :name => 'company_name', :display_name => 'Company name', :type => 'text', :input_class => '', :data_attribute => ''},
{:visible => true, :editable => true, :model_prefix => 'profile_attributes', :name => 'tel', :display_name => 'Tel', :type => 'text', :input_class => '', :data_attribute => ''},
{:visible => true, :editable => true, :model_prefix => 'profile_attributes', :name => 'mobile', :display_name => 'Mobile', :type => 'text', :input_class => '', :data_attribute => ''},
{:visible => false, :editable => true, :model_prefix => 'profile_attributes', :name => 'fax', :display_name => 'Fax', :type => 'text', :input_class => '', :data_attribute => ''},
{:visible => false, :editable => true, :model_prefix => 'profile_attributes', :name => 'address', :display_name => 'Address', :type => 'text', :input_class => '', :data_attribute => ''},
]
}
respond_to do |format|
format.json do
render :json => @info.to_json
end
end
end
|