devise_users 0.0.1

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 (115) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +3 -0
  4. data/Rakefile +23 -0
  5. data/app/assets/javascripts/devise_users/application.js +36 -0
  6. data/app/assets/stylesheets/devise_users/application.css.less +15 -0
  7. data/app/assets/stylesheets/devise_users/devise_users.css.less +27 -0
  8. data/app/controllers/devise_users/application_controller.rb +39 -0
  9. data/app/controllers/devise_users/devise_users_controller.rb +75 -0
  10. data/app/helpers/devise_users/application_helper.rb +4 -0
  11. data/app/views/devise_users/devise_users/_form.html.erb +11 -0
  12. data/app/views/devise_users/devise_users/active_users.html.erb +60 -0
  13. data/app/views/devise_users/devise_users/edit.html.erb +11 -0
  14. data/app/views/devise_users/devise_users/index.html.erb +62 -0
  15. data/app/views/devise_users/devise_users/new.html.erb +11 -0
  16. data/app/views/devise_users/devise_users/search.html.erb +13 -0
  17. data/app/views/devise_users/devise_users/show.html.erb +47 -0
  18. data/app/views/devise_users/shared/_side_bar.html.erb +26 -0
  19. data/app/views/devise_users/shared/_user_bar.html.erb +20 -0
  20. data/app/views/layouts/devise_users/application.html.erb +71 -0
  21. data/config/initializers/assets.rb +1 -0
  22. data/config/initializers/simple_form.rb +165 -0
  23. data/config/initializers/simple_form_bootstrap.rb +129 -0
  24. data/config/locales/en.yml +4 -0
  25. data/config/locales/simple_form.en.yml +31 -0
  26. data/config/routes.rb +11 -0
  27. data/lib/devise_users.rb +16 -0
  28. data/lib/devise_users/engine.rb +14 -0
  29. data/lib/devise_users/version.rb +3 -0
  30. data/lib/tasks/devise_users_tasks.rake +4 -0
  31. data/lib/templates/erb/scaffold/_form.html.erb +13 -0
  32. data/spec/controllers/devise_users/devise_users_controller_spec.rb +29 -0
  33. data/spec/dummy/README.rdoc +28 -0
  34. data/spec/dummy/Rakefile +6 -0
  35. data/spec/dummy/app/assets/javascripts/application.js +14 -0
  36. data/spec/dummy/app/assets/stylesheets/application.css +15 -0
  37. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  38. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  39. data/spec/dummy/app/models/user.rb +10 -0
  40. data/spec/dummy/app/views/application/index.html.erb +8 -0
  41. data/spec/dummy/app/views/layouts/application.html.erb +25 -0
  42. data/spec/dummy/bin/bundle +3 -0
  43. data/spec/dummy/bin/rails +4 -0
  44. data/spec/dummy/bin/rake +4 -0
  45. data/spec/dummy/config.ru +4 -0
  46. data/spec/dummy/config/application.rb +32 -0
  47. data/spec/dummy/config/boot.rb +5 -0
  48. data/spec/dummy/config/database.yml +25 -0
  49. data/spec/dummy/config/environment.rb +5 -0
  50. data/spec/dummy/config/environments/development.rb +37 -0
  51. data/spec/dummy/config/environments/production.rb +82 -0
  52. data/spec/dummy/config/environments/test.rb +39 -0
  53. data/spec/dummy/config/initializers/assets.rb +8 -0
  54. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  55. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  56. data/spec/dummy/config/initializers/datetime_format.rb +2 -0
  57. data/spec/dummy/config/initializers/devise.rb +259 -0
  58. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  59. data/spec/dummy/config/initializers/inflections.rb +16 -0
  60. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  61. data/spec/dummy/config/initializers/session_store.rb +3 -0
  62. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  63. data/spec/dummy/config/locales/devise.en.yml +60 -0
  64. data/spec/dummy/config/locales/en.yml +23 -0
  65. data/spec/dummy/config/routes.rb +6 -0
  66. data/spec/dummy/config/secrets.yml +22 -0
  67. data/spec/dummy/db/development.sqlite3 +0 -0
  68. data/spec/dummy/db/migrate/20140903052246_devise_create_users.rb +42 -0
  69. data/spec/dummy/db/schema.rb +34 -0
  70. data/spec/dummy/db/test.sqlite3 +0 -0
  71. data/spec/dummy/log/development.log +21573 -0
  72. data/spec/dummy/log/test.log +201 -0
  73. data/spec/dummy/public/404.html +67 -0
  74. data/spec/dummy/public/422.html +67 -0
  75. data/spec/dummy/public/500.html +66 -0
  76. data/spec/dummy/public/favicon.ico +0 -0
  77. data/spec/dummy/tmp/cache/assets/development/sprockets/007dd1341ceef46d0544e3d0185ccf1d +0 -0
  78. data/spec/dummy/tmp/cache/assets/development/sprockets/02131eafeb1ac5c40cb70da552716e05 +0 -0
  79. data/spec/dummy/tmp/cache/assets/development/sprockets/0471f60835d0fba3697eed3f6e391753 +0 -0
  80. data/spec/dummy/tmp/cache/assets/development/sprockets/12aba8cc060f17f9477fd5222fb31c26 +0 -0
  81. data/spec/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  82. data/spec/dummy/tmp/cache/assets/development/sprockets/1aa407c09eff002e639c0d9b441076b3 +0 -0
  83. data/spec/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  84. data/spec/dummy/tmp/cache/assets/development/sprockets/320d9530536803b47b9ca451a2f786d8 +0 -0
  85. data/spec/dummy/tmp/cache/assets/development/sprockets/3311cd7d4c65c245d019c650dfddd193 +0 -0
  86. data/spec/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  87. data/spec/dummy/tmp/cache/assets/development/sprockets/3b869cca45a858fe5d2e52fba7eb005c +0 -0
  88. data/spec/dummy/tmp/cache/assets/development/sprockets/46f01993ffd0416b87e11be390accf83 +0 -0
  89. data/spec/dummy/tmp/cache/assets/development/sprockets/4a546cec8628d7e8dce5c5ee9e898472 +0 -0
  90. data/spec/dummy/tmp/cache/assets/development/sprockets/53d3bc1ce9ed5cbd3f9bf30379cbed16 +0 -0
  91. data/spec/dummy/tmp/cache/assets/development/sprockets/666a4e48a5214503ac5e56ed86d6049c +0 -0
  92. data/spec/dummy/tmp/cache/assets/development/sprockets/685aac9cc839d6dc5b28e1396ab22a2a +0 -0
  93. data/spec/dummy/tmp/cache/assets/development/sprockets/71fbb71291e0ce8f00d41accdbae252d +0 -0
  94. data/spec/dummy/tmp/cache/assets/development/sprockets/8122d1e4447d3c92cd163d2633033d1a +0 -0
  95. data/spec/dummy/tmp/cache/assets/development/sprockets/8350c9183f0af7278a44dae604dfdcca +0 -0
  96. data/spec/dummy/tmp/cache/assets/development/sprockets/8ad0e057d3555ce2bfe91c77d2a08c91 +0 -0
  97. data/spec/dummy/tmp/cache/assets/development/sprockets/8c09980b6bb5011c76e46e68231bd42a +0 -0
  98. data/spec/dummy/tmp/cache/assets/development/sprockets/8d6cdb14decd04ffac8f3325731c629b +0 -0
  99. data/spec/dummy/tmp/cache/assets/development/sprockets/b9d8e35a5fe84f4d2c787744a76259ae +0 -0
  100. data/spec/dummy/tmp/cache/assets/development/sprockets/bb69f920e717f24c74444ee67934b1e5 +0 -0
  101. data/spec/dummy/tmp/cache/assets/development/sprockets/c39f488e87c6f3da861ea93a83cf0540 +0 -0
  102. data/spec/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  103. data/spec/dummy/tmp/cache/assets/development/sprockets/d0e40d6a415b5ec74a0d89befcb07ef8 +0 -0
  104. data/spec/dummy/tmp/cache/assets/development/sprockets/d6f2433a2b128ed4a3952ca1ea1319ce +0 -0
  105. data/spec/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  106. data/spec/dummy/tmp/cache/assets/development/sprockets/da9447e5dd39a617efd489f6fa8123bd +0 -0
  107. data/spec/dummy/tmp/cache/assets/development/sprockets/e2ec7045dd8b30bdb063e4b87c8b0d6f +0 -0
  108. data/spec/dummy/tmp/cache/assets/development/sprockets/e392d27e6df799c2ba1da8c5e8f4c571 +0 -0
  109. data/spec/dummy/tmp/cache/assets/development/sprockets/e4c42cf1655614a3e290cf65a2471a1a +0 -0
  110. data/spec/dummy/tmp/cache/assets/development/sprockets/f3be039639abc6fbab3865922e15fe00 +0 -0
  111. data/spec/dummy/tmp/cache/assets/development/sprockets/f4cd836845062b0538b63d898fd7da73 +0 -0
  112. data/spec/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  113. data/spec/rails_helper.rb +46 -0
  114. data/spec/spec_helper.rb +78 -0
  115. metadata +408 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 25d7686c6f4d6b2858c453b9f7dd45c7a23e2f3d
4
+ data.tar.gz: 242d3272eeba3aa8599a92984484a6d97860f871
5
+ SHA512:
6
+ metadata.gz: 0243269cc075e126004b1342621317ab1286ed11b47f8dd06e5b44c9cc74204c9765630e39b076fde04292757a5cb30d9444f5dc6e29c4c1957550bb488c2448
7
+ data.tar.gz: 2934bcd545601d220ef7a9458d2e2cbbcf371ffad4597be2e43ee1d8c3f1b9c61d62cce9d2968b08799e614af7903e7a828d9b77d3419ea0f4a3aaa273ef3330
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2014 YOURNAME
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,3 @@
1
+ = DeviseUsers
2
+
3
+ This project rocks and uses MIT-LICENSE.
data/Rakefile ADDED
@@ -0,0 +1,23 @@
1
+ begin
2
+ require 'bundler/setup'
3
+ rescue LoadError
4
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
+ end
6
+
7
+ require 'rdoc/task'
8
+
9
+ RDoc::Task.new(:rdoc) do |rdoc|
10
+ rdoc.rdoc_dir = 'rdoc'
11
+ rdoc.title = 'DeviseUsers'
12
+ rdoc.options << '--line-numbers'
13
+ rdoc.rdoc_files.include('README.rdoc')
14
+ rdoc.rdoc_files.include('lib/**/*.rb')
15
+ end
16
+
17
+ APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
18
+ load 'rails/tasks/engine.rake'
19
+
20
+
21
+
22
+ Bundler::GemHelper.install_tasks
23
+
@@ -0,0 +1,36 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // compiled file.
9
+ //
10
+ // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
+ //
13
+ //= require jquery_ujs
14
+ //= require_tree .
15
+
16
+ $.rails.sweetConfirm = function(element) {
17
+ var message = element.data('confirm');
18
+ swal({
19
+ title: "Are you sure?",
20
+ text: message,
21
+ type: "warning",
22
+ showCancelButton: true,
23
+ confirmButtonColor: "#DD6B55",
24
+ confirmButtonText: "Yes, delete it!",
25
+ closeOnConfirm: true
26
+ }, function() {
27
+ element.removeAttr('data-confirm');
28
+ element.trigger('click.rails');
29
+ });
30
+ };
31
+
32
+ $.rails.allowAction = function(element) {
33
+ if (!element.attr('data-confirm')) return true;
34
+ $.rails.sweetConfirm(element);
35
+ return false;
36
+ };
@@ -0,0 +1,15 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
+ * compiled file so the styles you add here take precedence over styles defined in any styles
10
+ * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11
+ * file per style scope.
12
+ *
13
+ *= require_tree .
14
+ *= require_self
15
+ */
@@ -0,0 +1,27 @@
1
+ .data-table-info {
2
+ margin: 10px 0;
3
+ }
4
+
5
+ .data-table-wrapper .pagination {
6
+ float: right;
7
+ margin: 10px 0 20px;
8
+ }
9
+
10
+ .skin-blue .sidebar > .sidebar-menu > li {
11
+ > a:hover, &.active > a {background: #ffffff;}
12
+ }
13
+
14
+ .navbar-nav > .user-menu > .dropdown-menu {
15
+ width: auto;
16
+ li.user-header {height: auto;}
17
+ }
18
+
19
+ table.show-table tr td.view-label {
20
+ width: 180px;
21
+ padding-left: 15px;
22
+ color: #8a949e;
23
+ }
24
+
25
+ .user-action a {
26
+ margin-right: 5px;
27
+ }
@@ -0,0 +1,39 @@
1
+ module DeviseUsers
2
+ class ApplicationController < ActionController::Base
3
+ include Devise::Controllers::Helpers
4
+ include Devise::Controllers::SignInOut
5
+ before_action :authenticate_devise_resource, :total_user_number
6
+
7
+ private
8
+ def authenticate_devise_resource
9
+ unless signed_in?(devise_resource_name)
10
+ redirect_to new_session_path(devise_resource_name), notice: t('devise_users.authentication_required')
11
+ return
12
+ end
13
+
14
+ unless devise_resource_object.respond_to?(:devise_user_manager?) and devise_resource_object.devise_user_manager?
15
+ redirect_to DeviseUsers.unauthorisation_url, notice: t('devise_users.authorisation_required')
16
+ return
17
+ end
18
+ end
19
+
20
+ def devise_resource_class
21
+ devise_resource_object.class
22
+ end
23
+
24
+ def total_user_number
25
+ @total_user_number = devise_resource_class.count
26
+ end
27
+ helper_method :total_user_number
28
+
29
+ def devise_resource_object
30
+ @devise_resource_object = self.send "current_#{devise_resource_name}".to_sym
31
+ end
32
+ helper_method :devise_resource_object
33
+
34
+ def devise_resource_name
35
+ DeviseUsers.devise_resource_name.to_sym
36
+ end
37
+ helper_method :devise_resource_name
38
+ end
39
+ end
@@ -0,0 +1,75 @@
1
+ require_dependency "devise_users/application_controller"
2
+
3
+ module DeviseUsers
4
+ class DeviseUsersController < ApplicationController
5
+
6
+ def index
7
+ @menu_item = :user_list
8
+ @users_count = total_user_number
9
+ @users = all_users
10
+ end
11
+
12
+ def new
13
+ @user = devise_resource_class.new
14
+ end
15
+
16
+ def create
17
+ @user = devise_resource_class.new user_params
18
+ unless @user.save
19
+ render :new
20
+ else
21
+ redirect_to @user
22
+ end
23
+ end
24
+
25
+ def show
26
+ @user = devise_resource_class.find params[:id]
27
+ end
28
+
29
+ def edit
30
+ @user = devise_resource_class.find params[:id]
31
+ end
32
+
33
+ def update
34
+ @user = devise_resource_class.find params[:id]
35
+ unless @user.update_attributes user_params
36
+ render :edit
37
+ else
38
+ redirect_to @user
39
+ end
40
+ end
41
+
42
+ def destroy
43
+ @user = devise_resource_class.find params[:id]
44
+ @user.destroy
45
+ redirect_to users_url, notice: 'user'
46
+ end
47
+
48
+ def search
49
+ search_query = devise_resource_class.where("email LIKE ?", "%#{params[:q]}%")
50
+ @users_count = search_query.count
51
+ @users = search_query.order('created_at desc').page(params[:page]).per 1
52
+ @searching = true
53
+ render :index
54
+ end
55
+
56
+ def active_users
57
+ @menu_item = :active_users
58
+ @recent_users = query_active_users
59
+ end
60
+
61
+ private
62
+ def query_active_users
63
+ devise_resource_class.limit(20).order('current_sign_in_at desc, last_sign_in_at desc')
64
+ end
65
+
66
+ def all_users
67
+ devise_resource_class.order('created_at desc').page params[:page]
68
+ end
69
+
70
+ def user_params
71
+ params.require(:user).permit :email, :password
72
+ end
73
+
74
+ end
75
+ end
@@ -0,0 +1,4 @@
1
+ module DeviseUsers
2
+ module ApplicationHelper
3
+ end
4
+ end
@@ -0,0 +1,11 @@
1
+ <%= simple_form_for @user do |f| %>
2
+ <div class='box-body'>
3
+ <%= f.error_notification %>
4
+
5
+ <%= f.input :email, placeholder: 'Enter email' %>
6
+
7
+ <%= f.input :password, placeholder: 'Password' %>
8
+ </div>
9
+
10
+ <div class="box-footer"><%= f.button :submit %></div>
11
+ <% end %>
@@ -0,0 +1,60 @@
1
+ <div class="row">
2
+ <div class="col-xs-12">
3
+ <div class="box">
4
+ <div class="box-body data-table-wrapper">
5
+ <table class="table table-bordered table-hover data-table">
6
+ <thead>
7
+ <tr>
8
+ <th>ID</th>
9
+ <th>EMail</th>
10
+ <th>Last Signed in At</th>
11
+ <th>Sign in Count</th>
12
+ <th>Created At</th>
13
+ <th></th>
14
+ </tr>
15
+ </thead>
16
+ <tbody>
17
+ <% @recent_users.each do |user| %>
18
+ <tr>
19
+ <td><%= user.id %></td>
20
+ <td>
21
+ <%= user.email %>
22
+ </td>
23
+ <td>
24
+ <% if user.current_sign_in_at.present? or user.last_sign_in_at.present? %>
25
+ <%= (user.current_sign_in_at || user.last_sign_in_at).in_time_zone %>
26
+ <% end %>
27
+ </td>
28
+ <td>
29
+ <%= user.sign_in_count %>
30
+ </td>
31
+ <td><%= user.created_at.in_time_zone %></td>
32
+ <td class="text-center user-action">
33
+ <%= link_to user_path(user) do %>
34
+ <i class="fa fa-hand-o-right"></i>
35
+ <% end %>
36
+ <%= link_to edit_user_path(user) do %>
37
+ <i class="fa fa-edit"></i>
38
+ <% end %>
39
+ </td>
40
+ </tr>
41
+ <% end %>
42
+ </tbody>
43
+ </table>
44
+ <div class="row">
45
+ <div class="col-xs-6">
46
+ <div class="data-table-info">Showing <%= @recent_users.count %> active users out of total <%= total_user_number %></div>
47
+ </div>
48
+ <div class="col-xs-6">
49
+ </div>
50
+ </div>
51
+ </div>
52
+ </div>
53
+ <!-- /.box-body -->
54
+ </div>
55
+ <!-- /.box -->
56
+ </div>
57
+
58
+ <% content_for :header do %>
59
+ Active Users <small>who signed in recently</small>
60
+ <% end %>
@@ -0,0 +1,11 @@
1
+ <div class="row">
2
+ <div class="col-xs-12">
3
+ <div class="box">
4
+ <%= render 'form' %>
5
+ </div>
6
+ </div>
7
+ </div>
8
+
9
+ <% content_for :header do %>
10
+ Edit User
11
+ <% end %>
@@ -0,0 +1,62 @@
1
+ <div class="row">
2
+ <div class="col-xs-12">
3
+ <div class="box">
4
+ <div class="box-body data-table-wrapper">
5
+ <table class="table table-bordered table-hover data-table">
6
+ <thead>
7
+ <tr>
8
+ <th>ID</th>
9
+ <th>EMail</th>
10
+ <th>Created At</th>
11
+ <th>Updated At</th>
12
+ <th>Last Signed in At</th>
13
+ <th></th>
14
+ </tr>
15
+ </thead>
16
+ <tbody>
17
+ <% @users.each do |user| %>
18
+ <tr>
19
+ <td><%= user.id %></td>
20
+ <td>
21
+ <%= user.email %>
22
+ </td>
23
+ <td><%= user.created_at.in_time_zone %></td>
24
+ <td><%= user.updated_at.in_time_zone if user.updated_at.present? %></td>
25
+ <td><%= user.last_sign_in_at.in_time_zone if user.last_sign_in_at.present? %></td>
26
+ <td class="text-center user-action">
27
+ <%= link_to user_path(user) do %>
28
+ <i class="fa fa-hand-o-right"></i>
29
+ <% end %>
30
+ <%= link_to edit_user_path(user) do %>
31
+ <i class="fa fa-edit"></i>
32
+ <% end %>
33
+ <%= link_to user_path(user), method: :delete, data: { confirm: 'Are you sure to delete this user?' } do %>
34
+ <i class="fa fa-trash"></i>
35
+ <% end %>
36
+ </td>
37
+ </tr>
38
+ <% end %>
39
+ </tbody>
40
+ </table>
41
+ <div class="row">
42
+ <div class="col-xs-6">
43
+ <div class="data-table-info">Showing <%= @users.count %> of total <%= @users_count %></div>
44
+ </div>
45
+ <div class="col-xs-6">
46
+ <%= paginate @users %>
47
+ </div>
48
+ </div>
49
+ </div>
50
+ </div>
51
+ <!-- /.box-body -->
52
+ </div>
53
+ <!-- /.box -->
54
+ </div>
55
+
56
+ <% content_for :header do %>
57
+ <% if @searching %>
58
+ Search Users <small>users match your search criterias <strong>'<%=params[:q]%>'</strong></small>
59
+ <% else %>
60
+ User List <small>all devise users</small>
61
+ <% end %>
62
+ <% end %>
@@ -0,0 +1,11 @@
1
+ <div class="row">
2
+ <div class="col-xs-12">
3
+ <div class="box">
4
+ <%= render 'form' %>
5
+ </div>
6
+ </div>
7
+ </div>
8
+
9
+ <% content_for :header do %>
10
+ Create new User
11
+ <% end %>
@@ -0,0 +1,13 @@
1
+ <div class="row">
2
+ <div class="col-xs-12">
3
+ <div class="box">
4
+ <div class="box-body data-table-wrapper">
5
+ Search users list
6
+ </div>
7
+ </div>
8
+ </div>
9
+ </div>
10
+
11
+ <% content_for :header do %>
12
+ Search Users <small>users match your search criterias</small>
13
+ <% end %>