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
@@ -7,10 +7,7 @@
|
|
7
7
|
<tr>
|
8
8
|
<th style="text-align: center;width:60px">#</th>
|
9
9
|
<th style="width:200px;">Name</th>
|
10
|
-
<th style="width:200px;">Data Type</th>
|
11
10
|
<th style="text-align: center;">Values</th>
|
12
|
-
<th style="width:80px;">Status</th>
|
13
|
-
<th style="width:80px;">Priority</th>
|
14
11
|
<th style="text-align: center;" colspan="2">Actions</th>
|
15
12
|
</tr>
|
16
13
|
</thead>
|
@@ -31,6 +28,7 @@
|
|
31
28
|
<td class="promotion_attribute-name">
|
32
29
|
<strong><%= link_to promotion_attribute.name, promotion_attribute_path(promotion_attribute), remote: true %></strong><br>
|
33
30
|
<%= content_tag :span, promotion_attribute.display_data_type, style: "color:chocolate;" %><br>
|
31
|
+
<%= display_publishable_status(promotion_attribute) %>
|
34
32
|
</td>
|
35
33
|
|
36
34
|
<td style="text-align: center;">
|
@@ -39,10 +37,6 @@
|
|
39
37
|
<% end %>
|
40
38
|
</td>
|
41
39
|
|
42
|
-
<td class="hidden-sm hidden-xs"><%= display_publishable_status(promotion_attribute) %></td>
|
43
|
-
|
44
|
-
<td class="hidden-sm hidden-xs"><%= promotion_attribute.priority %></td>
|
45
|
-
|
46
40
|
<% if display_manage_links? %>
|
47
41
|
<td class="action-links hidden-sm hidden-xs" style="width:10%">
|
48
42
|
<%= display_publishable_links(promotion_attribute) %>
|
@@ -11,6 +11,7 @@
|
|
11
11
|
<td class="promotion_attribute-name">
|
12
12
|
<strong><%= link_to promotion_attribute.name, promotion_attribute_path(promotion_attribute), remote: true %></strong><br>
|
13
13
|
<%= content_tag :span, promotion_attribute.display_data_type, style: "color:chocolate;" %><br>
|
14
|
+
<%= display_publishable_status(promotion_attribute) %>
|
14
15
|
</td>
|
15
16
|
|
16
17
|
<td style="text-align: center;">
|
@@ -19,10 +20,6 @@
|
|
19
20
|
<% end %>
|
20
21
|
</td>
|
21
22
|
|
22
|
-
<td class="hidden-sm hidden-xs"><%= display_publishable_status(promotion_attribute) %></td>
|
23
|
-
|
24
|
-
<td class="hidden-sm hidden-xs"><%= promotion_attribute.priority %></td>
|
25
|
-
|
26
23
|
<% if display_manage_links? %>
|
27
24
|
<td class="action-links hidden-sm hidden-xs" style="width:10%">
|
28
25
|
<%= display_publishable_links(promotion_attribute) %>
|
@@ -1,12 +1,10 @@
|
|
1
|
-
<div class="table-
|
1
|
+
<div class="table-responsive1">
|
2
2
|
<table class="table table-hover members-table middle-align">
|
3
3
|
<thead>
|
4
4
|
<tr>
|
5
|
-
<th style="text-align: center;width:8%">#</th>
|
6
|
-
<th>
|
7
|
-
<th>
|
8
|
-
<th>Phone</th>
|
9
|
-
<!-- <th style="width:100px;" class="hidden-sm hidden-xs">Status</th> -->
|
5
|
+
<th style="text-align: center;width:8%" class="hidden-sm hidden-xs">#</th>
|
6
|
+
<th>Enquiry</th>
|
7
|
+
<th class="hidden-sm hidden-xs">Promotion</th>
|
10
8
|
<% if display_manage_links? %>
|
11
9
|
<th style="text-align: center;" class="" >Actions</th>
|
12
10
|
<% end %>
|
@@ -17,7 +15,7 @@
|
|
17
15
|
<% @promotion_enquiries.each_with_index do |promotion_enquiry, i| %>
|
18
16
|
<tr id="tr_promotion_enquiry_<%= promotion_enquiry.id %>">
|
19
17
|
|
20
|
-
<th scope="row" style="text-align: center;">
|
18
|
+
<th scope="row" style="text-align: center;" class="hidden-sm hidden-xs">
|
21
19
|
<%= serial_number(i) %>
|
22
20
|
</th>
|
23
21
|
|
@@ -27,12 +25,14 @@
|
|
27
25
|
<% else %>
|
28
26
|
<%= link_to promotion_enquiry.name, promotion_enquiry_path(promotion_enquiry), remote: true %>
|
29
27
|
<% end %>
|
30
|
-
|
31
|
-
<%=
|
28
|
+
<%= content_tag(:div, promotion_enquiry.email) if promotion_enquiry.email %>
|
29
|
+
<%= content_tag(:div, promotion_enquiry.phone) if promotion_enquiry.phone %>
|
32
30
|
</td>
|
33
31
|
|
34
|
-
<td class=""
|
35
|
-
|
32
|
+
<td class="hidden-sm hidden-xs">
|
33
|
+
<%= content_tag(:div, promotion_enquiry.promotion.title, style: "color: chocolate") if promotion_enquiry.promotion %>
|
34
|
+
<%= time_ago_in_words(promotion_enquiry.created_at) + " ago" %>
|
35
|
+
</td>
|
36
36
|
|
37
37
|
<% if display_manage_links? %>
|
38
38
|
<td class="action-links" style="width:15%"><%= display_readable_links(promotion_enquiry) %></td>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<tr id="tr_promotion_enquiry_<%= promotion_enquiry.id %>">
|
2
2
|
|
3
|
-
<th scope="row" style="text-align: center;">
|
3
|
+
<th scope="row" style="text-align: center;" class="hidden-sm hidden-xs">
|
4
4
|
<%= serial_number(i) %>
|
5
5
|
</th>
|
6
6
|
|
@@ -10,12 +10,14 @@
|
|
10
10
|
<% else %>
|
11
11
|
<%= link_to promotion_enquiry.name, promotion_enquiry_path(promotion_enquiry), remote: true %>
|
12
12
|
<% end %>
|
13
|
-
|
14
|
-
<%=
|
13
|
+
<%= content_tag(:div, promotion_enquiry.email) if promotion_enquiry.email %>
|
14
|
+
<%= content_tag(:div, promotion_enquiry.phone) if promotion_enquiry.phone %>
|
15
15
|
</td>
|
16
16
|
|
17
|
-
<td class=""
|
18
|
-
|
17
|
+
<td class="hidden-sm hidden-xs">
|
18
|
+
<%= content_tag(:div, promotion_enquiry.promotion.title, style: "color: chocolate") if promotion_enquiry.promotion %>
|
19
|
+
<%= time_ago_in_words(promotion_enquiry.created_at) + " ago" %>
|
20
|
+
</td>
|
19
21
|
|
20
22
|
<% if display_manage_links? %>
|
21
23
|
<td class="action-links" style="width:15%"><%= display_readable_links(promotion_enquiry) %></td>
|
@@ -2,52 +2,11 @@
|
|
2
2
|
|
3
3
|
<div class="row">
|
4
4
|
|
5
|
-
<div class="col-md-8 col-sm-12 col-xs-12"
|
6
|
-
|
5
|
+
<div class="col-md-8 col-sm-12 col-xs-12">
|
7
6
|
<%= theme_panel_heading(@promotion_enquiry.name) %>
|
8
|
-
<%= theme_panel_description(@promotion_enquiry.
|
9
|
-
<%= theme_panel_description(@promotion_enquiry.phone) %>
|
7
|
+
<%= theme_panel_description(@promotion_enquiry.promotion.title) if @promotion_enquiry.promotion %>
|
10
8
|
<%= display_readable_status(@promotion_enquiry) %>
|
11
9
|
<%= clear_tag(10) %>
|
12
|
-
|
13
|
-
<div class="well">
|
14
|
-
<% @promotion_enquiry.additional_attributes.each do |k, v| %>
|
15
|
-
<div><strong><%= k %></strong>: <%= v %></div>
|
16
|
-
<% end %>
|
17
|
-
</div>
|
18
|
-
<%= clear_tag(10) %>
|
19
|
-
|
20
|
-
<% if @current_user.super_admin? %>
|
21
|
-
<div class="table-responsive">
|
22
|
-
<table class="table table-striped table-condensed table-bordered mb-60">
|
23
|
-
<tbody>
|
24
|
-
|
25
|
-
<tr>
|
26
|
-
<th>ID</th><td><%= @promotion_enquiry.id %></td>
|
27
|
-
</tr>
|
28
|
-
|
29
|
-
<tr>
|
30
|
-
<th></th><td></td>
|
31
|
-
</tr>
|
32
|
-
|
33
|
-
<tr>
|
34
|
-
<th>Status</th><td><%= @promotion_enquiry.status %></td>
|
35
|
-
</tr>
|
36
|
-
|
37
|
-
<tr>
|
38
|
-
<th>Created At</th><td><%= @promotion_enquiry.created_at.strftime("%m/%d/%Y - %H:%M:%S") if @promotion_enquiry.created_at %></td>
|
39
|
-
</tr>
|
40
|
-
|
41
|
-
<tr>
|
42
|
-
<th>Updated At</th><td><%= @promotion_enquiry.updated_at.strftime("%m/%d/%Y - %H:%M:%S") if @promotion_enquiry.updated_at %></td>
|
43
|
-
</tr>
|
44
|
-
|
45
|
-
</tbody>
|
46
|
-
</table>
|
47
|
-
</div>
|
48
|
-
<% end %>
|
49
|
-
|
50
|
-
<%= clear_tag(20) %>
|
51
10
|
</div>
|
52
11
|
|
53
12
|
<% if display_manage_links? %>
|
@@ -58,6 +17,39 @@
|
|
58
17
|
|
59
18
|
</div>
|
60
19
|
|
20
|
+
<%= clear_tag(20) %>
|
21
|
+
<div><strong class="fs-18">Enquiry Details</strong></div>
|
22
|
+
<hr>
|
23
|
+
<table class="table table-striped table-condensed table-bordered mb-60">
|
24
|
+
<tbody>
|
25
|
+
<tr><th>Name</th><td><%= @promotion_enquiry.name %></td></tr>
|
26
|
+
<tr><th>Phone</th><td><%= @promotion_enquiry.phone %></td></tr>
|
27
|
+
<tr><th>Email</th><td><%= @promotion_enquiry.email %></td></tr>
|
28
|
+
<% @promotion_enquiry.additional_attributes.each do |k, v| %>
|
29
|
+
<tr><th><%= k.titleize %></th><td><%= v %></td></tr>
|
30
|
+
<% end %>
|
31
|
+
</tbody>
|
32
|
+
</table>
|
33
|
+
|
34
|
+
<% if @current_user.super_admin? %>
|
35
|
+
<div><strong class="fs-18">Technical Details</strong></div>
|
36
|
+
<hr>
|
37
|
+
<table class="table table-striped table-condensed table-bordered mb-60">
|
38
|
+
<tbody>
|
39
|
+
|
40
|
+
<tr><th>ID</th><td><%= @promotion_enquiry.id %></td></tr>
|
41
|
+
|
42
|
+
<tr><th>Promotion</th><td><%= "#{@promotion_enquiry.promotion.title} (#{@promotion_enquiry.promotion.id})" if @promotion_enquiry.promotion %></td></tr>
|
43
|
+
|
44
|
+
<tr><th>Status</th><td><%= @promotion_enquiry.status %></td></tr>
|
45
|
+
|
46
|
+
<tr><th>Created At</th><td><%= @promotion_enquiry.created_at.strftime("%m/%d/%Y - %H:%M:%S") if @promotion_enquiry.created_at %></td></tr>
|
47
|
+
<tr><th>Updated At</th><td><%= @promotion_enquiry.updated_at.strftime("%m/%d/%Y - %H:%M:%S") if @promotion_enquiry.updated_at %></td></tr>
|
48
|
+
|
49
|
+
</tbody>
|
50
|
+
</table>
|
51
|
+
<% end %>
|
52
|
+
|
61
53
|
<%= link_to "Close", "#", onclick: "closeGenericModal();", class: "btn btn-primary pull-right" %>
|
62
54
|
|
63
55
|
<%= clear_tag %>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
<div class="tabs-vertical-env">
|
6
6
|
|
7
|
-
<ul id="div_category_types" class="nav tabs-vertical">
|
7
|
+
<ul id="div_category_types" class="nav tabs-vertical hidden-sm hidden-xs">
|
8
8
|
<% Readable::STATUS_REVERSE.keys.each do |st| %>
|
9
9
|
<% count_hsh = { "new" => @new_promotion_enquiries_count, "unread" => @unread_promotion_enquiries_count, "read" => @read_promotion_enquiries_count, "removed" => 0, "archived" => 0 } %>
|
10
10
|
<% badge_hsh = { "new" => "success", "unread" => "info", "read" => "default", "removed" => "", "archived" => "" } %>
|
@@ -20,17 +20,6 @@
|
|
20
20
|
<% end %>
|
21
21
|
</ul>
|
22
22
|
|
23
|
-
<!-- <ul class="nav nav-tabs nav-tabs-justified">
|
24
|
-
<%# Dhatu::PromotionEnquiry::STATUS.each do |key, value| %>
|
25
|
-
<li class="<%#= @status == value ? 'active' : '' %>">
|
26
|
-
<%#= link_to dhatu.promotion_enquiries_path(st: value), "aria-expanded" => "#{ @status == value ? 'true' : 'false' }" do %>
|
27
|
-
<span class="visible-xs"><i class="fa-gift"></i></span>
|
28
|
-
<span class="hidden-xs"><%#= key %></span>
|
29
|
-
<%# end %>
|
30
|
-
</li>
|
31
|
-
<%# end %>
|
32
|
-
</ul> -->
|
33
|
-
|
34
23
|
<div class="tab-content">
|
35
24
|
<div class="tab-pane active">
|
36
25
|
|
@@ -45,6 +34,25 @@
|
|
45
34
|
</div>
|
46
35
|
|
47
36
|
</div>
|
37
|
+
|
38
|
+
<div class="row">
|
39
|
+
<div class="col-md-12 visible-sm visible-xs mt-10">
|
40
|
+
</div>
|
41
|
+
<div class="col-md-12">
|
42
|
+
<% @filter_ui_settings.each do |filter_name, options| %>
|
43
|
+
<% if options[:object_filter] == true %>
|
44
|
+
<%= report_object_filter(filter_name, options) %>
|
45
|
+
<% end %>
|
46
|
+
<% end %>
|
47
|
+
</div>
|
48
|
+
<div class="col-md-12 visible-sm visible-xs">
|
49
|
+
<% @filter_ui_settings.each do |filter_name, options| %>
|
50
|
+
<% if options[:object_filter] == false %>
|
51
|
+
<%= report_filter(filter_name, options) %>
|
52
|
+
<% end %>
|
53
|
+
<% end %>
|
54
|
+
</div>
|
55
|
+
</div>
|
48
56
|
<%= clear_tag(10) %>
|
49
57
|
|
50
58
|
<div id="div_promotion_enquiry_index">
|
@@ -2,11 +2,8 @@
|
|
2
2
|
<thead>
|
3
3
|
<tr>
|
4
4
|
<th class="hidden-sm hidden-xs" style="text-align: center;width:5%">#</th>
|
5
|
-
<th
|
6
|
-
<th>
|
7
|
-
<th class="hidden-sm hidden-xs">Short Description</th>
|
8
|
-
<th style="width:100px;" class="hidden-sm hidden-xs">Featured</th>
|
9
|
-
<th style="width:100px;" class="hidden-sm hidden-xs">Status</th>
|
5
|
+
<th style="text-align: center;width:100px"><i class="fa fa-photo"></i></th>
|
6
|
+
<th>Promotion</th>
|
10
7
|
<% if display_manage_links? %>
|
11
8
|
<th style="text-align: center;" colspan="2" class="hidden-sm hidden-xs">Actions</th>
|
12
9
|
<% end %>
|
@@ -21,19 +18,20 @@
|
|
21
18
|
<%= serial_number(i) %>
|
22
19
|
</th>
|
23
20
|
|
24
|
-
<td class="display-image
|
25
|
-
<%=
|
21
|
+
<td class="display-image">
|
22
|
+
<%= display_thumbnail(promotion) %>
|
26
23
|
</td>
|
27
24
|
|
28
|
-
<td class="display-link"
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
25
|
+
<td class="display-link">
|
26
|
+
<%= link_to promotion.title, promotion_path(promotion), remote: true, style: "color:chocolate;font-size:16px;" %><br>
|
27
|
+
<p class="hidden-sm hidden-xs">
|
28
|
+
<%= link_to truncate(promotion.short_description, length: 100), promotion_path(promotion), remote: true %>
|
29
|
+
</p>
|
30
|
+
<%= display_featured(promotion) %>
|
31
|
+
<%= display_publishable_status(promotion) %>
|
32
|
+
</td>
|
35
33
|
|
36
|
-
|
34
|
+
<% if display_manage_links? %>
|
37
35
|
<td class="action-links hidden-sm hidden-xs" style="width:10%"><%= display_publishable_links(promotion) %></td>
|
38
36
|
|
39
37
|
<td class="action-links hidden-sm hidden-xs" style="width:10%">
|
@@ -4,17 +4,18 @@
|
|
4
4
|
<%= serial_number(i) %>
|
5
5
|
</th>
|
6
6
|
|
7
|
-
<td class="display-image
|
8
|
-
<%=
|
7
|
+
<td class="display-image">
|
8
|
+
<%= display_thumbnail(promotion) %>
|
9
9
|
</td>
|
10
10
|
|
11
|
-
<td class="display-link"
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
11
|
+
<td class="display-link">
|
12
|
+
<%= link_to promotion.title, promotion_path(promotion), remote: true, style: "color:chocolate;font-size:16px;" %><br>
|
13
|
+
<p class="hidden-sm hidden-xs">
|
14
|
+
<%= link_to truncate(promotion.short_description, length: 100), promotion_path(promotion), remote: true %>
|
15
|
+
</p>
|
16
|
+
<%= display_featured(promotion) %>
|
17
|
+
<%= display_publishable_status(promotion) %>
|
18
|
+
</td>
|
18
19
|
|
19
20
|
<% if display_manage_links? %>
|
20
21
|
<td class="action-links hidden-sm hidden-xs" style="width:10%"><%= display_publishable_links(promotion) %></td>
|
@@ -2,32 +2,130 @@
|
|
2
2
|
|
3
3
|
<div class="row">
|
4
4
|
|
5
|
-
<div class="col-md-
|
6
|
-
<% if display_edit_links? %>
|
7
|
-
<%= edit_image(@promotion,
|
8
|
-
"cover_image.image.large.url",
|
9
|
-
upload_image_link(@promotion, :cover_image, nil ),
|
10
|
-
remove_image_link(@promotion, :cover_image, nil ),
|
11
|
-
image_options: {assoc_name: :cover_image }) %>
|
12
|
-
<% else %>
|
13
|
-
<%= display_image(@promotion, "cover_image.image.large.url", class: "img-inline", alt: @promotion.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">
|
19
6
|
<%= theme_panel_heading(@promotion.title) %>
|
20
|
-
|
21
7
|
<%= theme_panel_sub_heading(@promotion.short_description, "#") if @promotion.short_description %>
|
22
|
-
|
23
8
|
<%= clear_tag(10) %>
|
24
|
-
|
25
9
|
<%= display_publishable_status(@promotion) %>
|
26
|
-
|
27
10
|
<%= display_featured(@promotion) %>
|
11
|
+
<%= clear_tag(20) %>
|
28
12
|
|
13
|
+
<%
|
14
|
+
new_count = @promotion.promotion_enquiries.status(:new).count
|
15
|
+
unread_count = @promotion.promotion_enquiries.unread.count
|
16
|
+
read_count = @promotion.promotion_enquiries.read.count
|
17
|
+
archived_count = @promotion.promotion_enquiries.archived.count
|
18
|
+
|
19
|
+
new_url = promotion_enquiries_url(pr: @promotion.id, st: :new)
|
20
|
+
unread_url = promotion_enquiries_url(pr: @promotion.id, st: :unread)
|
21
|
+
read_url = promotion_enquiries_url(pr: @promotion.id, st: :read)
|
22
|
+
archived_url = promotion_enquiries_url(pr: @promotion.id, st: :archived)
|
23
|
+
%>
|
29
24
|
<%= clear_tag(20) %>
|
25
|
+
</div>
|
26
|
+
|
27
|
+
<% if display_manage_links? %>
|
28
|
+
<div class="col-md-3 col-sm-12 col-xs-12">
|
29
|
+
<%= display_manage_buttons(@promotion) %>
|
30
|
+
<%= display_publishable_buttons(@promotion) %>
|
31
|
+
<%= display_featurable_buttons(@promotion) %>
|
32
|
+
</div>
|
33
|
+
<% end %>
|
34
|
+
|
35
|
+
</div>
|
36
|
+
|
37
|
+
<%= clear_tag(60) %>
|
38
|
+
<div class="row">
|
39
|
+
<div class="col-md-12">
|
40
|
+
<div><strong class="fs-18">Promotional Enquiries</strong></div>
|
41
|
+
<hr>
|
42
|
+
</div>
|
43
|
+
<div class="col-sm-3 col-xs-6" style="padding:0px;">
|
44
|
+
<div class="row p-20">
|
45
|
+
<div class="col-sm-4 col-xs-4">
|
46
|
+
<%= link_to new_url, target: "_blank" do %>
|
47
|
+
<i class="count-icon fa-envelope count-icon-new"></i>
|
48
|
+
<% end %>
|
49
|
+
</div>
|
50
|
+
<div class="col-sm-8 col-xs-8">
|
51
|
+
<%= link_to new_url, target: "_blank" do %>
|
52
|
+
<strong class="count-title"><%= new_count %></strong><br>
|
53
|
+
<span class="count-sub-title">New</span>
|
54
|
+
<% end %>
|
55
|
+
</div>
|
56
|
+
</div>
|
57
|
+
</div>
|
58
|
+
<div class="col-sm-3 col-xs-6" style="padding:0px;">
|
59
|
+
<div class="row p-20">
|
60
|
+
<div class="col-sm-4 col-xs-4">
|
61
|
+
<%= link_to unread_url, target: "_blank" do %>
|
62
|
+
<i class="count-icon fa-envelope count-icon-unread"></i>
|
63
|
+
<% end %>
|
64
|
+
</div>
|
65
|
+
<div class="col-sm-8 col-xs-8">
|
66
|
+
<%= link_to unread_url, target: "_blank" do %>
|
67
|
+
<strong class="count-title"><%= unread_count %></strong><br>
|
68
|
+
<span class="count-sub-title">Unread</span>
|
69
|
+
<% end %>
|
70
|
+
</div>
|
71
|
+
</div>
|
72
|
+
</div>
|
73
|
+
<div class="col-sm-3 col-xs-6" style="padding:0px;">
|
74
|
+
<div class="row p-20">
|
75
|
+
<div class="col-sm-4 col-xs-4">
|
76
|
+
<%= link_to read_url, target: "_blank" do %>
|
77
|
+
<i class="count-icon fa-envelope count-icon-read"></i>
|
78
|
+
<% end %>
|
79
|
+
</div>
|
80
|
+
<div class="col-sm-8 col-xs-8">
|
81
|
+
<%= link_to read_url, target: "_blank" do %>
|
82
|
+
<strong class="count-title"><%= read_count %></strong><br>
|
83
|
+
<span class="count-sub-title">Read</span>
|
84
|
+
<% end %>
|
85
|
+
</div>
|
86
|
+
</div>
|
87
|
+
</div>
|
88
|
+
<div class="col-sm-3 col-xs-6" style="padding:0px;">
|
89
|
+
<div class="row p-20">
|
90
|
+
<div class="col-sm-4 col-xs-4">
|
91
|
+
<%= link_to archived_url, target: "_blank" do %>
|
92
|
+
<i class="count-icon fa-envelope count-icon-archived"></i>
|
93
|
+
<% end %>
|
94
|
+
</div>
|
95
|
+
<div class="col-sm-8 col-xs-8">
|
96
|
+
<%= link_to archived_url, target: "_blank" do %>
|
97
|
+
<strong class="count-title"><%= archived_count %></strong><br>
|
98
|
+
<span class="count-sub-title">Archived</span>
|
99
|
+
<% end %>
|
100
|
+
</div>
|
101
|
+
</div>
|
102
|
+
</div>
|
103
|
+
</div>
|
104
|
+
|
105
|
+
<div class="row">
|
106
|
+
<div class="col-md-6 col-xs-12">
|
107
|
+
<%= clear_tag(60) %>
|
108
|
+
<div><strong class="fs-18">Popup Image</strong></div>
|
109
|
+
<hr>
|
110
|
+
<div class="row">
|
111
|
+
<div class="col-md-12 col-sm-12 col-xs-12" style="border-right:1px solid #f1f1f1;">
|
112
|
+
<% if display_edit_links? %>
|
113
|
+
<%= edit_image(@promotion,
|
114
|
+
"cover_image.image.large.url",
|
115
|
+
upload_image_link(@promotion, :cover_image, nil ),
|
116
|
+
remove_image_link(@promotion, :cover_image, nil ),
|
117
|
+
image_options: {assoc_name: :cover_image }) %>
|
118
|
+
<% else %>
|
119
|
+
<%= display_image(@promotion, "cover_image.image.large.url", class: "img-inline", alt: @promotion.display_name) %>
|
120
|
+
<% end %>
|
121
|
+
</div>
|
122
|
+
</div>
|
123
|
+
</div>
|
30
124
|
|
125
|
+
<div class="col-md-6 col-xs-12">
|
126
|
+
<%= clear_tag(60) %>
|
127
|
+
<div><strong class="fs-18">Promotion Details</strong></div>
|
128
|
+
<hr>
|
31
129
|
<table class="table table-condensed table-bordered mb-20">
|
32
130
|
<tbody>
|
33
131
|
|
@@ -85,94 +183,93 @@
|
|
85
183
|
</tbody>
|
86
184
|
</table>
|
87
185
|
</div>
|
88
|
-
|
89
|
-
<% if display_manage_links? %>
|
90
|
-
<div class="col-md-3 col-sm-12 col-xs-12">
|
91
|
-
<%= display_manage_buttons(@promotion) %>
|
92
|
-
<%= display_publishable_buttons(@promotion) %>
|
93
|
-
<%= display_featurable_buttons(@promotion) %>
|
94
|
-
</div>
|
95
|
-
<% end %>
|
96
|
-
|
97
186
|
</div>
|
98
187
|
|
188
|
+
<%= clear_tag(60) %>
|
189
|
+
<div><strong class="fs-18">Additional Form Fields</strong></div>
|
99
190
|
<hr>
|
191
|
+
<div id="div_promotion_attribute_action_buttons">
|
192
|
+
<div class="row">
|
193
|
+
<div class="col-md-6">
|
100
194
|
|
101
|
-
|
195
|
+
<%= theme_button('Add a Form Fields', 'plus', new_promotion_attribute_path(pr: @promotion.id), classes: "pull-left", btn_type: "success") %>
|
102
196
|
|
103
|
-
|
104
|
-
|
105
|
-
<ul class="nav nav-pills">
|
106
|
-
<li class="active">
|
107
|
-
<a href="#technical_details" data-toggle="tab" aria-expanded="false">
|
108
|
-
<span class="visible-xs"><i class="fa-database"></i></span>
|
109
|
-
<span class="hidden-xs">Technical Details</span>
|
110
|
-
</a>
|
111
|
-
</li>
|
112
|
-
|
113
|
-
<li class="">
|
114
|
-
<a href="#additional_attributes" data-toggle="tab" aria-expanded="false">
|
115
|
-
<span class="visible-xs"><i class="fa-database"></i></span>
|
116
|
-
<span class="hidden-xs">Additional Attributes</span>
|
117
|
-
</a>
|
118
|
-
</li>
|
119
|
-
</ul>
|
120
|
-
|
121
|
-
<div class="tab-content">
|
122
|
-
<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;">
|
123
|
-
|
124
|
-
<%= clear_tag(20) %>
|
197
|
+
<%= theme_button('Refresh', 'refresh', promotion_attributes_path(pr: @promotion.id), classes: "pull-left ml-10", btn_type: "white") %>
|
125
198
|
|
126
|
-
<div class="table-responsive">
|
127
|
-
<table class="table table-striped table-condensed table-bordered mb-60">
|
128
|
-
<tbody>
|
129
|
-
|
130
|
-
<tr>
|
131
|
-
<th>ID</th><td><%= @promotion.id %></td>
|
132
|
-
<th>Code</th><td><%= @promotion.code %></td>
|
133
|
-
</tr>
|
134
|
-
<tr>
|
135
|
-
<th>Featured</th><td><%= @promotion.featured %></td>
|
136
|
-
<th>Status</th><td><%= @promotion.status %></td>
|
137
|
-
</tr>
|
138
|
-
<tr>
|
139
|
-
<th>Created At</th><td><%= @promotion.created_at.strftime("%m/%d/%Y - %H:%M:%S") if @promotion.created_at %></td>
|
140
|
-
<th>Updated At</th><td><%= @promotion.updated_at.strftime("%m/%d/%Y - %H:%M:%S") if @promotion.updated_at %></td>
|
141
|
-
</tr>
|
142
|
-
|
143
|
-
</tbody>
|
144
|
-
</table>
|
145
199
|
</div>
|
146
|
-
|
200
|
+
<div class="col-md-6"></div>
|
147
201
|
</div>
|
202
|
+
</div>
|
203
|
+
<%= clear_tag(10) %>
|
148
204
|
|
149
|
-
|
150
|
-
|
151
|
-
<%= clear_tag(20) %>
|
152
|
-
|
153
|
-
<div id="div_promotion_attribute_action_buttons">
|
154
|
-
<div class="row">
|
155
|
-
<div class="col-md-6">
|
156
|
-
|
157
|
-
<%= theme_button('Add a Promotion Attribute', 'plus', new_promotion_attribute_path(pr: @promotion.id), classes: "pull-left", btn_type: "success") %>
|
158
|
-
|
159
|
-
<%= theme_button('Refresh', 'refresh', promotion_attributes_path(pr: @promotion.id), classes: "pull-left ml-10", btn_type: "white") %>
|
160
|
-
|
161
|
-
</div>
|
162
|
-
<div class="col-md-6"></div>
|
163
|
-
</div>
|
164
|
-
</div>
|
165
|
-
<%= clear_tag(10) %>
|
166
|
-
|
167
|
-
<div id="div_promotion_attribute_index">
|
168
|
-
<%= render :partial=>"dhatu/promotion_attributes/index" %>
|
169
|
-
</div>
|
170
|
-
<%= clear_tag(10) %>
|
171
|
-
</div>
|
205
|
+
<div id="div_promotion_attribute_index">
|
206
|
+
<%= render :partial=>"dhatu/promotion_attributes/index" %>
|
172
207
|
</div>
|
208
|
+
|
209
|
+
|
210
|
+
<% if @current_user.super_admin? %>
|
211
|
+
<%= clear_tag(60) %>
|
212
|
+
<div><strong class="fs-18">Technical Details</strong></div>
|
213
|
+
<hr>
|
214
|
+
<table class="table table-striped table-condensed table-bordered mb-60">
|
215
|
+
<tbody>
|
216
|
+
|
217
|
+
<tr>
|
218
|
+
<th>ID</th><td><%= @promotion.id %></td>
|
219
|
+
<th>Code</th><td><%= @promotion.code %></td>
|
220
|
+
</tr>
|
221
|
+
<tr>
|
222
|
+
<th>Featured</th><td><%= @promotion.featured %></td>
|
223
|
+
<th>Status</th><td><%= @promotion.status %></td>
|
224
|
+
</tr>
|
225
|
+
<tr>
|
226
|
+
<th>Created At</th><td><%= @promotion.created_at.strftime("%m/%d/%Y - %H:%M:%S") if @promotion.created_at %></td>
|
227
|
+
<th>Updated At</th><td><%= @promotion.updated_at.strftime("%m/%d/%Y - %H:%M:%S") if @promotion.updated_at %></td>
|
228
|
+
</tr>
|
229
|
+
|
230
|
+
</tbody>
|
231
|
+
</table>
|
232
|
+
<% end %>
|
173
233
|
|
174
234
|
<%= link_to "Close", "#", onclick: "closeLargeModal();", class: "btn btn-primary pull-right" %>
|
175
235
|
|
176
236
|
<%= clear_tag %>
|
177
237
|
|
178
238
|
</div>
|
239
|
+
|
240
|
+
<style type="text/css">
|
241
|
+
.count-icon {
|
242
|
+
display: block;
|
243
|
+
background: #898989;
|
244
|
+
color: #fff;
|
245
|
+
text-align: center;
|
246
|
+
font-size: 25px;
|
247
|
+
line-height: 50px;
|
248
|
+
width: 50px;
|
249
|
+
height: 50px;
|
250
|
+
-webkit-border-radius: 50%;
|
251
|
+
-webkit-background-clip: padding-box;
|
252
|
+
-moz-border-radius: 50%;
|
253
|
+
-moz-background-clip: padding;
|
254
|
+
border-radius: 50%;
|
255
|
+
background-clip: padding-box;
|
256
|
+
}
|
257
|
+
.count-icon-new {
|
258
|
+
background: #40bbea;
|
259
|
+
}
|
260
|
+
.count-icon-unread {
|
261
|
+
background: #68b828;
|
262
|
+
}
|
263
|
+
.count-icon-read {
|
264
|
+
background: #4b4b4b;
|
265
|
+
}
|
266
|
+
.count-icon-archived {
|
267
|
+
background: #898989;
|
268
|
+
}
|
269
|
+
.count-title {
|
270
|
+
font-size:20px;
|
271
|
+
}
|
272
|
+
.count-sub-title {
|
273
|
+
font-size:14px;
|
274
|
+
}
|
275
|
+
</style>
|