dhatu 0.3.6.pre.materialize → 0.3.7.pre.materialize

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/android-icon-144x144.png +0 -0
  3. data/app/assets/images/android-icon-192x192.png +0 -0
  4. data/app/assets/images/android-icon-36x36.png +0 -0
  5. data/app/assets/images/android-icon-48x48.png +0 -0
  6. data/app/assets/images/android-icon-72x72.png +0 -0
  7. data/app/assets/images/android-icon-96x96.png +0 -0
  8. data/app/assets/images/apple-icon-114x114.png +0 -0
  9. data/app/assets/images/apple-icon-120x120.png +0 -0
  10. data/app/assets/images/apple-icon-144x144.png +0 -0
  11. data/app/assets/images/apple-icon-152x152.png +0 -0
  12. data/app/assets/images/apple-icon-180x180.png +0 -0
  13. data/app/assets/images/apple-icon-57x57.png +0 -0
  14. data/app/assets/images/apple-icon-60x60.png +0 -0
  15. data/app/assets/images/apple-icon-72x72.png +0 -0
  16. data/app/assets/images/apple-icon-76x76.png +0 -0
  17. data/app/assets/images/apple-icon-precomposed.png +0 -0
  18. data/app/assets/images/apple-icon.png +0 -0
  19. data/app/assets/images/browserconfig.xml +2 -0
  20. data/app/assets/images/favicon-16x16.png +0 -0
  21. data/app/assets/images/favicon-32x32.png +0 -0
  22. data/app/assets/images/favicon-96x96.png +0 -0
  23. data/app/assets/images/favicon.ico +0 -0
  24. data/app/assets/images/favicon.png +0 -0
  25. data/app/assets/images/logo-small.png +0 -0
  26. data/app/assets/images/logo-white-small.png +0 -0
  27. data/app/assets/images/logo-white.png +0 -0
  28. data/app/assets/images/logo.png +0 -0
  29. data/app/assets/images/manifest.json +41 -0
  30. data/app/assets/images/ms-icon-144x144.png +0 -0
  31. data/app/assets/images/ms-icon-150x150.png +0 -0
  32. data/app/assets/images/ms-icon-310x310.png +0 -0
  33. data/app/assets/images/ms-icon-70x70.png +0 -0
  34. data/app/controllers/dhatu/application_controller.rb +2 -2
  35. data/app/controllers/dhatu/career_opportunities_controller.rb +2 -2
  36. data/app/controllers/dhatu/dashboard_controller.rb +165 -0
  37. data/app/controllers/dhatu/products_controller.rb +2 -2
  38. data/app/controllers/dhatu/projects_controller.rb +2 -2
  39. data/app/controllers/dhatu/services_controller.rb +2 -2
  40. data/app/models/dhatu/career_opportunity.rb +1 -1
  41. data/app/models/dhatu/category.rb +2 -10
  42. data/app/views/dhatu/dashboard/bootstrap4/_index.html.erb +41 -0
  43. data/app/views/dhatu/dashboard/index.html.erb +4 -4
  44. data/app/views/dhatu/dashboard/materialize/_index.html.erb +26 -0
  45. data/app/views/dhatu/dashboard/xenon/_index.html.erb +26 -0
  46. data/app/views/layouts/kuppayam/bootstrap4/_footer.html.erb +24 -0
  47. data/app/views/layouts/kuppayam/{_header.html.erb → bootstrap4/_header.html.erb} +0 -0
  48. data/app/views/layouts/kuppayam/bootstrap4/_navbar.html.erb +271 -0
  49. data/app/views/layouts/kuppayam/bootstrap4/_sidebar.html.erb +251 -0
  50. data/app/views/layouts/kuppayam/{_footer.html.erb → materialize/_footer.html.erb} +1 -1
  51. data/app/views/layouts/kuppayam/materialize/_header.html.erb +43 -0
  52. data/app/views/layouts/kuppayam/{_navbar.html.erb → materialize/_navbar.html.erb} +0 -0
  53. data/app/views/layouts/kuppayam/{_sidebar.html.erb → materialize/_sidebar.html.erb} +5 -5
  54. data/app/views/layouts/kuppayam/xenon/_footer.html.erb +25 -0
  55. data/app/views/layouts/kuppayam/xenon/_header.html.erb +43 -0
  56. data/app/views/layouts/kuppayam/xenon/_navbar.html.erb +55 -0
  57. data/app/views/layouts/kuppayam/xenon/_sidebar.html.erb +267 -0
  58. data/app/views/pattana/dashboard/_index.html.erb +1 -1
  59. data/app/views/usman/dashboard/_super_admin_index.html.erb +1 -1
  60. data/lib/dhatu/version.rb +1 -1
  61. metadata +55 -14
  62. data/app/views/dhatu/dashboard/_index.html.erb +0 -141
  63. data/app/views/layouts/dhatu/application.html.erb +0 -14
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0ead6bb74e421b774e38cffdd312736bdb198cee746f475b7e9b8ff601e694be
4
- data.tar.gz: f2f6f71bccd0af066727f16d3d49789736e9da803ae62e89e119763c915f816a
3
+ metadata.gz: b7e514404f5159a6180032e4868ebe93b3d67b50705cb51f40e75d7c3d0e6bfa
4
+ data.tar.gz: 3bb8191e6a5aee1dfe8e930476bd7361fdbfe19fc333e7483f2a23582e739a91
5
5
  SHA512:
6
- metadata.gz: 06fd06c6a66af62367d7fb8cced1ccf2d5194569010e9fa896bee6e2942422a3dd87784a9386e028148931b6d84b9cfcd1c447cff062cc2174615d2b2a555358
7
- data.tar.gz: 2f8731a7c846f2fae4a4f058ebb7f1bd0b5810278758cb310bcf083437a22afa667793d59d3f40a002548fd695c5bcc2ba5ff0e803de18d940dfd48f5178cade
6
+ metadata.gz: 71f3557e5be6d76ed0a713ab2b6787af47a2a6acaa10cb2712d0829e2f494557b93254010e2bb0447be8d8ffcb429f52f14c7690fb795ce7927a387a0286fc14
7
+ data.tar.gz: 88b9f7e82e240b882f23e673677781051524f0aafaf6b20e8d04e588892829186e7bf15d1a5826f86b5e4f15835b1224e7bfa3f3d5b80ceae06cac4fc36abcb5
@@ -0,0 +1,2 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <browserconfig><msapplication><tile><square70x70logo src="/ms-icon-70x70.png"/><square150x150logo src="/ms-icon-150x150.png"/><square310x310logo src="/ms-icon-310x310.png"/><TileColor>#ffffff</TileColor></tile></msapplication></browserconfig>
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "App",
3
+ "icons": [
4
+ {
5
+ "src": "\/android-icon-36x36.png",
6
+ "sizes": "36x36",
7
+ "type": "image\/png",
8
+ "density": "0.75"
9
+ },
10
+ {
11
+ "src": "\/android-icon-48x48.png",
12
+ "sizes": "48x48",
13
+ "type": "image\/png",
14
+ "density": "1.0"
15
+ },
16
+ {
17
+ "src": "\/android-icon-72x72.png",
18
+ "sizes": "72x72",
19
+ "type": "image\/png",
20
+ "density": "1.5"
21
+ },
22
+ {
23
+ "src": "\/android-icon-96x96.png",
24
+ "sizes": "96x96",
25
+ "type": "image\/png",
26
+ "density": "2.0"
27
+ },
28
+ {
29
+ "src": "\/android-icon-144x144.png",
30
+ "sizes": "144x144",
31
+ "type": "image\/png",
32
+ "density": "3.0"
33
+ },
34
+ {
35
+ "src": "\/android-icon-192x192.png",
36
+ "sizes": "192x192",
37
+ "type": "image\/png",
38
+ "density": "4.0"
39
+ }
40
+ ]
41
+ }
@@ -6,7 +6,7 @@ module Dhatu
6
6
  before_action :current_user
7
7
  before_action :require_user
8
8
  before_action :require_site_admin
9
-
9
+
10
10
  helper_method :breadcrumb_home_path
11
11
 
12
12
  private
@@ -18,6 +18,6 @@ module Dhatu
18
18
  def breadcrumb_home_path
19
19
  dhatu.dashboard_path
20
20
  end
21
-
21
+
22
22
  end
23
23
  end
@@ -130,10 +130,10 @@ module Dhatu
130
130
  def breadcrumbs_configuration
131
131
  {
132
132
  heading: "Manage Career Opportunities",
133
- icon: "fa-gift",
133
+ icon: "fa-male",
134
134
  description: "Listing all Career Opportunities",
135
135
  links: [{name: "Dashboard", link: breadcrumb_home_path, icon: 'fa-dashboard'},
136
- {name: "Manage CareerOpportunities", link: dhatu.career_opportunities_path, icon: 'fa-gift', active: true}]
136
+ {name: "Manage CareerOpportunities", link: dhatu.career_opportunities_path, icon: 'fa-male', active: true}]
137
137
  }
138
138
  end
139
139
 
@@ -3,6 +3,171 @@ module Dhatu
3
3
 
4
4
  # GET /dashboard
5
5
  def index
6
+ @dashboard_items = {}
7
+ @dashboard_items = {
8
+ dhatu_website_items: {
9
+ pages: {
10
+ text: "Pages",
11
+ icon_class: "fa-file",
12
+ url: dhatu.pages_url,
13
+ has_permission: @current_user.has_read_permission?(Dhatu::Page)
14
+ },
15
+ categories: {
16
+ text: "Categories",
17
+ icon_class: "fa-sitemap",
18
+ url: dhatu.choose_category_type_url,
19
+ has_permission: @current_user.has_read_permission?(Dhatu::Category)
20
+ },
21
+ projects: {
22
+ text: "Projects",
23
+ icon_class: "fa-tasks",
24
+ url: dhatu.projects_url,
25
+ has_permission: @current_user.has_read_permission?(Dhatu::Project)
26
+ },
27
+ manufacturers: {
28
+ text: "Manufacturers",
29
+ icon_class: "fa-institution",
30
+ url: dhatu.manufacturers_url,
31
+ has_permission: @current_user.has_read_permission?(Dhatu::Manufacturer)
32
+ },
33
+ products: {
34
+ text: "Products",
35
+ icon_class: "fa-th",
36
+ url: dhatu.products_url,
37
+ has_permission: @current_user.has_read_permission?(Dhatu::Product)
38
+ },
39
+ services: {
40
+ text: "Services",
41
+ icon_class: "fa-wrench",
42
+ url: dhatu.services_url,
43
+ has_permission: @current_user.has_read_permission?(Dhatu::Service)
44
+ },
45
+ photo_albums: {
46
+ text: "Photo Gallery",
47
+ icon_class: "fa-image",
48
+ url: dhatu.photo_albums_url,
49
+ has_permission: @current_user.has_read_permission?(Dhatu::PhotoAlbum)
50
+ },
51
+ prices: {
52
+ text: "Prices",
53
+ icon_class: "fa-dollar",
54
+ url: dhatu.prices_url,
55
+ has_permission: @current_user.has_read_permission?(Dhatu::Price)
56
+ },
57
+ branches: {
58
+ text: "Branches",
59
+ icon_class: "fa-map-marker",
60
+ url: dhatu.branches_url,
61
+ has_permission: @current_user.has_read_permission?(Dhatu::Branch)
62
+ },
63
+ events: {
64
+ text: "Events",
65
+ icon_class: "fa-calendar",
66
+ url: dhatu.events_url,
67
+ has_permission: @current_user.has_read_permission?(Dhatu::Event)
68
+ },
69
+ testimonials: {
70
+ text: "Testimonials",
71
+ icon_class: "fa-comment",
72
+ url: dhatu.testimonials_url,
73
+ has_permission: @current_user.has_read_permission?(Dhatu::Testimonial)
74
+ },
75
+ careers: {
76
+ text: "Careers",
77
+ icon_class: "fa-male",
78
+ url: dhatu.career_opportunities_url,
79
+ has_permission: @current_user.has_read_permission?(Dhatu::CareerOpportunity)
80
+ },
81
+ team: {
82
+ text: "Team",
83
+ icon_class: "fa-group",
84
+ url: dhatu.team_members_url,
85
+ has_permission: @current_user.has_read_permission?(Dhatu::TeamMember)
86
+ }
87
+ },
88
+ dhatu_marketing_items: {
89
+ promotions: {
90
+ text: "Promotions",
91
+ icon_class: "fa-gift",
92
+ url: dhatu.promotions_url,
93
+ has_permission: @current_user.has_read_permission?(Dhatu::Promotion)
94
+ },
95
+ promotion_enquiries: {
96
+ text: "Promotional Enquiries",
97
+ icon_class: "fa-bullhorn",
98
+ url: dhatu.promotion_enquiries_url,
99
+ has_permission: @current_user.has_read_permission?(Dhatu::PromotionEnquiry)
100
+ },
101
+ bookings: {
102
+ text: "Bookings",
103
+ icon_class: "fa-calendar",
104
+ url: dhatu.bookings_url,
105
+ has_permission: @current_user.has_read_permission?(Dhatu::Booking)
106
+ },
107
+ blog_posts: {
108
+ text: "Blog",
109
+ icon_class: "fa-newspaper-o",
110
+ url: dhatu.blog_posts_url,
111
+ has_permission: @current_user.has_read_permission?(Dhatu::BlogPost)
112
+ },
113
+ offers: {
114
+ text: "Offers",
115
+ icon_class: "fa-gift",
116
+ url: dhatu.offers_url,
117
+ has_permission: @current_user.has_read_permission?(Dhatu::Offer)
118
+ }
119
+ },
120
+ configuration_items: {
121
+ features: {
122
+ text: "Manage Features",
123
+ icon_class: "fa-diamond",
124
+ url: usman.features_url,
125
+ has_permission: @current_user.has_read_permission?(Feature)
126
+ },
127
+ users: {
128
+ text: "Manage Users",
129
+ icon_class: "fa-user",
130
+ url: usman.users_url,
131
+ has_permission: @current_user.has_read_permission?(User)
132
+ },
133
+ # registrations: {
134
+ # text: "Manage Registrations",
135
+ # icon_class: "fa-mobile",
136
+ # url: usman.registrations_url,
137
+ # has_permission: @current_user.has_read_permission?(Registration)
138
+ # },
139
+ roles: {
140
+ text: "Manage Roles",
141
+ icon_class: "fa-graduation-cap",
142
+ url: usman.roles_url,
143
+ has_permission: @current_user.has_read_permission?(Role)
144
+ },
145
+ permissions: {
146
+ text: "Manage Permissions",
147
+ icon_class: "fa-lock",
148
+ url: usman.permissions_url,
149
+ has_permission: @current_user.has_read_permission?(Permission)
150
+ },
151
+ countries: {
152
+ text: "Manage Countries",
153
+ icon_class: "fa-flag-checkered",
154
+ url: pattana.countries_url,
155
+ has_permission: @current_user.has_read_permission?(Country)
156
+ },
157
+ regions: {
158
+ text: "Manage Regions",
159
+ icon_class: "fa-globe",
160
+ url: pattana.regions_url,
161
+ has_permission: @current_user.has_read_permission?(Region)
162
+ },
163
+ cities: {
164
+ text: "Manage Cities",
165
+ icon_class: "fa-map-marker",
166
+ url: pattana.cities_url,
167
+ has_permission: @current_user.has_read_permission?(City)
168
+ },
169
+ }
170
+ } if @current_user
6
171
  end
7
172
 
8
173
  private
@@ -150,10 +150,10 @@ module Dhatu
150
150
  def breadcrumbs_configuration
151
151
  {
152
152
  heading: "Manage Products",
153
- icon: "linecons-shop",
153
+ icon: "fa-th",
154
154
  description: "Listing all Products",
155
155
  links: [{name: "Dashboard", link: breadcrumb_home_path, icon: 'fa-dashboard'},
156
- {name: "Manage Products", link: dhatu.products_path, icon: 'linecons-shop', active: true}]
156
+ {name: "Manage Products", link: dhatu.products_path, icon: 'fa-th', active: true}]
157
157
  }
158
158
  end
159
159
 
@@ -138,10 +138,10 @@ module Dhatu
138
138
  def breadcrumbs_configuration
139
139
  {
140
140
  heading: "Manage Projects",
141
- icon: "fa-rocket",
141
+ icon: "fa-tasks",
142
142
  description: "Listing all Projects",
143
143
  links: [{name: "Dashboard", link: breadcrumb_home_path, icon: 'fa-dashboard'},
144
- {name: "Manage Projects", link: dhatu.projects_path, icon: 'fa-rocket', active: true}]
144
+ {name: "Manage Projects", link: dhatu.projects_path, icon: 'fa-tasks', active: true}]
145
145
  }
146
146
  end
147
147
 
@@ -138,10 +138,10 @@ module Dhatu
138
138
  def breadcrumbs_configuration
139
139
  {
140
140
  heading: "Manage Services",
141
- icon: "fa-glass",
141
+ icon: "fa-wrench",
142
142
  description: "Listing all Services",
143
143
  links: [{name: "Dashboard", link: breadcrumb_home_path, icon: 'fa-dashboard'},
144
- {name: "Manage Services", link: dhatu.services_path, icon: 'fa-glass', active: true}]
144
+ {name: "Manage Services", link: dhatu.services_path, icon: 'fa-wrench', active: true}]
145
145
  }
146
146
  end
147
147
 
@@ -9,7 +9,7 @@ class Dhatu::CareerOpportunity < Dhatu::ApplicationRecord
9
9
 
10
10
  # Validations
11
11
  validates :title, presence: true, length: {minimum: 5, maximum: 256}, allow_blank: false
12
- validates :sub_title, allow_blank: true, length: {minimum: 5, maximum: 256}, allow_blank: false
12
+ validates :sub_title, allow_blank: true, length: {minimum: 5, maximum: 256}
13
13
  validates :short_description, presence: true
14
14
  validates :description, presence: true
15
15
 
@@ -37,18 +37,10 @@ class Dhatu::Category < Dhatu::ApplicationRecord
37
37
  scope :search, lambda {|query| where("LOWER(name) LIKE LOWER('%#{query}%') OR\
38
38
  LOWER(permalink) LIKE LOWER('%#{query}%') OR\
39
39
  LOWER(one_liner) LIKE LOWER('%#{query}%') OR\
40
- LOWER(description) LIKE LOWER('%#{query}%')")
41
- }
42
-
40
+ LOWER(description) LIKE LOWER('%#{query}%')")}
41
+
43
42
  scope :filter_by_category_type, lambda { |ctype| where("category_type = ?", ctype) }
44
43
 
45
- scope :status, lambda { |status| where("LOWER(status)='#{status}'") }
46
- scope :featured, lambda { |val| where(featured: val) }
47
-
48
- scope :published, -> { where(status: PUBLISHED) }
49
- scope :unpublished, -> { where(status: UNPUBLISHED) }
50
- scope :removed, -> { where(status: REMOVED) }
51
-
52
44
  # Import Methods
53
45
 
54
46
  def self.save_row_data(hsh)
@@ -0,0 +1,41 @@
1
+ <nav>
2
+ <div class="nav nav-tabs" id="nav-tab" role="tablist">
3
+ <a class="nav-item nav-link active" id="nav-website-tab" data-toggle="tab" href="#nav-website" role="tab" aria-controls="nav-website" aria-selected="true">Website</a>
4
+ <a class="nav-item nav-link" id="nav-marketing-tab" data-toggle="tab" href="#nav-marketing" role="tab" aria-controls="nav-marketing" aria-selected="false">Marketing</a>
5
+ <a class="nav-item nav-link" id="nav-configuration-tab" data-toggle="tab" href="#nav-configuration" role="tab" aria-controls="nav-configuration" aria-selected="false">Configuration</a>
6
+ </div>
7
+ </nav>
8
+ <div class="tab-content" id="nav-tabContent">
9
+ <div class="tab-pane fade show active" id="nav-website" role="tabpanel" aria-labelledby="nav-website-tab">
10
+ <!-- Website Elements -->
11
+ <% if (@dashboard_items[:dhatu_website_items].map{|x, y| y[:has_permission] }).compact.uniq.any? %>
12
+ <div class="mt-30"></div>
13
+ <%= render partial: "/layouts/dashboard/bootstrap4/items", locals: { items: @dashboard_items[:dhatu_website_items] } %>
14
+ <% end %>
15
+ </div>
16
+ <div class="tab-pane fade" id="nav-marketing" role="tabpanel" aria-labelledby="nav-marketing-tab">
17
+ <!-- Marketing Elements -->
18
+ <% if (@dashboard_items[:dhatu_marketing_items].map{|x, y| y[:has_permission] }).compact.uniq.any? %>
19
+
20
+ <div class="mt-30"></div>
21
+
22
+ <%= render partial: "/layouts/dashboard/bootstrap4/items", locals: { items: @dashboard_items[:dhatu_marketing_items] } %>
23
+ <% end %>
24
+ </div>
25
+ <div class="tab-pane fade" id="nav-configuration" role="tabpanel" aria-labelledby="nav-configuration-tab">
26
+ <!-- Configurations -->
27
+ <% if (@dashboard_items[:configuration_items].map{|x, y| y[:has_permission] }).compact.uniq.any? %>
28
+
29
+ <div class="mt-30"></div>
30
+
31
+ <%= render partial: "/layouts/dashboard/bootstrap4/items", locals: { items: @dashboard_items[:configuration_items] } %>
32
+
33
+ <% end %>
34
+ </div>
35
+ </div>
36
+
37
+
38
+
39
+
40
+
41
+
@@ -1,8 +1,8 @@
1
- <%= render partial: "index" %>
1
+ <%= render partial: "dhatu/dashboard/#{@current_layout}/index" %>
2
2
 
3
3
  <!-- Manage Users -->
4
- <%= render partial: "usman/dashboard/index" %>
5
- <%= render partial: "usman/dashboard/super_admin_index" if @current_user.super_admin? %>
4
+ <%#= render partial: "usman/dashboard/materialize/index" %>
5
+ <%#= render partial: "usman/dashboard/materialize/super_admin_index" if @current_user.super_admin? %>
6
6
 
7
7
  <!-- Manage Location -->
8
- <%= render partial: "pattana/dashboard/index" %>
8
+ <%#= render partial: "pattana/dashboard/materialize/index" %>