dhatu 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/dhatu/blog_posts_controller.rb +1 -1
  3. data/app/controllers/dhatu/bookings_controller.rb +1 -1
  4. data/app/controllers/dhatu/branches_controller.rb +1 -1
  5. data/app/controllers/dhatu/categories_controller.rb +7 -6
  6. data/app/controllers/dhatu/events_controller.rb +1 -1
  7. data/app/controllers/dhatu/offers_controller.rb +1 -1
  8. data/app/controllers/dhatu/pages_controller.rb +1 -1
  9. data/app/controllers/dhatu/photo_albums_controller.rb +172 -0
  10. data/app/controllers/dhatu/prices_controller.rb +1 -1
  11. data/app/controllers/dhatu/projects_controller.rb +1 -1
  12. data/app/controllers/dhatu/promotion_enquiries_controller.rb +1 -1
  13. data/app/controllers/dhatu/promotions_controller.rb +1 -1
  14. data/app/controllers/dhatu/sections_controller.rb +2 -2
  15. data/app/controllers/dhatu/services_controller.rb +1 -1
  16. data/app/controllers/dhatu/team_members_controller.rb +1 -1
  17. data/app/controllers/dhatu/testimonials_controller.rb +1 -1
  18. data/app/models/dhatu/photo_album.rb +172 -0
  19. data/app/views/dhatu/categories/_header.html.erb +86 -0
  20. data/app/views/dhatu/categories/_index.html.erb +0 -91
  21. data/app/views/dhatu/categories/_row.html.erb +13 -8
  22. data/app/views/dhatu/categories/index.html.erb +6 -1
  23. data/app/views/dhatu/dashboard/_index.html.erb +6 -0
  24. data/app/views/dhatu/pages/_index.html.erb +4 -27
  25. data/app/views/dhatu/pages/_row.html.erb +3 -21
  26. data/app/views/dhatu/pages/index.html.erb +7 -6
  27. data/app/views/dhatu/photo_albums/_form.html.erb +38 -0
  28. data/app/views/dhatu/photo_albums/_header.html.erb +70 -0
  29. data/app/views/dhatu/photo_albums/_index.html.erb +44 -0
  30. data/app/views/dhatu/photo_albums/_row.html.erb +28 -0
  31. data/app/views/dhatu/photo_albums/_show.html.erb +145 -0
  32. data/app/views/dhatu/photo_albums/index.html.erb +34 -0
  33. data/app/views/dhatu/sections/_index.html.erb +29 -53
  34. data/app/views/dhatu/sections/_row.html.erb +9 -25
  35. data/app/views/dhatu/sections_old/_form.html.erb +171 -0
  36. data/app/views/dhatu/sections_old/_index.html.erb +53 -0
  37. data/app/views/dhatu/sections_old/_row.html.erb +26 -0
  38. data/app/views/dhatu/sections_old/_show.html.erb +208 -0
  39. data/app/views/dhatu/sections_old/index.html.erb +52 -0
  40. data/app/views/layouts/kuppayam/_sidebar.html.erb +6 -0
  41. data/config/routes.rb +9 -0
  42. data/db/migrate/20180101093437_create_photo_albums.rb +24 -0
  43. data/lib/dhatu/version.rb +1 -1
  44. data/spec/dummy/spec/factories/photo_album.rb +28 -0
  45. metadata +18 -4
  46. data/app/views/dhatu/categories/_index_list.html.erb +0 -118
  47. data/app/views/dhatu/categories/_row_list.html.erb +0 -34
@@ -0,0 +1,44 @@
1
+ <% @photo_albums.each_with_index do |photo_album, i| %>
2
+ <div id="div_photo_album_<%= photo_album.id %>" class="col-lg-2 col-md-3 col-sm-6 col-xs-6">
3
+
4
+ <div style="text-align: center;border: 1px solid #f1f1f1;padding:10px;margin-bottom:15px;">
5
+ <div style="height:200px;">
6
+ <% if photo_album.cover_image %>
7
+ <%= display_image(photo_album, "cover_image.image.small.url", class: "img-inline", alt: photo_album.display_name, width: "100", height: "100", class: "p-20") %>
8
+ <% else %>
9
+ <i class="fa-image" style="font-size:60px;padding:20px;"></i>
10
+ <% end %><br>
11
+ <% photo_album_name = truncate(photo_album.display_name, length: 20) %>
12
+ <% if photo_album.end_node? %>
13
+ <%= content_tag :span, photo_album_name, style: ";font-size:14px;" %><br>
14
+ <%#= content_tag :span, photo_album.id, style: "color: #ffba00;" %><!-- <br> -->
15
+ <%= display_publishable_status(photo_album) %>
16
+ <% else %>
17
+ <%= link_to raw("<i class=\"fa fa-caret-right\"></i> #{photo_album_name}"), photo_albums_path(parent_id: photo_album.id), style: "font-weight:bold;font-size:14px;" %><br>
18
+ <%= content_tag :span, photo_album.id, style: "color: #cc3f44;" %><br>
19
+ <%= display_publishable_status(photo_album) %>
20
+ <% end %><br>
21
+ </div>
22
+ <% if display_manage_links? %>
23
+ <div style="width: 90%;border: 1px solid #e0e0e0;margin:5%;">
24
+ <%#= display_publishable_links(photo_album) %>
25
+ <%= link_to raw("<i class=\"fa-eye mr-5\"></i>"), photo_album_path(photo_album), :remote=>true, style: "color:#373e4a" %>
26
+ <% if @current_user.has_create_permission?(Dhatu::PhotoAlbum) %>
27
+ <%= link_to raw("<i class='fa-plus mr-5'></i>"), new_photo_album_path(parent_id: photo_album.try(:id)), class: "", style: "color: #8dc63f" %>
28
+ <% end %>
29
+ <%= display_manage_links(photo_album, @current_user, edit_text: "", delete_text: "") %>
30
+ </div>
31
+ <% end %>
32
+ </div>
33
+
34
+ </div>
35
+ <% end %>
36
+
37
+ <%= clear_tag %>
38
+
39
+ <div class="row">
40
+ <div class="col-sm-12">
41
+ <%= paginate_kuppayam(@photo_albums) %>
42
+ </div>
43
+ </div>
44
+
@@ -0,0 +1,28 @@
1
+ <div id="div_photo_album_<%= photo_album.id %>" class="col-lg-2 col-md-3 col-sm-6 col-xs-6">
2
+
3
+ <div style="text-align: center;border: 1px solid #f1f1f1;padding:10px;margin-bottom:15px;">
4
+ <div style="height:200px;">
5
+ <i class="fa-image" style="font-size:60px;padding:20px;"></i><br>
6
+ <% if photo_album.end_node? %>
7
+ <%= content_tag :span, photo_album.display_name, style: ";font-size:14px;" %><br>
8
+ <%= content_tag :span, photo_album.id, style: "color: #ffba00;" %><br>
9
+ <%= display_publishable_status(photo_album) %>
10
+ <% else %>
11
+ <%= link_to raw("<i class=\"fa fa-caret-right\"></i> #{photo_album.display_name}"), photo_albums_path(parent_id: photo_album.id), remote: true, style: "font-weight:bold;font-size:14px;" %><br>
12
+ <%= content_tag :span, photo_album.id, style: "color: #cc3f44;" %><br>
13
+ <%= display_publishable_status(photo_album) %>
14
+ <% end %><br>
15
+ </div>
16
+ <% if display_manage_links? %>
17
+ <div style="width: 90%;border: 1px solid #e0e0e0;margin:5%;">
18
+ <%#= display_publishable_links(photo_album) %>
19
+ <%= link_to raw("<i class=\"fa-eye mr-5\"></i>"), photo_album_path(photo_album), :remote=>true, style: "color:#373e4a" %>
20
+ <% if @current_user.has_create_permission?(Dhatu::PhotoAlbum) %>
21
+ <%= link_to raw("<i class='fa-plus mr-5'></i>"), new_photo_album_path(parent_id: photo_album.try(:id)), class: "", remote: true, style: "color: #8dc63f" %>
22
+ <% end %>
23
+ <%= display_manage_links(photo_album, @current_user, edit_text: "", delete_text: "") %>
24
+ </div>
25
+ <% end %>
26
+ </div>
27
+
28
+ </div>
@@ -0,0 +1,145 @@
1
+ <div id="div_photo_album_show">
2
+
3
+ <div class="row">
4
+
5
+ <div class="col-md-8 col-sm-12 col-xs-12" style="border-right:1px solid #f1f1f1;">
6
+
7
+ <%= theme_panel_heading(@photo_album.name) %>
8
+
9
+ <%= clear_tag(10) %>
10
+ <%= display_publishable_status(@photo_album) %>
11
+ <%= clear_tag(10) %>
12
+ <%= theme_panel_description(@photo_album.one_liner) %>
13
+ <%= clear_tag(5) %>
14
+ <%= theme_panel_description(@photo_album.description) %>
15
+ <%= clear_tag(20) %>
16
+
17
+ <div class="table-responsive">
18
+ <table class="table table-striped table-condensed table-bordered mb-60">
19
+ <tbody>
20
+
21
+ <tr>
22
+ <th>Category Type</th><td><%= @photo_album.id %></td>
23
+ </tr>
24
+
25
+ <tr>
26
+ <th>Parent</th><td>
27
+ <% if @photo_album.parent %>
28
+ <%= @photo_album.parent.try(:display_name) %> (<%= @photo_album.parent.try(:id) %>)
29
+ <% end %>
30
+ </td>
31
+ </tr>
32
+
33
+ <tr>
34
+ <th>Top Parent</th><td>
35
+ <% if @photo_album.top_parent %>
36
+ <%= @photo_album.top_parent.try(:display_name) %> (<%= @photo_album.top_parent.try(:id) %>)
37
+ <% end %>
38
+ </td>
39
+ </tr>
40
+
41
+ <tr>
42
+ <th>Priority</th><td><%= @photo_album.priority %></td>
43
+ </tr>
44
+
45
+ </tbody>
46
+ </table>
47
+ </div>
48
+
49
+ <%= clear_tag(20) %>
50
+
51
+ </div>
52
+
53
+ <% if display_manage_links? %>
54
+ <div class="col-md-4 col-sm-12 col-xs-12">
55
+ <%= display_manage_buttons(@photo_album) %>
56
+ <%= display_publishable_buttons(@photo_album) %>
57
+ <%= display_featurable_buttons(@photo_album) %>
58
+ </div>
59
+ <% end %>
60
+
61
+ </div>
62
+
63
+ <%= clear_tag(20) %>
64
+ <div><strong class="fs-18">Photo Album - Cover Image</strong></div>
65
+ <hr>
66
+ <div class="row">
67
+ <div class="col-md-3 col-sm-12 col-xs-12" style="border-right:1px solid #f1f1f1;">
68
+ <% if display_edit_links? %>
69
+ <%= edit_image(@photo_album,
70
+ "cover_image.image.url",
71
+ upload_image_link(@photo_album, :cover_image, nil ),
72
+ remove_image_link(@photo_album, :cover_image, nil ),
73
+ image_options: {assoc_name: :cover_image }) %>
74
+ <% else %>
75
+ <%= display_image(@photo_album, "cover_image.image.url", class: "img-inline", alt: @photo_album.display_name) %>
76
+ <% end %>
77
+ </div>
78
+ </div>
79
+
80
+ <%= clear_tag(100) %>
81
+ <div><strong class="fs-18">Gallery Images</strong></div>
82
+ <hr>
83
+ <div id="div_photo_album_images_buttons">
84
+ <div class="row">
85
+ <div class="col-md-6">
86
+ <%= theme_button('Upload a New Image', 'plus', upload_multiple_image_link(@photo_album, :gallery_images, nil ), classes: "pull-left", btn_type: "white") %>
87
+ </div>
88
+ <div class="col-md-6">
89
+ </div>
90
+ </div>
91
+ </div>
92
+ <%= render :partial=>"kuppayam/images/multiple_images", locals: { images: @photo_album.gallery_images } %>
93
+
94
+
95
+ <% if @current_user.super_admin? %>
96
+ <%= clear_tag(40) %>
97
+ <div><strong class="fs-18">Technical Details</strong></div>
98
+ <hr>
99
+ <div class="table-responsive">
100
+ <table class="table table-striped table-condensed table-bordered mb-60">
101
+ <tbody>
102
+
103
+ <tr>
104
+ <th>ID</th><td><%= @photo_album.id %></td>
105
+ <th>Permalink</th><td><%= @photo_album.permalink %></td>
106
+ </tr>
107
+
108
+ <tr>
109
+ <th>Parent</th><td>
110
+ <% if @photo_album.parent %>
111
+ <%= @photo_album.parent.try(:display_name) %> (<%= @photo_album.parent.try(:id) %>)
112
+ <% end %>
113
+ </td>
114
+ <th>Top Parent</th><td>
115
+ <% if @photo_album.top_parent %>
116
+ <%= @photo_album.top_parent.try(:display_name) %> (<%= @photo_album.top_parent.try(:id) %>)
117
+ <% end %>
118
+ </td>
119
+ </tr>
120
+
121
+ <tr>
122
+ <th>Status</th><td><%= @photo_album.status %></td>
123
+ <th>Featured</th><td><%= @photo_album.featured? ? "Yes" : "No" %></td>
124
+ </tr>
125
+
126
+ <tr>
127
+ <th>Priority</th><td><%= @photo_album.priority %></td>
128
+ <th>End Node</th><td><%= @photo_album.end_node? ? "Yes" : "No" %></td>
129
+ </tr>
130
+
131
+ <tr>
132
+ <th>Created At</th><td><%= @photo_album.created_at.strftime("%m/%d/%Y - %H:%M:%S") if @photo_album.created_at %></td>
133
+ <th>Updated At</th><td><%= @photo_album.updated_at.strftime("%m/%d/%Y - %H:%M:%S") if @photo_album.updated_at %></td>
134
+ </tr>
135
+
136
+ </tbody>
137
+ </table>
138
+ </div>
139
+ <% end %>
140
+
141
+ <%= link_to "Close", "#", onclick: "closeGenericModal();", class: "btn btn-primary pull-right" %>
142
+
143
+ <%= clear_tag %>
144
+
145
+ </div>
@@ -0,0 +1,34 @@
1
+ <div class="row">
2
+
3
+ <div class="col-md-12">
4
+ <div class="tabs-vertical-env">
5
+
6
+ <div class="tab-content">
7
+ <div class="tab-pane active" id="v-home">
8
+
9
+ <div id="div_photo_album_index">
10
+ <div id="div_photo_album_header" class="row">
11
+ <%= render :partial=>"dhatu/photo_albums/header" %>
12
+ </div>
13
+ <div id="div_photo_album_list" class="row mt-30">
14
+ <%= render :partial=>"dhatu/photo_albums/index" %>
15
+ </div>
16
+ </div>
17
+ <%= clear_tag(10) %>
18
+
19
+ </div>
20
+ </div>
21
+
22
+ </div>
23
+ </div>
24
+
25
+ </div>
26
+
27
+ <script type="text/javascript">
28
+ $('body').on('change', '#inp_name', function() {
29
+ var photoAlbumCode = $(this).val().replace(/ /g, '_').toUpperCase().slice(0, 63);
30
+ if($('#inp_code').val() == ""){
31
+ $('#inp_code').val(photoAlbumCode);
32
+ }
33
+ });
34
+ </script>
@@ -1,53 +1,29 @@
1
- <div class="table-responsive">
2
- <table class="table table-hover table-condensed members-table middle-align">
3
- <thead>
4
- <tr>
5
- <th style="text-align: center;width:5%">#</th>
6
- <!-- <th style="text-align: center;width:100px"><i class="fa fa-photo"></i></th> -->
7
- <th style="width:50%;">Title</th>
8
- <th style="width:100px;" class="hidden-sm hidden-xs">Status</th>
9
- <% if display_manage_links? %>
10
- <th style="text-align: center;" colspan="2" class="hidden-sm hidden-xs">Actions</th>
11
- <% end %>
12
- </tr>
13
- </thead>
14
- <tbody>
15
- <tr id="tr_section_0"></tr>
16
- <% @sections.each_with_index do |section, i| %>
17
-
18
- <tr id="tr_section_<%= section.id %>">
19
-
20
- <th scope="row" style="text-align: center;">
21
- <%= serial_number(i) %>
22
- </th>
23
-
24
- <!-- <td class="display-image">
25
- <%#= display_thumbnail(section) %>
26
- </td> -->
27
-
28
- <td>
29
- <strong><%= section.title %></strong><br>
30
- <%= section.sub_title %><br>
31
- </td>
32
-
33
- <td class="hidden-sm hidden-xs"><%= display_publishable_status(section) %></td>
34
-
35
- <% if display_manage_links? %>
36
- <td class="action-links hidden-sm hidden-xs" style="width:10%"><%= display_publishable_links(section) %></td>
37
-
38
- <td class="action-links hidden-sm hidden-xs" style="width:10%">
39
- <%= display_manage_links(section, @current_user) %>
40
- </td>
41
- <% end %>
42
-
43
- </tr>
44
- <% end %>
45
- </tbody>
46
- </table>
47
- </div>
48
-
49
- <div class="row">
50
- <div class="col-sm-12">
51
- <%= paginate_kuppayam(@sections) %>
52
- </div>
53
- </div>
1
+ <% if @current_user.super_admin? %>
2
+ <% sections = page.sections %>
3
+ <% else %>
4
+ <% sections = page.sections.published %>
5
+ <% end %>
6
+
7
+ <% sections.order("priority ASC, created_at DESC").each do |section| %>
8
+ <div id="div_section_<%= section.id %>" class="row ml-30 mb-5">
9
+ <span class="pull-left">
10
+ <%= link_to raw("<i class='fa-reorder mr-10'></i>#{section.name}"), section_path(section), remote: true, style: "font-size: 18px;;color:#4b4b4b;margin-right:20px;" %>
11
+ </span>
12
+ <span class="action-links">
13
+ <%= display_manage_links(section, @current_user) %>
14
+ <%= display_publishable_links(section) if @current_user.super_admin? %>
15
+ </span>
16
+ <%= clear_tag %>
17
+ </div>
18
+ <% end %>
19
+
20
+ <div class="row mt-30">
21
+ <div class="col-md-12">
22
+ <% if page.feature %>
23
+ <%#= theme_button("Manage #{page.feature.display_name}", 'list', dhatu.new_section_path(page_id: page), classes: "btn btn-success btn-xs ml-30 mb-5", btn_type: "success") if @current_user.super_admin? %>
24
+ <p class="ml-30"> Go to <%= page.feature.display_name %> section to edit the contents on this page. </p>
25
+ <% else %>
26
+ <%= theme_button('Add a Section', 'plus', dhatu.new_section_path(page_id: page), classes: "btn btn-success btn-xs ml-30 mb-5", btn_type: "info") if @current_user.super_admin? %>
27
+ <% end %>
28
+ </div>
29
+ </div>
@@ -1,26 +1,10 @@
1
- <tr id="tr_section_<%= section.id %>">
2
-
3
- <th scope="row" style="text-align: center;">
4
- <%= serial_number(i) %>
5
- </th>
6
-
7
- <!-- <td class="display-image">
8
- <%#= display_thumbnail(section) %>
9
- </td> -->
10
-
11
- <td>
12
- <strong><%= section.title %></strong><br>
13
- <%= section.sub_title %><br>
14
- </td>
15
-
16
- <td class="hidden-sm hidden-xs"><%= display_publishable_status(section) %></td>
17
-
18
- <% if display_manage_links? %>
19
- <td class="action-links hidden-sm hidden-xs" style="width:10%"><%= display_publishable_links(section) %></td>
20
-
21
- <td class="action-links hidden-sm hidden-xs" style="width:10%">
1
+ <div id="div_section_<%= section.id %>" class="row ml-30 mb-5">
2
+ <span class="pull-left">
3
+ <%= link_to raw("<i class='fa-reorder mr-10'></i>#{section.name}"), section_path(section), remote: true, style: "font-size: 18px;;color:#4b4b4b;margin-right:20px;" %>
4
+ </span>
5
+ <span class="action-links">
22
6
  <%= display_manage_links(section, @current_user) %>
23
- </td>
24
- <% end %>
25
-
26
- </tr>
7
+ <%= display_publishable_links(section) if @current_user.super_admin? %>
8
+ </span>
9
+ <%= clear_tag %>
10
+ </div>
@@ -0,0 +1,171 @@
1
+ <%
2
+ if @section.new_record?
3
+ @section.page_id = params[:page_id]
4
+ @section.enable_title = true
5
+ @section.enable_sub_title = true
6
+ @section.enable_button_one = true
7
+ @section.enable_button_two = true
8
+ @section.enable_short_description = true
9
+ @section.enable_long_description = true
10
+ end
11
+ %>
12
+
13
+ <%= form_for(@section,
14
+ :url => (@section.new_record? ? dhatu.sections_path : dhatu.section_path),
15
+ :method => (@section.new_record? ? :post : :put),
16
+ :remote => true,
17
+ :html => {:id=>"form_section", :class=>"mb-0 form-horizontal"}) do |f| %>
18
+
19
+ <div id="section_form_error">
20
+ <%= @section.errors[:base].to_sentence %>
21
+ </div>
22
+
23
+ <div class="form-inputs">
24
+
25
+ <!-- Hidden field tag to carry page_id -->
26
+ <%= hidden_field_tag :page_id, params[:page_id] %>
27
+
28
+ <div class="row">
29
+
30
+ <% if @current_user.super_admin? %>
31
+ <!-- Name -->
32
+ <div class="col-md-12">
33
+ <%= theme_form_field(@section, :name, form_style: "top-bottom", html_options: { placeholder: "", id: "inp_section_name"}) %>
34
+ </div>
35
+ <% end %>
36
+
37
+ <!-- Title -->
38
+ <% if @section.enable_title %>
39
+ <div class="col-md-12">
40
+ <%= theme_form_field(@section, :title, form_style: "top-bottom", html_options: { placeholder: ""}) %>
41
+ </div>
42
+ <% end %>
43
+
44
+ <!-- Sub Title -->
45
+ <% if @section.enable_sub_title %>
46
+ <div class="col-md-12">
47
+ <%= theme_form_field(@section, :sub_title, required: false, form_style: "top-bottom", html_options: { placeholder: "" }) %>
48
+ </div>
49
+ <% end %>
50
+
51
+ <!-- Button One -->
52
+ <% if @section.enable_button_one %>
53
+ <div class="col-md-4">
54
+ <div class="row">
55
+ <div class="col-md-6 pr-20">
56
+ <%= theme_form_field(@section, :button_one_text, required: false, form_style: "top-bottom", html_options: { placeholder: "" }) %>
57
+ </div>
58
+ <div class="col-md-6 pl-20">
59
+ <%= theme_form_field(@section, :button_one_link, required: false, form_style: "top-bottom", html_options: { placeholder: "" }) %>
60
+ </div>
61
+ </div>
62
+ </div>
63
+ <% end %>
64
+
65
+ <!-- Button Two -->
66
+ <% if @section.enable_button_one %>
67
+ <div class="col-md-4">
68
+ <div class="row">
69
+ <div class="col-md-6 pr-20">
70
+ <%= theme_form_field(@section, :button_two_text, required: false, form_style: "top-bottom", html_options: { placeholder: "" }) %>
71
+ </div>
72
+ <div class="col-md-6 pl-20">
73
+ <%= theme_form_field(@section, :button_two_link, required: false, form_style: "top-bottom", html_options: { placeholder: "" }) %>
74
+ </div>
75
+ </div>
76
+ </div>
77
+ <% end %>
78
+
79
+ </div>
80
+
81
+ <!-- Short Description -->
82
+ <% if @section.enable_short_description %>
83
+ <div class="row">
84
+ <div class="col-md-12">
85
+ <%#= theme_form_field(@section, :short_description, required: false, form_style: "top-bottom", html_options: { placeholder: "" }) %>
86
+ <%= theme_form_field(@section, :short_description, required: true, html_options: {type: :textarea, class: "form-control"}, form_style: "top-bottom") %>
87
+ </div>
88
+ </div>
89
+ <% end %>
90
+
91
+ <!-- Long Description -->
92
+ <% if @section.enable_long_description %>
93
+ <div class="row">
94
+ <div class="col-md-12">
95
+ <%= theme_form_field(@section, :long_description, required: true, html_options: {type: :textarea, class: "form-control wysihtml5", "data-stylesheet-url": "assets/wysiwyg-color.css"}, form_style: "top-bottom") %>
96
+ </div>
97
+ </div>
98
+ <% end %>
99
+
100
+ <% if @current_user.super_admin? %>
101
+ <div class="row">
102
+
103
+ <!-- Page -->
104
+ <div class="col-md-4">
105
+ <% options = {assoc_collection: Dhatu::Page.select("id, name").order("name ASC").all, editable: true, assoc_display_method: :name, include_blank: true} %>
106
+ <%= theme_form_assoc_group(@section, :page_id, label: "Page", form_style: "top-bottom", **options) %>
107
+ </div>
108
+
109
+ <!-- Code -->
110
+ <% if @current_user.super_admin? %>
111
+ <div class="col-md-4">
112
+ <%= theme_form_field(@section, :code, label: "Code", form_style: "top-bottom") %>
113
+ </div>
114
+ <% end %>
115
+
116
+ <!-- Priority -->
117
+ <div class="col-md-4">
118
+ <%= theme_form_field(@section, :priority, required: false, form_style: "top-bottom") %>
119
+ </div>
120
+
121
+ </div>
122
+ <% end %>
123
+
124
+ </div>
125
+
126
+ <% if @current_user.super_admin? %>
127
+ <%= clear_tag(30) %>
128
+ <div><strong class="fs-18">Configuration</strong></div>
129
+ <hr>
130
+
131
+ <div class="row">
132
+ <div class="col-md-3">
133
+ <%= theme_form_field(@section, :enable_title, required: false, html_options: {type: :checkbox}, form_style: "top-bottom") %>
134
+ </div>
135
+ <div class="col-md-3">
136
+ <%= theme_form_field(@section, :enable_sub_title, required: false, html_options: {type: :checkbox}, form_style: "top-bottom") %>
137
+ </div>
138
+ <div class="col-md-3">
139
+ <%= theme_form_field(@section, :enable_short_description, required: false, html_options: {type: :checkbox}, form_style: "top-bottom") %>
140
+ </div>
141
+ <div class="col-md-3">
142
+ <%= theme_form_field(@section, :enable_long_description, required: false, html_options: {type: :checkbox}, form_style: "top-bottom") %>
143
+ </div>
144
+ <div class="col-md-3">
145
+ <%= theme_form_field(@section, :enable_button_one, required: false, html_options: {type: :checkbox}, form_style: "top-bottom") %>
146
+ </div>
147
+ <div class="col-md-3">
148
+ <%= theme_form_field(@section, :enable_button_two, required: false, html_options: {type: :checkbox}, form_style: "top-bottom") %>
149
+ </div>
150
+ <div class="col-md-3">
151
+ <%= theme_form_field(@section, :enable_cover_image, required: false, html_options: {type: :checkbox}, form_style: "top-bottom") %>
152
+ </div>
153
+ <div class="col-md-3">
154
+ <%= theme_form_field(@section, :enable_gallery_images, required: false, html_options: {type: :checkbox}, form_style: "top-bottom") %>
155
+ </div>
156
+ </div>
157
+ <% end %>
158
+
159
+ <%= clear_tag(50) %>
160
+ <div class="row">
161
+ <div class="col-md-12 pr-20">
162
+ <%= submit_tag("Save", :class=>"btn btn-primary pull-right ml-10") %>
163
+
164
+ <%= link_to raw("<i class='fa fa-close mr-5'></i><span>Cancel</span>"), "#", onclick: "closeLargeModal();", class: "pull-right btn btn-white" %>
165
+ </div>
166
+ </div>
167
+
168
+ <%= clear_tag %>
169
+
170
+ <% end %>
171
+