dhatu 0.2.2 → 0.2.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 772976e588fc8350ad7f5d811b3bcdfd66c5b94ddb4b1bb6ae5509a6e9c53942
4
- data.tar.gz: ccf828b3ff63233d9f804594804fff61f14a1ce3f26180fa8b29cdf7cd673a7c
3
+ metadata.gz: cc360634b9ede99c5c6b00f614dbfad23879cc74cec417ad0d42f86cc688a97a
4
+ data.tar.gz: c38f864a578245c25b542c9db371a9d650fbf06e9784043e88ff3c1f0a493624
5
5
  SHA512:
6
- metadata.gz: 0eb0a29894e4d1a4a10c02eeab83c4d1ccaaa1d16caf8f0ed364f4ef17d8545660c0e4319c324ab1ee747ba1e404a9a19510392f01e48f5a11b48c442680d673
7
- data.tar.gz: 208b25447aa574358c8aef658bf6ca53c7d15970c5d1fde29a292cb970338c5c65401f159acc08ca087b4b920233c0bf5fa02e3876614c930c337706ce450e6a
6
+ metadata.gz: 61b29b8894b190a2489103fd8f7d4ff1667c656e17f94a3813a52f352830ab8b35ac8efcb7009cd420d07849e692a901b32ef5568b2936187ac1d8abf1203f00
7
+ data.tar.gz: 0ca3f28972956e9d1adad6f9356a23702c05907918b02db9699172d761ed6ec9dc57805eb0ae54cf53e2983c4175b2f42410fb109875bb5344dd322d104b444a
@@ -13,7 +13,10 @@ class Dhatu::Booking < Dhatu::ApplicationRecord
13
13
  validates :mobile, length: {maximum: 250}, allow_blank: true
14
14
 
15
15
  # Associations
16
- belongs_to :service
16
+ belongs_to :service, optional: true
17
+
18
+ # Serializers
19
+ # serialize :additional_attributes, Hash
17
20
 
18
21
  # ------------------
19
22
  # Class Methods
@@ -4,9 +4,11 @@
4
4
  <tr>
5
5
  <th style="text-align: center;width:8%" class="hidden-sm hidden-xs">#</th>
6
6
  <th>Name</th>
7
- <th class="hidden-sm hidden-xs">Message</th>
7
+ <th>Date / Time</th>
8
+ <th>Service</th>
9
+ <th style="width:20%" class="hidden-sm hidden-xs">Message</th>
8
10
  <% if display_manage_links? %>
9
- <th style="text-align: center;" class="" >Actions</th>
11
+ <th style="text-align: center;width:10%;" class="" >Actions</th>
10
12
  <% end %>
11
13
  </tr>
12
14
  </thead>
@@ -21,15 +23,26 @@
21
23
 
22
24
  <td class="display-link">
23
25
  <% if booking.new? || booking.unread? %>
24
- <%= link_to booking.name, booking_path(booking), remote: true, style: "font-weight:800;" %><br>
26
+ <%= link_to booking.name, booking_path(booking), remote: true, style: "font-weight:800;" %>
25
27
  <% else %>
26
- <%= link_to booking.name, booking_path(booking), remote: true %>
28
+ <%= link_to booking.name, booking_path(booking), remote: true %></td>
27
29
  <% end %>
28
- <%= link_to time_ago_in_words(booking.created_at) + " ago", booking_path(booking), remote: true, style: "color:chocolate;font-size:10px;" %>
30
+ <br><%= link_to booking.email, booking_path(booking), remote: true %>
31
+ <br><%= link_to booking.mobile, booking_path(booking), remote: true %>
32
+ <br><%= link_to time_ago_in_words(booking.created_at) + " ago", booking_path(booking), remote: true, style: "color:chocolate;font-size:10px;" %>
29
33
  <%= display_readable_status(booking) %>
30
34
  </td>
31
35
 
32
- <td class="hidden-sm hidden-xs"><%= truncate booking.message, length: 30 %></td>
36
+ <td class="">
37
+ <strong><%= booking.date %></strong><br>
38
+ <%= booking.time %>
39
+ </td>
40
+
41
+ <td class="">
42
+ <%= content_tag :span, booking.try(:service).try(:name), style: "color: chocolate; font-weight:bold;" %>
43
+ </td>
44
+
45
+ <td class="hidden-sm hidden-xs"><%= truncate booking.message, length: 100 %></td>
33
46
 
34
47
  <% if display_manage_links? %>
35
48
  <td class="action-links" style="width:15%"><%= display_readable_links(booking) %></td>
@@ -9,7 +9,24 @@
9
9
  <%= display_featured(@booking) %>
10
10
  <%= clear_tag(10) %>
11
11
  <div class="well">
12
- <%= theme_panel_description(@booking.message) %>
12
+ <div class="row mb-10">
13
+ <div class="col-sm-3"> Service: </div><%= theme_panel_description(@booking.service.name, "col-sm-9") %>
14
+ </div>
15
+ <div class="row mb-10">
16
+ <div class="col-sm-3"> Email: </div><%= theme_panel_description(@booking.email, "col-sm-9") %>
17
+ </div>
18
+ <div class="row mb-10">
19
+ <div class="col-sm-3"> Mobile: </div><%= theme_panel_description(@booking.mobile, "col-sm-9") %>
20
+ </div>
21
+ <div class="row mb-10">
22
+ <div class="col-sm-3"> Date: </div><%= theme_panel_description(@booking.date, "col-sm-4") %>
23
+ <div class="col-sm-3"> Time: </div><%= theme_panel_description(@booking.time, "col-sm-3") %>
24
+ </div>
25
+ <div class="row mb-10">
26
+ <div class="col-sm-3"> Message: </div><%= theme_panel_description(@booking.message, "col-sm-9") %>
27
+ </div>
28
+
29
+
13
30
  </div>
14
31
  <%= clear_tag(10) %>
15
32
 
@@ -85,7 +85,7 @@
85
85
  },
86
86
  promotion_enquiries: {
87
87
  text: "Promotional Enquiries",
88
- icon_class: "linecons-sound",
88
+ icon_class: "fa-bullhorn",
89
89
  url: dhatu.promotion_enquiries_url,
90
90
  has_permission: @current_user.has_read_permission?(Dhatu::PromotionEnquiry)
91
91
  },
@@ -72,7 +72,7 @@
72
72
  },
73
73
  promotion_enquiries: {
74
74
  text: "Promotional Enquiries",
75
- icon_class: "linecons-sound",
75
+ icon_class: "fa-bullhorn",
76
76
  url: dhatu.promotion_enquiries_url,
77
77
  has_permission: @current_user.has_read_permission?(Dhatu::PromotionEnquiry)
78
78
  },
@@ -112,7 +112,7 @@
112
112
  },
113
113
  roles: {
114
114
  text: "Manage Roles",
115
- icon_class: "linecons-graduation-cap",
115
+ icon_class: "fa-graduation-cap",
116
116
  url: usman.roles_url,
117
117
  has_permission: @current_user.has_read_permission?(Role)
118
118
  },
@@ -128,7 +128,7 @@
128
128
  configuration_items = {
129
129
  features: {
130
130
  text: "Manage Features",
131
- icon_class: "linecons-diamond",
131
+ icon_class: "fa-diamond",
132
132
  url: usman.features_url,
133
133
  has_permission: @current_user.has_read_permission?(Feature)
134
134
  }
@@ -192,14 +192,14 @@
192
192
  <% if @current_user.super_admin? || @current_user.has_role?("Site Admin") %>
193
193
  <li class="<%= nav_active?('admin/dashboard') ? 'active' : '' %>">
194
194
  <% begin %>
195
- <%= link_to raw("<i class=\"linecons-desktop\"></i> <span class='title'>Dashboard</span>"), main_app.dashboard_path %>
195
+ <%= link_to raw("<i class=\"fa-desktop\"></i> <span class='title'>Dashboard</span>"), main_app.dashboard_path %>
196
196
  <% rescue %>
197
- <%= link_to raw("<i class=\"linecons-desktop\"></i> <span class='title'>Dashboard</span>"), dhatu.dashboard_path %>
197
+ <%= link_to raw("<i class=\"fa-desktop\"></i> <span class='title'>Dashboard</span>"), dhatu.dashboard_path %>
198
198
  <% end %>
199
199
  </li>
200
200
  <% else %>
201
201
  <li class="<%= nav_active?('profile/dashboard') ? 'active' : '' %>">
202
- <%= link_to raw("<i class=\"linecons-desktop\"></i> <span class='title'>Dashboard</span>"), usman.my_account_url %>
202
+ <%= link_to raw("<i class=\"fa-desktop\"></i> <span class='title'>Dashboard</span>"), usman.my_account_url %>
203
203
  </li>
204
204
  <% end %>
205
205
 
@@ -257,7 +257,7 @@
257
257
  <% if configuration_items.map{|x,y| x if y[:has_permission] }.compact.any? %>
258
258
  <li class="">
259
259
  <a href="#">
260
- <i class="linecons-params"></i>
260
+ <i class="fa-sliders-h"></i>
261
261
  <span class="title">Configurations</span>
262
262
  </a>
263
263
  <ul>
@@ -289,10 +289,10 @@
289
289
  <% end %>
290
290
 
291
291
  <li class="<%= nav_active?('profile/profile') ? 'active' : '' %>">
292
- <a href="#"><i class="linecons-user"></i><span class="title">My Account</span></a>
292
+ <a href="#"><i class="fa-users"></i><span class="title">My Account</span></a>
293
293
  <ul>
294
294
  <li class="<%= nav_class("profile/settings") %>">
295
- <%= link_to raw("<i class=\"linecons-cog\"></i> <span class='title'>User Settings</span>"), "#" %>
295
+ <%= link_to raw("<i class=\"fa-cog\"></i> <span class='title'>User Settings</span>"), "#" %>
296
296
  </li>
297
297
  </ul>
298
298
  </li>
@@ -2,7 +2,7 @@
2
2
  super_admin_items = {
3
3
  features: {
4
4
  text: "Features",
5
- icon_class: "linecons-diamond",
5
+ icon_class: "fa-diamond",
6
6
  url: usman.features_url,
7
7
  has_permission: @current_user.has_read_permission?(Feature)
8
8
  }
@@ -1,7 +1,6 @@
1
1
  class CreateBlogPosts < ActiveRecord::Migration[5.0]
2
2
  def change
3
3
  create_table :blog_posts do |t|
4
-
5
4
  t.string :title, null: false, limit: 256
6
5
  t.string :slug, null: true, limit: 64
7
6
  t.string :author, null: true, limit: 256
@@ -21,6 +20,5 @@ class CreateBlogPosts < ActiveRecord::Migration[5.0]
21
20
  t.timestamps null: false
22
21
  end
23
22
  add_index :blog_posts, :status
24
-
25
23
  end
26
24
  end
@@ -14,6 +14,9 @@ class CreateBookings < ActiveRecord::Migration[5.1]
14
14
 
15
15
  t.boolean :featured, default: false
16
16
  t.string :status, :null => false, :default=>"new", :limit=>16
17
+
18
+ # Additional Details
19
+ t.text :additional_attributes
17
20
 
18
21
  t.timestamps null: false
19
22
  end
@@ -1,5 +1,5 @@
1
1
  module Dhatu
2
- VERSION = '0.2.2'
2
+ VERSION = '0.2.3'
3
3
  # The old version to migrate existing applications
4
4
  # VERSION = '0.1.25'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dhatu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - kpvarma
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-02 00:00:00.000000000 Z
11
+ date: 2018-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails