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::Branch::STATUS.each do |key, value| %>
7
- <li class="<%= @status == value ? 'active' : '' %>">
8
- <%= link_to branches_path(st: value), "aria-expanded" => "#{ @status == value ? 'true' : 'false' }" do %>
9
- <span class="visible-xs"><i class="fa-gift"></i></span>
10
- <span class="hidden-xs"><%= key %></span>
11
- <% end %>
12
- </li>
13
- <% end %>
14
6
  </ul>
15
7
 
16
8
  <div class="tab-content">
@@ -28,6 +20,19 @@
28
20
  <%= search_form_kuppayam(Dhatu::Offer, branches_path(st: @status), text: @filters[:query]) %>
29
21
  </div>
30
22
  </div>
23
+ <div class="row">
24
+ <div class="col-md-12 visible-sm visible-xs mt-10">
25
+ </div>
26
+ <div class="col-md-12">
27
+ <% @filter_ui_settings.each do |filter_name, options| %>
28
+ <% if options[:object_filter] == true %>
29
+ <%= report_object_filter(filter_name, options) %>
30
+ <% else %>
31
+ <%= report_filter(filter_name, options) %>
32
+ <% end %>
33
+ <% end %>
34
+ </div>
35
+ </div>
31
36
 
32
37
  </div>
33
38
  <%= clear_tag(10) %>
@@ -0,0 +1,27 @@
1
+ <h3 class="text-gray" style="text-align: center;">
2
+ Choose a Category Type <br>
3
+ <small class="text-muted">Click on Browse to see the categories.</small>
4
+ </h3>
5
+ <%= clear_tag(10) %>
6
+
7
+ <% @features.each_with_index do |feature, i| %>
8
+ <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12" style="height:280px;">
9
+
10
+ <div class="xe-widget xe-vertical-counter xe-vertical-counter-white" data-count=".num" data-from="0" data-to="128" data-duration="4">
11
+ <div class="xe-icon" style="padding:0px;">
12
+ <i class="<%= Feature::FEATURE_ICONS[feature.name] %>"></i>
13
+ <%#= display_image(feature, "feature_image.image.small_square.url", class: "img-inline", alt: feature.display_name) %>
14
+ </div>
15
+
16
+ <div class="xe-label">
17
+ <strong class="num" style="font-size:16px;"><%= feature.display_name %></strong>
18
+ </div>
19
+
20
+ <div class="xe-label">
21
+ <% url = categories_url(ft: feature.try(:id)) %>
22
+ <span><%= link_to("Browse", url, class: "btn btn-sm btn-primary btn-block") %></span>
23
+ </div>
24
+ </div>
25
+
26
+ </div>
27
+ <% end %>
@@ -26,14 +26,14 @@
26
26
  categories = relation.all
27
27
  %>
28
28
 
29
- <% options = {assoc_collection: categories, required: false, editable: true, assoc_display_method: :name} %>
29
+ <% options = {assoc_collection: categories, required: false, editable: true, assoc_display_method: :name, label: "Parent Category", include_blank: true} %>
30
30
  <%= theme_form_assoc_group(@category, :parent_id, **options) %>
31
31
  </div>
32
32
 
33
33
  <div>
34
34
  <%= submit_tag("Save", :class=>"btn btn-primary pull-right ml-10") %>
35
35
 
36
- <%= link_to raw("<i class='fa fa-close mr-5'></i><span>Cancel</span>"), "#", onclick: "closeLargeModal();", class: "pull-right ml-10 btn btn-white" %>
36
+ <%= link_to raw("<i class='fa fa-close mr-5'></i><span>Cancel</span>"), "#", onclick: "closeGenericModal();", class: "pull-right ml-10 btn btn-white" %>
37
37
  </div>
38
38
  <%= clear_tag(10) %>
39
39
  </div>
@@ -1,104 +1,129 @@
1
- <div id="div_category_action_buttons">
2
- <div class="row">
3
- <div class="col-md-6">
4
-
5
- <% if @current_category %>
6
- <%= theme_button('Back', 'arrow-left', categories_path(parent_id: @current_category.try(:parent_id), category_type: @category_type), classes: "pull-left mr-10", btn_type: "white") %>
7
- <% end %>
8
-
9
- <%= theme_button('Refresh', 'refresh', categories_path(parent_id: @current_category.try(:id), category_type: @category_type), classes: "pull-left mr-10", btn_type: "white") %>
10
-
11
- <% if @current_user.has_create_permission?(Dhatu::Category) %>
12
- <%= theme_button('Add a Category', 'plus', new_category_path(parent_id: @current_category.try(:id), category_type: @category_type), classes: "pull-left mr-10", btn_type: "success") %>
13
- <% end %>
14
-
1
+ <div class="row">
2
+ <% if @current_category %>
3
+ <div class="col-md-12">
4
+ <h3 class="text-gray" style="text-align: center;">
5
+ <%= @current_category.display_name %> <br>
6
+ <small class="text-muted">Click on the name to view sub categories.</small>
7
+ </h3>
8
+ </div>
9
+ <% elsif @feature %>
10
+ <div class="col-md-12">
11
+ <h3 class="text-gray" style="text-align: center;">
12
+ Category Type: <%= @feature.display_name %> <br>
13
+ <small class="text-muted">Click on the name to view sub categories.</small>
14
+ </h3>
15
15
  </div>
16
- <div class="col-md-6">
17
- <%= search_form_kuppayam(Dhatu::Category, categories_path, text: @filters[:query]) %>
16
+ <% elsif @query %>
17
+ <div class="col-md-12">
18
+ <h3 class="text-gray" style="text-align: center;">
19
+ Search Results for '<%= @query %>'</small>
20
+ </h3>
21
+ </div>
22
+ <% end %>
23
+
24
+ <div class="col-md-12">
25
+ <div style="text-align: center;">
26
+ <%= link_to "(Change Category Type)", choose_category_type_path(ft: @feature.try(:id)), style: "color:#d42020;" %>
18
27
  </div>
19
28
  </div>
20
- </div>
21
- <%= clear_tag(10) %>
29
+ <%= clear_tag(40) %>
22
30
 
23
- <div id="div_category_breadcrumbs">
24
- <% c_list = [] %>
25
- <% c = @current_category %>
26
- <% while c do %>
27
- <% c_list << c %>
28
- <% c = c.parent %>
29
- <% end %>
30
-
31
- <% if c_list.count >= 1 %>
32
- <ol class="breadcrumb auto-hidden1 bc-3">
33
- <% c_list.reverse.each do |c| %>
34
- <% if c_list[0] == c %>
35
- <li class="active"><strong><%= c.display_name %></strong></li>
36
- <% else %>
37
- <li><%= link_to c.display_name, categories_path(parent_id: c.id), remote: true, class: "collapsed" %></li>
38
- <% end %>
39
- <% end %>
40
- </ol>
41
- <% end %>
42
- </div>
43
- <%= clear_tag %>
31
+ <div id="div_category_action_buttons" class="col-md-12">
32
+ <div class="row">
33
+ <div class="col-md-6">
34
+
35
+ <% if @current_category %>
36
+ <%= theme_button('Back', 'arrow-left', categories_path(parent_id: @current_category.try(:parent_id), ft: @feature.try(:id)), classes: "pull-left mr-10", btn_type: "white") %>
37
+ <% else %>
38
+ <%= theme_button('Back', 'arrow-left', choose_category_type_path(ft: 1), classes: "pull-left mr-10", btn_type: "white", remote: false) %>
39
+ <% end %>
44
40
 
45
- <div class="table-responsive">
46
- <table class="table table-hover members-table middle-align">
47
- <thead>
48
- <tr>
49
- <th style="text-align: center;width:60px">#</th>
50
- <th>Name</th>
51
- <th>Category Type</th>
52
- <th>Priority</th>
53
- <!-- <th>Parent</th>
54
- <th>Top Parent</th> -->
55
- <th style="text-align: center;width:100px;">Status</th>
56
- <!-- <th style="text-align: center;width:100px;">Priority</th>
57
- <th style="text-align: center;width:120px;">End Node?</th> -->
58
- <% if display_manage_links? %>
59
- <th style="text-align: center;" colspan="2">Actions</th>
60
- <% end %>
61
- </tr>
62
- </thead>
63
- <tbody>
64
- <% @categories.each_with_index do |category, i| %>
65
- <tr id="tr_category_<%= category.id %>">
66
-
67
- <th scope="row" style="text-align: center;">
68
- <% if i < 0 %>
69
- <i class="fa fa-check text-success"></i>
70
- <% else %>
71
- <%= i + 1 + (@per_page.to_i * (@current_page.to_i - 1)) %>
72
- <% end %>
73
- </th>
74
-
75
- <% if category.end_node? %>
76
- <td class="category-name"><%= category.display_name %></td>
77
- <% else %>
78
- <td class="category-name">
79
- <%= 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 %></td>
80
- <% end %>
41
+ <% if @current_user.has_create_permission?(Dhatu::Category) %>
42
+ <%= theme_button('Add a Category', 'plus', new_category_path(parent_id: @current_category.try(:id), category_type: @feature.try(:name), ft: @feature.try(:id)), classes: "pull-left mr-10", btn_type: "success") %>
43
+ <% end %>
81
44
 
82
- <td><%= category.display_category_type %></td>
83
- <td><%= category.priority %></td>
45
+ <%# binding.pry %>
84
46
 
85
- <td class="hidden-sm hidden-xs"><%= display_publishable_status(category) %></td>
47
+ <%= theme_button('Refresh', 'refresh', categories_path(parent_id: @current_category.try(:id), category_type: @feature.try(:name), ft: @feature.try(:id)), classes: "pull-left mr-10", btn_type: "white") %>
86
48
 
87
- <% if display_manage_links? %>
88
- <td class="action-links hidden-sm hidden-xs" style="width:10%"><%= display_publishable_links(category) %></td>
49
+ </div>
50
+ <div class="col-md-6">
51
+ <%= search_form_kuppayam(Dhatu::Category, categories_path(parent_id: @current_category.try(:id), category_type: @feature.try(:name), ft: @feature.try(:id)), text: @filters[:query]) %>
52
+ </div>
53
+ </div>
54
+ </div>
55
+ <%= clear_tag(10) %>
89
56
 
90
- <td class="action-links hidden-sm hidden-xs" style="width:10%">
91
- <%= link_to raw("<i class=\"linecons-desktop\"></i> View Details"), category_path(category), :remote=>true, style: "color:#40bbea" %>
92
- <%= display_manage_links(category, @current_user) %>
93
- </td>
94
- <% end %>
57
+ <div class="col-md-12">
58
+ <div class="row">
59
+ <!-- <div class="col-md-12"> -->
60
+ <%# @filter_ui_settings.each do |filter_name, options| %>
61
+ <%# if options[:object_filter] == true %>
62
+ <%#= report_object_filter(filter_name, options) %>
63
+ <%# else %>
64
+ <%#= report_filter(filter_name, options) %>
65
+ <%# end %>
66
+ <%# end %>
67
+ <!-- </div> -->
68
+ <div class="col-md-12" id="div_category_breadcrumbs">
69
+ <% c_list = [] %>
70
+ <% c = @current_category %>
71
+ <% while c do %>
72
+ <% c_list << c %>
73
+ <% c = c.parent %>
74
+ <% end %>
95
75
 
96
- </tr>
97
- <% end %>
98
- </tbody>
99
- </table>
76
+ <% if c_list.count >= 1 %>
77
+ <ol class="breadcrumb auto-hidden1 bc-3">
78
+ <% c_list.reverse.each do |c| %>
79
+ <% if c_list[0] == c %>
80
+ <li class="active"><strong><%= c.display_name %></strong></li>
81
+ <% else %>
82
+ <li><%= link_to c.display_name, categories_path(parent_id: c.id), remote: true, class: "collapsed" %></li>
83
+ <% end %>
84
+ <% end %>
85
+ </ol>
86
+ <% end %>
87
+ </div>
88
+ </div>
89
+ </div>
100
90
  </div>
101
91
 
92
+ <div id="div_category_list" class="row mt-30">
93
+ <% @categories.each_with_index do |category, i| %>
94
+ <div id="div_category_<%= category.id %>" class="col-lg-2 col-md-3 col-sm-6 col-xs-6">
95
+
96
+ <div style="text-align: center;border: 1px solid #f1f1f1;padding:10px;margin-bottom:15px;">
97
+ <div style="height:200px;">
98
+ <i class="<%= Feature::FEATURE_ICONS[category.category_type] %>" style="font-size:60px;padding:20px;"></i><br>
99
+ <% if category.end_node? %>
100
+ <%= content_tag :span, category.display_name, style: ";font-size:14px;" %><br>
101
+ <%= content_tag :span, category.display_category_type, style: "color: #ffba00;" %><br>
102
+ <%= display_publishable_status(category) %>
103
+ <% else %>
104
+ <%= 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;" %><br>
105
+ <%= content_tag :span, category.display_category_type, style: "color: #cc3f44;" %><br>
106
+ <%= display_publishable_status(category) %>
107
+ <% end %><br>
108
+ </div>
109
+ <% if display_manage_links? %>
110
+ <div style="width: 90%;border: 1px solid #e0e0e0;margin:5%;">
111
+ <%#= display_publishable_links(category) %>
112
+ <%= link_to raw("<i class=\"fa-eye mr-5\"></i>"), category_path(category), :remote=>true, style: "color:#373e4a" %>
113
+ <% if @current_user.has_create_permission?(Dhatu::Category) %>
114
+ <%= link_to raw("<i class='fa-plus mr-5'></i>"), new_category_path(parent_id: category.try(:id),category_type: category.category_type, ft: @feature.try(:id)), class: "", remote: true, style: "color: #8dc63f" %>
115
+ <% end %>
116
+ <%= display_manage_links(category, @current_user, edit_text: "", delete_text: "") %>
117
+ </div>
118
+ <% end %>
119
+ </div>
120
+
121
+ </div>
122
+ <% end %>
123
+ </div>
124
+
125
+ <%= clear_tag %>
126
+
102
127
  <div class="row">
103
128
  <div class="col-sm-12">
104
129
  <%= paginate_kuppayam(@categories) %>
@@ -0,0 +1,118 @@
1
+ <div id="div_category_action_buttons">
2
+ <div class="row">
3
+ <div class="col-md-6">
4
+
5
+ <%#= theme_button('Back to Category Types', 'arrow-left', choose_category_type_path, classes: "pull-left mr-10", btn_type: "white", remote: false) %>
6
+
7
+ <% if @current_category %>
8
+ <%= theme_button('Back', 'arrow-left', categories_path(parent_id: @current_category.try(:parent_id), category_type: @category_type), classes: "pull-left mr-10", btn_type: "white") %>
9
+ <% end %>
10
+
11
+ <%= theme_button('Refresh', 'refresh', categories_path(parent_id: @current_category.try(:id), category_type: @feature.try(:name)), classes: "pull-left mr-10", btn_type: "white") %>
12
+
13
+ <% if @current_user.has_create_permission?(Dhatu::Category) %>
14
+ <%= theme_button('Add a Category', 'plus', new_category_path(parent_id: @current_category.try(:id), category_type: @feature.try(:name)), classes: "pull-left mr-10", btn_type: "success") %>
15
+ <% end %>
16
+
17
+ </div>
18
+ <div class="col-md-6">
19
+ <%= search_form_kuppayam(Dhatu::Category, categories_path, text: @filters[:query]) %>
20
+ </div>
21
+ </div>
22
+ </div>
23
+ <%= clear_tag(10) %>
24
+
25
+ <div class="row">
26
+ <div class="col-md-3">
27
+ <% @filter_ui_settings.each do |filter_name, options| %>
28
+ <% if options[:object_filter] == true %>
29
+ <%= report_object_filter(filter_name, options) %>
30
+ <% else %>
31
+ <%= report_filter(filter_name, options) %>
32
+ <% end %>
33
+ <% end %>
34
+ </div>
35
+ <div class="col-md-9" id="div_category_breadcrumbs">
36
+ <% c_list = [] %>
37
+ <% c = @current_category %>
38
+ <% while c do %>
39
+ <% c_list << c %>
40
+ <% c = c.parent %>
41
+ <% end %>
42
+
43
+ <% if c_list.count >= 1 %>
44
+ <ol class="breadcrumb auto-hidden1 bc-3">
45
+ <% c_list.reverse.each do |c| %>
46
+ <% if c_list[0] == c %>
47
+ <li class="active"><strong><%= c.display_name %></strong></li>
48
+ <% else %>
49
+ <li><%= link_to c.display_name, categories_path(parent_id: c.id), remote: true, class: "collapsed" %></li>
50
+ <% end %>
51
+ <% end %>
52
+ </ol>
53
+ <% end %>
54
+ </div>
55
+ </div>
56
+
57
+ <%= clear_tag %>
58
+
59
+ <div class="table-responsive">
60
+ <table class="table table-hover members-table middle-align">
61
+ <thead>
62
+ <tr>
63
+ <th style="text-align: center;width:60px" class="hidden-sm hidden-xs">#</th>
64
+ <th>Category</th>
65
+ <% if display_manage_links? %>
66
+ <th style="text-align: center;" colspan="2" class="hidden-sm hidden-xs">Actions</th>
67
+ <% end %>
68
+ </tr>
69
+ </thead>
70
+ <tbody>
71
+ <% @categories.each_with_index do |category, i| %>
72
+ <tr id="tr_category_<%= category.id %>">
73
+
74
+ <th scope="row" style="text-align: center;" class="hidden-sm hidden-xs">
75
+ <% if i < 0 %>
76
+ <i class="fa fa-check text-success"></i>
77
+ <% else %>
78
+ <%= i + 1 + (@per_page.to_i * (@current_page.to_i - 1)) %>
79
+ <% end %>
80
+ </th>
81
+
82
+ <% if category.end_node? %>
83
+ <td class="category-name">
84
+ <%= content_tag :span, category.display_name, style: ";font-size:14px;" %>
85
+ <%= display_publishable_status(category) %>
86
+ <div class="badge">Priority: <%= category.priority %></div><br>
87
+ <%= content_tag :span, category.display_category_type, style: "color: #ffba00;" %>
88
+ </td>
89
+ <% else %>
90
+ <td class="category-name">
91
+ <%= 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;" %>
92
+ <%= display_publishable_status(category) %>
93
+ <div class="badge">Priority: <%= category.priority %></div><br>
94
+ <%= content_tag :span, category.display_category_type, style: "color: #ffba00;" %>
95
+ </td>
96
+ <% end %>
97
+
98
+ <% if display_manage_links? %>
99
+ <td class="action-links hidden-sm hidden-xs" style="width:10%"><%= display_publishable_links(category) %></td>
100
+
101
+ <td class="action-links hidden-sm hidden-xs" style="width:10%">
102
+ <%= link_to raw("<i class=\"linecons-desktop\"></i> View Details"), category_path(category), :remote=>true, style: "color:#40bbea" %>
103
+ <%= display_manage_links(category, @current_user) %>
104
+ </td>
105
+ <% end %>
106
+
107
+ </tr>
108
+ <% end %>
109
+ </tbody>
110
+ </table>
111
+ </div>
112
+
113
+ <div class="row">
114
+ <div class="col-sm-12">
115
+ <%= paginate_kuppayam(@categories) %>
116
+ </div>
117
+ </div>
118
+
@@ -1,32 +1,28 @@
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"><%= category.display_name %></td>
13
- <% else %>
14
- <td class="category-name">
15
- <%= 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 %></td>
16
- <% end %>
17
-
18
- <td><%= category.display_category_type %></td>
19
- <td><%= category.priority %></td>
20
-
21
- <td class="hidden-sm hidden-xs"><%= display_publishable_status(category) %></td>
1
+ <div id="div_category_<%= category.id %>" class="col-lg-2 col-md-3 col-sm-6 col-xs-6">
22
2
 
23
- <% if display_manage_links? %>
24
- <td class="action-links hidden-sm hidden-xs" style="width:10%"><%= display_publishable_links(category) %></td>
25
-
26
- <td class="action-links hidden-sm hidden-xs" style="width:10%">
27
- <%= link_to raw("<i class=\"linecons-desktop\"></i> View Details"), category_path(category), :remote=>true, style: "color:#40bbea" %>
28
- <%= display_manage_links(category, @current_user) %>
29
- </td>
30
- <% end %>
31
-
32
- </tr>
3
+ <div style="text-align: center;border: 1px solid #f1f1f1;padding:10px;margin-bottom:15px;">
4
+ <div style="height:200px;">
5
+ <i class="<%= Feature::FEATURE_ICONS[category.category_type] %>" style="font-size:60px;padding:20px;"></i><br>
6
+ <% if category.end_node? %>
7
+ <%= content_tag :span, category.display_name, style: ";font-size:14px;" %><br>
8
+ <%= content_tag :span, category.display_category_type, style: "color: #ffba00;" %><br>
9
+ <%= display_publishable_status(category) %>
10
+ <% else %>
11
+ <%= 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;" %><br>
12
+ <%= content_tag :span, category.display_category_type, style: "color: #cc3f44;" %><br>
13
+ <%= display_publishable_status(category) %>
14
+ <% end %><br>
15
+ </div>
16
+ <% if display_manage_links? %>
17
+ <div style="width: 90%;border: 1px solid #e0e0e0;margin:5%;">
18
+ <%#= display_publishable_links(category) %>
19
+ <%= link_to raw("<i class=\"fa-eye mr-5\"></i>"), category_path(category), :remote=>true, style: "color:#373e4a" %>
20
+ <% if @current_user.has_create_permission?(Dhatu::Category) %>
21
+ <%= link_to raw("<i class='fa-plus mr-5'></i>"), new_category_path(parent_id: category.try(:id),category_type: category.category_type, ft: @feature.try(:id)), class: "", remote: true, style: "color: #8dc63f" %>
22
+ <% end %>
23
+ <%= display_manage_links(category, @current_user, edit_text: "", delete_text: "") %>
24
+ </div>
25
+ <% end %>
26
+ </div>
27
+
28
+ </div>