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
@@ -0,0 +1,34 @@
|
|
1
|
+
<tr id="tr_category_<%= category.id %>">
|
2
|
+
|
3
|
+
<th scope="row" style="text-align: center;">
|
4
|
+
<% if i < 0 %>
|
5
|
+
<i class="fa fa-check text-success"></i>
|
6
|
+
<% else %>
|
7
|
+
<%= i + 1 + (@per_page.to_i * (@current_page.to_i - 1)) %>
|
8
|
+
<% end %>
|
9
|
+
</th>
|
10
|
+
|
11
|
+
<% if category.end_node? %>
|
12
|
+
<td class="category-name">
|
13
|
+
<%= link_to category.display_name, "#", remote: true, style: ";font-size:14px;" %> - <%= category.display_category_type %><br>
|
14
|
+
<%= display_publishable_status(category) %>
|
15
|
+
<div class="badge">Priority: <%= category.priority %></div>
|
16
|
+
</td>
|
17
|
+
<% else %>
|
18
|
+
<td class="category-name">
|
19
|
+
<%= link_to raw("<i class=\"fa fa-caret-right\"></i> #{category.display_name}"), categories_path(parent_id: category.id, category_type: @category_type), remote: true, style: "font-weight:bold;font-size:14px;" %> - <%= category.display_category_type %><br>
|
20
|
+
<%= display_publishable_status(category) %>
|
21
|
+
<div class="badge">Priority: <%= category.priority %></div>
|
22
|
+
</td>
|
23
|
+
<% end %>
|
24
|
+
|
25
|
+
<% if display_manage_links? %>
|
26
|
+
<td class="action-links hidden-sm hidden-xs" style="width:10%"><%= display_publishable_links(category) %></td>
|
27
|
+
|
28
|
+
<td class="action-links hidden-sm hidden-xs" style="width:10%">
|
29
|
+
<%= link_to raw("<i class=\"linecons-desktop\"></i> View Details"), category_path(category), :remote=>true, style: "color:#40bbea" %>
|
30
|
+
<%= display_manage_links(category, @current_user) %>
|
31
|
+
</td>
|
32
|
+
<% end %>
|
33
|
+
|
34
|
+
</tr>
|
@@ -2,23 +2,11 @@
|
|
2
2
|
|
3
3
|
<div class="row">
|
4
4
|
|
5
|
-
<div class="col-md-
|
6
|
-
<% if display_edit_links? %>
|
7
|
-
<%= edit_image(@category,
|
8
|
-
"category_image.image.url",
|
9
|
-
upload_image_link(@category, :category_image, nil ),
|
10
|
-
remove_image_link(@category, :category_image, nil ),
|
11
|
-
image_options: {assoc_name: :category_image }) %>
|
12
|
-
<% else %>
|
13
|
-
<%= display_image(@category, "category_image.image.url", class: "img-inline", alt: @category.display_name) %>
|
14
|
-
<% end %>
|
15
|
-
</div>
|
16
|
-
|
17
|
-
<div class="col-md-5 col-sm-12 col-xs-12" style="border-right:1px solid #f1f1f1;">
|
5
|
+
<div class="col-md-8 col-sm-12 col-xs-12" style="border-right:1px solid #f1f1f1;">
|
18
6
|
|
19
7
|
<%= theme_panel_heading(@category.name) %>
|
20
8
|
|
21
|
-
<%= theme_panel_sub_heading(@category.
|
9
|
+
<%= theme_panel_sub_heading(@category.display_category_type, "#") if @category.one_liner %>
|
22
10
|
|
23
11
|
<%= clear_tag(10) %>
|
24
12
|
<%= display_publishable_status(@category) %>
|
@@ -27,6 +15,40 @@
|
|
27
15
|
<%= clear_tag(5) %>
|
28
16
|
<%= theme_panel_description(@category.description) %>
|
29
17
|
<%= clear_tag(20) %>
|
18
|
+
|
19
|
+
<div class="table-responsive">
|
20
|
+
<table class="table table-striped table-condensed table-bordered mb-60">
|
21
|
+
<tbody>
|
22
|
+
|
23
|
+
<tr>
|
24
|
+
<th>Category Type</th><td><%= @category.display_category_type %></td>
|
25
|
+
</tr>
|
26
|
+
|
27
|
+
<tr>
|
28
|
+
<th>Parent</th><td>
|
29
|
+
<% if @category.parent %>
|
30
|
+
<%= @category.parent.try(:display_name) %> (<%= @category.parent.try(:id) %>)
|
31
|
+
<% end %>
|
32
|
+
</td>
|
33
|
+
</tr>
|
34
|
+
|
35
|
+
<tr>
|
36
|
+
<th>Top Parent</th><td>
|
37
|
+
<% if @category.top_parent %>
|
38
|
+
<%= @category.top_parent.try(:display_name) %> (<%= @category.top_parent.try(:id) %>)
|
39
|
+
<% end %>
|
40
|
+
</td>
|
41
|
+
</tr>
|
42
|
+
|
43
|
+
<tr>
|
44
|
+
<th>Priority</th><td><%= @category.priority %></td>
|
45
|
+
</tr>
|
46
|
+
|
47
|
+
</tbody>
|
48
|
+
</table>
|
49
|
+
</div>
|
50
|
+
|
51
|
+
<%= clear_tag(20) %>
|
30
52
|
|
31
53
|
</div>
|
32
54
|
|
@@ -42,70 +64,75 @@
|
|
42
64
|
|
43
65
|
<%= clear_tag(20) %>
|
44
66
|
|
45
|
-
<
|
46
|
-
|
47
|
-
<a href="#technical_details" data-toggle="tab" aria-expanded="false">
|
48
|
-
<span class="visible-xs"><i class="fa-database"></i></span>
|
49
|
-
<span class="hidden-xs">Technical Details</span>
|
50
|
-
</a>
|
51
|
-
</li>
|
52
|
-
</ul>
|
53
|
-
|
54
|
-
<div class="tab-content">
|
55
|
-
<div class="tab-pane active" id="technical_details" style="border: 1px solid #000;min-height:200px;padding:20px;margin-bottom:20px;max-height: 400px;overflow-y: auto;">
|
56
|
-
|
57
|
-
<%= clear_tag(20) %>
|
67
|
+
<div><strong class="fs-18">Category Image</strong></div>
|
68
|
+
<hr>
|
58
69
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
<th></th><td></td>
|
71
|
-
</tr>
|
72
|
-
|
73
|
-
<tr>
|
74
|
-
<th>Parent</th><td>
|
75
|
-
<% if @category.parent %>
|
76
|
-
<%= @category.parent.try(:display_name) %> (<%= @category.parent.try(:id) %>)
|
77
|
-
<% end %>
|
78
|
-
</td>
|
79
|
-
<th>Top Parent</th><td>
|
80
|
-
<% if @category.top_parent %>
|
81
|
-
<%= @category.top_parent.try(:display_name) %> (<%= @category.top_parent.try(:id) %>)
|
82
|
-
<% end %>
|
83
|
-
</td>
|
84
|
-
</tr>
|
85
|
-
|
86
|
-
<tr>
|
87
|
-
<th>Status</th><td><%= @category.status %></td>
|
88
|
-
<th>Featured</th><td><%= @category.featured? ? "Yes" : "No" %></td>
|
89
|
-
</tr>
|
90
|
-
|
91
|
-
<tr>
|
92
|
-
<th>Priority</th><td><%= @category.priority %></td>
|
93
|
-
<th>End Node</th><td><%= @category.end_node? ? "Yes" : "No" %></td>
|
94
|
-
</tr>
|
95
|
-
|
96
|
-
<tr>
|
97
|
-
<th>Created At</th><td><%= @category.created_at.strftime("%m/%d/%Y - %H:%M:%S") if @category.created_at %></td>
|
98
|
-
<th>Updated At</th><td><%= @category.updated_at.strftime("%m/%d/%Y - %H:%M:%S") if @category.updated_at %></td>
|
99
|
-
</tr>
|
100
|
-
|
101
|
-
</tbody>
|
102
|
-
</table>
|
103
|
-
</div>
|
104
|
-
|
70
|
+
<div class="row">
|
71
|
+
<div class="col-md-6 col-sm-12 col-xs-12" style="border-right:1px solid #f1f1f1;">
|
72
|
+
<% if display_edit_links? %>
|
73
|
+
<%= edit_image(@category,
|
74
|
+
"category_image.image.url",
|
75
|
+
upload_image_link(@category, :category_image, nil ),
|
76
|
+
remove_image_link(@category, :category_image, nil ),
|
77
|
+
image_options: {assoc_name: :category_image }) %>
|
78
|
+
<% else %>
|
79
|
+
<%= display_image(@category, "category_image.image.url", class: "img-inline", alt: @category.display_name) %>
|
80
|
+
<% end %>
|
105
81
|
</div>
|
106
82
|
</div>
|
107
83
|
|
108
|
-
|
84
|
+
<% if @current_user.super_admin? %>
|
85
|
+
<%= clear_tag(40) %>
|
86
|
+
<div><strong class="fs-18">Technical Details</strong></div>
|
87
|
+
<hr>
|
88
|
+
<div class="table-responsive">
|
89
|
+
<table class="table table-striped table-condensed table-bordered mb-60">
|
90
|
+
<tbody>
|
91
|
+
|
92
|
+
<tr>
|
93
|
+
<th>ID</th><td><%= @category.id %></td>
|
94
|
+
<th>Permalink</th><td><%= @category.permalink %></td>
|
95
|
+
</tr>
|
96
|
+
|
97
|
+
<tr>
|
98
|
+
<th>Category Type</th><td><%= @category.category_type %></td>
|
99
|
+
<th></th><td></td>
|
100
|
+
</tr>
|
101
|
+
|
102
|
+
<tr>
|
103
|
+
<th>Parent</th><td>
|
104
|
+
<% if @category.parent %>
|
105
|
+
<%= @category.parent.try(:display_name) %> (<%= @category.parent.try(:id) %>)
|
106
|
+
<% end %>
|
107
|
+
</td>
|
108
|
+
<th>Top Parent</th><td>
|
109
|
+
<% if @category.top_parent %>
|
110
|
+
<%= @category.top_parent.try(:display_name) %> (<%= @category.top_parent.try(:id) %>)
|
111
|
+
<% end %>
|
112
|
+
</td>
|
113
|
+
</tr>
|
114
|
+
|
115
|
+
<tr>
|
116
|
+
<th>Status</th><td><%= @category.status %></td>
|
117
|
+
<th>Featured</th><td><%= @category.featured? ? "Yes" : "No" %></td>
|
118
|
+
</tr>
|
119
|
+
|
120
|
+
<tr>
|
121
|
+
<th>Priority</th><td><%= @category.priority %></td>
|
122
|
+
<th>End Node</th><td><%= @category.end_node? ? "Yes" : "No" %></td>
|
123
|
+
</tr>
|
124
|
+
|
125
|
+
<tr>
|
126
|
+
<th>Created At</th><td><%= @category.created_at.strftime("%m/%d/%Y - %H:%M:%S") if @category.created_at %></td>
|
127
|
+
<th>Updated At</th><td><%= @category.updated_at.strftime("%m/%d/%Y - %H:%M:%S") if @category.updated_at %></td>
|
128
|
+
</tr>
|
129
|
+
|
130
|
+
</tbody>
|
131
|
+
</table>
|
132
|
+
</div>
|
133
|
+
<% end %>
|
134
|
+
|
135
|
+
<%= link_to "Close", "#", onclick: "closeGenericModal();", class: "btn btn-primary pull-right" %>
|
109
136
|
|
110
137
|
<%= clear_tag %>
|
111
138
|
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<div class="row">
|
2
|
+
|
3
|
+
<div class="col-md-12">
|
4
|
+
|
5
|
+
<ul class="nav nav-tabs">
|
6
|
+
</ul>
|
7
|
+
<div class="tab-content">
|
8
|
+
<div class="tab-pane active">
|
9
|
+
|
10
|
+
<div id="div_category_types_index" class="row">
|
11
|
+
<%= render :partial=>"category_types" %>
|
12
|
+
</div>
|
13
|
+
<%= clear_tag(10) %>
|
14
|
+
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
|
18
|
+
</div>
|
19
|
+
|
20
|
+
</div>
|
@@ -3,27 +3,9 @@
|
|
3
3
|
<div class="col-md-12">
|
4
4
|
<div class="tabs-vertical-env">
|
5
5
|
|
6
|
-
<ul id="div_category_types" class="nav tabs-vertical">
|
7
|
-
<li class="<%= @category_type == "All" ? 'active' : '' %>">
|
8
|
-
<%= link_to "All", categories_path %>
|
9
|
-
</li>
|
10
|
-
<% @features.each do |feature| %>
|
11
|
-
<li class="<%= @category_type == feature.name ? 'active' : '' %>">
|
12
|
-
<%= link_to feature.display_name, categories_path(category_type: feature.name) %>
|
13
|
-
</li>
|
14
|
-
<% end %>
|
15
|
-
<% if @current_user.super_admin? %>
|
16
|
-
<li class="<%= @category_type == "none" ? 'active' : '' %>">
|
17
|
-
<%= link_to "None", categories_path(category_type: :none) %>
|
18
|
-
</li>
|
19
|
-
<li class="<%= @category_type == "all_including_children" ? 'active' : '' %>">
|
20
|
-
<%= link_to "All Including Children", categories_path(category_type: :all_including_children) %>
|
21
|
-
</li>
|
22
|
-
<% end %>
|
23
|
-
</ul>
|
24
|
-
|
25
6
|
<div class="tab-content">
|
26
7
|
<div class="tab-pane active" id="v-home">
|
8
|
+
|
27
9
|
<div id="div_category_index">
|
28
10
|
<%= render :partial=>"dhatu/categories/index" %>
|
29
11
|
</div>
|
@@ -1,21 +1,15 @@
|
|
1
1
|
<%
|
2
2
|
dhatu_items = {
|
3
|
-
|
4
|
-
text: "
|
5
|
-
icon_class: "fa-
|
6
|
-
url: dhatu.
|
7
|
-
has_permission: @current_user.has_read_permission?(Dhatu::
|
8
|
-
},
|
9
|
-
sections: {
|
10
|
-
text: "Sections",
|
11
|
-
icon_class: "fa-reorder",
|
12
|
-
url: dhatu.sections_url,
|
13
|
-
has_permission: @current_user.has_read_permission?(Dhatu::Section)
|
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)
|
14
8
|
},
|
15
9
|
categories: {
|
16
10
|
text: "Categories",
|
17
11
|
icon_class: "fa-sitemap",
|
18
|
-
url: dhatu.
|
12
|
+
url: dhatu.choose_category_type_url,
|
19
13
|
has_permission: @current_user.has_read_permission?(Dhatu::Category)
|
20
14
|
},
|
21
15
|
projects: {
|
@@ -30,30 +24,6 @@
|
|
30
24
|
url: dhatu.services_url,
|
31
25
|
has_permission: @current_user.has_read_permission?(Dhatu::Service)
|
32
26
|
},
|
33
|
-
promotions: {
|
34
|
-
text: "Promotions",
|
35
|
-
icon_class: "fa-gift",
|
36
|
-
url: dhatu.promotions_url,
|
37
|
-
has_permission: @current_user.has_read_permission?(Dhatu::Promotion)
|
38
|
-
},
|
39
|
-
promotion_enquiries: {
|
40
|
-
text: "Promotional Enquiries",
|
41
|
-
icon_class: "linecons-sound",
|
42
|
-
url: dhatu.promotion_enquiries_url,
|
43
|
-
has_permission: @current_user.has_read_permission?(Dhatu::PromotionEnquiry)
|
44
|
-
},
|
45
|
-
bookings: {
|
46
|
-
text: "Bookings",
|
47
|
-
icon_class: "fa-calendar",
|
48
|
-
url: dhatu.bookings_url,
|
49
|
-
has_permission: @current_user.has_read_permission?(Dhatu::Booking)
|
50
|
-
},
|
51
|
-
blog_posts: {
|
52
|
-
text: "Blog",
|
53
|
-
icon_class: "fa-newspaper-o",
|
54
|
-
url: dhatu.blog_posts_url,
|
55
|
-
has_permission: @current_user.has_read_permission?(Dhatu::BlogPost)
|
56
|
-
},
|
57
27
|
prices: {
|
58
28
|
text: "Prices",
|
59
29
|
icon_class: "fa-dollar",
|
@@ -66,12 +36,6 @@
|
|
66
36
|
url: dhatu.branches_url,
|
67
37
|
has_permission: @current_user.has_read_permission?(Dhatu::Branch)
|
68
38
|
},
|
69
|
-
offers: {
|
70
|
-
text: "Offers",
|
71
|
-
icon_class: "fa-gift",
|
72
|
-
url: dhatu.offers_url,
|
73
|
-
has_permission: @current_user.has_read_permission?(Dhatu::Offer)
|
74
|
-
},
|
75
39
|
events: {
|
76
40
|
text: "Events",
|
77
41
|
icon_class: "fa-calendar",
|
@@ -102,5 +66,52 @@
|
|
102
66
|
<hr class="mb-30" style="border-top:1px solid #ddd;">
|
103
67
|
|
104
68
|
<%= render partial: "/layouts/dashboard/items", locals: { items: dhatu_items } %>
|
69
|
+
<% end %>
|
70
|
+
|
71
|
+
|
72
|
+
<%
|
73
|
+
dhatu_marketing_items = {
|
74
|
+
promotions: {
|
75
|
+
text: "Promotions",
|
76
|
+
icon_class: "fa-gift",
|
77
|
+
url: dhatu.promotions_url,
|
78
|
+
has_permission: @current_user.has_read_permission?(Dhatu::Promotion)
|
79
|
+
},
|
80
|
+
promotion_enquiries: {
|
81
|
+
text: "Promotional Enquiries",
|
82
|
+
icon_class: "linecons-sound",
|
83
|
+
url: dhatu.promotion_enquiries_url,
|
84
|
+
has_permission: @current_user.has_read_permission?(Dhatu::PromotionEnquiry)
|
85
|
+
},
|
86
|
+
bookings: {
|
87
|
+
text: "Bookings",
|
88
|
+
icon_class: "fa-calendar",
|
89
|
+
url: dhatu.bookings_url,
|
90
|
+
has_permission: @current_user.has_read_permission?(Dhatu::Booking)
|
91
|
+
},
|
92
|
+
blog_posts: {
|
93
|
+
text: "Blog",
|
94
|
+
icon_class: "fa-newspaper-o",
|
95
|
+
url: dhatu.blog_posts_url,
|
96
|
+
has_permission: @current_user.has_read_permission?(Dhatu::BlogPost)
|
97
|
+
},
|
98
|
+
offers: {
|
99
|
+
text: "Offers",
|
100
|
+
icon_class: "fa-gift",
|
101
|
+
url: dhatu.offers_url,
|
102
|
+
has_permission: @current_user.has_read_permission?(Dhatu::Offer)
|
103
|
+
}
|
104
|
+
}
|
105
|
+
%>
|
106
|
+
|
107
|
+
<% if (dhatu_marketing_items.map{|x, y| y[:has_permission] }).compact.uniq.any? %>
|
108
|
+
|
109
|
+
<h3 class="text-gray mt-50 mb-10">
|
110
|
+
Marketing Elements <br>
|
111
|
+
<small class="text-muted">Manage All Elements of your websites and much more ...</small>
|
112
|
+
</h3>
|
113
|
+
<hr class="mb-30" style="border-top:1px solid #ddd;">
|
114
|
+
|
115
|
+
<%= render partial: "/layouts/dashboard/items", locals: { items: dhatu_marketing_items } %>
|
105
116
|
|
106
117
|
<% end %>
|
@@ -2,31 +2,33 @@
|
|
2
2
|
|
3
3
|
<div class="row">
|
4
4
|
|
5
|
-
<div class="col-md-
|
6
|
-
<% if display_edit_links? %>
|
7
|
-
<%= edit_image(@event,
|
8
|
-
"cover_image.image.large.url",
|
9
|
-
upload_image_link(@event, :cover_image, nil ),
|
10
|
-
remove_image_link(@event, :cover_image, nil ),
|
11
|
-
image_options: {assoc_name: :cover_image }) %>
|
12
|
-
<% else %>
|
13
|
-
<%= display_image(@event, "cover_image.image.large.url", class: "img-inline", alt: @event.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
|
-
|
5
|
+
<div class="col-md-9 col-sm-12 col-xs-12" style="border-right:1px solid #f1f1f1;">
|
19
6
|
<%= theme_panel_heading(@event.title) %>
|
20
|
-
|
21
7
|
<%= theme_panel_sub_heading(@event.venue, "#") if @event.venue %>
|
22
|
-
|
23
8
|
<%= clear_tag(10) %>
|
24
|
-
|
25
9
|
<%= display_publishable_status(@event) %>
|
26
|
-
|
27
10
|
<%= display_featured(@event) %>
|
28
|
-
|
29
11
|
<%= clear_tag(20) %>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<% if display_manage_links? %>
|
15
|
+
<div class="col-md-3 col-sm-12 col-xs-12">
|
16
|
+
<%= display_manage_buttons(@event) %>
|
17
|
+
<%= display_publishable_buttons(@event) %>
|
18
|
+
<%= display_featurable_buttons(@event) %>
|
19
|
+
</div>
|
20
|
+
<% end %>
|
21
|
+
|
22
|
+
</div>
|
23
|
+
|
24
|
+
<div class="row">
|
25
|
+
|
26
|
+
<div class="col-md-6 col-xs-12">
|
27
|
+
<%= clear_tag(40) %>
|
28
|
+
<div><strong class="fs-18">Service Details</strong></div>
|
29
|
+
<hr>
|
30
|
+
<strong>Description</strong><br><br>
|
31
|
+
<%= raw(@event.description) %>
|
30
32
|
|
31
33
|
<div class="table-responsive">
|
32
34
|
<table class="table table-striped table-condensed table-bordered">
|
@@ -35,13 +37,15 @@
|
|
35
37
|
<tr>
|
36
38
|
<th style="width:25%">Starts At</th>
|
37
39
|
<td style="width:25%"><%= time_tag(@event.starts_at) if @event.starts_at %></td>
|
40
|
+
<tr>
|
41
|
+
|
42
|
+
</tr>
|
38
43
|
<th style="width:25%">Ends At</th>
|
39
44
|
<td style="width:25%"><%= time_tag(@event.ends_at) if @event.ends_at %></td>
|
40
45
|
</tr>
|
41
46
|
|
42
47
|
<tr>
|
43
48
|
<th>Date</th><td><%= @event.date.strftime("%m/%d/%Y - %H:%M:%S") if @event.date %></td>
|
44
|
-
<th></th><td></td>
|
45
49
|
</tr>
|
46
50
|
|
47
51
|
</tbody>
|
@@ -49,69 +53,89 @@
|
|
49
53
|
</div>
|
50
54
|
</div>
|
51
55
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
56
|
+
<div class="col-md-6 col-xs-12">
|
57
|
+
<%= clear_tag(40) %>
|
58
|
+
<div><strong class="fs-18">Cover Image</strong></div>
|
59
|
+
<hr>
|
60
|
+
<div class="row">
|
61
|
+
<div class="col-md-6 col-sm-12 col-xs-12" style="border-right:1px solid #f1f1f1;">
|
62
|
+
<% if display_edit_links? %>
|
63
|
+
<%= edit_image(@event,
|
64
|
+
"cover_image.image.large.url",
|
65
|
+
upload_image_link(@event, :cover_image, nil ),
|
66
|
+
remove_image_link(@event, :cover_image, nil ),
|
67
|
+
image_options: {assoc_name: :cover_image }) %>
|
68
|
+
<% else %>
|
69
|
+
<%= display_image(@event, "cover_image.image.large.url", class: "img-inline", alt: @event.display_name) %>
|
70
|
+
<% end %>
|
71
|
+
</div>
|
72
|
+
</div>
|
57
73
|
</div>
|
58
|
-
<% end %>
|
59
|
-
|
60
74
|
</div>
|
61
75
|
|
62
|
-
<%= clear_tag(
|
63
|
-
|
64
|
-
<
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
</
|
70
|
-
|
71
|
-
|
72
|
-
<a href="#technical_details" data-toggle="tab" aria-expanded="false">
|
73
|
-
<span class="visible-xs"><i class="fa-database"></i></span>
|
74
|
-
<span class="hidden-xs">Technical Details</span>
|
75
|
-
</a>
|
76
|
-
</li>
|
77
|
-
</ul>
|
78
|
-
|
79
|
-
<div class="tab-content">
|
80
|
-
<div class="tab-pane active" id="event_details" style="border: 1px solid #000;min-height:200px;padding:20px;margin-bottom:20px;max-height: 400px;overflow-y: auto;">
|
81
|
-
|
82
|
-
<%= clear_tag(20) %>
|
83
|
-
<%= raw(@event.description) %>
|
84
|
-
<%= clear_tag(20) %>
|
85
|
-
|
76
|
+
<%= clear_tag(40) %>
|
77
|
+
<div><strong class="fs-18">Gallery Images</strong></div>
|
78
|
+
<hr>
|
79
|
+
<div id="div_event_images_buttons">
|
80
|
+
<div class="row">
|
81
|
+
<div class="col-md-6">
|
82
|
+
<%= theme_button('Upload a New Image', 'plus', upload_multiple_image_link(@event, :gallery_images, nil ), classes: "pull-left", btn_type: "white") %>
|
83
|
+
</div>
|
84
|
+
<div class="col-md-6">
|
85
|
+
</div>
|
86
86
|
</div>
|
87
|
+
</div>
|
88
|
+
<%= render :partial=>"kuppayam/images/multiple_images", locals: { images: @event.gallery_images } %>
|
89
|
+
|
90
|
+
<% if @current_user.has_read_permission?(Dhatu::MetaTag) %>
|
91
|
+
<%= clear_tag(40) %>
|
92
|
+
<div><strong class="fs-18">Meta Tags</strong></div>
|
93
|
+
<hr>
|
94
|
+
<div id="div_meta_tags_action_buttons">
|
95
|
+
<div class="row">
|
96
|
+
<div class="col-md-6">
|
97
|
+
<%= theme_button('Add a Meta Tag', 'plus', new_meta_tag_path(meta_taggable_id: @event.id, meta_taggable_type: @event.class.name), classes: "pull-left mr-10", btn_type: "success") if @current_user.has_create_permission?(Dhatu::MetaTag) %>
|
98
|
+
|
99
|
+
<%= theme_button('Refresh', 'refresh', meta_tags_path(meta_taggable_id: @event.id, meta_taggable_type: @event.class.name), classes: "pull-left mr-10", btn_type: "white") %>
|
100
|
+
</div>
|
101
|
+
<div class="col-md-6">
|
102
|
+
<%= search_form_kuppayam(User, meta_tags_path(meta_taggable_id: @event.id, meta_taggable_type: @event.class.name), text: "") %>
|
103
|
+
</div>
|
104
|
+
</div>
|
105
|
+
</div>
|
106
|
+
<%= clear_tag(10) %>
|
107
|
+
<div id="div_meta_tag_index">
|
108
|
+
<% meta_tags = @event.meta_tags.page(@current_page).per(@per_page) %>
|
109
|
+
<%= render :partial=>"dhatu/meta_tags/index", locals: {meta_tags: meta_tags, meta_taggable: @event } %>
|
110
|
+
</div>
|
111
|
+
<% end %>
|
87
112
|
|
88
|
-
|
89
|
-
|
90
|
-
|
113
|
+
<% if @current_user.super_admin? %>
|
114
|
+
<%= clear_tag(40) %>
|
115
|
+
<div><strong class="fs-18">Technical Details</strong></div>
|
116
|
+
<hr>
|
91
117
|
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
<tr>
|
97
|
-
<th>ID</th><td><%= @event.id %></td>
|
98
|
-
<th>Permalink</th><td><%= @event.to_param %></td>
|
99
|
-
</tr>
|
100
|
-
<tr>
|
101
|
-
<th>Featured</th><td><%= @event.featured %></td>
|
102
|
-
<th>Status</th><td><%= @event.status %></td>
|
103
|
-
</tr>
|
104
|
-
<tr>
|
105
|
-
<th>Created At</th><td><%= @event.created_at.strftime("%m/%d/%Y - %H:%M:%S") if @event.created_at %></td>
|
106
|
-
<th>Updated At</th><td><%= @event.updated_at.strftime("%m/%d/%Y - %H:%M:%S") if @event.updated_at %></td>
|
107
|
-
</tr>
|
108
|
-
|
109
|
-
</tbody>
|
110
|
-
</table>
|
111
|
-
</div>
|
118
|
+
<div class="table-responsive">
|
119
|
+
<table class="table table-striped table-condensed table-bordered mb-60">
|
120
|
+
<tbody>
|
112
121
|
|
113
|
-
|
122
|
+
<tr>
|
123
|
+
<th>ID</th><td><%= @event.id %></td>
|
124
|
+
<th>Permalink</th><td><%= @event.to_param %></td>
|
125
|
+
</tr>
|
126
|
+
<tr>
|
127
|
+
<th>Featured</th><td><%= @event.featured %></td>
|
128
|
+
<th>Status</th><td><%= @event.status %></td>
|
129
|
+
</tr>
|
130
|
+
<tr>
|
131
|
+
<th>Created At</th><td><%= @event.created_at.strftime("%m/%d/%Y - %H:%M:%S") if @event.created_at %></td>
|
132
|
+
<th>Updated At</th><td><%= @event.updated_at.strftime("%m/%d/%Y - %H:%M:%S") if @event.updated_at %></td>
|
133
|
+
</tr>
|
134
|
+
|
135
|
+
</tbody>
|
136
|
+
</table>
|
114
137
|
</div>
|
138
|
+
<% end %>
|
115
139
|
|
116
140
|
<%= link_to "Close", "#", onclick: "closeLargeModal();", class: "btn btn-primary pull-right" %>
|
117
141
|
|