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
@@ -2,15 +2,7 @@
2
2
 
3
3
  <div class="col-md-12">
4
4
 
5
- <ul class="nav nav-tabs nav-tabs-justified">
6
- <% Dhatu::Event::STATUS.each do |key, value| %>
7
- <li class="<%= @status == value ? 'active' : '' %>">
8
- <%= link_to events_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 %>
5
+ <ul class="nav nav-tabs nav-tabs-justified">
14
6
  </ul>
15
7
  <div class="tab-content">
16
8
  <div class="tab-pane active">
@@ -27,6 +19,19 @@
27
19
  <%= search_form_kuppayam(Dhatu::Event, events_path, text: @filters[:query]) %>
28
20
  </div>
29
21
  </div>
22
+ <div class="row">
23
+ <div class="col-md-12 visible-sm visible-xs mt-10">
24
+ </div>
25
+ <div class="col-md-12">
26
+ <% @filter_ui_settings.each do |filter_name, options| %>
27
+ <% if options[:object_filter] == true %>
28
+ <%= report_object_filter(filter_name, options) %>
29
+ <% else %>
30
+ <%= report_filter(filter_name, options) %>
31
+ <% end %>
32
+ <% end %>
33
+ </div>
34
+ </div>
30
35
 
31
36
  </div>
32
37
  <%= clear_tag(10) %>
@@ -0,0 +1,48 @@
1
+ <%= form_for(@meta_tag,
2
+ :url => (@meta_tag.new_record? ? dhatu.meta_tags_path(meta_taggable_id: @meta_taggable.id, meta_taggable_type: @meta_taggable.class.name) : dhatu.meta_tag_path(meta_taggable_id: @meta_taggable.id, meta_taggable_type: @meta_taggable.class.name)),
3
+ :method => (@meta_tag.new_record? ? :post : :put),
4
+ :remote => true,
5
+ :html => {:id=>"form_page", :class=>"mb-0 form-horizontal"}) do |f| %>
6
+
7
+ <%= hidden_field_tag :meta_taggable_id, params[:meta_taggable_id] %>
8
+
9
+ <%= hidden_field_tag :meta_taggable_type, params[:meta_taggable_type] %>
10
+
11
+ <div id="page_form_error">
12
+ <%= @meta_tag.errors[:base].to_sentence %>
13
+ </div>
14
+
15
+ <div class="form-inputs m-15">
16
+
17
+ <div class="row">
18
+ <div class="col-md-12 pr-20">
19
+ <% options_list = Array[*Dhatu::MetaTag::META_TYPES.map {|i| [i,i] }] %>
20
+
21
+ <%= theme_form_select_group(@meta_tag, :meta_type, options_list, param_name: "dhatu/meta_tag[meta_type]", label: "Choose Type", prompt: "Select Type", include_blank: true, form_style: "top-bottom") %>
22
+ </div>
23
+ </div>
24
+ <div class="row">
25
+ <div class="col-md-12 pr-20">
26
+ <%= theme_form_field(@meta_tag, :meta_key, form_style: "top-bottom") %>
27
+ </div>
28
+ </div>
29
+
30
+ <div class="row">
31
+ <div class="col-md-12 pl-20">
32
+ <%= theme_form_field(@meta_tag, :meta_value, form_style: "top-bottom", html_options: {"data-id": @meta_tag.id.to_s, type: "textarea", height: "400px"}) %>
33
+ </div>
34
+ </div>
35
+
36
+ </div>
37
+
38
+ <div>
39
+ <%= submit_tag("Save", :class=>"btn btn-primary pull-right ml-10") %>
40
+
41
+ <%= link_to raw("<i class='fa fa-close mr-5'></i><span>Cancel</span>"), "#", onclick: "closeGenericModal();", class: "pull-right btn btn-white" %>
42
+ </div>
43
+
44
+ <%= clear_tag %>
45
+ </div>
46
+
47
+ <% end %>
48
+
@@ -0,0 +1,59 @@
1
+ <div class="table-responsive">
2
+ <table class="table table-hover members-table middle-align">
3
+ <thead>
4
+ <tr>
5
+ <th style=";width:60px" class="hidden-sm hidden-xs">#</th>
6
+ <th>Meta Key</th>
7
+ <th>Meta Value</th>
8
+ <th>Meta Type</th>
9
+ <% if display_manage_links? %>
10
+ <th style="text-align: center;" class="hidden-sm hidden-xs" colspan="2">Actions</th>
11
+ <% end %>
12
+ </tr>
13
+ </thead>
14
+
15
+ <tbody>
16
+ <% meta_tags.each_with_index do |meta_tag, i| %>
17
+ <tr id="tr_meta_tag_<%= meta_tag.id %>">
18
+
19
+ <th scope="row" style="" class="hidden-sm hidden-xs">
20
+ <% if i < 0 %>
21
+ <i class="fa fa-check text-success"></i>
22
+ <% else %>
23
+ <%= i + 1 + (@per_meta_tag.to_i * (@current_meta_tag.to_i - 1)) %>
24
+ <% end %>
25
+ </th>
26
+
27
+ <td><%= link_to meta_tag.meta_key, "#" %></td>
28
+ <td><%= link_to meta_tag.meta_value, "#" %></td>
29
+ <td><%= link_to meta_tag.meta_type, "#", style: "color: darkred;" %></td>
30
+
31
+ <% if display_manage_links? %>
32
+
33
+ <td class="action-links hidden-sm hidden-xs" style="width:10%"><%= display_publishable_links(meta_tag,
34
+ publish_link: url_for(action: 'update_status', controller: 'dhatu/meta_tags', id: meta_tag.id, meta_taggable_id: meta_taggable.id, meta_taggable_type: meta_taggable.class.name, status: "published"),
35
+ unpublish_link: url_for(action: 'update_status', controller: 'dhatu/meta_tags', id: meta_tag.id, meta_taggable_id: meta_taggable.id, meta_taggable_type: meta_taggable.class.name, status: "unpublished"),
36
+ remove_link: url_for(action: 'update_status', controller: 'dhatu/meta_tags', id: meta_tag.id, meta_taggable_id: meta_taggable.id, meta_taggable_type: meta_taggable.class.name, status: "removed"),
37
+ archive_link: url_for(action: 'update_status', controller: 'dhatu/meta_tags', id: meta_tag.id, meta_taggable_id: meta_taggable.id, meta_taggable_type: meta_taggable.class.name, status: "archived"))
38
+ %></td>
39
+
40
+ <td class="action-links hidden-sm hidden-xs" style="width:10%">
41
+ <%= display_manage_links(
42
+ meta_tag, @current_user,
43
+ edit_link: url_for(action: "edit", controller: 'dhatu/meta_tags', id: meta_tag.id, meta_taggable_id: meta_taggable.id, meta_taggable_type: meta_taggable.class.name),
44
+ delete_link: url_for(action: "destroy", controller: 'dhatu/meta_tags', id: meta_tag.id, meta_taggable_id: meta_taggable.id, meta_taggable_type: meta_taggable.class.name)) %>
45
+ </td>
46
+ <% end %>
47
+
48
+ </tr>
49
+ <% end %>
50
+ </tbody>
51
+ </table>
52
+ </div>
53
+
54
+ <div class="row">
55
+ <div class="col-sm-12">
56
+ <%= paginate_kuppayam(meta_tags, params: { controller: "dhatu/meta_tags", action: 'index', meta_taggable_id: meta_taggable.id, meta_taggable_type: meta_taggable.class.name } ) %>
57
+ </div>
58
+ </div>
59
+
@@ -0,0 +1,32 @@
1
+ <tr id="tr_meta_tag_<%= meta_tag.id %>">
2
+
3
+ <th scope="row" style="" class="hidden-sm hidden-xs">
4
+ <% if i < 0 %>
5
+ <i class="fa fa-check text-success"></i>
6
+ <% else %>
7
+ <%= i + 1 + (@per_meta_tag.to_i * (@current_meta_tag.to_i - 1)) %>
8
+ <% end %>
9
+ </th>
10
+
11
+ <td><%= link_to meta_tag.meta_key, "#" %></td>
12
+ <td><%= link_to meta_tag.meta_value, "#" %></td>
13
+ <td><%= link_to meta_tag.meta_type, "#", style: "color: darkred;" %></td>
14
+
15
+ <% if display_manage_links? %>
16
+
17
+ <td class="action-links hidden-sm hidden-xs" style="width:10%"><%= display_publishable_links(meta_tag,
18
+ publish_link: url_for(action: 'update_status', controller: 'dhatu/meta_tags', id: meta_tag.id, meta_taggable_id: meta_taggable.id, meta_taggable_type: meta_taggable.class.name, status: "published"),
19
+ unpublish_link: url_for(action: 'update_status', controller: 'dhatu/meta_tags', id: meta_tag.id, meta_taggable_id: meta_taggable.id, meta_taggable_type: meta_taggable.class.name, status: "unpublished"),
20
+ remove_link: url_for(action: 'update_status', controller: 'dhatu/meta_tags', id: meta_tag.id, meta_taggable_id: meta_taggable.id, meta_taggable_type: meta_taggable.class.name, status: "removed"),
21
+ archive_link: url_for(action: 'update_status', controller: 'dhatu/meta_tags', id: meta_tag.id, meta_taggable_id: meta_taggable.id, meta_taggable_type: meta_taggable.class.name, status: "archived"))
22
+ %></td>
23
+
24
+ <td class="action-links hidden-sm hidden-xs" style="width:10%">
25
+ <%= display_manage_links(
26
+ meta_tag, @current_user,
27
+ edit_link: url_for(action: "edit", controller: 'dhatu/meta_tags', id: meta_tag.id, meta_taggable_id: meta_taggable.id, meta_taggable_type: meta_taggable.class.name),
28
+ delete_link: url_for(action: "destroy", controller: 'dhatu/meta_tags', id: meta_tag.id, meta_taggable_id: meta_taggable.id, meta_taggable_type: meta_taggable.class.name)) %>
29
+ </td>
30
+ <% end %>
31
+
32
+ </tr>
@@ -0,0 +1,29 @@
1
+ <% if @r_object.errors.blank? %>
2
+
3
+ // Inserting the row on top of the table and highlighting it
4
+ $('#div_<%= @resource_options[:item_name] %>_index table > tbody').prepend("<%= escape_javascript(render(:partial=>"#{@resource_options[:view_path]}/row", locals: {@resource_options[:item_name].to_sym => @r_object, meta_taggable: @meta_taggable, i: -1})) %>");
5
+ $("#tr_<%= @resource_options[:item_name] %>_<%= @r_object.id %>").css("background-color", "#fffddd");
6
+
7
+ // Closing the modal if it is opened
8
+ closeLargeModal();
9
+
10
+ // Showing Growl Like Message
11
+ notifySuccess("<%= escape_javascript(@notification[:title]) %>", "<%= escape_javascript(@notification[:message]) %>");
12
+
13
+ <% else %>
14
+
15
+ // Reload the form with errors
16
+ var heading = "Add <%= @resource_options[:item_name] %>";
17
+ var bodyContent = "<%= escape_javascript(render(:partial=>"#{@resource_options[:view_path]}/form", locals: {meta_taggable: @meta_taggable})) %>";
18
+ showLargeModal(heading, bodyContent, true);
19
+
20
+ // Show Main Error Message on the form
21
+ <% error_message = content_tag(:div, I18n.t('errors.errors_highlighted'), class: "alert alert-danger mt-20") %>
22
+ $("#<%= @resource_options[:item_name] %>_form_error").html("<%= escape_javascript(error_message) %>");
23
+
24
+ // Showing Growl Like Message
25
+ notifyError("<%= escape_javascript(@notification[:title]) %>", "<%= escape_javascript(raw(@notification[:message])) %>");
26
+
27
+ <% end %>
28
+
29
+
@@ -2,9 +2,8 @@
2
2
  <thead>
3
3
  <tr>
4
4
  <th style="text-align: center;width:5%" class="hidden-sm hidden-xs">#</th>
5
- <th style="text-align: center;width:100px" class="hidden-sm hidden-xs"><i class="fa fa-photo"></i></th>
6
- <th>Offer Title</th>
7
- <th class="hidden-sm hidden-xs">Offer Text</th>
5
+ <th style="text-align: center;width:100px"><i class="fa fa-photo"></i></th>
6
+ <th>Offer</th>
8
7
  <th style="width:100px;" class="hidden-sm hidden-xs">Featured</th>
9
8
  <th style="width:100px;" class="hidden-sm hidden-xs">Status</th>
10
9
  <% if display_manage_links? %>
@@ -21,13 +20,14 @@
21
20
  <%= serial_number(i) %>
22
21
  </th>
23
22
 
24
- <td class="display-image hidden-sm hidden-xs">
25
- <%= display_thumbnail_small(offer) %>
23
+ <td class="display-image">
24
+ <%= display_thumbnail(offer) %>
26
25
  </td>
27
26
 
28
- <td class="display-link"><%= link_to offer.title, offer_path(offer), remote: true %></td>
29
-
30
- <td class="display-link hidden-sm hidden-xs"><%= link_to offer.offer_text, offer_path(offer), remote: true %></td>
27
+ <td class="display-link">
28
+ <%= link_to offer.title, offer_path(offer), remote: true, style: "font-weight:bold;color:#4b4b4b;" %><br>
29
+ <%= link_to offer.offer_text, offer_path(offer), remote: true %>
30
+ </td>
31
31
 
32
32
  <td class="hidden-sm hidden-xs"><%= display_featured(offer) %></td>
33
33
 
@@ -5,7 +5,7 @@
5
5
  </th>
6
6
 
7
7
  <td class="display-image hidden-sm hidden-xs">
8
- <%= display_thumbnail_small(offer) %>
8
+ <%= display_thumbnail(offer) %>
9
9
  </td>
10
10
 
11
11
  <td class="display-link"><%= link_to offer.title, offer_path(offer), remote: true %></td>
@@ -2,114 +2,118 @@
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(@offer,
8
- "cover_image.image.large.url",
9
- upload_image_link(@offer, :cover_image, nil ),
10
- remove_image_link(@offer, :cover_image, nil ),
11
- image_options: {assoc_name: :cover_image }) %>
12
- <% else %>
13
- <%= display_image(@offer, "cover_image.image.large.url", class: "img-inline", alt: @offer.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;">
5
+ <div class="col-md-9 col-sm-12 col-xs-12" style="border-right:1px solid #f1f1f1;">
18
6
 
19
7
  <%= theme_panel_heading(@offer.title) %>
20
-
21
8
  <%= theme_panel_sub_heading(@offer.offer_text, "#") if @offer.offer_text %>
22
-
23
9
  <%= clear_tag(10) %>
24
-
25
10
  <%= display_publishable_status(@offer) %>
26
-
27
11
  <%= display_featured(@offer) %>
28
-
29
12
  <%= clear_tag(20) %>
13
+ </div>
14
+
15
+ <% if display_manage_links? %>
16
+ <div class="col-md-3 col-sm-12 col-xs-12">
17
+ <%= display_manage_buttons(@offer) %>
18
+ <%= display_publishable_buttons(@offer) %>
19
+ <%= display_featurable_buttons(@offer) %>
20
+ </div>
21
+ <% end %>
22
+ </div>
30
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">Offer Details</strong></div>
29
+ <hr>
30
+ <strong>Description</strong><br><br>
31
+ <%= raw(@offer.description) %>
32
+ <%= clear_tag(20) %>
31
33
  <table class="table table-condensed table-bordered mb-20">
32
34
  <tbody>
33
-
34
35
  <tr>
35
36
  <th style="width:25%">Starts At</th>
36
37
  <td style="width:25%"><%= time_tag(@offer.starts_at) if @offer.starts_at %></td>
37
- <th style="width:25%">Ends At</th>
38
+ </tr>
39
+ <tr><th style="width:25%">Ends At</th>
38
40
  <td style="width:25%"><%= time_tag(@offer.ends_at) if @offer.ends_at %></td>
39
41
  </tr>
40
-
41
42
  </tbody>
42
43
  </table>
44
+
43
45
  </div>
44
46
 
45
- <% if display_manage_links? %>
46
- <div class="col-md-3 col-sm-12 col-xs-12">
47
- <%= display_manage_buttons(@offer) %>
48
- <%= display_publishable_buttons(@offer) %>
49
- <%= display_featurable_buttons(@offer) %>
47
+ <div class="col-md-6 col-xs-12">
48
+ <%= clear_tag(40) %>
49
+ <div><strong class="fs-18">Cover Image</strong></div>
50
+ <hr>
51
+ <div class="row">
52
+ <div class="col-md-6 col-sm-12 col-xs-12" style="border-right:1px solid #f1f1f1;">
53
+ <% if display_edit_links? %>
54
+ <%= edit_image(@offer,
55
+ "cover_image.image.large.url",
56
+ upload_image_link(@offer, :cover_image, nil ),
57
+ remove_image_link(@offer, :cover_image, nil ),
58
+ image_options: {assoc_name: :cover_image }) %>
59
+ <% else %>
60
+ <%= display_image(@offer, "cover_image.image.large.url", class: "img-inline", alt: @offer.display_name) %>
61
+ <% end %>
62
+ </div>
63
+ </div>
50
64
  </div>
51
- <% end %>
52
65
  </div>
53
66
 
67
+ <% if @current_user.has_read_permission?(Dhatu::MetaTag) %>
68
+ <%= clear_tag(40) %>
69
+ <div><strong class="fs-18">Meta Tags</strong></div>
54
70
  <hr>
71
+ <div id="div_meta_tags_action_buttons">
72
+ <div class="row">
73
+ <div class="col-md-6">
74
+ <%= theme_button('Add a Meta Tag', 'plus', new_meta_tag_path(meta_taggable_id: @offer.id, meta_taggable_type: @offer.class.name), classes: "pull-left mr-10", btn_type: "success") if @current_user.has_create_permission?(Dhatu::MetaTag) %>
55
75
 
56
- <div class="visible-sm visible-xs mb-50"></div>
57
-
58
- <ul class="nav nav-pills">
59
- <li class="active">
60
- <a href="#offer_details" data-toggle="tab" aria-expanded="false">
61
- <span class="visible-xs"><i class="fa-database"></i></span>
62
- <span class="hidden-xs">Offer Details</span>
63
- </a>
64
- </li>
65
-
66
- <% if @current_user.has_role?("Technical Admin") %>
67
- <li class="">
68
- <a href="#technical_details" data-toggle="tab" aria-expanded="false">
69
- <span class="visible-xs"><i class="fa-database"></i></span>
70
- <span class="hidden-xs">Technical Details</span>
71
- </a>
72
- </li>
73
- <% end %>
74
- </ul>
75
-
76
- <div class="tab-content">
77
- <div class="tab-pane active" id="offer_details" style="border: 1px solid #f5f5f5;min-height:200px;padding:20px;margin-bottom:20px;max-height: 400px;overflow-y: auto;">
78
-
79
- <%= clear_tag(20) %>
80
- <%= raw(@offer.description) %>
81
- <%= clear_tag(20) %>
82
- </div>
83
-
84
- <% if @current_user.has_role?("Technical Admin") %>
85
- <div class="tab-pane" id="technical_details" style="border: 1px solid #f5f5f5;min-height:200px;padding:20px;margin-bottom:20px;max-height: 400px;overflow-y: auto;">
86
-
87
- <%= clear_tag(20) %>
88
-
89
- <div class="table-responsive">
90
- <table class="table table-striped table-condensed table-bordered mb-60">
91
- <tbody>
92
-
93
- <tr>
94
- <th>ID</th><td><%= @offer.id %></td>
95
- <th>Permalink</th><td><%= @offer.to_param %></td>
96
- </tr>
97
- <tr>
98
- <th>Featured</th><td><%= @offer.featured %></td>
99
- <th>Status</th><td><%= @offer.status %></td>
100
- </tr>
101
- <tr>
102
- <th>Created At</th><td><%= @offer.created_at.strftime("%m/%d/%Y - %H:%M:%S") if @offer.created_at %></td>
103
- <th>Updated At</th><td><%= @offer.updated_at.strftime("%m/%d/%Y - %H:%M:%S") if @offer.updated_at %></td>
104
- </tr>
105
-
106
- </tbody>
107
- </table>
76
+ <%= theme_button('Refresh', 'refresh', meta_tags_path(meta_taggable_id: @offer.id, meta_taggable_type: @offer.class.name), classes: "pull-left mr-10", btn_type: "white") %>
77
+ </div>
78
+ <div class="col-md-6">
79
+ <%= search_form_kuppayam(User, meta_tags_path(meta_taggable_id: @offer.id, meta_taggable_type: @offer.class.name), text: "") %>
108
80
  </div>
109
-
110
81
  </div>
111
- <% end %>
112
82
  </div>
83
+ <%= clear_tag(10) %>
84
+ <div id="div_meta_tag_index">
85
+ <% meta_tags = @offer.meta_tags.page(@current_page).per(@per_page) %>
86
+ <%= render :partial=>"dhatu/meta_tags/index", locals: {meta_tags: meta_tags, meta_taggable: @offer } %>
87
+ </div>
88
+ <% end %>
89
+
90
+ <% if @current_user.super_admin? %>
91
+ <%= clear_tag(40) %>
92
+ <div><strong class="fs-18">Technical Details</strong></div>
93
+ <hr>
94
+ <div class="table-responsive">
95
+ <table class="table table-striped table-condensed table-bordered mb-60">
96
+ <tbody>
97
+
98
+ <tr>
99
+ <th>ID</th><td><%= @offer.id %></td>
100
+ <th>Permalink</th><td><%= @offer.to_param %></td>
101
+ </tr>
102
+
103
+ <tr>
104
+ <th>Status</th><td><%= @offer.status %></td>
105
+ <th>Featured</th><td><%= @offer.featured %></td>
106
+ </tr>
107
+
108
+ <tr>
109
+ <th>Created At</th><td><%= @offer.created_at.strftime("%m/%d/%Y - %H:%M:%S") if @offer.created_at %></td>
110
+ <th>Updated At</th><td><%= @offer.updated_at.strftime("%m/%d/%Y - %H:%M:%S") if @offer.updated_at %></td>
111
+ </tr>
112
+
113
+ </tbody>
114
+ </table>
115
+ </div>
116
+ <% end %>
113
117
 
114
118
  <%= link_to "Close", "#", onclick: "closeLargeModal();", class: "btn btn-primary pull-right" %>
115
119