usman 0.2.10 → 0.2.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/usman/registration_devices_controller.rb +0 -44
- data/app/controllers/usman/users_controller.rb +1 -1
- data/app/helpers/usman/authentication_helper.rb +6 -1
- data/app/views/usman/features/_index.html.erb +7 -1
- data/app/views/usman/features/_row.html.erb +8 -2
- data/app/views/usman/registration_devices/_index.html.erb +5 -25
- data/app/views/usman/registration_devices/_show.html.erb +51 -0
- data/app/views/usman/registrations/_index.html.erb +9 -5
- data/app/views/usman/registrations/_show.html.erb +83 -28
- data/app/views/usman/users/_show.html.erb +53 -9
- data/config/routes.rb +1 -1
- data/lib/usman/version.rb +1 -1
- metadata +7 -7
- data/app/views/usman/registration_devices/_form.html.erb +0 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b2112f5abecf2b7e9a3f96c68f96f1d10cce382
|
4
|
+
data.tar.gz: 82b7fdf3aa9fda6dbff8b0af6fa7b4ae63959e4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9bcb588f538bee5cd3d386c49454f4969d39de1962f30fe240894e1a3761854d8fa7143827dc9db734a5ee5fce1c720b765a4fb4514798071d602be3440aca15
|
7
|
+
data.tar.gz: 153befa09c258ef921cae756577f734d1380ed1759026ef3e30aec3e15b55a01dac73a42a4188ee0b9c4aa01f0aa5562a864818d99e1bf85c4cb092b8cd8fda8
|
@@ -21,50 +21,6 @@ module Usman
|
|
21
21
|
render_accordingly
|
22
22
|
end
|
23
23
|
|
24
|
-
def new
|
25
|
-
@device = Device.new
|
26
|
-
render_accordingly
|
27
|
-
end
|
28
|
-
|
29
|
-
def create
|
30
|
-
@device = @r_object = Device.find_by_id(permitted_params[:id])
|
31
|
-
if @device.add_registration(@registration)
|
32
|
-
set_notification(true, I18n.t('status.success'), "Registration '#{@registration.name}' has been assigned to the device '#{@device.name}'")
|
33
|
-
else
|
34
|
-
set_notification(false, I18n.t('status.success'), "Failed to assign the Registration '#{@registration.name}'")
|
35
|
-
end
|
36
|
-
action_name = params[:action].to_s == "create" ? "new" : "edit"
|
37
|
-
render_or_redirect(false, resource_url(@r_object), action_name)
|
38
|
-
end
|
39
|
-
|
40
|
-
def destroy
|
41
|
-
@device = @r_object = Device.find_by_id(params[:id])
|
42
|
-
if @device
|
43
|
-
if @device.remove_registration(@registration)
|
44
|
-
get_collections
|
45
|
-
set_flash_message(I18n.t('success.deleted'), :success)
|
46
|
-
set_notification(true, I18n.t('status.success'), "Registration '#{@registration.name}' has been removed for the device '#{@device.name}'")
|
47
|
-
@destroyed = true
|
48
|
-
else
|
49
|
-
message = I18n.t('errors.failed_to_delete', item: default_item_name.titleize)
|
50
|
-
set_flash_message(message, :failure)
|
51
|
-
set_notification(false, I18n.t('status.success'), "Failed to remove the Registration '#{@registration.name}'")
|
52
|
-
@destroyed = false
|
53
|
-
end
|
54
|
-
else
|
55
|
-
set_notification(false, I18n.t('status.error'), I18n.t('status.not_found', item: default_item_name.titleize))
|
56
|
-
end
|
57
|
-
|
58
|
-
respond_to do |format|
|
59
|
-
format.html {}
|
60
|
-
format.js {
|
61
|
-
js_view_path = @resource_options && @resource_options[:js_view_path] ? "#{@resource_options[:js_view_path]}/destroy" : :destroy
|
62
|
-
render js_view_path
|
63
|
-
}
|
64
|
-
end
|
65
|
-
|
66
|
-
end
|
67
|
-
|
68
24
|
private
|
69
25
|
|
70
26
|
def get_registration
|
@@ -72,6 +72,10 @@ module Usman
|
|
72
72
|
end
|
73
73
|
end
|
74
74
|
|
75
|
+
def permission_denied
|
76
|
+
render :file => "layouts/kuppayam/401", layout: 'layouts/kuppayam/blank_with_nav', :status => :unauthorized
|
77
|
+
end
|
78
|
+
|
75
79
|
# This method is widely used to create the @current_user object from the session
|
76
80
|
# This method will return @current_user if it already exists which will save queries when called multiple times
|
77
81
|
def current_user
|
@@ -109,7 +113,8 @@ module Usman
|
|
109
113
|
format.html {
|
110
114
|
#text = "#{I18n.t("authentication.permission_denied.heading")}: #{I18n.t("authentication.permission_denied.message")}"
|
111
115
|
#set_flash_message(text, :error, false) if defined?(flash) && flash
|
112
|
-
redirect_after_unsuccessful_authentication
|
116
|
+
#redirect_after_unsuccessful_authentication
|
117
|
+
permission_denied
|
113
118
|
}
|
114
119
|
format.js {
|
115
120
|
@params_hsh = {}
|
@@ -17,7 +17,13 @@
|
|
17
17
|
|
18
18
|
<tr id="tr_feature_<%= feature.id %>">
|
19
19
|
|
20
|
-
<
|
20
|
+
<th scope="row" style="text-align: center;">
|
21
|
+
<% if i < 0 %>
|
22
|
+
<i class="fa fa-check text-success"></i>
|
23
|
+
<% else %>
|
24
|
+
<%= i + 1 + (@per_page.to_i * (@current_page.to_i - 1)) %>
|
25
|
+
<% end %>
|
26
|
+
</th>
|
21
27
|
|
22
28
|
<td class="feature-image" style="text-align: center;">
|
23
29
|
<%= link_to(feature_path(feature), remote: true) do %>
|
@@ -3,9 +3,15 @@
|
|
3
3
|
|
4
4
|
<tr id="tr_feature_<%= feature.id %>">
|
5
5
|
|
6
|
-
<
|
6
|
+
<th scope="row" style="text-align: center;">
|
7
|
+
<% if i < 0 %>
|
8
|
+
<i class="fa fa-check text-success"></i>
|
9
|
+
<% else %>
|
10
|
+
<%= i + 1 + (@per_page.to_i * (@current_page.to_i - 1)) %>
|
11
|
+
<% end %>
|
12
|
+
</th>
|
7
13
|
|
8
|
-
<td class="feature-image">
|
14
|
+
<td class="feature-image" style="text-align: center;">
|
9
15
|
<%= link_to(feature_path(feature), remote: true) do %>
|
10
16
|
<%= display_image(feature, "feature_image.image.small.url", width: "32", height: "auto", class: "img-rectangle", alt: feature.display_name) %>
|
11
17
|
<% end %>
|
@@ -3,20 +3,11 @@
|
|
3
3
|
<thead>
|
4
4
|
<tr>
|
5
5
|
<th style="text-align: center;width:60px">#</th>
|
6
|
-
<th>Status</th>
|
7
6
|
<th>UUID</th>
|
8
|
-
<th>
|
7
|
+
<th>Status</th>
|
9
8
|
<th>Device Name</th>
|
10
9
|
<th>Device Type</th>
|
11
|
-
<th>
|
12
|
-
<th>Software Version</th>
|
13
|
-
<th>Last Accessed at</th>
|
14
|
-
<th>Last Accessed API</th>
|
15
|
-
<% if @current_user.super_admin? %>
|
16
|
-
<th>OTP</th>
|
17
|
-
<% end %>
|
18
|
-
<th>OTP Sent at</th>
|
19
|
-
<th style="text-align: center;" colspan="2">Actions</th>
|
10
|
+
<!-- <th style="text-align: center;" colspan="2">Actions</th> -->
|
20
11
|
</tr>
|
21
12
|
</thead>
|
22
13
|
|
@@ -35,6 +26,7 @@
|
|
35
26
|
<% end %>
|
36
27
|
</th>
|
37
28
|
|
29
|
+
<td class="device-name" style="font-weight:bold;"><%= link_to device.uuid, registration_device_path(device), remote: true %></td>
|
38
30
|
<td>
|
39
31
|
<% if device.pending? %>
|
40
32
|
<span class="ml-5 mt-5 label label-default">Pending</span>
|
@@ -45,26 +37,14 @@
|
|
45
37
|
<% end %>
|
46
38
|
</td>
|
47
39
|
|
48
|
-
<td class="device-name"><%= device.uuid %></td>
|
49
|
-
<td class="device-name"><%= device.device_token %></td>
|
50
40
|
<td class="device-name"><%= device.device_name %></td>
|
51
41
|
<td class="device-name"><%= device.device_type %></td>
|
52
|
-
<td class="device-name"><%= device.operating_system %></td>
|
53
|
-
<td class="device-name"><%= device.software_version %></td>
|
54
|
-
<td class="device-name"><%= device.last_accessed_at %></td>
|
55
|
-
<td class="device-name"><%= device.last_accessed_api %></td>
|
56
42
|
|
57
|
-
|
58
|
-
<td class="device-name"><%= device.otp %></td>
|
59
|
-
<% end %>
|
60
|
-
|
61
|
-
<td class="device-name"><%= device.otp_sent_at %></td>
|
62
|
-
|
63
|
-
<td class="action-links" style="width:10%">
|
43
|
+
<!-- <td class="action-links" style="width:10%"> -->
|
64
44
|
|
65
45
|
<%#= link_to raw("<i class=\"linecons-trash\"></i> Remove Role"), delete_link, method: :delete, device: "menuitem", tabindex: "-1", data: { confirm: 'Are you sure?' }, :remote=>true, class: "delete" %>
|
66
46
|
|
67
|
-
</td>
|
47
|
+
<!-- </td> -->
|
68
48
|
|
69
49
|
</tr>
|
70
50
|
<% end %>
|
@@ -0,0 +1,51 @@
|
|
1
|
+
<% status_hash = {published: "success", unpublished: "default", disabled: "danger"} %>
|
2
|
+
|
3
|
+
<div class="media <%= status_hash[@device.status.to_sym] %>">
|
4
|
+
|
5
|
+
<div class="pull-left ml-10" style="width:65%;">
|
6
|
+
|
7
|
+
<h1><%= @device.display_name %></h1>
|
8
|
+
|
9
|
+
<span class="ml-5 mt-5 label label-<%= status_hash[@device.status.to_sym] %>"><%= @device.status.titleize %></span>
|
10
|
+
|
11
|
+
<%= clear_tag %>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
</div>
|
15
|
+
|
16
|
+
<h4 class="mb-20">Technical Details</h4>
|
17
|
+
|
18
|
+
<div class="table-responsive mb-50">
|
19
|
+
<table class="table table-striped table-condensed table-bordered">
|
20
|
+
<tbody>
|
21
|
+
|
22
|
+
<tr><th>Operating System</th><td><%= @device.operating_system %></td></tr>
|
23
|
+
<tr><th>Software Version</th><td><%= @device.software_version %></td></tr>
|
24
|
+
|
25
|
+
<tr><th>Last Accesssed API</th><td><%= @device.last_accessed_api %></td></tr>
|
26
|
+
<tr><th>Last Accessed At</th><td><%= @device.last_accessed_at.strftime("%m/%d/%Y - %H:%M:%S") if @device.last_accessed_at %></td></tr>
|
27
|
+
|
28
|
+
<% if @current_user.super_admin? %>
|
29
|
+
<tr><th>OTP</th><td><%= @device.otp %></td></tr>
|
30
|
+
<% else %>
|
31
|
+
<tr><th>Device Token</th><td><%= @device.device_token %></td></tr>
|
32
|
+
<% end %>
|
33
|
+
<tr><th>OTP Sent At</th><td><%= @device.otp_sent_at.strftime("%m/%d/%Y - %H:%M:%S") if @device.otp_sent_at %></td></tr>
|
34
|
+
|
35
|
+
<% if @current_user.super_admin? %>
|
36
|
+
<tr><th>API Token</th><td><%= @device.api_token %></td></tr>
|
37
|
+
<% end %>
|
38
|
+
<tr><th>Token Created At</th><td><%= @device.token_created_at.strftime("%m/%d/%Y - %H:%M:%S") if @device.token_created_at %></td></tr>
|
39
|
+
|
40
|
+
<tr><th>Created At</th><td><%= @device.created_at.strftime("%m/%d/%Y - %H:%M:%S") if @device.created_at %></td></tr>
|
41
|
+
<tr><th>Updated At</th><td><%= @device.updated_at.strftime("%m/%d/%Y - %H:%M:%S") if @device.updated_at %></td></tr>
|
42
|
+
|
43
|
+
</tbody>
|
44
|
+
</table>
|
45
|
+
</div>
|
46
|
+
|
47
|
+
<div>
|
48
|
+
<%= link_to raw("<i class=\"fa fa-close mr-5\"></i> <span>Close</span>"), "#", onclick: "closeGenericModal();", class: "btn btn-white pull-left" %>
|
49
|
+
</div>
|
50
|
+
|
51
|
+
<%= clear_tag %>
|
@@ -3,9 +3,9 @@
|
|
3
3
|
<thead>
|
4
4
|
<tr>
|
5
5
|
<th style="text-align: center;width:50px;">#</th>
|
6
|
-
<th style="text-align: left;">
|
6
|
+
<th style="text-align: left;">User</th>
|
7
|
+
<th style="text-align: left;width:200px;">Mobile</th>
|
7
8
|
<th style="text-align: left;width:200px;">Location</th>
|
8
|
-
<th style="text-align: left;width:200px;">User</th>
|
9
9
|
<th style="text-align: left;width:200px;">Status</th>
|
10
10
|
</tr>
|
11
11
|
</thead>
|
@@ -26,9 +26,15 @@
|
|
26
26
|
<% end %>
|
27
27
|
</th>
|
28
28
|
|
29
|
+
<% if registration.user %>
|
30
|
+
<td class="registration-name"><%= link_to registration.user.display_name, registration_path(registration), remote: true %></td>
|
31
|
+
<% else %>
|
32
|
+
<td class="registration-name"><%= link_to registration.display_name, registration_path(registration), remote: true %></td>
|
33
|
+
<% end %>
|
34
|
+
|
29
35
|
<td class="registration-name"><%= link_to registration.display_name, registration_path(registration), remote: true %></td>
|
36
|
+
|
30
37
|
<td class="registration-name"><%= link_to registration.display_location, registration_path(registration), remote: true %></td>
|
31
|
-
<td class="registration-name"><%= link_to registration.display_name, registration_path(registration), remote: true %></td>
|
32
38
|
|
33
39
|
<td>
|
34
40
|
<% if registration.pending? %>
|
@@ -39,11 +45,9 @@
|
|
39
45
|
</td>
|
40
46
|
|
41
47
|
<!-- <td class="action-links" style="width:10%">
|
42
|
-
|
43
48
|
<%#= link_to raw("<i class=\"linecons-pencil\"></i> Edit Registration"), edit_link, :remote=>true, class: "edit" if @current_user.super_admin? and registration.can_be_edited? %>
|
44
49
|
|
45
50
|
<%#= link_to raw("<i class=\"linecons-trash\"></i> Delete"), delete_link, method: :delete, registration: "menuitem", tabindex: "-1", data: { confirm: 'Are you sure?' }, :remote=>true, class: "delete" if @current_user.super_admin? and registration.can_be_deleted? %>
|
46
|
-
|
47
51
|
</td> -->
|
48
52
|
|
49
53
|
</tr>
|
@@ -1,4 +1,5 @@
|
|
1
1
|
<% @devices = @registration.devices.page(@current_page).per(@per_page) %>
|
2
|
+
<% @user = @registration.user %>
|
2
3
|
|
3
4
|
<div id="div_registration_show">
|
4
5
|
|
@@ -8,7 +9,13 @@
|
|
8
9
|
|
9
10
|
<div class="visible-sm visible-xs mt-50"></div>
|
10
11
|
|
11
|
-
|
12
|
+
<% if @user %>
|
13
|
+
<%= theme_panel_heading(@user.display_name) %>
|
14
|
+
<%= theme_panel_sub_heading(@registration.display_name, "#") %>
|
15
|
+
<% else %>
|
16
|
+
<%= theme_panel_heading(@registration.display_name) %>
|
17
|
+
<% end %>
|
18
|
+
<br>
|
12
19
|
|
13
20
|
<% if @registration.pending? %>
|
14
21
|
<span class="ml-5 mt-5 label label-default">Pending</span>
|
@@ -42,68 +49,116 @@
|
|
42
49
|
<ul class="nav nav-pills">
|
43
50
|
|
44
51
|
<li class="active">
|
45
|
-
<a href="#
|
52
|
+
<a href="#registration_info" data-toggle="tab" aria-expanded="false">
|
46
53
|
<span class="visible-xs"><i class="fa-database"></i></span>
|
47
|
-
<span class="hidden-xs">
|
54
|
+
<span class="hidden-xs">Registration Info</span>
|
48
55
|
</a>
|
49
56
|
</li>
|
50
57
|
|
51
58
|
<li class="">
|
52
|
-
<a href="#
|
59
|
+
<a href="#profile_info" data-toggle="tab" aria-expanded="false">
|
53
60
|
<span class="visible-xs"><i class="fa-database"></i></span>
|
54
|
-
<span class="hidden-xs">
|
61
|
+
<span class="hidden-xs">Profile Info</span>
|
55
62
|
</a>
|
56
63
|
</li>
|
64
|
+
|
65
|
+
<li class="">
|
66
|
+
<a href="#registration_devices" data-toggle="tab" aria-expanded="false">
|
67
|
+
<span class="visible-xs"><i class="fa-database"></i></span>
|
68
|
+
<span class="hidden-xs">Devices</span>
|
69
|
+
</a>
|
70
|
+
</li>
|
71
|
+
|
72
|
+
|
57
73
|
</ul>
|
58
74
|
|
59
75
|
<div class="tab-content">
|
60
76
|
|
61
|
-
<div class="tab-pane active" id="
|
77
|
+
<div class="tab-pane active" id="registration_info" style="border: 1px solid #000;min-height:200px;padding:20px;margin-bottom:20px;max-height: 400px;overflow-y: auto;">
|
62
78
|
|
63
79
|
<%= clear_tag(20) %>
|
64
80
|
|
65
|
-
<div
|
66
|
-
|
67
|
-
|
81
|
+
<div class="table-responsive">
|
82
|
+
<table class="table table-striped table-condensed table-bordered mb-30">
|
83
|
+
<tbody>
|
84
|
+
|
85
|
+
<tr>
|
86
|
+
<th>ID</th><td><%= @registration.id %></td>
|
87
|
+
<th>Status</th><td><%= @registration.status %></td>
|
88
|
+
</tr>
|
68
89
|
|
69
|
-
|
90
|
+
<tr>
|
91
|
+
<th>Country</th><td><%= @registration.country.try(:display_name) %></td>
|
92
|
+
<th>City</th><td><%= @registration.city.try(:display_name) %></td>
|
93
|
+
</tr>
|
70
94
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
95
|
+
<tr>
|
96
|
+
<th>Dialing Prefix</th><td><%= @registration.dialing_prefix %></td>
|
97
|
+
<th>Mobile Number</th><td><%= @registration.mobile_number %></td>
|
98
|
+
</tr>
|
99
|
+
|
100
|
+
<tr>
|
101
|
+
<th>Created At</th><td><%= @registration.created_at.strftime("%m/%d/%Y - %H:%M:%S") if @registration.created_at %></td>
|
102
|
+
<th>Updated At</th><td><%= @registration.updated_at.strftime("%m/%d/%Y - %H:%M:%S") if @registration.updated_at %></td>
|
103
|
+
</tr>
|
79
104
|
|
80
|
-
|
81
|
-
|
82
|
-
|
105
|
+
</tbody>
|
106
|
+
</table>
|
107
|
+
</div>
|
83
108
|
</div>
|
84
109
|
|
85
|
-
<div class="tab-pane" id="
|
110
|
+
<div class="tab-pane" id="profile_info" style="border: 1px solid #000;min-height:200px;padding:20px;margin-bottom:20px;max-height: 400px;overflow-y: auto;">
|
86
111
|
|
87
112
|
<%= clear_tag(20) %>
|
88
113
|
|
89
|
-
<div class="table-responsive">
|
90
|
-
|
114
|
+
<div class="table-responsive mt-30">
|
115
|
+
<table class="table table-striped table-condensed table-bordered">
|
91
116
|
<tbody>
|
92
117
|
|
93
118
|
<tr>
|
94
|
-
<th>
|
119
|
+
<th>Name</th><td><%= @user.try(:name) %></td>
|
120
|
+
<th>Username</th><td><%= @user.try(:username) %></td>
|
95
121
|
</tr>
|
96
|
-
|
122
|
+
|
97
123
|
<tr>
|
98
|
-
<th>
|
99
|
-
<th>
|
124
|
+
<th>Email</th><td><%= @user.try(:email) %></td>
|
125
|
+
<th>Phone</th><td><%= @user.try(:phone) %></td>
|
100
126
|
</tr>
|
101
127
|
|
128
|
+
<tr>
|
129
|
+
<th>Designation</th><td><%= @user.try(:designation) %></td>
|
130
|
+
<th>Status</th><td><%= @user.try(:status).try(:titleize) %></td>
|
131
|
+
</tr>
|
132
|
+
|
102
133
|
</tbody>
|
103
134
|
</table>
|
104
135
|
</div>
|
136
|
+
|
105
137
|
</div>
|
106
138
|
|
139
|
+
<div class="tab-pane" id="registration_devices" style="border: 1px solid #000;min-height:200px;padding:20px;margin-bottom:20px;max-height: 400px;overflow-y: auto;">
|
140
|
+
|
141
|
+
<%= clear_tag(20) %>
|
142
|
+
|
143
|
+
<div id="div_device_action_buttons">
|
144
|
+
<div class="row">
|
145
|
+
<div class="col-md-6">
|
146
|
+
<%= theme_button('Refresh', 'refresh', registration_devices_path(@registration), classes: "pull-left", btn_type: "white") %>
|
147
|
+
</div>
|
148
|
+
<div class="col-md-6">
|
149
|
+
<%= search_form_kuppayam(Registration, registration_devices_path(@registration), text: "") %>
|
150
|
+
</div>
|
151
|
+
</div>
|
152
|
+
</div>
|
153
|
+
<%= clear_tag(10) %>
|
154
|
+
|
155
|
+
<div id="div_device_index">
|
156
|
+
<%= render :partial=>"usman/registration_devices/index" %>
|
157
|
+
</div>
|
158
|
+
</div>
|
159
|
+
|
160
|
+
|
161
|
+
|
107
162
|
</div>
|
108
163
|
|
109
164
|
<%= link_to "Close", "#", onclick: "closeLargeModal();", class: "btn btn-primary pull-right" %>
|
@@ -1,3 +1,4 @@
|
|
1
|
+
<% @registration = @user.registration %>
|
1
2
|
<div id="div_user_show">
|
2
3
|
<% status_hash = {approved: "success", pending: "default", suspended: "danger"} %>
|
3
4
|
|
@@ -79,21 +80,31 @@
|
|
79
80
|
|
80
81
|
<ul class="nav nav-pills">
|
81
82
|
<li class="active">
|
82
|
-
<a href="#
|
83
|
+
<a href="#profile_info" data-toggle="tab" aria-expanded="true">
|
83
84
|
<span class="visible-xs"><i class="fa-info"></i></span>
|
84
|
-
<span class="hidden-xs">
|
85
|
+
<span class="hidden-xs">Profile Info</span>
|
85
86
|
</a>
|
86
87
|
</li>
|
88
|
+
|
89
|
+
<li class="">
|
90
|
+
<a href="#registration_info" data-toggle="tab" aria-expanded="true">
|
91
|
+
<span class="visible-xs"><i class="fa-info"></i></span>
|
92
|
+
<span class="hidden-xs">Registration Info</span>
|
93
|
+
</a>
|
94
|
+
</li>
|
95
|
+
|
96
|
+
<% if @current_user.super_admin? %>
|
87
97
|
<li class="">
|
88
98
|
<a href="#technical_details" data-toggle="tab" aria-expanded="false">
|
89
99
|
<span class="visible-xs"><i class="fa-database"></i></span>
|
90
100
|
<span class="hidden-xs">Technical Details</span>
|
91
101
|
</a>
|
92
102
|
</li>
|
103
|
+
<% end %>
|
93
104
|
</ul>
|
94
105
|
|
95
106
|
<div class="tab-content">
|
96
|
-
<div class="tab-pane active" id="
|
107
|
+
<div class="tab-pane active" id="profile_info">
|
97
108
|
|
98
109
|
<%= clear_tag(20) %>
|
99
110
|
|
@@ -102,26 +113,54 @@
|
|
102
113
|
<tbody>
|
103
114
|
|
104
115
|
<tr>
|
105
|
-
<th>
|
106
|
-
<th>
|
116
|
+
<th>Name</th><td><%= @user.name %></td>
|
117
|
+
<th>Username</th><td><%= @user.username %></td>
|
107
118
|
</tr>
|
108
119
|
|
109
120
|
<tr>
|
121
|
+
<th>Email</th><td><%= @user.email %></td>
|
110
122
|
<th>Phone</th><td><%= @user.phone %></td>
|
111
|
-
<th>Designation</th><td><%= @user.designation %></td>
|
112
123
|
</tr>
|
113
124
|
|
114
125
|
<tr>
|
115
|
-
<th>
|
126
|
+
<th>Designation</th><td><%= @user.designation %></td>
|
116
127
|
<th>Status</th><td><%= @user.status.titleize %></td>
|
117
128
|
</tr>
|
118
129
|
|
119
130
|
</tbody>
|
120
131
|
</table>
|
121
132
|
</div>
|
122
|
-
|
123
133
|
</div>
|
124
134
|
|
135
|
+
<div class="tab-pane active" id="registration_info">
|
136
|
+
|
137
|
+
<%= clear_tag(20) %>
|
138
|
+
|
139
|
+
<div class="table-responsive mt-30">
|
140
|
+
<table class="table table-striped table-condensed table-bordered">
|
141
|
+
<tbody>
|
142
|
+
|
143
|
+
<tr>
|
144
|
+
<th>Country</th><td><%= @registration.try(:country).try(:display_name) %></td>
|
145
|
+
<th>City</th><td><%= @registration.try(:city).try(:display_name) %></td>
|
146
|
+
</tr>
|
147
|
+
|
148
|
+
<tr>
|
149
|
+
<th>Dialing Prefix</th><td><%= @registration.try(:dialing_prefix) %></td>
|
150
|
+
<th>Mobile Number</th><td><%= @registration.try(:mobile_number) %></td>
|
151
|
+
</tr>
|
152
|
+
|
153
|
+
<tr>
|
154
|
+
<th>Status</th><td><%= @registration.try(:status).try(:titleize) %></td>
|
155
|
+
<th></th><td></td>
|
156
|
+
</tr>
|
157
|
+
|
158
|
+
</tbody>
|
159
|
+
</table>
|
160
|
+
</div>
|
161
|
+
</div>
|
162
|
+
|
163
|
+
<% if @current_user.super_admin? %>
|
125
164
|
<div class="tab-pane" id="technical_details">
|
126
165
|
|
127
166
|
<%= clear_tag(20) %>
|
@@ -130,6 +169,11 @@
|
|
130
169
|
<table class="table table-striped table-condensed table-bordered mb-30">
|
131
170
|
<tbody>
|
132
171
|
|
172
|
+
<tr>
|
173
|
+
<th>Super Admin?</th><td><%= @user.super_admin.to_s.upcase %></td>
|
174
|
+
<th>Status</th><td><%= @user.status.titleize %></td>
|
175
|
+
</tr>
|
176
|
+
|
133
177
|
<tr>
|
134
178
|
<th style="width:20%;">Sign In Count</th><td style="width:30%;"><%= @user.sign_in_count %></td>
|
135
179
|
<th style="width:20%;">Remember User</th><td style="width:30%;"><%= @user.remember_created_at.strftime("%m/%d/%Y - %H:%M:%S") if @user.remember_created_at %></td>
|
@@ -188,8 +232,8 @@
|
|
188
232
|
</tbody>
|
189
233
|
</table>
|
190
234
|
</div>
|
191
|
-
|
192
235
|
</div>
|
236
|
+
<% end %>
|
193
237
|
|
194
238
|
</div>
|
195
239
|
|
data/config/routes.rb
CHANGED
@@ -17,7 +17,7 @@ Usman::Engine.routes.draw do
|
|
17
17
|
scope :admin do
|
18
18
|
|
19
19
|
resources :registrations, only: [:index, :show] do
|
20
|
-
resources :devices, :controller => "registration_devices"
|
20
|
+
resources :devices, :controller => "registration_devices", only: [:index, :show]
|
21
21
|
end
|
22
22
|
|
23
23
|
resources :users do
|
data/lib/usman/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: usman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kpvarma
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-09-
|
11
|
+
date: 2017-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -90,28 +90,28 @@ dependencies:
|
|
90
90
|
requirements:
|
91
91
|
- - "~>"
|
92
92
|
- !ruby/object:Gem::Version
|
93
|
-
version: 0.1.
|
93
|
+
version: 0.1.12
|
94
94
|
type: :runtime
|
95
95
|
prerelease: false
|
96
96
|
version_requirements: !ruby/object:Gem::Requirement
|
97
97
|
requirements:
|
98
98
|
- - "~>"
|
99
99
|
- !ruby/object:Gem::Version
|
100
|
-
version: 0.1.
|
100
|
+
version: 0.1.12
|
101
101
|
- !ruby/object:Gem::Dependency
|
102
102
|
name: pattana
|
103
103
|
requirement: !ruby/object:Gem::Requirement
|
104
104
|
requirements:
|
105
105
|
- - "~>"
|
106
106
|
- !ruby/object:Gem::Version
|
107
|
-
version: 0.1.
|
107
|
+
version: 0.1.7
|
108
108
|
type: :runtime
|
109
109
|
prerelease: false
|
110
110
|
version_requirements: !ruby/object:Gem::Requirement
|
111
111
|
requirements:
|
112
112
|
- - "~>"
|
113
113
|
- !ruby/object:Gem::Version
|
114
|
-
version: 0.1.
|
114
|
+
version: 0.1.7
|
115
115
|
- !ruby/object:Gem::Dependency
|
116
116
|
name: bcrypt
|
117
117
|
requirement: !ruby/object:Gem::Requirement
|
@@ -431,9 +431,9 @@ files:
|
|
431
431
|
- app/views/usman/permissions/_row.html.erb
|
432
432
|
- app/views/usman/permissions/_show.html.erb
|
433
433
|
- app/views/usman/permissions/index.html.erb
|
434
|
-
- app/views/usman/registration_devices/_form.html.erb
|
435
434
|
- app/views/usman/registration_devices/_index.html.erb
|
436
435
|
- app/views/usman/registration_devices/_row.html.erb
|
436
|
+
- app/views/usman/registration_devices/_show.html.erb
|
437
437
|
- app/views/usman/registrations/_form.html.erb
|
438
438
|
- app/views/usman/registrations/_index.html.erb
|
439
439
|
- app/views/usman/registrations/_row.html.erb
|
@@ -1,24 +0,0 @@
|
|
1
|
-
<%= form_for([@role, @user], :html => {:id=>"form_user", :class=>"mb-0 form-horizontal", :user => "form", :method => (@user.new_record? ? :post : :put), :remote=>true}) do |f| %>
|
2
|
-
|
3
|
-
<div id="user_form_error">
|
4
|
-
<%= @user.errors[:base].to_sentence %>
|
5
|
-
</div>
|
6
|
-
|
7
|
-
<div class="form-inputs mb-30 mt-30">
|
8
|
-
<% options = {assoc_collection: User.approved.normal_users.select("id, name").order("name ASC").all, required: false, editable: true, assoc_display_method: :name} %>
|
9
|
-
<%= theme_form_assoc_group(@user, :id, label: "Select User", **options) %>
|
10
|
-
</div>
|
11
|
-
|
12
|
-
<div>
|
13
|
-
|
14
|
-
<%= submit_tag("Save", :class=>"btn btn-primary pull-right ml-10") %>
|
15
|
-
|
16
|
-
<%= link_to raw("<i class='fa fa-close mr-5'></i><span>Cancel</span>"), "#", onclick: "closeGenericModal();", class: "pull-right ml-10 btn btn-white" %>
|
17
|
-
|
18
|
-
</div>
|
19
|
-
<%= clear_tag(10) %>
|
20
|
-
|
21
|
-
</div>
|
22
|
-
|
23
|
-
<% end %>
|
24
|
-
|