dhatu 0.1.19 → 0.1.20

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/dhatu/blog_posts_controller.rb +81 -14
  3. data/app/controllers/dhatu/bookings_controller.rb +51 -5
  4. data/app/controllers/dhatu/branches_controller.rb +42 -8
  5. data/app/controllers/dhatu/categories_controller.rb +86 -47
  6. data/app/controllers/dhatu/events_controller.rb +79 -9
  7. data/app/controllers/dhatu/meta_tags_controller.rb +96 -0
  8. data/app/controllers/dhatu/offers_controller.rb +83 -10
  9. data/app/controllers/dhatu/pages_controller.rb +130 -0
  10. data/app/controllers/dhatu/prices_controller.rb +78 -12
  11. data/app/controllers/dhatu/projects_controller.rb +78 -22
  12. data/app/controllers/dhatu/promotion_enquiries_controller.rb +69 -7
  13. data/app/controllers/dhatu/promotions_controller.rb +46 -2
  14. data/app/controllers/dhatu/resource_controller.rb +4 -0
  15. data/app/controllers/dhatu/sections_controller.rb +41 -8
  16. data/app/controllers/dhatu/services_controller.rb +78 -18
  17. data/app/controllers/dhatu/team_members_controller.rb +41 -8
  18. data/app/controllers/dhatu/testimonials_controller.rb +41 -9
  19. data/app/models/dhatu/blog_post.rb +6 -2
  20. data/app/models/dhatu/category.rb +3 -3
  21. data/app/models/dhatu/event.rb +4 -0
  22. data/app/models/dhatu/meta_tag.rb +48 -0
  23. data/app/models/dhatu/offer.rb +4 -0
  24. data/app/models/dhatu/page.rb +50 -0
  25. data/app/models/dhatu/project.rb +7 -3
  26. data/app/models/dhatu/promotion.rb +1 -0
  27. data/app/models/dhatu/section.rb +8 -12
  28. data/app/models/dhatu/service.rb +7 -3
  29. data/app/models/image/og_image.rb +3 -0
  30. data/app/uploaders/og_image_uploader.rb +15 -0
  31. data/app/views/dhatu/blog_posts/_form.html.erb +1 -1
  32. data/app/views/dhatu/blog_posts/_index.html.erb +1 -1
  33. data/app/views/dhatu/blog_posts/_row.html.erb +1 -1
  34. data/app/views/dhatu/blog_posts/_show.html.erb +1 -1
  35. data/app/views/dhatu/bookings/_index.html.erb +7 -8
  36. data/app/views/dhatu/bookings/_row.html.erb +11 -7
  37. data/app/views/dhatu/bookings/index.html.erb +20 -12
  38. data/app/views/dhatu/branches/_index.html.erb +8 -12
  39. data/app/views/dhatu/branches/_show.html.erb +75 -69
  40. data/app/views/dhatu/branches/index.html.erb +13 -8
  41. data/app/views/dhatu/categories/_category_types.html.erb +27 -0
  42. data/app/views/dhatu/categories/_form.html.erb +2 -2
  43. data/app/views/dhatu/categories/_index.html.erb +114 -89
  44. data/app/views/dhatu/categories/_index_list.html.erb +118 -0
  45. data/app/views/dhatu/categories/_row.html.erb +27 -31
  46. data/app/views/dhatu/categories/_row_list.html.erb +34 -0
  47. data/app/views/dhatu/categories/_show.html.erb +101 -74
  48. data/app/views/dhatu/categories/choose_category_type.html.erb +20 -0
  49. data/app/views/dhatu/categories/index.html.erb +1 -19
  50. data/app/views/dhatu/dashboard/_index.html.erb +53 -42
  51. data/app/views/dhatu/events/_index.html.erb +1 -1
  52. data/app/views/dhatu/events/_row.html.erb +1 -1
  53. data/app/views/dhatu/events/_show.html.erb +99 -75
  54. data/app/views/dhatu/events/index.html.erb +14 -9
  55. data/app/views/dhatu/meta_tags/_form.html.erb +48 -0
  56. data/app/views/dhatu/meta_tags/_index.html.erb +59 -0
  57. data/app/views/dhatu/meta_tags/_row.html.erb +32 -0
  58. data/app/views/dhatu/meta_tags/create.js.erb +29 -0
  59. data/app/views/dhatu/offers/_index.html.erb +8 -8
  60. data/app/views/dhatu/offers/_row.html.erb +1 -1
  61. data/app/views/dhatu/offers/_show.html.erb +85 -81
  62. data/app/views/dhatu/offers/index.html.erb +14 -8
  63. data/app/views/dhatu/pages/_form.html.erb +44 -0
  64. data/app/views/dhatu/pages/_index.html.erb +57 -0
  65. data/app/views/dhatu/pages/_row.html.erb +47 -0
  66. data/app/views/dhatu/pages/_show.html.erb +99 -0
  67. data/app/views/dhatu/pages/index.html.erb +59 -0
  68. data/app/views/dhatu/pages/show.html.erb +12 -0
  69. data/app/views/dhatu/prices/_index.html.erb +6 -6
  70. data/app/views/dhatu/prices/_row.html.erb +3 -2
  71. data/app/views/dhatu/prices/_show.html.erb +34 -45
  72. data/app/views/dhatu/prices/index.html.erb +14 -25
  73. data/app/views/dhatu/projects/_form.html.erb +15 -16
  74. data/app/views/dhatu/projects/_index.html.erb +6 -7
  75. data/app/views/dhatu/projects/_row.html.erb +4 -4
  76. data/app/views/dhatu/projects/_show.html.erb +108 -97
  77. data/app/views/dhatu/projects/index.html.erb +13 -19
  78. data/app/views/dhatu/projects/show.html.erb +12 -0
  79. data/app/views/dhatu/promotion_attributes/_index.html.erb +1 -7
  80. data/app/views/dhatu/promotion_attributes/_row.html.erb +1 -4
  81. data/app/views/dhatu/promotion_enquiries/_index.html.erb +11 -11
  82. data/app/views/dhatu/promotion_enquiries/_row.html.erb +7 -5
  83. data/app/views/dhatu/promotion_enquiries/_show.html.erb +35 -43
  84. data/app/views/dhatu/promotion_enquiries/index.html.erb +20 -12
  85. data/app/views/dhatu/promotions/_index.html.erb +13 -15
  86. data/app/views/dhatu/promotions/_row.html.erb +10 -9
  87. data/app/views/dhatu/promotions/_show.html.erb +190 -93
  88. data/app/views/dhatu/promotions/index.html.erb +0 -8
  89. data/app/views/dhatu/{section_types → section_types1}/_form.html.erb +0 -0
  90. data/app/views/dhatu/{section_types → section_types1}/_index.html.erb +0 -0
  91. data/app/views/dhatu/{section_types → section_types1}/_row.html.erb +0 -0
  92. data/app/views/dhatu/{section_types → section_types1}/_show.html.erb +0 -0
  93. data/app/views/dhatu/{section_types → section_types1}/index.html.erb +0 -0
  94. data/app/views/dhatu/sections/_form.html.erb +116 -11
  95. data/app/views/dhatu/sections/_index.html.erb +6 -3
  96. data/app/views/dhatu/sections/_row.html.erb +5 -2
  97. data/app/views/dhatu/sections/_show.html.erb +168 -132
  98. data/app/views/dhatu/sections/index.html.erb +10 -2
  99. data/app/views/dhatu/services/_form.html.erb +16 -17
  100. data/app/views/dhatu/services/_index.html.erb +6 -7
  101. data/app/views/dhatu/services/_row.html.erb +4 -4
  102. data/app/views/dhatu/services/_show.html.erb +107 -96
  103. data/app/views/dhatu/services/index.html.erb +13 -19
  104. data/app/views/dhatu/team_members/_index.html.erb +5 -6
  105. data/app/views/dhatu/team_members/_row.html.erb +3 -3
  106. data/app/views/dhatu/team_members/_show.html.erb +70 -58
  107. data/app/views/dhatu/team_members/index.html.erb +13 -8
  108. data/app/views/dhatu/testimonials/_index.html.erb +3 -6
  109. data/app/views/dhatu/testimonials/_row.html.erb +2 -3
  110. data/app/views/dhatu/testimonials/_show.html.erb +63 -93
  111. data/app/views/dhatu/testimonials/index.html.erb +13 -8
  112. data/app/views/layouts/kuppayam/_sidebar.html.erb +63 -48
  113. data/app/views/usman/dashboard/_super_admin_index.html.erb +22 -0
  114. data/config/routes.rb +12 -1
  115. data/db/data/dummy/services.csv +1 -1
  116. data/db/migrate/20180101093435_create_pages.rb +14 -0
  117. data/db/migrate/20180101093436_create_meta_tags.rb +19 -0
  118. data/db/migrate/20180101093437_add_page_id_to_sections.rb +5 -0
  119. data/db/migrate/20180101093438_add_priority_to_pages_and_sections.rb +6 -0
  120. data/db/migrate/20180101093439_add_a_ton_of_boolean_fields_to_sections.rb +34 -0
  121. data/db/migrate/20180101093440_add_code_to_sections.rb +19 -0
  122. data/db/migrate/20180101093441_rename_meta_description_all_over.rb +7 -0
  123. data/db/migrate/20180101093442_add_name_to_sections.rb +19 -0
  124. data/lib/dhatu/version.rb +1 -1
  125. metadata +43 -14
  126. data/db/migrate/20171203114529_add_meta_description_to_services.rb +0 -7
@@ -3,14 +3,6 @@
3
3
  <div class="col-md-12">
4
4
 
5
5
  <ul class="nav nav-tabs nav-tabs-justified">
6
- <% Dhatu::Promotion::STATUS.each do |key, value| %>
7
- <li class="<%= @status == value ? 'active' : '' %>">
8
- <%= link_to promotions_path(st: value), "aria-expanded" => "#{ @status == value ? 'true' : 'false' }", title: key.titleize do %>
9
- <span class="visible-xs"><i class="fa-gift"> <%= key[0].upcase %></i></span>
10
- <span class="hidden-xs"><%= key %></span>
11
- <% end %>
12
- </li>
13
- <% end %>
14
6
  </ul>
15
7
 
16
8
  <div class="tab-content">
@@ -1,3 +1,15 @@
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
+
1
13
  <%= form_for(@section,
2
14
  :url => (@section.new_record? ? dhatu.sections_path : dhatu.section_path),
3
15
  :method => (@section.new_record? ? :post : :put),
@@ -10,19 +22,35 @@
10
22
 
11
23
  <div class="form-inputs">
12
24
 
25
+ <!-- Hidden field tag to carry page_id -->
26
+ <%= hidden_field_tag :page_id, params[:page_id] %>
27
+
13
28
  <div class="row">
14
- <div class="col-md-8 pr-20">
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">
15
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">
16
47
  <%= theme_form_field(@section, :sub_title, required: false, form_style: "top-bottom", html_options: { placeholder: "" }) %>
17
- <%= theme_form_field(@section, :short_description, required: false, form_style: "top-bottom", html_options: { placeholder: "" }) %>
18
48
  </div>
19
- <div class="col-md-4 pl-20">
20
- <div class="row">
21
- <div class="col-md-12">
22
- <% options = {assoc_collection: Dhatu::SectionType.select("id, name").order("name ASC").all, editable: true, assoc_display_method: :name} %>
23
- <%= theme_form_assoc_group(@section, :section_type_id, label: "Type", form_style: "top-bottom", **options) %>
24
- </div>
25
- </div>
49
+ <% end %>
50
+
51
+ <!-- Button One -->
52
+ <% if @section.enable_button_one %>
53
+ <div class="col-md-4">
26
54
  <div class="row">
27
55
  <div class="col-md-6 pr-20">
28
56
  <%= theme_form_field(@section, :button_one_text, required: false, form_style: "top-bottom", html_options: { placeholder: "" }) %>
@@ -31,7 +59,12 @@
31
59
  <%= theme_form_field(@section, :button_one_link, required: false, form_style: "top-bottom", html_options: { placeholder: "" }) %>
32
60
  </div>
33
61
  </div>
62
+ </div>
63
+ <% end %>
34
64
 
65
+ <!-- Button Two -->
66
+ <% if @section.enable_button_one %>
67
+ <div class="col-md-4">
35
68
  <div class="row">
36
69
  <div class="col-md-6 pr-20">
37
70
  <%= theme_form_field(@section, :button_two_text, required: false, form_style: "top-bottom", html_options: { placeholder: "" }) %>
@@ -40,18 +73,90 @@
40
73
  <%= theme_form_field(@section, :button_two_link, required: false, form_style: "top-bottom", html_options: { placeholder: "" }) %>
41
74
  </div>
42
75
  </div>
76
+ </div>
77
+ <% end %>
78
+
79
+ </div>
43
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") %>
44
87
  </div>
45
88
  </div>
46
-
89
+ <% end %>
90
+
91
+ <!-- Long Description -->
92
+ <% if @section.enable_long_description %>
47
93
  <div class="row">
48
- <div class="col-md-12 pr-20">
94
+ <div class="col-md-12">
49
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") %>
50
96
  </div>
51
97
  </div>
98
+ <% end %>
52
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>
53
156
  </div>
157
+ <% end %>
54
158
 
159
+ <%= clear_tag(50) %>
55
160
  <div class="row">
56
161
  <div class="col-md-12 pr-20">
57
162
  <%= submit_tag("Save", :class=>"btn btn-primary pull-right ml-10") %>
@@ -4,7 +4,7 @@
4
4
  <tr>
5
5
  <th style="text-align: center;width:5%">#</th>
6
6
  <!-- <th style="text-align: center;width:100px"><i class="fa fa-photo"></i></th> -->
7
- <th>Section Type</th>
7
+ <th style="width:50%;">Title</th>
8
8
  <th style="width:100px;" class="hidden-sm hidden-xs">Status</th>
9
9
  <% if display_manage_links? %>
10
10
  <th style="text-align: center;" colspan="2" class="hidden-sm hidden-xs">Actions</th>
@@ -22,10 +22,13 @@
22
22
  </th>
23
23
 
24
24
  <!-- <td class="display-image">
25
- <%#= display_thumbnail_small(section) %>
25
+ <%#= display_thumbnail(section) %>
26
26
  </td> -->
27
27
 
28
- <td class="display-link"><%= link_to section.section_type.try(:name), section_path(section), remote: true %></td>
28
+ <td>
29
+ <strong><%= section.title %></strong><br>
30
+ <%= section.sub_title %><br>
31
+ </td>
29
32
 
30
33
  <td class="hidden-sm hidden-xs"><%= display_publishable_status(section) %></td>
31
34
 
@@ -5,10 +5,13 @@
5
5
  </th>
6
6
 
7
7
  <!-- <td class="display-image">
8
- <%#= display_thumbnail_small(section) %>
8
+ <%#= display_thumbnail(section) %>
9
9
  </td> -->
10
10
 
11
- <td class="display-link"><%= link_to section.section_type.try(:name), section_path(section), remote: true %></td>
11
+ <td>
12
+ <strong><%= section.title %></strong><br>
13
+ <%= section.sub_title %><br>
14
+ </td>
12
15
 
13
16
  <td class="hidden-sm hidden-xs"><%= display_publishable_status(section) %></td>
14
17
 
@@ -2,164 +2,200 @@
2
2
 
3
3
  <div class="row">
4
4
 
5
- <div class="col-md-3 col-sm-12 col-xs-12" style="border-right:1px solid #f1f1f1;">
6
- <% if display_edit_links? %>
7
- <%= edit_image(@section,
8
- "cover_image.image.large.url",
9
- upload_image_link(@section, :cover_image, nil ),
10
- remove_image_link(@section, :cover_image, nil ),
11
- image_options: {assoc_name: :cover_image }) %>
12
- <% else %>
13
- <%= display_image(@section, "cover_image.image.large.url", class: "img-inline", alt: @section.display_name) %>
14
- <% end %>
15
- </div>
16
-
17
- <div class="col-md-6 col-sm-12 col-xs-12" style="border-right:1px solid #f1f1f1;">
18
-
19
- <%= theme_panel_heading(@section.section_type.try(:name)) %>
20
-
5
+ <div class="col-md-9 col-sm-12 col-xs-12">
6
+ <%= theme_panel_heading(@section.name) %>
7
+ <%= theme_panel_sub_heading(@section.page.try(:name), "#") %>
21
8
  <%= clear_tag(10) %>
22
-
23
9
  <%= display_publishable_status(@section) %>
24
-
25
- <%#= display_featured(@section) %>
26
-
27
- <%= clear_tag(20) %>
28
-
29
- <table class="table table-condensed table-bordered mb-20">
30
- <tbody>
31
-
32
- <tr>
33
- <th style="width:25%" colspan="2">Title</th>
34
- <td style="width:25%" colspan="2"><%=@section.title %></td>
35
- </tr>
36
-
37
- <tr>
38
- <th style="width:25%" colspan="2">Sub Title</th>
39
- <td style="width:25%" colspan="2"><%=@section.sub_title %></td>
40
- </tr>
41
-
42
- <tr>
43
- <th style="width:25%">Button Text One</th>
44
- <td style="width:25%"><%=@section.button_one_text %></td>
45
- <th style="width:25%">Button Link One</th>
46
- <td style="width:25%"><%=@section.button_one_link %></td>
47
- </tr>
48
-
49
- <tr>
50
- <th style="width:25%">Button Text Two</th>
51
- <td style="width:25%"><%=@section.button_two_text %></td>
52
- <th style="width:25%">Button Link Two</th>
53
- <td style="width:25%"><%=@section.button_two_link %></td>
54
- </tr>
55
-
56
- </tbody>
57
- </table>
58
10
  </div>
59
11
 
60
12
  <% if display_manage_links? %>
61
13
  <div class="col-md-3 col-sm-12 col-xs-12">
62
14
  <%= display_manage_buttons(@section) %>
63
- <%= display_publishable_buttons(@section) %>
15
+ <%= display_publishable_buttons(@section) if @current_user.super_admin? %>
64
16
  </div>
65
17
  <% end %>
66
18
 
67
19
  </div>
68
20
 
21
+ <%= clear_tag(20) %>
22
+ <div><strong class="fs-18">Section Texts</strong></div>
69
23
  <hr>
70
-
71
- <div class="visible-sm visible-xs mb-50"></div>
72
-
24
+
73
25
  <%= clear_tag(20) %>
26
+
27
+ <div class="row tabular-item">
28
+ <% if @section.enable_title %>
29
+ <div class="col-sm-12 mb-40">
30
+ <div class="item-title">Title</div>
31
+ <div class="item-detail"><%= @section.title %></div>
32
+ </div>
33
+ <% end %>
74
34
 
75
- <ul class="nav nav-pills">
76
- <li class="active">
77
- <a href="#section_details" data-toggle="tab" aria-expanded="false">
78
- <span class="visible-xs"><i class="fa-database"></i></span>
79
- <span class="hidden-xs">Offer Details</span>
80
- </a>
81
- </li>
82
-
83
- <li class="">
84
- <a href="#section_images" data-toggle="tab" aria-expanded="false">
85
- <span class="visible-xs"><i class="fa-database"></i></span>
86
- <span class="hidden-xs">Images</span>
87
- </a>
88
- </li>
89
-
90
- <li class="">
91
- <a href="#technical_details" data-toggle="tab" aria-expanded="false">
92
- <span class="visible-xs"><i class="fa-database"></i></span>
93
- <span class="hidden-xs">Technical Details</span>
94
- </a>
95
- </li>
96
- </ul>
97
-
98
- <div class="tab-content">
99
- <div class="tab-pane active" id="section_details" style="border: 1px solid #000;min-height:200px;padding:20px;margin-bottom:20px;max-height: 400px;overflow-y: auto;">
100
-
101
- <%= clear_tag(20) %>
102
- <strong>Short Description</strong>
103
- <%= raw(@section.short_description) %>
35
+ <% if @section.enable_sub_title %>
36
+ <div class="col-sm-12 mb-40">
37
+ <div class="item-title">Sub Title</div>
38
+ <div class="item-detail"><%= @section.sub_title.blank? ? "-" : @section.sub_title %></div>
39
+ </div>
40
+ <% end %>
41
+ </div>
104
42
 
105
- <%= clear_tag(20) %>
43
+ <div class="row tabular-item">
44
+ <% if @section.enable_button_one %>
45
+ <div class="col-sm-3 mb-40">
46
+ <div class="item-title">Button Text One</div>
47
+ <div class="item-detail"><%= @section.button_one_text.blank? ? "-" : @section.button_one_text %></div>
48
+ </div>
49
+ <div class="col-sm-3 mb-40">
50
+ <div class="item-title">Button Link One</div>
51
+ <div class="item-detail"><%= @section.button_one_link.blank? ? "-" : @section.button_one_link %></div>
52
+ </div>
53
+ <% end %>
106
54
 
107
- <strong>Long Description</strong>
108
- <%= raw(@section.long_description) %>
109
- <%= clear_tag(20) %>
110
-
55
+ <% if @section.enable_button_two %>
56
+ <div class="col-sm-3 mb-40">
57
+ <div class="item-title">Button Text Two</div>
58
+ <div class="item-detail"><%= @section.button_two_text.blank? ? "-" : @section.button_two_text %></div>
59
+ </div>
60
+ <div class="col-sm-3 mb-40">
61
+ <div class="item-title">Button Link Two</div>
62
+ <div class="item-detail"><%= @section.button_two_link.blank? ? "-" : @section.button_two_link %></div>
111
63
  </div>
64
+ <% end %>
65
+ </div>
112
66
 
113
- <div class="tab-pane" id="section_images" style="border: 1px solid #000;min-height:200px;padding:20px;margin-bottom:20px;max-height: 400px;overflow-y: auto;">
114
-
115
- <%= clear_tag(20) %>
116
-
117
- <div id="div_section_images_buttons">
118
- <div class="row">
119
- <div class="col-md-6">
120
- <%= theme_button('Upload a New Image', 'refresh', upload_multiple_image_link(@section, :gallery_images, nil ), classes: "pull-left", btn_type: "white") %>
121
- </div>
122
- <div class="col-md-6">
123
- </div>
124
- </div>
67
+ <div class="row tabular-item">
68
+ <% if @section.enable_short_description %>
69
+ <div class="col-sm-12 mb-40">
70
+ <div class="item-title">Short Description</div>
71
+ <div class="item-detail pt-20 pb-20">
72
+ <% if @section.short_description.blank? %>
73
+ &ltNot Specified&gt
74
+ <% else %>
75
+ <%= raw(@section.short_description) %>
76
+ <% end %>
125
77
  </div>
126
- <%= clear_tag(10) %>
78
+ </div>
79
+ <% end %>
80
+
81
+ <% if @section.enable_long_description %>
82
+ <div class="col-sm-12 mb-40">
83
+ <div class="item-title">Long Description</div>
84
+ <div class="item-detail pt-20 pb-20">
85
+ <% if @section.long_description.blank? %>
86
+ &ltNot Specified&gt
87
+ <% else %>
88
+ <%= raw(@section.long_description) %>
89
+ <% end %>
90
+ </div>
91
+ </div>
92
+ <% end %>
93
+ </div>
127
94
 
95
+ <% if @section.enable_cover_image %>
96
+ <%= clear_tag(30) %>
97
+ <div class="row">
98
+ <div class="col-md-6">
99
+ <div><strong class="fs-18">Section Image (Optional)</strong></div>
100
+ </div>
101
+ </div>
102
+ <hr style="margin-top:0px;">
103
+ <div class="row">
104
+ <div class="col-md-3">
105
+ <%= clear_tag(10) %>
106
+ <% if display_edit_links? %>
107
+ <%= edit_image(@section,
108
+ "cover_image.image.large.url",
109
+ upload_image_link(@section, :cover_image, nil ),
110
+ remove_image_link(@section, :cover_image, nil ),
111
+ image_options: {assoc_name: :cover_image }) %>
112
+ <% else %>
113
+ <%= display_image(@section, "cover_image.image.large.url", class: "img-inline", alt: @section.display_name) %>
114
+ <% end %>
115
+ </div>
116
+ </div>
117
+ <%= clear_tag(30) %>
118
+ <% end %>
119
+
120
+ <% if @section.enable_gallery_images %>
121
+ <%= clear_tag(30) %>
122
+ <div class="row">
123
+ <div class="col-md-6">
124
+ <div><strong class="fs-18">Section Images (Optional)</strong></div>
125
+ </div>
126
+ <div class="col-md-6">
127
+ <%= theme_button('Upload a New Image', 'plus', upload_multiple_image_link(@section, :gallery_images, nil ), classes: "pull-right", btn_type: "success") %>
128
+ </div>
129
+ </div>
130
+ <hr style="margin-top:0px;">
131
+ <%= clear_tag(10) %>
132
+ <div id="div_multiple_images">
128
133
  <%= render :partial=>"kuppayam/images/multiple_images", locals: { images: @section.gallery_images } %>
129
-
130
134
  </div>
135
+ <%= clear_tag(30) %>
136
+ <% end %>
131
137
 
132
- <div class="tab-pane" id="technical_details" style="border: 1px solid #000;min-height:200px;padding:20px;margin-bottom:20px;max-height: 400px;overflow-y: auto;">
133
-
134
- <%= clear_tag(20) %>
135
-
136
- <div class="table-responsive">
137
- <table class="table table-striped table-condensed table-bordered mb-60">
138
- <tbody>
139
-
140
- <tr>
141
- <th>ID</th><td><%= @section.id %></td>
142
- <th>Status</th><td><%= @section.status %></td>
143
- </tr>
144
-
145
- <tr>
146
- <th style="width:25%">Section Code</th>
147
- <td style="width:25%"><%=@section.section_type.try(:code) %></td>
148
- <th></th><td></td>
149
- <th></th><td></td>
150
- </tr>
151
-
152
- <tr>
153
- <th>Created At</th><td><%= @section.created_at.strftime("%m/%d/%Y - %H:%M:%S") if @section.created_at %></td>
154
- <th>Updated At</th><td><%= @section.updated_at.strftime("%m/%d/%Y - %H:%M:%S") if @section.updated_at %></td>
155
- </tr>
156
-
157
- </tbody>
158
- </table>
159
- </div>
138
+ <% if @current_user.super_admin? %>
139
+ <%= clear_tag(30) %>
140
+ <div><strong class="fs-18">Technical Details</strong></div>
141
+ <hr>
142
+ <div class="table-responsive">
143
+ <table class="table table-striped table-condensed table-bordered mb-60">
144
+ <tbody>
160
145
 
161
- </div>
146
+ <tr>
147
+ <th>ID</th><td><%= @section.id %></td>
148
+ <th style="width:25%">Page</th>
149
+ <td style="width:25%"><%= "#{@section.page.name} (#{@section.page.id})" if @section.page %></td>
150
+ </tr>
151
+
152
+ <tr>
153
+ <th>CODE</th><td><%= @section.code %></td>
154
+ <th></th><td></td>
155
+ </tr>
156
+
157
+ <tr>
158
+ <th>Status</th><td><%= @section.status %></td>
159
+ <th>Priority</th><td><%= @section.priority %></td>
160
+ </tr>
161
+
162
+ <tr>
163
+ <th style="width:25%">Enable Title</th>
164
+ <td style="width:25%"><%=@section.enable_title %></td>
165
+ <th style="width:25%">Enable Sub Title</th>
166
+ <td style="width:25%"><%=@section.enable_sub_title %></td>
167
+ </tr>
168
+
169
+ <tr>
170
+ <th style="width:25%">Enable Button One</th>
171
+ <td style="width:25%"><%=@section.enable_button_one %></td>
172
+ <th style="width:25%">Enable Button Two</th>
173
+ <td style="width:25%"><%=@section.enable_button_two %></td>
174
+ </tr>
175
+
176
+ <tr>
177
+ <th style="width:25%">Enable Short Description</th>
178
+ <td style="width:25%"><%=@section.enable_short_description %></td>
179
+ <th style="width:25%">Enable Long Description</th>
180
+ <td style="width:25%"><%=@section.enable_long_description %></td>
181
+ </tr>
182
+
183
+ <tr>
184
+ <th style="width:25%">Enable Cover Image</th>
185
+ <td style="width:25%"><%=@section.enable_cover_image %></td>
186
+ <th style="width:25%">Enable Gallery Images</th>
187
+ <td style="width:25%"><%=@section.enable_gallery_images %></td>
188
+ </tr>
189
+
190
+ <tr>
191
+ <th>Created At</th><td><%= @section.created_at.strftime("%m/%d/%Y - %H:%M:%S") if @section.created_at %></td>
192
+ <th>Updated At</th><td><%= @section.updated_at.strftime("%m/%d/%Y - %H:%M:%S") if @section.updated_at %></td>
193
+ </tr>
194
+
195
+ </tbody>
196
+ </table>
162
197
  </div>
198
+ <% end %>
163
199
 
164
200
  <%= link_to "Close", "#", onclick: "closeLargeModal();", class: "btn btn-primary pull-right" %>
165
201