dhatu 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/dhatu/booking.rb +4 -1
- data/app/views/dhatu/bookings/_index.html.erb +19 -6
- data/app/views/dhatu/bookings/_show.html.erb +18 -1
- data/app/views/dhatu/dashboard/_index.html.erb +1 -1
- data/app/views/layouts/kuppayam/_sidebar.html.erb +9 -9
- data/app/views/usman/dashboard/_super_admin_index.html.erb +1 -1
- data/db/migrate/20171012103806_create_blog_posts.rb +0 -2
- data/db/migrate/20171104163661_create_bookings.rb +3 -0
- data/lib/dhatu/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc360634b9ede99c5c6b00f614dbfad23879cc74cec417ad0d42f86cc688a97a
|
4
|
+
data.tar.gz: c38f864a578245c25b542c9db371a9d650fbf06e9784043e88ff3c1f0a493624
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61b29b8894b190a2489103fd8f7d4ff1667c656e17f94a3813a52f352830ab8b35ac8efcb7009cd420d07849e692a901b32ef5568b2936187ac1d8abf1203f00
|
7
|
+
data.tar.gz: 0ca3f28972956e9d1adad6f9356a23702c05907918b02db9699172d761ed6ec9dc57805eb0ae54cf53e2983c4175b2f42410fb109875bb5344dd322d104b444a
|
data/app/models/dhatu/booking.rb
CHANGED
@@ -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
|
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;"
|
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
|
-
|
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="
|
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
|
-
|
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
|
|
@@ -72,7 +72,7 @@
|
|
72
72
|
},
|
73
73
|
promotion_enquiries: {
|
74
74
|
text: "Promotional Enquiries",
|
75
|
-
icon_class: "
|
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: "
|
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: "
|
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=\"
|
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=\"
|
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=\"
|
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="
|
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="
|
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=\"
|
295
|
+
<%= link_to raw("<i class=\"fa-cog\"></i> <span class='title'>User Settings</span>"), "#" %>
|
296
296
|
</li>
|
297
297
|
</ul>
|
298
298
|
</li>
|
@@ -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
|
data/lib/dhatu/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2018-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|