dhatu 0.1.19 → 0.1.20

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/dhatu/blog_posts_controller.rb +81 -14
  3. data/app/controllers/dhatu/bookings_controller.rb +51 -5
  4. data/app/controllers/dhatu/branches_controller.rb +42 -8
  5. data/app/controllers/dhatu/categories_controller.rb +86 -47
  6. data/app/controllers/dhatu/events_controller.rb +79 -9
  7. data/app/controllers/dhatu/meta_tags_controller.rb +96 -0
  8. data/app/controllers/dhatu/offers_controller.rb +83 -10
  9. data/app/controllers/dhatu/pages_controller.rb +130 -0
  10. data/app/controllers/dhatu/prices_controller.rb +78 -12
  11. data/app/controllers/dhatu/projects_controller.rb +78 -22
  12. data/app/controllers/dhatu/promotion_enquiries_controller.rb +69 -7
  13. data/app/controllers/dhatu/promotions_controller.rb +46 -2
  14. data/app/controllers/dhatu/resource_controller.rb +4 -0
  15. data/app/controllers/dhatu/sections_controller.rb +41 -8
  16. data/app/controllers/dhatu/services_controller.rb +78 -18
  17. data/app/controllers/dhatu/team_members_controller.rb +41 -8
  18. data/app/controllers/dhatu/testimonials_controller.rb +41 -9
  19. data/app/models/dhatu/blog_post.rb +6 -2
  20. data/app/models/dhatu/category.rb +3 -3
  21. data/app/models/dhatu/event.rb +4 -0
  22. data/app/models/dhatu/meta_tag.rb +48 -0
  23. data/app/models/dhatu/offer.rb +4 -0
  24. data/app/models/dhatu/page.rb +50 -0
  25. data/app/models/dhatu/project.rb +7 -3
  26. data/app/models/dhatu/promotion.rb +1 -0
  27. data/app/models/dhatu/section.rb +8 -12
  28. data/app/models/dhatu/service.rb +7 -3
  29. data/app/models/image/og_image.rb +3 -0
  30. data/app/uploaders/og_image_uploader.rb +15 -0
  31. data/app/views/dhatu/blog_posts/_form.html.erb +1 -1
  32. data/app/views/dhatu/blog_posts/_index.html.erb +1 -1
  33. data/app/views/dhatu/blog_posts/_row.html.erb +1 -1
  34. data/app/views/dhatu/blog_posts/_show.html.erb +1 -1
  35. data/app/views/dhatu/bookings/_index.html.erb +7 -8
  36. data/app/views/dhatu/bookings/_row.html.erb +11 -7
  37. data/app/views/dhatu/bookings/index.html.erb +20 -12
  38. data/app/views/dhatu/branches/_index.html.erb +8 -12
  39. data/app/views/dhatu/branches/_show.html.erb +75 -69
  40. data/app/views/dhatu/branches/index.html.erb +13 -8
  41. data/app/views/dhatu/categories/_category_types.html.erb +27 -0
  42. data/app/views/dhatu/categories/_form.html.erb +2 -2
  43. data/app/views/dhatu/categories/_index.html.erb +114 -89
  44. data/app/views/dhatu/categories/_index_list.html.erb +118 -0
  45. data/app/views/dhatu/categories/_row.html.erb +27 -31
  46. data/app/views/dhatu/categories/_row_list.html.erb +34 -0
  47. data/app/views/dhatu/categories/_show.html.erb +101 -74
  48. data/app/views/dhatu/categories/choose_category_type.html.erb +20 -0
  49. data/app/views/dhatu/categories/index.html.erb +1 -19
  50. data/app/views/dhatu/dashboard/_index.html.erb +53 -42
  51. data/app/views/dhatu/events/_index.html.erb +1 -1
  52. data/app/views/dhatu/events/_row.html.erb +1 -1
  53. data/app/views/dhatu/events/_show.html.erb +99 -75
  54. data/app/views/dhatu/events/index.html.erb +14 -9
  55. data/app/views/dhatu/meta_tags/_form.html.erb +48 -0
  56. data/app/views/dhatu/meta_tags/_index.html.erb +59 -0
  57. data/app/views/dhatu/meta_tags/_row.html.erb +32 -0
  58. data/app/views/dhatu/meta_tags/create.js.erb +29 -0
  59. data/app/views/dhatu/offers/_index.html.erb +8 -8
  60. data/app/views/dhatu/offers/_row.html.erb +1 -1
  61. data/app/views/dhatu/offers/_show.html.erb +85 -81
  62. data/app/views/dhatu/offers/index.html.erb +14 -8
  63. data/app/views/dhatu/pages/_form.html.erb +44 -0
  64. data/app/views/dhatu/pages/_index.html.erb +57 -0
  65. data/app/views/dhatu/pages/_row.html.erb +47 -0
  66. data/app/views/dhatu/pages/_show.html.erb +99 -0
  67. data/app/views/dhatu/pages/index.html.erb +59 -0
  68. data/app/views/dhatu/pages/show.html.erb +12 -0
  69. data/app/views/dhatu/prices/_index.html.erb +6 -6
  70. data/app/views/dhatu/prices/_row.html.erb +3 -2
  71. data/app/views/dhatu/prices/_show.html.erb +34 -45
  72. data/app/views/dhatu/prices/index.html.erb +14 -25
  73. data/app/views/dhatu/projects/_form.html.erb +15 -16
  74. data/app/views/dhatu/projects/_index.html.erb +6 -7
  75. data/app/views/dhatu/projects/_row.html.erb +4 -4
  76. data/app/views/dhatu/projects/_show.html.erb +108 -97
  77. data/app/views/dhatu/projects/index.html.erb +13 -19
  78. data/app/views/dhatu/projects/show.html.erb +12 -0
  79. data/app/views/dhatu/promotion_attributes/_index.html.erb +1 -7
  80. data/app/views/dhatu/promotion_attributes/_row.html.erb +1 -4
  81. data/app/views/dhatu/promotion_enquiries/_index.html.erb +11 -11
  82. data/app/views/dhatu/promotion_enquiries/_row.html.erb +7 -5
  83. data/app/views/dhatu/promotion_enquiries/_show.html.erb +35 -43
  84. data/app/views/dhatu/promotion_enquiries/index.html.erb +20 -12
  85. data/app/views/dhatu/promotions/_index.html.erb +13 -15
  86. data/app/views/dhatu/promotions/_row.html.erb +10 -9
  87. data/app/views/dhatu/promotions/_show.html.erb +190 -93
  88. data/app/views/dhatu/promotions/index.html.erb +0 -8
  89. data/app/views/dhatu/{section_types → section_types1}/_form.html.erb +0 -0
  90. data/app/views/dhatu/{section_types → section_types1}/_index.html.erb +0 -0
  91. data/app/views/dhatu/{section_types → section_types1}/_row.html.erb +0 -0
  92. data/app/views/dhatu/{section_types → section_types1}/_show.html.erb +0 -0
  93. data/app/views/dhatu/{section_types → section_types1}/index.html.erb +0 -0
  94. data/app/views/dhatu/sections/_form.html.erb +116 -11
  95. data/app/views/dhatu/sections/_index.html.erb +6 -3
  96. data/app/views/dhatu/sections/_row.html.erb +5 -2
  97. data/app/views/dhatu/sections/_show.html.erb +168 -132
  98. data/app/views/dhatu/sections/index.html.erb +10 -2
  99. data/app/views/dhatu/services/_form.html.erb +16 -17
  100. data/app/views/dhatu/services/_index.html.erb +6 -7
  101. data/app/views/dhatu/services/_row.html.erb +4 -4
  102. data/app/views/dhatu/services/_show.html.erb +107 -96
  103. data/app/views/dhatu/services/index.html.erb +13 -19
  104. data/app/views/dhatu/team_members/_index.html.erb +5 -6
  105. data/app/views/dhatu/team_members/_row.html.erb +3 -3
  106. data/app/views/dhatu/team_members/_show.html.erb +70 -58
  107. data/app/views/dhatu/team_members/index.html.erb +13 -8
  108. data/app/views/dhatu/testimonials/_index.html.erb +3 -6
  109. data/app/views/dhatu/testimonials/_row.html.erb +2 -3
  110. data/app/views/dhatu/testimonials/_show.html.erb +63 -93
  111. data/app/views/dhatu/testimonials/index.html.erb +13 -8
  112. data/app/views/layouts/kuppayam/_sidebar.html.erb +63 -48
  113. data/app/views/usman/dashboard/_super_admin_index.html.erb +22 -0
  114. data/config/routes.rb +12 -1
  115. data/db/data/dummy/services.csv +1 -1
  116. data/db/migrate/20180101093435_create_pages.rb +14 -0
  117. data/db/migrate/20180101093436_create_meta_tags.rb +19 -0
  118. data/db/migrate/20180101093437_add_page_id_to_sections.rb +5 -0
  119. data/db/migrate/20180101093438_add_priority_to_pages_and_sections.rb +6 -0
  120. data/db/migrate/20180101093439_add_a_ton_of_boolean_fields_to_sections.rb +34 -0
  121. data/db/migrate/20180101093440_add_code_to_sections.rb +19 -0
  122. data/db/migrate/20180101093441_rename_meta_description_all_over.rb +7 -0
  123. data/db/migrate/20180101093442_add_name_to_sections.rb +19 -0
  124. data/lib/dhatu/version.rb +1 -1
  125. metadata +43 -14
  126. data/db/migrate/20171203114529_add_meta_description_to_services.rb +0 -7
@@ -3,14 +3,6 @@
3
3
  <div class="col-md-12">
4
4
 
5
5
  <ul class="nav nav-tabs nav-tabs-justified">
6
- <% Dhatu::Offer::STATUS.each do |key, value| %>
7
- <li class="<%= @status == value ? 'active' : '' %>">
8
- <%= link_to offers_path(st: value), "aria-expanded" => "#{ @status == value ? 'true' : 'false' }", title: key.titleize do %>
9
- <span class="visible-xs"><i class="fa-gift"> <%= key[0].upcase %></i></span>
10
- <span class="hidden-xs"><%= key %></span>
11
- <% end %>
12
- </li>
13
- <% end %>
14
6
  </ul>
15
7
 
16
8
  <div class="tab-content">
@@ -29,6 +21,20 @@
29
21
  </div>
30
22
  </div>
31
23
 
24
+ <div class="row">
25
+ <div class="col-md-12 visible-sm visible-xs mt-10">
26
+ </div>
27
+ <div class="col-md-12">
28
+ <% @filter_ui_settings.each do |filter_name, options| %>
29
+ <% if options[:object_filter] == true %>
30
+ <%= report_object_filter(filter_name, options) %>
31
+ <% else %>
32
+ <%= report_filter(filter_name, options) %>
33
+ <% end %>
34
+ <% end %>
35
+ </div>
36
+ </div>
37
+
32
38
  </div>
33
39
  <%= clear_tag(10) %>
34
40
 
@@ -0,0 +1,44 @@
1
+ <%= form_for(@page,
2
+ :url => (@page.new_record? ? dhatu.pages_path : dhatu.page_path),
3
+ :method => (@page.new_record? ? :post : :put),
4
+ :remote => true,
5
+ :html => {:id=>"form_page", :class=>"mb-0 form-horizontal"}) do |f| %>
6
+
7
+ <div id="page_form_error">
8
+ <%= @page.errors[:base].to_sentence %>
9
+ </div>
10
+
11
+ <div class="form-inputs m-15">
12
+
13
+ <div class="row">
14
+ <div class="col-md-6 pr-20">
15
+ <%= theme_form_field(@page, :name, form_style: "top-bottom") %>
16
+ </div>
17
+ <div class="col-md-6 pl-20">
18
+ <%= theme_form_field(@page, :code, form_style: "top-bottom", html_options: {"data-id": @page.id.to_s}) %>
19
+ </div>
20
+ </div>
21
+
22
+ <div class="row">
23
+ <div class="col-md-6 pr-20">
24
+ <% options = {assoc_collection: Feature.published.select("id, name").order("name ASC").all, editable: true, assoc_display_method: :display_name, include_blank: true, required: false} %>
25
+ <%= theme_form_assoc_group(@page, :feature_id, label: "Select Feature", form_style: "top-bottom", **options) %>
26
+ </div>
27
+ <div class="col-md-6 pl-20">
28
+ <%= theme_form_field(@page, :priority, form_style: "top-bottom") %>
29
+ </div>
30
+ </div>
31
+
32
+ </div>
33
+
34
+ <div>
35
+ <%= submit_tag("Save", :class=>"btn btn-primary pull-right ml-10") %>
36
+
37
+ <%= link_to raw("<i class='fa fa-close mr-5'></i><span>Cancel</span>"), "#", onclick: "closeGenericModal();", class: "pull-right btn btn-white" %>
38
+ </div>
39
+
40
+ <%= clear_tag %>
41
+ </div>
42
+
43
+ <% end %>
44
+
@@ -0,0 +1,57 @@
1
+ <% @pages.each_with_index do |page, i| %>
2
+
3
+ <div id="div_page_<%= page.id %>" class="kuppayam-feed">
4
+
5
+ <div class="row">
6
+ <div class="col-md-8">
7
+ <% if page.feature %>
8
+ <%= link_to raw("<i class='fa-file mr-10'></i>#{page.name}"), page_path(page), remote: true, style: "font-size: 20px;font-weight:800;color:#cc3f44;" %>
9
+ ( <%= content_tag :span, page.feature.try(:display_name) if page.feature %> )
10
+ <% else %>
11
+ <%= link_to raw("<i class='fa-file mr-10'></i>#{page.name}"), page_path(page), remote: true, style: "font-size: 20px;font-weight:800;" %>
12
+ <% end %>
13
+ <span class="ml-10" style="font-size:16px;"><%= display_publishable_status(page) if @current_user.super_admin? %></span>
14
+
15
+ <%= clear_tag(20) %>
16
+ <% if @current_user.super_admin? %>
17
+ <% sections = page.sections %>
18
+ <% else %>
19
+ <% sections = page.sections.published %>
20
+ <% end %>
21
+ <% sections.order("priority ASC, created_at DESC").each do |section| %>
22
+ <div class="row ml-30 mb-5">
23
+ <span class="pull-left">
24
+ <%= link_to raw("<i class='fa-reorder mr-10'></i>#{section.name}"), section_path(section), remote: true, style: "font-size: 18px;;color:#4b4b4b;margin-right:20px;" %>
25
+ </span>
26
+ <span class="action-links">
27
+ <%= display_manage_links(section, @current_user) %>
28
+ <%= display_publishable_links(section) if @current_user.super_admin? %>
29
+ </span>
30
+ <%= clear_tag %>
31
+ </div>
32
+ <% end %>
33
+
34
+ </div>
35
+ <% if @current_user.super_admin? %>
36
+ <div class="col-md-4 action-links">
37
+ <% if page.feature %>
38
+ <%= display_manage_links(page, @current_user) if @current_user.super_admin? %>
39
+ <% else %>
40
+ <%= display_manage_links(page, @current_user) %>
41
+ <% end %>
42
+ <%= display_publishable_links(page) %>
43
+ </div>
44
+ <% end %>
45
+ </div>
46
+
47
+ <%= theme_button('Add a Section', 'plus', dhatu.new_section_path(page_id: page), classes: "btn btn-success btn-xs ml-30 mb-5", btn_type: "success") if @current_user.super_admin? %>
48
+
49
+ </div>
50
+
51
+ <% end %>
52
+
53
+ <div class="row">
54
+ <div class="col-sm-12">
55
+ <%= paginate_kuppayam(@pages) %>
56
+ </div>
57
+ </div>
@@ -0,0 +1,47 @@
1
+ <div id="div_page_<%= page.id %>" class="kuppayam-feed">
2
+
3
+ <div class="row">
4
+ <div class="col-md-8">
5
+ <% if page.feature %>
6
+ <%= link_to raw("<i class='fa-file mr-10'></i>#{page.name}"), page_path(page), remote: true, style: "font-size: 20px;font-weight:800;color:#cc3f44;" %>
7
+ ( <%= content_tag :span, page.feature.try(:display_name) if page.feature %> )
8
+ <% else %>
9
+ <%= link_to raw("<i class='fa-file mr-10'></i>#{page.name}"), page_path(page), remote: true, style: "font-size: 20px;font-weight:800;" %>
10
+ <% end %>
11
+ <span class="ml-10" style="font-size:16px;"><%= display_publishable_status(page) if @current_user.super_admin? %></span>
12
+
13
+ <%= clear_tag(20) %>
14
+ <% if @current_user.super_admin? %>
15
+ <% sections = page.sections %>
16
+ <% else %>
17
+ <% sections = page.sections.published %>
18
+ <% end %>
19
+ <% sections.order("priority ASC, created_at DESC").each do |section| %>
20
+ <div class="row ml-30 mb-5">
21
+ <span class="pull-left">
22
+ <%= link_to raw("<i class='fa-reorder mr-10'></i>#{section.title}"), section_path(section), remote: true, style: "font-size: 18px;;color:#4b4b4b;margin-right:20px;" %>
23
+ </span>
24
+ <span class="action-links">
25
+ <%= display_manage_links(section, @current_user) %>
26
+ <%= display_publishable_links(section) if @current_user.super_admin? %>
27
+ </span>
28
+ <%= clear_tag %>
29
+ </div>
30
+ <% end %>
31
+
32
+ </div>
33
+ <% if @current_user.super_admin? %>
34
+ <div class="col-md-4 action-links">
35
+ <% if page.feature %>
36
+ <%= display_manage_links(page, @current_user) if @current_user.super_admin? %>
37
+ <% else %>
38
+ <%= display_manage_links(page, @current_user) %>
39
+ <% end %>
40
+ <%= display_publishable_links(page) %>
41
+ </div>
42
+ <% end %>
43
+ </div>
44
+
45
+ <%= theme_button('Add a Section', 'plus', dhatu.new_section_path(page_id: page), classes: "btn btn-success btn-xs ml-30 mb-5", btn_type: "success") if @current_user.super_admin? %>
46
+
47
+ </div>
@@ -0,0 +1,99 @@
1
+ <div id="div_page_show">
2
+
3
+ <div class="row">
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(@page,
8
+ "cover_image.image.large.url",
9
+ upload_image_link(@page, :cover_image, nil ),
10
+ remove_image_link(@page, :cover_image, nil ),
11
+ image_options: {assoc_name: :cover_image }) %>
12
+ <%# else %>
13
+ <%#= display_image(@page, "cover_image.image.large.url", class: "img-inline", alt: @page.display_name) %>
14
+ <%# end %>
15
+ <!-- </div> -->
16
+
17
+ <div class="col-md-9 col-sm-12 col-xs-12" style="border-right:1px solid #f1f1f1;">
18
+
19
+ <%= theme_panel_heading(@page.name) %>
20
+
21
+ <%= theme_panel_sub_heading(@page.code, "#") if @page.code %>
22
+
23
+ <%= clear_tag(10) %>
24
+ <span class="mr-5 mt-5 badge badge-warning"><%= @page.feature.try(:name) %></span>
25
+ <%= clear_tag(10) %>
26
+
27
+ <%= display_publishable_status(@page) %>
28
+
29
+ <%= clear_tag(10) %>
30
+
31
+ </div>
32
+
33
+ <% if display_manage_links? %>
34
+ <div class="col-md-3 col-sm-12 col-xs-12">
35
+ <%= display_manage_buttons(@page) %>
36
+ <%= display_publishable_buttons(@page) %>
37
+ </div>
38
+ <% end %>
39
+
40
+ </div>
41
+
42
+ <%= clear_tag(40) %>
43
+
44
+ <div><strong class="fs-18">Meta Tags</strong></div>
45
+ <hr>
46
+ <% if @page.feature %>
47
+ <div class="alert alert-default"><%= @page.feature.try(:display_name) %> module has a built in meta tag manager. Manage Meta Tags for this page there.</div>
48
+ <% else %>
49
+ <div id="div_meta_tags_action_buttons">
50
+ <div class="row">
51
+ <div class="col-md-6">
52
+ <%= theme_button('Add a Meta Tag', 'plus', new_meta_tag_path(meta_taggable_id: @page.id, meta_taggable_type: @page.class.name), classes: "pull-left mr-10", btn_type: "success") if @current_user.has_create_permission?(Dhatu::MetaTag) %>
53
+
54
+ <%= theme_button('Refresh', 'refresh', meta_tags_path(meta_taggable_id: @page.id, meta_taggable_type: @page.class.name), classes: "pull-left mr-10", btn_type: "white") %>
55
+ </div>
56
+ <div class="col-md-6">
57
+ <%= search_form_kuppayam(User, meta_tags_path(meta_taggable_id: @page.id, meta_taggable_type: @page.class.name), text: "") %>
58
+ </div>
59
+ </div>
60
+ </div>
61
+ <%= clear_tag(10) %>
62
+ <div id="div_meta_tag_index">
63
+ <% meta_tags = @page.meta_tags.page(@current_page).per(@per_page) %>
64
+ <%= render :partial=>"dhatu/meta_tags/index", locals: {meta_tags: meta_tags, meta_taggable: @page } %>
65
+ </div>
66
+ <% end %>
67
+
68
+ <% if @current_user.super_admin? %>
69
+ <%= clear_tag(40) %>
70
+ <div><strong class="fs-18">Technical Details</strong></div>
71
+ <hr>
72
+
73
+ <div class="table-responsive">
74
+ <table class="table table-striped table-condensed table-bordered mb-60">
75
+ <tbody>
76
+
77
+ <tr>
78
+ <th>ID</th><td><%= @page.id %></td>
79
+ <th>Name</th><td><%= @page.name %></td>
80
+ </tr>
81
+ <tr>
82
+ <th>Code</th><td><%= @page.code %></td>
83
+ <th>Status</th><td><%= @page.status %></td>
84
+ </tr>
85
+ <tr>
86
+ <th>Created At</th><td><%= @page.created_at.strftime("%m/%d/%Y - %H:%M:%S") if @page.created_at %></td>
87
+ <th>Updated At</th><td><%= @page.updated_at.strftime("%m/%d/%Y - %H:%M:%S") if @page.updated_at %></td>
88
+ </tr>
89
+
90
+ </tbody>
91
+ </table>
92
+ </div>
93
+ <% end %>
94
+
95
+ <%= link_to "Close", "#", onclick: "closeLargeModal();", class: "btn btn-primary pull-right" %>
96
+
97
+ <%= clear_tag %>
98
+
99
+ </div>
@@ -0,0 +1,59 @@
1
+ <div class="row">
2
+
3
+ <div class="col-md-12">
4
+
5
+ <ul class="nav nav-tabs nav-tabs-justified">
6
+ </ul>
7
+
8
+ <div class="tab-content">
9
+ <div class="tab-pane active">
10
+
11
+ <div id="div_page_action_buttons">
12
+
13
+ <div class="row">
14
+ <div class="col-sm-6">
15
+ <%= theme_button('Add a Page', 'plus', new_page_path(ct: @category.try(:id)), classes: "pull-left mr-10", btn_type: "success") if @current_user.super_admin? %>
16
+
17
+ <%= theme_button('Refresh', 'refresh', pages_path(ct: @category.try(:id)), classes: "pull-left", btn_type: "white") %>
18
+ </div>
19
+ <div class="col-sm-6">
20
+ <%= search_form_kuppayam(Dhatu::Page, pages_path, text: @filters[:query]) %>
21
+ </div>
22
+ </div>
23
+
24
+ </div>
25
+ <%= clear_tag(10) %>
26
+
27
+ <div id="div_page_index">
28
+ <%= render :partial=>"dhatu/pages/index" %>
29
+ </div>
30
+ <%= clear_tag(10) %>
31
+
32
+ </div>
33
+ </div>
34
+
35
+ </div>
36
+
37
+ </div>
38
+
39
+ <script type="text/javascript">
40
+ $('body').on('change', '#inp_name', function() {
41
+ var pageId = $('#inp_code').data("id");
42
+ if(pageId){
43
+ } else {
44
+ var pageCode = convertToSlug($(this).val()).slice(0, 63);
45
+ $('#inp_code').val(pageCode);
46
+ }
47
+ });
48
+
49
+ $("#inp_meta_key").autocomplete({
50
+ source: [ "c++", "java", "php", "coldfusion", "javascript", "asp", "ruby" ]
51
+ });
52
+
53
+ $('body').on('change', '#inp_title', function() {
54
+ var sectionCode = $(this).val().replace(/ /g, '_').toUpperCase().slice(0, 63);
55
+ console.log("hello");
56
+ $('#inp_code').val(sectionCode);
57
+ });
58
+ </script>
59
+
@@ -0,0 +1,12 @@
1
+ <div class="row">
2
+
3
+ <div class="col-md-12 p-30" style="background-color:#fff;">
4
+
5
+ <div id="div_page_show">
6
+ <%= render :partial=>"dhatu/pages/show" %>
7
+ </div>
8
+
9
+ </div>
10
+
11
+ </div>
12
+
@@ -1,11 +1,11 @@
1
- <div class="table-responsive">
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:5%">#</th>
5
+ <th style="text-align: center;width:5%" class="hidden-sm hidden-xs">#</th>
6
6
  <th>Item</th>
7
- <th style="width:200px">Price</th>
8
- <th>Priority</th>
7
+ <th>Price</th>
8
+ <th class="hidden-sm hidden-xs">Priority</th>
9
9
  <th style="width:100px;" class="hidden-sm hidden-xs">Status</th>
10
10
  <% if display_manage_links? %>
11
11
  <th style="text-align: center;" colspan="2" class="hidden-sm hidden-xs" >Actions</th>
@@ -17,7 +17,7 @@
17
17
  <% @prices.each_with_index do |price, i| %>
18
18
  <tr id="tr_price_<%= price.id %>">
19
19
 
20
- <th scope="row" style="text-align: center;">
20
+ <th scope="row" style="text-align: center;" class="hidden-sm hidden-xs">
21
21
  <%= serial_number(i) %>
22
22
  </th>
23
23
 
@@ -26,7 +26,7 @@
26
26
  <%= link_to price.category.try(:display_name), price_path(price), remote: true, style: "color:chocolate" %>
27
27
  </td>
28
28
 
29
- <td class="hidden-sm hidden-xs"><%= price.price %></td>
29
+ <td><%= price.price %></td>
30
30
  <td class="hidden-sm hidden-xs"><%= price.priority %></td>
31
31
  <td class="hidden-sm hidden-xs"><%= display_publishable_status(price) %></td>
32
32
 
@@ -1,5 +1,6 @@
1
1
  <tr id="tr_price_<%= price.id %>">
2
- <th scope="row" style="text-align: center;">
2
+
3
+ <th scope="row" style="text-align: center;" class="hidden-sm hidden-xs">
3
4
  <%= serial_number(i) %>
4
5
  </th>
5
6
 
@@ -8,7 +9,7 @@
8
9
  <%= link_to price.category.try(:display_name), price_path(price), remote: true, style: "color:chocolate" %>
9
10
  </td>
10
11
 
11
- <td class="hidden-sm hidden-xs"><%= price.price %></td>
12
+ <td><%= price.price %></td>
12
13
  <td class="hidden-sm hidden-xs"><%= price.priority %></td>
13
14
  <td class="hidden-sm hidden-xs"><%= display_publishable_status(price) %></td>
14
15
 
@@ -2,58 +2,16 @@
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(@price,
8
- "cover_image.image.large.url",
9
- upload_image_link(@price, :cover_image, nil ),
10
- remove_image_link(@price, :cover_image, nil ),
11
- image_options: {assoc_name: :cover_image }) %>
12
- <%# else %>
13
- <%#= display_image(@price, "cover_image.image.large.url", class: "img-inline", alt: @price.display_name) %>
14
- <%# end %>
15
- </div> -->
16
-
17
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(@price.title) %>
20
-
21
8
  <%= theme_panel_description(@price.sub_title) %>
22
-
23
9
  <%= theme_panel_sub_heading(@price.category.try(:display_name), "#") if @price.category %>
24
-
25
10
  <%= clear_tag(10) %>
26
-
11
+ <div>Price: <%= @price.price %></div>
12
+ <%= clear_tag(10) %>
27
13
  <%= display_publishable_status(@price) %>
28
-
29
14
  <%= display_featured(@price) %>
30
-
31
- <%= clear_tag(20) %>
32
-
33
- <div class="table-responsive">
34
- <table class="table table-striped table-condensed table-bordered mb-60">
35
- <tbody>
36
-
37
- <tr>
38
- <th>ID</th><td><%= @price.id %></td>
39
- </tr>
40
-
41
- <tr>
42
- <th>Status</th><td><%= @price.status %></td>
43
- </tr>
44
-
45
- <tr>
46
- <th>Created At</th><td><%= @price.created_at.strftime("%m/%d/%Y - %H:%M:%S") if @price.created_at %></td>
47
- </tr>
48
-
49
- <tr>
50
- <th>Updated At</th><td><%= @price.updated_at.strftime("%m/%d/%Y - %H:%M:%S") if @price.updated_at %></td>
51
- </tr>
52
-
53
- </tbody>
54
- </table>
55
- </div>
56
-
57
15
  <%= clear_tag(20) %>
58
16
  </div>
59
17
 
@@ -67,7 +25,38 @@
67
25
 
68
26
  </div>
69
27
 
70
- <div class="visible-sm visible-xs mb-50"></div>
28
+ <% if @current_user.super_admin? %>
29
+ <%= clear_tag(40) %>
30
+ <div><strong class="fs-18">Technical Details</strong></div>
31
+ <hr>
32
+ <div class="table-responsive">
33
+ <table class="table table-striped table-condensed table-bordered mb-60">
34
+ <tbody>
35
+
36
+ <tr>
37
+ <th>ID</th><td><%= @price.id %></td>
38
+ <th>Category</th><td><%= "#{@price.category.name} (#{@price.category.id})" if @price.category %></td>
39
+ </tr>
40
+
41
+ <tr>
42
+ <th>Status</th><td><%= @price.status %></td>
43
+ <th>Featured</th><td><%= @price.featured? ? "Yes" : "No" %></td>
44
+ </tr>
45
+
46
+ <tr>
47
+ <th>Priority</th><td><%= @price.priority %></td>
48
+ <th></th><td></td>
49
+ </tr>
50
+
51
+ <tr>
52
+ <th>Created At</th><td><%= @price.created_at.strftime("%m/%d/%Y - %H:%M:%S") if @price.created_at %></td>
53
+ <th>Updated At</th><td><%= @price.updated_at.strftime("%m/%d/%Y - %H:%M:%S") if @price.updated_at %></td>
54
+ </tr>
55
+
56
+ </tbody>
57
+ </table>
58
+ </div>
59
+ <% end %>
71
60
 
72
61
  <%= link_to "Close", "#", onclick: "closeGenericModal();", class: "btn btn-primary pull-right" %>
73
62