dhatu 0.1.19 → 0.1.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/dhatu/blog_posts_controller.rb +81 -14
- data/app/controllers/dhatu/bookings_controller.rb +51 -5
- data/app/controllers/dhatu/branches_controller.rb +42 -8
- data/app/controllers/dhatu/categories_controller.rb +86 -47
- data/app/controllers/dhatu/events_controller.rb +79 -9
- data/app/controllers/dhatu/meta_tags_controller.rb +96 -0
- data/app/controllers/dhatu/offers_controller.rb +83 -10
- data/app/controllers/dhatu/pages_controller.rb +130 -0
- data/app/controllers/dhatu/prices_controller.rb +78 -12
- data/app/controllers/dhatu/projects_controller.rb +78 -22
- data/app/controllers/dhatu/promotion_enquiries_controller.rb +69 -7
- data/app/controllers/dhatu/promotions_controller.rb +46 -2
- data/app/controllers/dhatu/resource_controller.rb +4 -0
- data/app/controllers/dhatu/sections_controller.rb +41 -8
- data/app/controllers/dhatu/services_controller.rb +78 -18
- data/app/controllers/dhatu/team_members_controller.rb +41 -8
- data/app/controllers/dhatu/testimonials_controller.rb +41 -9
- data/app/models/dhatu/blog_post.rb +6 -2
- data/app/models/dhatu/category.rb +3 -3
- data/app/models/dhatu/event.rb +4 -0
- data/app/models/dhatu/meta_tag.rb +48 -0
- data/app/models/dhatu/offer.rb +4 -0
- data/app/models/dhatu/page.rb +50 -0
- data/app/models/dhatu/project.rb +7 -3
- data/app/models/dhatu/promotion.rb +1 -0
- data/app/models/dhatu/section.rb +8 -12
- data/app/models/dhatu/service.rb +7 -3
- data/app/models/image/og_image.rb +3 -0
- data/app/uploaders/og_image_uploader.rb +15 -0
- data/app/views/dhatu/blog_posts/_form.html.erb +1 -1
- data/app/views/dhatu/blog_posts/_index.html.erb +1 -1
- data/app/views/dhatu/blog_posts/_row.html.erb +1 -1
- data/app/views/dhatu/blog_posts/_show.html.erb +1 -1
- data/app/views/dhatu/bookings/_index.html.erb +7 -8
- data/app/views/dhatu/bookings/_row.html.erb +11 -7
- data/app/views/dhatu/bookings/index.html.erb +20 -12
- data/app/views/dhatu/branches/_index.html.erb +8 -12
- data/app/views/dhatu/branches/_show.html.erb +75 -69
- data/app/views/dhatu/branches/index.html.erb +13 -8
- data/app/views/dhatu/categories/_category_types.html.erb +27 -0
- data/app/views/dhatu/categories/_form.html.erb +2 -2
- data/app/views/dhatu/categories/_index.html.erb +114 -89
- data/app/views/dhatu/categories/_index_list.html.erb +118 -0
- data/app/views/dhatu/categories/_row.html.erb +27 -31
- data/app/views/dhatu/categories/_row_list.html.erb +34 -0
- data/app/views/dhatu/categories/_show.html.erb +101 -74
- data/app/views/dhatu/categories/choose_category_type.html.erb +20 -0
- data/app/views/dhatu/categories/index.html.erb +1 -19
- data/app/views/dhatu/dashboard/_index.html.erb +53 -42
- data/app/views/dhatu/events/_index.html.erb +1 -1
- data/app/views/dhatu/events/_row.html.erb +1 -1
- data/app/views/dhatu/events/_show.html.erb +99 -75
- data/app/views/dhatu/events/index.html.erb +14 -9
- data/app/views/dhatu/meta_tags/_form.html.erb +48 -0
- data/app/views/dhatu/meta_tags/_index.html.erb +59 -0
- data/app/views/dhatu/meta_tags/_row.html.erb +32 -0
- data/app/views/dhatu/meta_tags/create.js.erb +29 -0
- data/app/views/dhatu/offers/_index.html.erb +8 -8
- data/app/views/dhatu/offers/_row.html.erb +1 -1
- data/app/views/dhatu/offers/_show.html.erb +85 -81
- data/app/views/dhatu/offers/index.html.erb +14 -8
- data/app/views/dhatu/pages/_form.html.erb +44 -0
- data/app/views/dhatu/pages/_index.html.erb +57 -0
- data/app/views/dhatu/pages/_row.html.erb +47 -0
- data/app/views/dhatu/pages/_show.html.erb +99 -0
- data/app/views/dhatu/pages/index.html.erb +59 -0
- data/app/views/dhatu/pages/show.html.erb +12 -0
- data/app/views/dhatu/prices/_index.html.erb +6 -6
- data/app/views/dhatu/prices/_row.html.erb +3 -2
- data/app/views/dhatu/prices/_show.html.erb +34 -45
- data/app/views/dhatu/prices/index.html.erb +14 -25
- data/app/views/dhatu/projects/_form.html.erb +15 -16
- data/app/views/dhatu/projects/_index.html.erb +6 -7
- data/app/views/dhatu/projects/_row.html.erb +4 -4
- data/app/views/dhatu/projects/_show.html.erb +108 -97
- data/app/views/dhatu/projects/index.html.erb +13 -19
- data/app/views/dhatu/projects/show.html.erb +12 -0
- data/app/views/dhatu/promotion_attributes/_index.html.erb +1 -7
- data/app/views/dhatu/promotion_attributes/_row.html.erb +1 -4
- data/app/views/dhatu/promotion_enquiries/_index.html.erb +11 -11
- data/app/views/dhatu/promotion_enquiries/_row.html.erb +7 -5
- data/app/views/dhatu/promotion_enquiries/_show.html.erb +35 -43
- data/app/views/dhatu/promotion_enquiries/index.html.erb +20 -12
- data/app/views/dhatu/promotions/_index.html.erb +13 -15
- data/app/views/dhatu/promotions/_row.html.erb +10 -9
- data/app/views/dhatu/promotions/_show.html.erb +190 -93
- data/app/views/dhatu/promotions/index.html.erb +0 -8
- data/app/views/dhatu/{section_types → section_types1}/_form.html.erb +0 -0
- data/app/views/dhatu/{section_types → section_types1}/_index.html.erb +0 -0
- data/app/views/dhatu/{section_types → section_types1}/_row.html.erb +0 -0
- data/app/views/dhatu/{section_types → section_types1}/_show.html.erb +0 -0
- data/app/views/dhatu/{section_types → section_types1}/index.html.erb +0 -0
- data/app/views/dhatu/sections/_form.html.erb +116 -11
- data/app/views/dhatu/sections/_index.html.erb +6 -3
- data/app/views/dhatu/sections/_row.html.erb +5 -2
- data/app/views/dhatu/sections/_show.html.erb +168 -132
- data/app/views/dhatu/sections/index.html.erb +10 -2
- data/app/views/dhatu/services/_form.html.erb +16 -17
- data/app/views/dhatu/services/_index.html.erb +6 -7
- data/app/views/dhatu/services/_row.html.erb +4 -4
- data/app/views/dhatu/services/_show.html.erb +107 -96
- data/app/views/dhatu/services/index.html.erb +13 -19
- data/app/views/dhatu/team_members/_index.html.erb +5 -6
- data/app/views/dhatu/team_members/_row.html.erb +3 -3
- data/app/views/dhatu/team_members/_show.html.erb +70 -58
- data/app/views/dhatu/team_members/index.html.erb +13 -8
- data/app/views/dhatu/testimonials/_index.html.erb +3 -6
- data/app/views/dhatu/testimonials/_row.html.erb +2 -3
- data/app/views/dhatu/testimonials/_show.html.erb +63 -93
- data/app/views/dhatu/testimonials/index.html.erb +13 -8
- data/app/views/layouts/kuppayam/_sidebar.html.erb +63 -48
- data/app/views/usman/dashboard/_super_admin_index.html.erb +22 -0
- data/config/routes.rb +12 -1
- data/db/data/dummy/services.csv +1 -1
- data/db/migrate/20180101093435_create_pages.rb +14 -0
- data/db/migrate/20180101093436_create_meta_tags.rb +19 -0
- data/db/migrate/20180101093437_add_page_id_to_sections.rb +5 -0
- data/db/migrate/20180101093438_add_priority_to_pages_and_sections.rb +6 -0
- data/db/migrate/20180101093439_add_a_ton_of_boolean_fields_to_sections.rb +34 -0
- data/db/migrate/20180101093440_add_code_to_sections.rb +19 -0
- data/db/migrate/20180101093441_rename_meta_description_all_over.rb +7 -0
- data/db/migrate/20180101093442_add_name_to_sections.rb +19 -0
- data/lib/dhatu/version.rb +1 -1
- metadata +43 -14
- 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::Testimonial::STATUS.each do |key, value| %>
|
7
|
-
<li class="<%= @status == value ? 'active' : '' %>">
|
8
|
-
<%= link_to testimonials_path(st: value), "aria-expanded" => "#{ @status == value ? 'true' : 'false' }" do %>
|
9
|
-
<span class="visible-xs"><i class="fa-gift"></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">
|
@@ -28,6 +20,19 @@
|
|
28
20
|
<%= search_form_kuppayam(Dhatu::Offer, testimonials_path(st: @status), text: @filters[:query]) %>
|
29
21
|
</div>
|
30
22
|
</div>
|
23
|
+
<div class="row">
|
24
|
+
<div class="col-md-12 visible-sm visible-xs mt-10">
|
25
|
+
</div>
|
26
|
+
<div class="col-md-12">
|
27
|
+
<% @filter_ui_settings.each do |filter_name, options| %>
|
28
|
+
<% if options[:object_filter] == true %>
|
29
|
+
<%= report_object_filter(filter_name, options) %>
|
30
|
+
<% else %>
|
31
|
+
<%= report_filter(filter_name, options) %>
|
32
|
+
<% end %>
|
33
|
+
<% end %>
|
34
|
+
</div>
|
35
|
+
</div>
|
31
36
|
|
32
37
|
</div>
|
33
38
|
<%= clear_tag(10) %>
|
@@ -1,15 +1,15 @@
|
|
1
1
|
<%
|
2
|
-
|
3
|
-
|
4
|
-
text: "
|
5
|
-
icon_class: "fa-
|
6
|
-
url: dhatu.
|
7
|
-
has_permission: @current_user.has_read_permission?(Dhatu::
|
2
|
+
dhatu_website_items = {
|
3
|
+
pages: {
|
4
|
+
text: "Pages",
|
5
|
+
icon_class: "fa-file",
|
6
|
+
url: dhatu.pages_url,
|
7
|
+
has_permission: @current_user.has_read_permission?(Dhatu::Page)
|
8
8
|
},
|
9
9
|
categories: {
|
10
10
|
text: "Categories",
|
11
11
|
icon_class: "fa-sitemap",
|
12
|
-
url: dhatu.
|
12
|
+
url: dhatu.choose_category_type_url,
|
13
13
|
has_permission: @current_user.has_read_permission?(Dhatu::Category)
|
14
14
|
},
|
15
15
|
projects: {
|
@@ -24,30 +24,6 @@
|
|
24
24
|
url: dhatu.services_url,
|
25
25
|
has_permission: @current_user.has_read_permission?(Dhatu::Service)
|
26
26
|
},
|
27
|
-
promotions: {
|
28
|
-
text: "Promotions",
|
29
|
-
icon_class: "fa-gift",
|
30
|
-
url: dhatu.promotions_url,
|
31
|
-
has_permission: @current_user.has_read_permission?(Dhatu::Promotion)
|
32
|
-
},
|
33
|
-
promotion_enquiries: {
|
34
|
-
text: "Promotional Enquiries",
|
35
|
-
icon_class: "linecons-sound",
|
36
|
-
url: dhatu.promotion_enquiries_url,
|
37
|
-
has_permission: @current_user.has_read_permission?(Dhatu::PromotionEnquiry)
|
38
|
-
},
|
39
|
-
bookings: {
|
40
|
-
text: "Bookings",
|
41
|
-
icon_class: "fa-calendar",
|
42
|
-
url: dhatu.bookings_url,
|
43
|
-
has_permission: @current_user.has_read_permission?(Dhatu::Booking)
|
44
|
-
},
|
45
|
-
blog_posts: {
|
46
|
-
text: "Blog",
|
47
|
-
icon_class: "fa-newspaper-o",
|
48
|
-
url: dhatu.blog_posts_url,
|
49
|
-
has_permission: @current_user.has_read_permission?(Dhatu::BlogPost)
|
50
|
-
},
|
51
27
|
prices: {
|
52
28
|
text: "Prices",
|
53
29
|
icon_class: "fa-dollar",
|
@@ -60,12 +36,6 @@
|
|
60
36
|
url: dhatu.branches_url,
|
61
37
|
has_permission: @current_user.has_read_permission?(Dhatu::Branch)
|
62
38
|
},
|
63
|
-
offers: {
|
64
|
-
text: "Offers",
|
65
|
-
icon_class: "fa-gift",
|
66
|
-
url: dhatu.offers_url,
|
67
|
-
has_permission: @current_user.has_read_permission?(Dhatu::Offer)
|
68
|
-
},
|
69
39
|
events: {
|
70
40
|
text: "Events",
|
71
41
|
icon_class: "fa-calendar",
|
@@ -86,6 +56,40 @@
|
|
86
56
|
}
|
87
57
|
}
|
88
58
|
%>
|
59
|
+
<%
|
60
|
+
dhatu_marketing_items = {
|
61
|
+
promotions: {
|
62
|
+
text: "Promotions",
|
63
|
+
icon_class: "fa-gift",
|
64
|
+
url: dhatu.promotions_url,
|
65
|
+
has_permission: @current_user.has_read_permission?(Dhatu::Promotion)
|
66
|
+
},
|
67
|
+
promotion_enquiries: {
|
68
|
+
text: "Promotional Enquiries",
|
69
|
+
icon_class: "linecons-sound",
|
70
|
+
url: dhatu.promotion_enquiries_url,
|
71
|
+
has_permission: @current_user.has_read_permission?(Dhatu::PromotionEnquiry)
|
72
|
+
},
|
73
|
+
bookings: {
|
74
|
+
text: "Bookings",
|
75
|
+
icon_class: "fa-calendar",
|
76
|
+
url: dhatu.bookings_url,
|
77
|
+
has_permission: @current_user.has_read_permission?(Dhatu::Booking)
|
78
|
+
},
|
79
|
+
blog_posts: {
|
80
|
+
text: "Blog",
|
81
|
+
icon_class: "fa-newspaper-o",
|
82
|
+
url: dhatu.blog_posts_url,
|
83
|
+
has_permission: @current_user.has_read_permission?(Dhatu::BlogPost)
|
84
|
+
},
|
85
|
+
offers: {
|
86
|
+
text: "Offers",
|
87
|
+
icon_class: "fa-gift",
|
88
|
+
url: dhatu.offers_url,
|
89
|
+
has_permission: @current_user.has_read_permission?(Dhatu::Offer)
|
90
|
+
}
|
91
|
+
}
|
92
|
+
%>
|
89
93
|
<%
|
90
94
|
user_items = {
|
91
95
|
users: {
|
@@ -121,12 +125,6 @@
|
|
121
125
|
icon_class: "linecons-diamond",
|
122
126
|
url: usman.features_url,
|
123
127
|
has_permission: @current_user.has_read_permission?(Feature)
|
124
|
-
},
|
125
|
-
section_types: {
|
126
|
-
text: "Manage Section Types",
|
127
|
-
icon_class: "fa-reorder",
|
128
|
-
url: dhatu.section_types_url,
|
129
|
-
has_permission: @current_user.has_read_permission?(Dhatu::SectionType)
|
130
128
|
}
|
131
129
|
}
|
132
130
|
%>
|
@@ -154,7 +152,7 @@
|
|
154
152
|
}
|
155
153
|
%>
|
156
154
|
|
157
|
-
<div class="sidebar-menu toggle-others
|
155
|
+
<div class="sidebar-menu toggle-others collapsed">
|
158
156
|
|
159
157
|
<div class="sidebar-menu-inner">
|
160
158
|
|
@@ -191,14 +189,31 @@
|
|
191
189
|
</li>
|
192
190
|
<% end %>
|
193
191
|
|
194
|
-
<% if
|
192
|
+
<% if dhatu_website_items.map{|x,y| x if y[:has_permission] }.compact.any? %>
|
195
193
|
<li class="">
|
196
194
|
<a href="#">
|
197
195
|
<i class="fa-trello"></i>
|
198
|
-
<span class="title">
|
196
|
+
<span class="title">Website Elements</span>
|
197
|
+
</a>
|
198
|
+
<ul>
|
199
|
+
<% dhatu_website_items.each do |key, values| %>
|
200
|
+
<% next unless values[:has_permission] %>
|
201
|
+
<li class="">
|
202
|
+
<%= link_to raw("<i class=\"#{values[:icon_class]}\"></i> <span class='title'>#{values[:text]}</span>"), values[:url] %>
|
203
|
+
</li>
|
204
|
+
<% end %>
|
205
|
+
</ul>
|
206
|
+
</li>
|
207
|
+
<% end %>
|
208
|
+
|
209
|
+
<% if dhatu_marketing_items.map{|x,y| x if y[:has_permission] }.compact.any? %>
|
210
|
+
<li class="">
|
211
|
+
<a href="#">
|
212
|
+
<i class="fa-money"></i>
|
213
|
+
<span class="title">Marketing Elements</span>
|
199
214
|
</a>
|
200
215
|
<ul>
|
201
|
-
<%
|
216
|
+
<% dhatu_marketing_items.each do |key, values| %>
|
202
217
|
<% next unless values[:has_permission] %>
|
203
218
|
<li class="">
|
204
219
|
<%= link_to raw("<i class=\"#{values[:icon_class]}\"></i> <span class='title'>#{values[:text]}</span>"), values[:url] %>
|
@@ -229,7 +244,7 @@
|
|
229
244
|
<li class="">
|
230
245
|
<a href="#">
|
231
246
|
<i class="linecons-params"></i>
|
232
|
-
<span class="title">
|
247
|
+
<span class="title">Configurations</span>
|
233
248
|
</a>
|
234
249
|
<ul>
|
235
250
|
<% configuration_items.each do |key, values| %>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<%
|
2
|
+
super_admin_items = {
|
3
|
+
features: {
|
4
|
+
text: "Features",
|
5
|
+
icon_class: "linecons-diamond",
|
6
|
+
url: usman.features_url,
|
7
|
+
has_permission: @current_user.has_read_permission?(Feature)
|
8
|
+
}
|
9
|
+
}
|
10
|
+
%>
|
11
|
+
|
12
|
+
<% if (super_admin_items.map{|x, y| y[:has_permission] }).compact.uniq.any? %>
|
13
|
+
|
14
|
+
<h3 class="text-gray mt-50 mb-10">
|
15
|
+
Configurations <br>
|
16
|
+
<small class="text-muted">Configure Features & Other Settings </small>
|
17
|
+
</h3>
|
18
|
+
<hr class="mb-30" style="border-top:1px solid #ddd;">
|
19
|
+
|
20
|
+
<%= render partial: "/layouts/dashboard/items", locals: { items: super_admin_items } %>
|
21
|
+
|
22
|
+
<% end %>
|
data/config/routes.rb
CHANGED
@@ -68,7 +68,17 @@ Dhatu::Engine.routes.draw do
|
|
68
68
|
end
|
69
69
|
end
|
70
70
|
|
71
|
-
resources :
|
71
|
+
resources :pages do
|
72
|
+
member do
|
73
|
+
put :update_status, as: :update_status
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
resources :meta_tags do
|
78
|
+
member do
|
79
|
+
put :update_status, as: :update_status
|
80
|
+
end
|
81
|
+
end
|
72
82
|
|
73
83
|
resources :sections do
|
74
84
|
member do
|
@@ -116,6 +126,7 @@ Dhatu::Engine.routes.draw do
|
|
116
126
|
end
|
117
127
|
end
|
118
128
|
|
129
|
+
get '/categories/choose_category_type', :controller => "categories", action: :choose_category_type, as: :choose_category_type
|
119
130
|
resources :categories do
|
120
131
|
member do
|
121
132
|
put :make_parent, as: :make_parent
|
data/db/data/dummy/services.csv
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
name,
|
1
|
+
name, short_description, description, price, duration, category, status, featured, priority
|
2
2
|
Hair coloring,Hair coloring,"Red Velvet hair salon specializes in diverse hair coloring styles. The design of our salon setting is in such a way that you will relax the whole good time as we work our magic on your hair. We guarantee that you will love the results and probably keep coming back for more. There are many standard hair coloring packages out there, but none can beat our advanced and specialized packages.",,,Hair,published,false,1
|
3
3
|
Balayage hair coloring technique,Balayage hair coloring technique,"Balayage means sweeping or painting in the French language. Believe you me; the effect of balayage hair coloring is outstanding. Our coloring specialists brush the hair with a color of your choice on the surface of the hair without saturating the whole section with hair dye. The result is soft hair that is equally blended and attractive to the eye.",,,Hair,published,false,1
|
4
4
|
The ombre option,The ombre option,"The beauty of ombre hair coloring is that it will never go out of fashion. As such our dedicated team at Red Velvet salon will work round the clock to bring this perfect finishing to your hair. Book an appointment with us, and you will be amazed at the beauty that ombre coloring will bring on board. Ombre hair coloring uses a unique technique to ensure that the hair ends are lighter in color than the rest of the hair. Supposing that your hair is not dark, well our staff would advise that you consider deepening your natural hair shade to something different.",,,Hair,published,false,1
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class CreatePages < ActiveRecord::Migration[5.1]
|
2
|
+
def change
|
3
|
+
create_table :pages do |t|
|
4
|
+
t.string :name, :null => false, limit: 64
|
5
|
+
t.string :code, :null => false, limit: 64
|
6
|
+
t.references :feature
|
7
|
+
t.string :status, :null => false, :default=>"unpublished", :limit=>16
|
8
|
+
t.timestamps null: false
|
9
|
+
end
|
10
|
+
|
11
|
+
add_index :pages, :code, :unique => true
|
12
|
+
add_index :pages, :status
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
class CreateMetaTags < ActiveRecord::Migration[5.1]
|
2
|
+
def change
|
3
|
+
create_table :meta_tags do |t|
|
4
|
+
t.integer :meta_taggable_id
|
5
|
+
t.string :meta_taggable_type
|
6
|
+
|
7
|
+
# Type Can be Basic HTML, Open Graph, Twitter Card, Others
|
8
|
+
t.string :meta_type, :null => false, limit: 16
|
9
|
+
|
10
|
+
t.string :meta_key, :null => false, limit: 128
|
11
|
+
t.string :meta_value, :null => true, limit: 1024
|
12
|
+
|
13
|
+
t.string :status, :null => false, :default=>"unpublished", :limit=>16
|
14
|
+
t.timestamps null: false
|
15
|
+
end
|
16
|
+
add_index :meta_tags, :status
|
17
|
+
add_index(:meta_tags, [ :meta_taggable_id, :meta_taggable_type ])
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
class AddATonOfBooleanFieldsToSections < ActiveRecord::Migration[5.1]
|
2
|
+
def change
|
3
|
+
add_column :sections, :enable_title, :boolean, default: false
|
4
|
+
add_column :sections, :enable_sub_title, :boolean, default: false
|
5
|
+
add_column :sections, :enable_short_description, :boolean, default: false
|
6
|
+
add_column :sections, :enable_long_description, :boolean, default: false
|
7
|
+
add_column :sections, :enable_button_one, :boolean, default: false
|
8
|
+
add_column :sections, :enable_button_two, :boolean, default: false
|
9
|
+
add_column :sections, :enable_cover_image, :boolean, default: false
|
10
|
+
add_column :sections, :enable_gallery_images, :boolean, default: false
|
11
|
+
|
12
|
+
begin
|
13
|
+
Dhatu::Section.all.each do |section|
|
14
|
+
section.enable_title = !section.title.blank?
|
15
|
+
section.enable_sub_title = !section.sub_title.blank?
|
16
|
+
section.enable_short_description = !section.short_description.blank?
|
17
|
+
section.enable_long_description = !section.long_description.blank?
|
18
|
+
section.enable_button_one = !section.button_one_text.blank?
|
19
|
+
section.enable_button_two = !section.button_two_text.blank?
|
20
|
+
section.enable_cover_image = !section.cover_image.blank?
|
21
|
+
section.enable_gallery_images = section.gallery_images.any?
|
22
|
+
section.save
|
23
|
+
end
|
24
|
+
rescue
|
25
|
+
puts ""
|
26
|
+
puts ""
|
27
|
+
puts ""
|
28
|
+
puts "ERROR in AddATonOfBooleanFieldsToSections".red
|
29
|
+
puts ""
|
30
|
+
puts ""
|
31
|
+
puts ""
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
class AddCodeToSections < ActiveRecord::Migration[5.1]
|
2
|
+
def change
|
3
|
+
add_column :sections, :code, :string, null: false, limit: 64
|
4
|
+
begin
|
5
|
+
Dhatu::Section.all.each do |section|
|
6
|
+
section.code = section.section_type.code if section.section_type
|
7
|
+
section.save
|
8
|
+
end
|
9
|
+
rescue
|
10
|
+
puts ""
|
11
|
+
puts ""
|
12
|
+
puts ""
|
13
|
+
puts "ERROR in AddCodeToSections".red
|
14
|
+
puts ""
|
15
|
+
puts ""
|
16
|
+
puts ""
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
class RenameMetaDescriptionAllOver < ActiveRecord::Migration[5.1]
|
2
|
+
def change
|
3
|
+
rename_column :projects, :meta_description, :short_description
|
4
|
+
rename_column :services, :meta_description, :short_description
|
5
|
+
rename_column :blog_posts, :meta_description, :short_description
|
6
|
+
end
|
7
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
class AddNameToSections < ActiveRecord::Migration[5.1]
|
2
|
+
def change
|
3
|
+
add_column :sections, :name, :string, null: false, limit: 64
|
4
|
+
begin
|
5
|
+
Dhatu::Section.all.each do |section|
|
6
|
+
section.name = section.code.titleize.gsub("_", " ") if section.code
|
7
|
+
section.save
|
8
|
+
end
|
9
|
+
rescue
|
10
|
+
puts ""
|
11
|
+
puts ""
|
12
|
+
puts ""
|
13
|
+
puts "ERROR in AddNameToSections".red
|
14
|
+
puts ""
|
15
|
+
puts ""
|
16
|
+
puts ""
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/lib/dhatu/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dhatu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kpvarma
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -107,7 +107,7 @@ dependencies:
|
|
107
107
|
version: '0.1'
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0.1.
|
110
|
+
version: 0.1.35
|
111
111
|
type: :runtime
|
112
112
|
prerelease: false
|
113
113
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -117,7 +117,7 @@ dependencies:
|
|
117
117
|
version: '0.1'
|
118
118
|
- - ">="
|
119
119
|
- !ruby/object:Gem::Version
|
120
|
-
version: 0.1.
|
120
|
+
version: 0.1.35
|
121
121
|
- !ruby/object:Gem::Dependency
|
122
122
|
name: pattana
|
123
123
|
requirement: !ruby/object:Gem::Requirement
|
@@ -127,7 +127,7 @@ dependencies:
|
|
127
127
|
version: '0.1'
|
128
128
|
- - ">="
|
129
129
|
- !ruby/object:Gem::Version
|
130
|
-
version: 0.1.
|
130
|
+
version: 0.1.23
|
131
131
|
type: :runtime
|
132
132
|
prerelease: false
|
133
133
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -137,7 +137,7 @@ dependencies:
|
|
137
137
|
version: '0.1'
|
138
138
|
- - ">="
|
139
139
|
- !ruby/object:Gem::Version
|
140
|
-
version: 0.1.
|
140
|
+
version: 0.1.23
|
141
141
|
- !ruby/object:Gem::Dependency
|
142
142
|
name: usman
|
143
143
|
requirement: !ruby/object:Gem::Requirement
|
@@ -147,7 +147,7 @@ dependencies:
|
|
147
147
|
version: '0.3'
|
148
148
|
- - ">="
|
149
149
|
- !ruby/object:Gem::Version
|
150
|
-
version: 0.3.
|
150
|
+
version: 0.3.34
|
151
151
|
type: :runtime
|
152
152
|
prerelease: false
|
153
153
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -157,7 +157,7 @@ dependencies:
|
|
157
157
|
version: '0.3'
|
158
158
|
- - ">="
|
159
159
|
- !ruby/object:Gem::Version
|
160
|
-
version: 0.3.
|
160
|
+
version: 0.3.34
|
161
161
|
- !ruby/object:Gem::Dependency
|
162
162
|
name: bcrypt
|
163
163
|
requirement: !ruby/object:Gem::Requirement
|
@@ -416,7 +416,9 @@ files:
|
|
416
416
|
- app/controllers/dhatu/categories_controller.rb
|
417
417
|
- app/controllers/dhatu/dashboard_controller.rb
|
418
418
|
- app/controllers/dhatu/events_controller.rb
|
419
|
+
- app/controllers/dhatu/meta_tags_controller.rb
|
419
420
|
- app/controllers/dhatu/offers_controller.rb
|
421
|
+
- app/controllers/dhatu/pages_controller.rb
|
420
422
|
- app/controllers/dhatu/prices_controller.rb
|
421
423
|
- app/controllers/dhatu/projects_controller.rb
|
422
424
|
- app/controllers/dhatu/promotion_attributes_controller.rb
|
@@ -437,7 +439,9 @@ files:
|
|
437
439
|
- app/models/dhatu/branch.rb
|
438
440
|
- app/models/dhatu/category.rb
|
439
441
|
- app/models/dhatu/event.rb
|
442
|
+
- app/models/dhatu/meta_tag.rb
|
440
443
|
- app/models/dhatu/offer.rb
|
444
|
+
- app/models/dhatu/page.rb
|
441
445
|
- app/models/dhatu/price.rb
|
442
446
|
- app/models/dhatu/project.rb
|
443
447
|
- app/models/dhatu/promotion.rb
|
@@ -449,7 +453,9 @@ files:
|
|
449
453
|
- app/models/dhatu/team_member.rb
|
450
454
|
- app/models/dhatu/testimonial.rb
|
451
455
|
- app/models/image/category_image.rb
|
456
|
+
- app/models/image/og_image.rb
|
452
457
|
- app/uploaders/category_image_uploader.rb
|
458
|
+
- app/uploaders/og_image_uploader.rb
|
453
459
|
- app/views/dhatu/blog_posts/_form.html.erb
|
454
460
|
- app/views/dhatu/blog_posts/_index.html.erb
|
455
461
|
- app/views/dhatu/blog_posts/_row.html.erb
|
@@ -465,10 +471,14 @@ files:
|
|
465
471
|
- app/views/dhatu/branches/_row.html.erb
|
466
472
|
- app/views/dhatu/branches/_show.html.erb
|
467
473
|
- app/views/dhatu/branches/index.html.erb
|
474
|
+
- app/views/dhatu/categories/_category_types.html.erb
|
468
475
|
- app/views/dhatu/categories/_form.html.erb
|
469
476
|
- app/views/dhatu/categories/_index.html.erb
|
477
|
+
- app/views/dhatu/categories/_index_list.html.erb
|
470
478
|
- app/views/dhatu/categories/_row.html.erb
|
479
|
+
- app/views/dhatu/categories/_row_list.html.erb
|
471
480
|
- app/views/dhatu/categories/_show.html.erb
|
481
|
+
- app/views/dhatu/categories/choose_category_type.html.erb
|
472
482
|
- app/views/dhatu/categories/index.html.erb
|
473
483
|
- app/views/dhatu/dashboard/_index.html.erb
|
474
484
|
- app/views/dhatu/dashboard/index.html.erb
|
@@ -477,11 +487,21 @@ files:
|
|
477
487
|
- app/views/dhatu/events/_row.html.erb
|
478
488
|
- app/views/dhatu/events/_show.html.erb
|
479
489
|
- app/views/dhatu/events/index.html.erb
|
490
|
+
- app/views/dhatu/meta_tags/_form.html.erb
|
491
|
+
- app/views/dhatu/meta_tags/_index.html.erb
|
492
|
+
- app/views/dhatu/meta_tags/_row.html.erb
|
493
|
+
- app/views/dhatu/meta_tags/create.js.erb
|
480
494
|
- app/views/dhatu/offers/_form.html.erb
|
481
495
|
- app/views/dhatu/offers/_index.html.erb
|
482
496
|
- app/views/dhatu/offers/_row.html.erb
|
483
497
|
- app/views/dhatu/offers/_show.html.erb
|
484
498
|
- app/views/dhatu/offers/index.html.erb
|
499
|
+
- app/views/dhatu/pages/_form.html.erb
|
500
|
+
- app/views/dhatu/pages/_index.html.erb
|
501
|
+
- app/views/dhatu/pages/_row.html.erb
|
502
|
+
- app/views/dhatu/pages/_show.html.erb
|
503
|
+
- app/views/dhatu/pages/index.html.erb
|
504
|
+
- app/views/dhatu/pages/show.html.erb
|
485
505
|
- app/views/dhatu/prices/_form.html.erb
|
486
506
|
- app/views/dhatu/prices/_index.html.erb
|
487
507
|
- app/views/dhatu/prices/_row.html.erb
|
@@ -492,6 +512,7 @@ files:
|
|
492
512
|
- app/views/dhatu/projects/_row.html.erb
|
493
513
|
- app/views/dhatu/projects/_show.html.erb
|
494
514
|
- app/views/dhatu/projects/index.html.erb
|
515
|
+
- app/views/dhatu/projects/show.html.erb
|
495
516
|
- app/views/dhatu/promotion_attributes/_form.html.erb
|
496
517
|
- app/views/dhatu/promotion_attributes/_index.html.erb
|
497
518
|
- app/views/dhatu/promotion_attributes/_row.html.erb
|
@@ -507,11 +528,11 @@ files:
|
|
507
528
|
- app/views/dhatu/promotions/_row.html.erb
|
508
529
|
- app/views/dhatu/promotions/_show.html.erb
|
509
530
|
- app/views/dhatu/promotions/index.html.erb
|
510
|
-
- app/views/dhatu/
|
511
|
-
- app/views/dhatu/
|
512
|
-
- app/views/dhatu/
|
513
|
-
- app/views/dhatu/
|
514
|
-
- app/views/dhatu/
|
531
|
+
- app/views/dhatu/section_types1/_form.html.erb
|
532
|
+
- app/views/dhatu/section_types1/_index.html.erb
|
533
|
+
- app/views/dhatu/section_types1/_row.html.erb
|
534
|
+
- app/views/dhatu/section_types1/_show.html.erb
|
535
|
+
- app/views/dhatu/section_types1/index.html.erb
|
515
536
|
- app/views/dhatu/sections/_form.html.erb
|
516
537
|
- app/views/dhatu/sections/_index.html.erb
|
517
538
|
- app/views/dhatu/sections/_row.html.erb
|
@@ -538,6 +559,7 @@ files:
|
|
538
559
|
- app/views/layouts/kuppayam/_navbar.html.erb
|
539
560
|
- app/views/layouts/kuppayam/_sidebar.html.erb
|
540
561
|
- app/views/pattana/dashboard/_index.html.erb
|
562
|
+
- app/views/usman/dashboard/_super_admin_index.html.erb
|
541
563
|
- config/routes.rb
|
542
564
|
- db/data/dummy/categories.csv
|
543
565
|
- db/data/dummy/events.csv
|
@@ -572,9 +594,16 @@ files:
|
|
572
594
|
- db/migrate/20171120145547_add_section_type_id_to_sections.rb
|
573
595
|
- db/migrate/20171120145548_create_promotion_and_promotion_enquiries.rb
|
574
596
|
- db/migrate/20171203114528_change_default_status_of_promotion_enquiries.rb
|
575
|
-
- db/migrate/20171203114529_add_meta_description_to_services.rb
|
576
597
|
- db/migrate/20171203114530_add_control_fields_to_promotions.rb
|
577
598
|
- db/migrate/20180101093434_create_projects.rb
|
599
|
+
- db/migrate/20180101093435_create_pages.rb
|
600
|
+
- db/migrate/20180101093436_create_meta_tags.rb
|
601
|
+
- db/migrate/20180101093437_add_page_id_to_sections.rb
|
602
|
+
- db/migrate/20180101093438_add_priority_to_pages_and_sections.rb
|
603
|
+
- db/migrate/20180101093439_add_a_ton_of_boolean_fields_to_sections.rb
|
604
|
+
- db/migrate/20180101093440_add_code_to_sections.rb
|
605
|
+
- db/migrate/20180101093441_rename_meta_description_all_over.rb
|
606
|
+
- db/migrate/20180101093442_add_name_to_sections.rb
|
578
607
|
- lib/dhatu.rb
|
579
608
|
- lib/dhatu/engine.rb
|
580
609
|
- lib/dhatu/factories.rb
|