adminpanel 2.1.2 → 2.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/adminpanel.gemspec +20 -18
  3. data/app/assets/javascripts/adminpanel/jquery.knob.js +652 -0
  4. data/app/assets/javascripts/adminpanel/realm.js +20 -18
  5. data/app/assets/javascripts/adminpanel/spinner.js.coffee +3 -3
  6. data/app/controllers/adminpanel/analytics_controller.rb +99 -53
  7. data/app/controllers/adminpanel/auths_controller.rb +1 -1
  8. data/app/controllers/adminpanel/sessions_controller.rb +26 -26
  9. data/app/controllers/concerns/adminpanel/facebook_actions.rb +2 -2
  10. data/app/helpers/adminpanel/adminpanel_form_builder.rb +257 -298
  11. data/app/helpers/adminpanel/analytics_helper.rb +46 -0
  12. data/app/helpers/adminpanel/application_helper.rb +57 -57
  13. data/app/helpers/adminpanel/breadcrumbs_helper.rb +13 -13
  14. data/app/helpers/adminpanel/sessions_helper.rb +20 -20
  15. data/app/helpers/adminpanel/shared_pages_helper.rb +41 -41
  16. data/app/models/adminpanel/gallery.rb +65 -63
  17. data/app/models/adminpanel/image.rb +5 -5
  18. data/app/models/adminpanel/section.rb +61 -53
  19. data/app/models/adminpanel/user.rb +1 -6
  20. data/app/models/concerns/adminpanel/facebook.rb +1 -1
  21. data/app/uploaders/adminpanel/gallery_uploader.rb +1 -1
  22. data/app/views/adminpanel/analytics/_widget_task_statistics.html.erb +63 -0
  23. data/app/views/adminpanel/analytics/fb.html.erb +98 -0
  24. data/app/views/adminpanel/analytics/index.html.erb +8 -8
  25. data/app/views/adminpanel/galleries/_galleries_table.html.erb +12 -12
  26. data/app/views/adminpanel/galleries/move_better.js.erb +1 -1
  27. data/app/views/adminpanel/galleries/move_worst.js.erb +1 -1
  28. data/app/views/adminpanel/sections/_sections_table.html.erb +7 -7
  29. data/app/views/adminpanel/sections/show.html.erb +25 -25
  30. data/app/views/adminpanel/sessions/new.html.erb +22 -22
  31. data/app/views/layouts/_shim.html.erb +1 -1
  32. data/app/views/layouts/_side_menu.html.erb +35 -35
  33. data/app/views/layouts/admin-login.html.erb +22 -22
  34. data/app/views/layouts/admin.html.erb +35 -35
  35. data/app/views/shared/_breadcrumb.html.erb +4 -4
  36. data/app/views/shared/_error_messages.html.erb +15 -15
  37. data/app/views/shared/_form_fields.html.erb +48 -47
  38. data/app/views/shared/_image_fields.html.erb +1 -1
  39. data/config/initializers/pluralization_es.rb +1 -1
  40. data/config/locales/es.yml +38 -2
  41. data/config/routes.rb +5 -4
  42. data/lib/adminpanel/version.rb +1 -1
  43. data/lib/generators/adminpanel/gallery/templates/gallery_migration.rb +5 -5
  44. data/lib/generators/adminpanel/gallery/templates/uploader.rb +1 -1
  45. data/lib/generators/adminpanel/initialize/initialize_generator.rb +54 -54
  46. data/lib/generators/adminpanel/initialize/templates/category_template.rb +1 -1
  47. data/lib/generators/adminpanel/initialize/templates/create_adminpanel_categories_table.rb +5 -5
  48. data/lib/generators/adminpanel/initialize/templates/create_adminpanel_tables.rb +57 -57
  49. data/lib/generators/adminpanel/initialize/templates/section_uploader.rb +1 -1
  50. data/lib/generators/adminpanel/migration/migration_generator.rb +44 -0
  51. data/lib/generators/adminpanel/migration/migration_generator_helper.rb +19 -0
  52. data/lib/generators/adminpanel/resource/resource_generator.rb +60 -245
  53. data/lib/generators/adminpanel/resource/resource_generator_helper.rb +189 -0
  54. data/lib/generators/adminpanel/resource/templates/{controller.rb → adminpanel_controller_template.rb} +2 -2
  55. data/lib/generators/adminpanel/resource/templates/{resource.rb → adminpanel_resource_template.rb} +0 -0
  56. data/test/dummy/app/models/adminpanel/categorization.rb +2 -2
  57. data/test/dummy/app/models/adminpanel/category.rb +3 -3
  58. data/test/dummy/app/models/adminpanel/department.rb +2 -2
  59. data/test/dummy/app/models/adminpanel/item.rb +3 -3
  60. data/test/dummy/app/models/adminpanel/mug.rb +14 -14
  61. data/test/dummy/app/models/adminpanel/product.rb +19 -19
  62. data/test/dummy/app/models/adminpanel/salesman.rb +15 -15
  63. data/test/dummy/app/uploader/adminpanel/photo_uploader.rb +1 -1
  64. data/test/dummy/app/views/layouts/application.html.erb +9 -9
  65. data/test/dummy/config/boot.rb +1 -1
  66. data/test/features/shared/{belongs_to_category_modal_test.rb → form/belongs_to_category_modal_test.rb} +0 -0
  67. data/test/features/shared/{belongs_to_non_category_modal_test.rb → form/belongs_to_non_category_modal_test.rb} +0 -0
  68. data/test/features/shared/{has_many_through_category_modal_test.rb → form/has_many_through_category_modal_test.rb} +0 -0
  69. data/test/features/shared/{has_many_through_non_category_modal_test.rb → form/has_many_through_non_category_modal_test.rb} +0 -0
  70. data/test/features/shared/{edit_test.rb → resource/edit_test.rb} +0 -0
  71. data/test/features/shared/{index_test.rb → resource/index_test.rb} +0 -0
  72. data/test/features/shared/{new_test.rb → resource/new_test.rb} +0 -0
  73. data/test/features/shared/{show_test.rb → resource/show_test.rb} +0 -0
  74. data/test/features/shared/{action_exclution_test.rb → ui/action_exclution_test.rb} +0 -0
  75. data/test/test_helper.rb +1 -1
  76. metadata +44 -32
  77. data/test/dummy/app/controllers/adminpanel/.gitkeep +0 -0
  78. data/test/dummy/app/models/.gitkeep +0 -0
@@ -2,30 +2,30 @@
2
2
  <% breadcrumb_add('Secciones', sections_path) %>
3
3
 
4
4
  <div class="row-fluid">
5
- <div class="widget widget-padding span12">
6
- <div class="widget-header">
7
- <i class="fa fa-tasks"></i>
8
- <h5><%= @section.name.humanize %>&nbsp;
9
- <%= render 'shared/edit_icon_button', resource: @section, resource_name: @model.display_name %>
10
- </h5>
11
- </div>
12
- <div class="widget-body row-fluid">
5
+ <div class="widget widget-padding span12">
6
+ <div class="widget-header">
7
+ <i class="fa fa-tasks"></i>
8
+ <h5><%= @section.name.humanize %>&nbsp;
9
+ <%= render 'shared/edit_icon_button', resource: @section, resource_name: @model.display_name %>
10
+ </h5>
11
+ </div>
12
+ <div class="widget-body row-fluid">
13
13
 
14
- <div class="span2">
15
- <b>Descripción</b>
16
- </div>
17
- <div class="span10">
18
- <% if @section.description.nil? %>
19
- <%= t("other.no description") %>
20
- <% else %>
21
- <%= @section.description.html_safe %>
22
- <% end %>
23
- </div>
24
- <div class="span12">
25
- <% @section.images.each do |image|-%>
26
- <%= image_tag(image.file_url :thumb) %>
27
- <% end %>
28
- </div>
29
- </div>
30
- </div>
14
+ <div class="span2">
15
+ <b>Descripción</b>
16
+ </div>
17
+ <div class="span10">
18
+ <% if @section.description.nil? %>
19
+ <%= t("other.no description") %>
20
+ <% else %>
21
+ <%= @section.description.html_safe %>
22
+ <% end %>
23
+ </div>
24
+ <div class="span12">
25
+ <% @section.images.each do |image|-%>
26
+ <%= image_tag(image.file_url :thumb) %>
27
+ <% end %>
28
+ </div>
29
+ </div>
30
+ </div>
31
31
  </div>
@@ -1,26 +1,26 @@
1
1
  <% provide(:title, 'Inicio') %>
2
2
  <% provide(:section, 'login') %>
3
3
  <div class="widget container-narrow">
4
- <div class="widget-header">
5
- <i class="fa fa-user"></i>
6
- <h5><%= t("authentication.welcome") %></h5>
7
- </div>
8
- <div class="widget-body clearfix" style="padding:25px;">
9
- <% flash.each do |key, value| %>
10
- <div class = "alert alert-<%= key %>"><%= value %></div>
11
- <% end %>
12
- <%= form_for(:session, :url => sessions_path) do |f| %>
13
- <div class="control-group">
14
- <div class="controls">
15
- <%= f.text_field :email, :class => "btn-block", :id => "inputEmail" , :placeholder => t("session.email") %>
16
- </div>
17
- </div>
18
- <div class="control-group">
19
- <div class="controls">
20
- <%= f.password_field :password, :class => "btn-block", :id => "inputPassword", :placeholder => t("session.password") %>
21
- </div>
22
- </div>
23
- <%= f.submit I18n.t('authentication.new-session'), :class => "btn pull-right", :id => "signin-button" %>
24
- <% end %>
25
- </div>
4
+ <div class="widget-header">
5
+ <i class="fa fa-user"></i>
6
+ <h5><%= t("authentication.welcome") %></h5>
7
+ </div>
8
+ <div class="widget-body clearfix" style="padding:25px;">
9
+ <% flash.each do |key, value| %>
10
+ <div class = "alert alert-<%= key %>"><%= value %></div>
11
+ <% end %>
12
+ <%= form_for(:session, :url => sessions_path) do |f| %>
13
+ <div class="control-group">
14
+ <div class="controls">
15
+ <%= f.text_field :email, :class => "btn-block", :id => "inputEmail" , :placeholder => t("session.email") %>
16
+ </div>
17
+ </div>
18
+ <div class="control-group">
19
+ <div class="controls">
20
+ <%= f.password_field :password, :class => "btn-block", :id => "inputPassword", :placeholder => t("session.password") %>
21
+ </div>
22
+ </div>
23
+ <%= f.submit I18n.t('authentication.new-session'), :class => "btn pull-right", :id => "signin-button" %>
24
+ <% end %>
25
+ </div>
26
26
  </div>
@@ -1,4 +1,4 @@
1
1
  <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
2
2
  <!--[if lt IE 9]>
3
3
  <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
4
- <![endif]-->
4
+ <![endif]-->
@@ -1,40 +1,40 @@
1
1
  <!-- Side menu -->
2
2
  <div class="sidebar-nav nav-collapse collapse" id="sidebar-navigation">
3
- <div class="user_side clearfix">
4
- <h5>
5
- <%= current_user.name.humanize %>
6
- </h5>
7
- <%=
8
- link_to(
9
- "#{current_user.group.name}",
10
- "#"
11
- )
12
- %>
13
- </div>
14
- <div class="accordion">
15
- <% Adminpanel.displayable_resources.each do |resource| %>
16
- <% resource_class = symbol_class(resource) %>
17
- <% if can? :read, resource_class %>
18
- <div class="accordion-group">
19
- <div class="accordion-heading">
20
- <%=
21
- link_to(
22
- content_tag(
23
- :i,
24
- nil,
25
- class:"fa fa-#{resource_class.icon}"
26
- ) + content_tag(:span," " + resource_class.display_name.pluralize(I18n.default_locale)
27
- ),
28
- [route_symbol(resource.to_s)],
29
- data: { no_transition_cache: true },
30
- class: "accordion-toggle b_99FFCC #{is_current_section?(resource_class.display_name)}"
31
- )
32
- %>
33
- </div>
34
- </div>
35
- <% end %>
36
- <% end %>
3
+ <div class="user_side clearfix">
4
+ <h5>
5
+ <%= current_user.name.humanize %>
6
+ </h5>
7
+ <%=
8
+ link_to(
9
+ "#{current_user.group.name}",
10
+ "#"
11
+ )
12
+ %>
13
+ </div>
14
+ <div class="accordion">
15
+ <% Adminpanel.displayable_resources.each do |resource| %>
16
+ <% resource_class = symbol_class(resource) %>
17
+ <% if can? :read, resource_class %>
18
+ <div class="accordion-group">
19
+ <div class="accordion-heading">
20
+ <%=
21
+ link_to(
22
+ content_tag(
23
+ :i,
24
+ nil,
25
+ class:"fa fa-#{resource_class.icon}"
26
+ ) + content_tag(:span," " + resource_class.display_name.pluralize(I18n.default_locale)
27
+ ),
28
+ [route_symbol(resource.to_s)],
29
+ data: { no_transition_cache: true },
30
+ class: "accordion-toggle b_99FFCC #{is_current_section?(resource_class.display_name)}"
31
+ )
32
+ %>
33
+ </div>
34
+ </div>
35
+ <% end %>
36
+ <% end %>
37
37
 
38
- </div>
38
+ </div>
39
39
  </div>
40
40
  <!-- /Side menu -->
@@ -1,26 +1,26 @@
1
1
  <!DOCTYPE html>
2
2
  <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <title><%= full_title(yield(:page_title)) %></title>
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
- <%= stylesheet_link_tag "application-admin", :media => "all" %>
8
- <%= javascript_include_tag "application-admin" %>
9
- <%= csrf_meta_tags %>
10
- <%= favicon_link_tag "adminpanel/favicon.ico" %>
11
- <link href="http://fonts.googleapis.com/css?family=Open+Sans:400,700" rel="stylesheet" type="text/css">
12
- <%= render 'layouts/shim' %>
13
- </head>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title><%= full_title(yield(:page_title)) %></title>
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <%= stylesheet_link_tag "application-admin", :media => "all" %>
8
+ <%= javascript_include_tag "application-admin" %>
9
+ <%= csrf_meta_tags %>
10
+ <%= favicon_link_tag "adminpanel/favicon.ico" %>
11
+ <link href="http://fonts.googleapis.com/css?family=Open+Sans:400,700" rel="stylesheet" type="text/css">
12
+ <%= render 'layouts/shim' %>
13
+ </head>
14
14
 
15
- <body>
16
- <div id="wrap">
17
- <%= render 'layouts/top_bar' %>
18
- <div class="container-fluid">
19
- <%= yield %>
20
- <%= debug(params) if Rails.env.development? %>
21
- </div>
22
- <!--/.fluid-container-->
23
- </div>
24
- <!-- wrap ends-->
25
- </body>
15
+ <body>
16
+ <div id="wrap">
17
+ <%= render 'layouts/top_bar' %>
18
+ <div class="container-fluid">
19
+ <%= yield %>
20
+ <%= debug(params) if Rails.env.development? %>
21
+ </div>
22
+ <!--/.fluid-container-->
23
+ </div>
24
+ <!-- wrap ends-->
25
+ </body>
26
26
  </html>
@@ -1,40 +1,40 @@
1
1
  <!DOCTYPE html>
2
2
  <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <title><%= full_title(yield(:page_title)) %></title>
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
- <%= stylesheet_link_tag "application-admin", :media => "all" %>
8
- <%= javascript_include_tag "application-admin" %>
9
- <%= csrf_meta_tags %>
10
- <%= favicon_link_tag "adminpanel/favicon.ico" %>
11
- <link href="http://fonts.googleapis.com/css?family=Open+Sans:400,700" rel="stylesheet" type="text/css">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title><%= full_title(yield(:page_title)) %></title>
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <%= stylesheet_link_tag "application-admin", :media => "all" %>
8
+ <%= javascript_include_tag "application-admin" %>
9
+ <%= csrf_meta_tags %>
10
+ <%= favicon_link_tag "adminpanel/favicon.ico" %>
11
+ <link href="http://fonts.googleapis.com/css?family=Open+Sans:400,700" rel="stylesheet" type="text/css">
12
12
 
13
- <%= render 'layouts/shim' %>
14
- </head>
13
+ <%= render 'layouts/shim' %>
14
+ </head>
15
15
 
16
- <body>
17
- <div id="wrap">
18
- <%= render 'layouts/top_bar' %>
19
- <div class="container-fluid">
20
- <%= render 'layouts/side_menu' %>
21
- <!-- Main window -->
22
- <div class="main_container" id="dashboard_page">
23
- <div class = "row-fluid">
24
- <%= render_breadcrumb '/' %>
25
- <h2 class = "heading"><%= yield(:page_title) %></h2>
26
- </div>
27
- <% flash.each do |key, value| %>
28
- <div class = "alert alert-<%= key %>"><%= value %></div>
29
- <% end %>
30
- <%= yield %>
31
- <%= debug(params) if Rails.env.development? %>
32
- </div>
33
- <!-- /Main window -->
34
- </div>
35
- <!--/.fluid-container-->
36
- </div>
37
- <!-- wrap ends-->
38
- </body>
39
- <%= yield :scripts %>
16
+ <body>
17
+ <div id="wrap">
18
+ <%= render 'layouts/top_bar' %>
19
+ <div class="container-fluid">
20
+ <%= render 'layouts/side_menu' %>
21
+ <!-- Main window -->
22
+ <div class="main_container" id="dashboard_page">
23
+ <div class = "row-fluid">
24
+ <%= render_breadcrumb '/' %>
25
+ <h2 class = "heading"><%= yield(:page_title) %></h2>
26
+ </div>
27
+ <% flash.each do |key, value| %>
28
+ <div class = "alert alert-<%= key %>"><%= value %></div>
29
+ <% end %>
30
+ <%= yield %>
31
+ <%= debug(params) if Rails.env.development? %>
32
+ </div>
33
+ <!-- /Main window -->
34
+ </div>
35
+ <!--/.fluid-container-->
36
+ </div>
37
+ <!-- wrap ends-->
38
+ </body>
39
+ <%= yield :scripts %>
40
40
  </html>
@@ -1,6 +1,6 @@
1
1
  <ul class="breadcrumb">
2
- <% nav.each do |nav| %>
3
- <li><%= link_to nav[:title], nav[:url] %><span class="divider"><%= divider %></span></li>
4
- <% end %>
5
- <li class="active"><%= yield(:page_title) %></li>
2
+ <% nav.each do |nav| %>
3
+ <li><%= link_to nav[:title], nav[:url] %><span class="divider"><%= divider %></span></li>
4
+ <% end %>
5
+ <li class="active"><%= yield(:page_title) %></li>
6
6
  </ul>
@@ -1,17 +1,17 @@
1
1
  <% if object.errors.any? %>
2
- <div id="error_explanation">
3
- <div id="alerts" class="alert alert-error">
4
- <%= t( :errors, :count => object.errors.count, :model => @model.display_name) %>:
5
- <ul>
6
- <% object.errors.messages.keys.each do |field| %>
7
- <% object.errors.messages[field].each do |value| %>
8
- <li>
9
- <%= @model.get_attribute_label(field.to_s) %>
10
- <%= value %>
11
- </li>
12
- <% end %>
13
- <% end %>
14
- </ul>
15
- </div>
16
- </div>
2
+ <div id="error_explanation">
3
+ <div id="alerts" class="alert alert-error">
4
+ <%= t( :errors, :count => object.errors.count, :model => @model.display_name) %>:
5
+ <ul>
6
+ <% object.errors.messages.keys.each do |field| %>
7
+ <% object.errors.messages[field].each do |value| %>
8
+ <li>
9
+ <%= @model.get_attribute_label(field.to_s) %>
10
+ <%= value %>
11
+ </li>
12
+ <% end %>
13
+ <% end %>
14
+ </ul>
15
+ </div>
16
+ </div>
17
17
  <% end %>
@@ -1,60 +1,61 @@
1
1
  <% @model.form_attributes.each do |entries| %>
2
2
  <% entries.each do |attribute, properties| %>
3
3
 
4
- <% field_type = properties['type'] %>
5
- <% properties = properties.except('type') %>
4
+ <% field_type = properties['type'] %>
5
+ <% properties = properties.except('type') %>
6
6
 
7
- <% if field_type == 'adminpanel_file_field' %>
7
+ <% if field_type == 'adminpanel_file_field' %>
8
8
 
9
- <% if !defined? remote_request %>
10
- <!-- if not making resource from other form -->
11
- <%= content_tag :div, :class => 'file-collection-container', :data => {:max => properties['max-files'].nil? ? 0 : properties['max-files'] } do %>
12
- <%= f.fields_for(attribute) do |builder| %>
13
- <%= render 'shared/image_fields', :f => builder %>
14
- <% end -%>
15
- <%= link_to_add_fields t('Add Image'), f, attribute %>
16
- <% end %>
9
+ <% if !defined? remote_request %>
10
+ <!-- if not making resource from other form -->
11
+ <%= content_tag :div, :class => 'file-collection-container', :data => {:max => properties['max-files'].nil? ? 0 : properties['max-files'] } do %>
12
+ <%= f.fields_for(attribute) do |builder| %>
13
+ <%= render 'shared/image_fields', :f => builder %>
14
+ <% end -%>
15
+ <%= link_to_add_fields t('Add Image'), f, attribute %>
16
+ <% end %>
17
17
 
18
- <% end %>
18
+ <% end %>
19
19
  <% elsif field_type == 'belongs_to' %>
20
- <% if !defined? remote_request %>
21
- <!-- if not making resource from other form
22
- so we don't have to manage infinite nested forms
23
- -->
24
- <% args = properties.except('model') %>
25
- <%= f.select(attribute, (@collections["#{properties["model"]}"].collect{|resource| [resource.name, resource.id]}), args) %>
26
-
27
- <% if(properties['remote_resource'].nil? || properties['remote_resource']) %>
28
- <%= render 'shared/create_remote_resource_button', belongs_request: true, remote_resource_name: properties['model'] %>
29
- <% end %>
30
-
31
- <% end %>
20
+ <% if !defined? remote_request %>
21
+ <!-- if not making resource from other form so we don't have to manage
22
+ infinite nested forms and relations -->
23
+ <% args = properties.except('model') %>
24
+ <%= f.select(attribute, (@collections["#{properties["model"]}"].collect{|resource| [resource.name, resource.id]}), args) %>
25
+
26
+ <% if(properties['remote_resource'].nil? || properties['remote_resource']) %>
27
+ <%= render 'shared/create_remote_resource_button', belongs_request: true, remote_resource_name: properties['model'] %>
28
+ <% end %>
29
+
30
+ <% end %>
32
31
  <% elsif field_type == 'has_many' %>
33
- <% if !defined? remote_request %>
34
- <div class="control-group">
35
- <div class="control-label">
36
- <%= properties['label'] %>
37
- </div>
38
- <%= hidden_field_tag("#{class_name_downcase(f.object)}[#{relationship_ids(properties["model"])}][]", nil) %>
39
- <div class="controls" id="<%= properties['model'].demodulize.downcase %>-relation">
40
- <% @collections["#{properties['model']}"].each do |resource| %>
41
- <%= f.checkbox(resource, class_name_downcase(f.object), relationship_ids(properties['model'])) %>
42
- <% end %>
43
- </div>
44
- </div>
45
-
46
- <% if(properties['remote_resource'].nil? || properties['remote_resource']) %>
47
- <%= render 'shared/create_remote_resource_button', remote_resource_name: properties['model'] %>
48
- <% end %>
49
- <% end %>
32
+ <% if !defined? remote_request %>
33
+ <!-- if not making resource from other form so we don't have to manage
34
+ infinite nested forms and relations -->
35
+ <div class="control-group">
36
+ <div class="control-label">
37
+ <%= properties['label'] %>
38
+ </div>
39
+ <%= hidden_field_tag("#{class_name_downcase(f.object)}[#{relationship_ids(properties["model"])}][]", nil) %>
40
+ <div class="controls" id="<%= properties['model'].demodulize.downcase %>-relation">
41
+ <% @collections["#{properties['model']}"].each do |resource| %>
42
+ <%= f.checkbox(resource, class_name_downcase(f.object), relationship_ids(properties['model'])) %>
43
+ <% end %>
44
+ </div>
45
+ </div>
46
+
47
+ <% if(properties['remote_resource'].nil? || properties['remote_resource']) %>
48
+ <%= render 'shared/create_remote_resource_button', remote_resource_name: properties['model'] %>
49
+ <% end %>
50
+ <% end %>
50
51
 
51
52
  <% elsif field_type == 'file_field' %>
52
- <% if !defined? remote_request %>
53
- <% args = properties.except('name') %>
54
- <%= f.send(field_type, attribute, args) %>
55
- <% end %>
56
- <% else %>
57
- <% args = properties.except('name') %>
53
+ <% if !defined? remote_request %>
54
+ <% args = properties.except('name') %>
55
+ <%= f.send(field_type, attribute, args) %>
56
+ <% end %>
57
+ <% else %>
58
+ <% args = properties.except('name') %>
58
59
  <%= f.send(field_type, attribute, args) %>
59
60
  <% end %>
60
61