thecore_ui_rails_admin 2.1.4 → 2.1.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/{rails_admin/custom/ui.js → thecore_ui_rails_admin/thecore_rails_admin.js} +2 -39
  3. data/app/assets/stylesheets/thecore_ui_rails_admin/animate.css +3458 -0
  4. data/app/assets/stylesheets/thecore_ui_rails_admin/apexcharts.scss +7 -0
  5. data/app/assets/stylesheets/thecore_ui_rails_admin/colors.scss +13 -0
  6. data/app/assets/stylesheets/thecore_ui_rails_admin/common.scss +43 -0
  7. data/app/assets/stylesheets/thecore_ui_rails_admin/devise.scss +241 -0
  8. data/app/assets/stylesheets/{rails_admin/custom → thecore_ui_rails_admin}/flashing.scss +3 -3
  9. data/app/assets/stylesheets/thecore_ui_rails_admin/mixins.scss +18 -0
  10. data/app/assets/stylesheets/{rails_admin/custom/theming.scss → thecore_ui_rails_admin/thecore.scss} +60 -53
  11. data/app/assets/stylesheets/thecore_ui_rails_admin/thecore_rails_admin.scss +27 -0
  12. data/app/assets/stylesheets/{rails_admin/custom → thecore_ui_rails_admin}/togglable-sidebar.scss +4 -26
  13. data/app/controllers/pages_controller.rb +43 -0
  14. data/app/helpers/devise_bootstrap_errors_helper.rb +20 -0
  15. data/app/helpers/thecore_helper.rb +54 -0
  16. data/app/views/layouts/rails_admin/_secondary_navigation.html.haml +1 -1
  17. data/app/views/layouts/rails_admin/_user_navigation.html.haml +2 -2
  18. data/app/views/layouts/rails_admin/application.html.haml +2 -2
  19. data/app/views/rails_admin/main/dashboard.html.haml +20 -7
  20. data/config/initializers/rails_admin.rb +32 -8
  21. data/config/initializers/thecore_concern.rb +6 -1
  22. data/config/initializers/thecore_ui_rails_admin_app_configs.rb +17 -0
  23. data/config/locales/thecore_settings.en.yml +31 -0
  24. data/config/locales/thecore_settings.it.yml +31 -0
  25. data/db/migrate/20161227101954_create_rails_admin_settings.rb +25 -0
  26. data/db/migrate/20161227101956_add_app_name.rb +5 -0
  27. data/lib/abilities/thecore_ui_rails_admin.rb +12 -0
  28. data/lib/concerns/rails_admin_requirements.rb +19 -0
  29. data/lib/concerns/thecore_rails_admin_bulk_delete_concern.rb +16 -0
  30. data/lib/concerns/thecore_rails_admin_export_concern.rb +16 -0
  31. data/lib/concerns/thecore_ui_rails_admin_permission.rb +32 -0
  32. data/lib/concerns/thecore_ui_rails_admin_role.rb +36 -0
  33. data/lib/concerns/thecore_ui_rails_admin_user.rb +75 -0
  34. data/lib/thecore_ui_rails_admin.rb +18 -3
  35. data/lib/thecore_ui_rails_admin/engine.rb +0 -7
  36. data/lib/thecore_ui_rails_admin/version.rb +1 -1
  37. metadata +112 -52
  38. data/app/assets/javascripts/rails_admin/custom/ckeditor_ajax.js.coffee +0 -7
  39. data/app/assets/javascripts/rails_admin/custom/timer.js +0 -135
  40. data/app/views/contact_mailer/contact_message.html.erb +0 -5
  41. data/app/views/devise/confirmations/new.html.erb +0 -16
  42. data/app/views/devise/mailer/confirmation_instructions.html.erb +0 -5
  43. data/app/views/devise/mailer/password_change.html.erb +0 -5
  44. data/app/views/devise/mailer/reset_password_instructions.html.erb +0 -8
  45. data/app/views/devise/mailer/unlock_instructions.html.erb +0 -7
  46. data/app/views/devise/menu/_login_items.html.erb +0 -7
  47. data/app/views/devise/passwords/edit.html.erb +0 -25
  48. data/app/views/devise/passwords/new.html.erb +0 -18
  49. data/app/views/devise/registrations/edit.html.erb +0 -45
  50. data/app/views/devise/registrations/new.html.erb +0 -29
  51. data/app/views/devise/sessions/new.html.erb +0 -28
  52. data/app/views/devise/shared/_links.html.erb +0 -25
  53. data/app/views/devise/unlocks/new.html.erb +0 -16
  54. data/app/views/home/index.html.erb +0 -5
  55. data/app/views/kaminari/_first_page.html.erb +0 -3
  56. data/app/views/kaminari/_gap.html.erb +0 -3
  57. data/app/views/kaminari/_last_page.html.erb +0 -3
  58. data/app/views/kaminari/_next_page.html.erb +0 -3
  59. data/app/views/kaminari/_page.html.erb +0 -9
  60. data/app/views/kaminari/_paginator.html.erb +0 -15
  61. data/app/views/kaminari/_prev_page.html.erb +0 -3
  62. data/app/views/layouts/_footer.html.erb +0 -3
  63. data/app/views/layouts/_messages.html.erb +0 -9
  64. data/app/views/layouts/_navigation.html.erb +0 -20
  65. data/app/views/layouts/_navigation_links.html.erb +0 -7
  66. data/app/views/layouts/mailer.html.erb +0 -6
  67. data/app/views/layouts/mailer.text.erb +0 -1
  68. data/app/views/layouts/thecore.html.erb +0 -42
  69. data/app/views/pages/contact.html.erb +0 -54
  70. data/app/views/pages/home.html.erb +0 -2
  71. data/app/views/pages/inside.html.erb +0 -4
  72. data/app/views/users/confirmations/new.html.erb +0 -16
  73. data/app/views/users/mailer/confirmation_instructions.html.erb +0 -5
  74. data/app/views/users/mailer/password_change.html.erb +0 -3
  75. data/app/views/users/mailer/reset_password_instructions.html.erb +0 -8
  76. data/app/views/users/mailer/unlock_instructions.html.erb +0 -7
  77. data/app/views/users/passwords/edit.html.erb +0 -19
  78. data/app/views/users/passwords/new.html.erb +0 -15
  79. data/app/views/users/registrations/edit.html.erb +0 -27
  80. data/app/views/users/registrations/new.html.erb +0 -17
  81. data/app/views/users/sessions/new.html.erb +0 -37
  82. data/app/views/users/shared/_links.html.erb +0 -26
  83. data/app/views/users/unlocks/new.html.erb +0 -16
@@ -1,3 +0,0 @@
1
- <li>
2
- <%= link_to_unless current_page.first?, raw(t 'views.pagination.previous'), url, :rel => 'prev', :remote => remote %>
3
- </li>
@@ -1,3 +0,0 @@
1
- <!-- Arrow to workaround the problem, on android default browser, of input fields being hidden by keyboard /-->
2
-
3
- <img src="<%= image_url('up-arrow.png') %>" class="img-responsive" id="up-arrow"/>
@@ -1,9 +0,0 @@
1
- <%# Rails flash messages styled for Bootstrap 3.0 %>
2
- <% flash.each do |name, msg| %>
3
- <% if msg.is_a?(String) %>
4
- <div class="alert alert-<%= name == "notice" ? "success" : "danger" %>">
5
- <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
6
- <%= content_tag :div, msg, :id => "flash_#{name}" %>
7
- </div>
8
- <% end %>
9
- <% end %>
@@ -1,20 +0,0 @@
1
- <nav class="navbar navbar-inverse">
2
- <div class="container">
3
- <div class="navbar-header">
4
- <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
5
- <span class="sr-only">Toggle navigation</span>
6
- <span class="icon-bar"></span>
7
- <span class="icon-bar"></span>
8
- <span class="icon-bar"></span>
9
- </button>
10
- <% if user_signed_in? %>
11
- <%= link_to t(:dashboard), inside_path, class: 'navbar-brand' %>
12
- <%end%>
13
- </div>
14
- <div class="collapse navbar-collapse">
15
- <ul class="nav navbar-nav">
16
- <%= render 'layouts/navigation_links' %>
17
- </ul>
18
- </div>
19
- </div>
20
- </nav>
@@ -1,7 +0,0 @@
1
- <% if user_signed_in? %>
2
- <li><%= link_to t(:contact), contact_path %></li>
3
-
4
- <li><%= link_to t(:manage), rails_admin_path %></li>
5
-
6
- <li><%= link_to t(:sign_out), destroy_user_session_path, data:{method: :delete} %></li>
7
- <% end %>
@@ -1,6 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
- <html>
3
- <body style="margin: 0;">
4
- <%= yield %>
5
- </body>
6
- </html>
@@ -1 +0,0 @@
1
- <%= yield %>
@@ -1,42 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="<%=I18n.locale%>">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="apple-mobile-web-app-capable" content="yes">
6
-
7
- <meta name="viewport" content="width=device-width, initial-scale=1">
8
- <title><%= Settings.app_name rescue "Thecore" %></title>
9
-
10
- <%= tag("link", rel: "manifest", href: asset_path("manifest.json", skip_pipeline: true)) %>
11
- <meta name="turbolinks-cache-control" content="no-cache">
12
- <%= stylesheet_link_tag 'thecore', media: 'all', 'data-turbolinks-track' => true %>
13
- <%= javascript_include_tag 'thecore', 'data-turbolinks-track' => true %>
14
-
15
- <%= favicon_link_tag 'apple-touch-icon.png', rel: 'apple-touch-icon', sizes: "180x180" %>
16
- <%= favicon_link_tag 'favicon-32x32.png', rel: 'icon', sizes: "32x32" %>
17
- <%= favicon_link_tag 'favicon-16x16.png', rel: 'icon', sizes: "16x16" %>
18
- <%= favicon_link_tag 'safari-pinned-tab.svg', rel: 'mask-icon', color: "#5bbad5" %>
19
- <meta name="theme-color" content="#3b4e59">
20
-
21
- <%= csrf_meta_tags %>
22
- <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
23
- <!--[if lt IE 9]> <%= javascript_include_tag "ie" %> <![endif]-->
24
- </head>
25
- <body>
26
- <div class="jumbotron vertical-center">
27
- <div class="container">
28
- <div class="col-md-4 col-md-offset-4 text-center">
29
- <img class="main-menu-app-logo" style="width: 25%; max-width: 152px" src="<%= image_url('logo.png') %>"/>
30
- </div>
31
- <%- unless flash.empty? %>
32
- <div class="col-md-4 col-md-offset-4" style="margin-top: 1em;">
33
- <%= render partial: 'shared/flash' %>
34
- </div>
35
- <%-end%>
36
- <%= yield %>
37
- </div>
38
- </div>
39
-
40
- <%= render 'layouts/footer' %>
41
- </body>
42
- </html>
@@ -1,54 +0,0 @@
1
- <% title("Contact") %>
2
- <h1 class="page-title">Contact</h1>
3
-
4
- <div class="row">
5
- <div class="col-sm-6">
6
-
7
- <%= form_tag email_confirmation_path, method: 'post', html: {role: "form"} do %>
8
-
9
- <% if current_user && current_user.username %>
10
- <%= hidden_field_tag :name, current_user.username %>
11
- <%else%>
12
- <div class="form-group">
13
- <%= label_tag :name, "Your name" %>
14
- <div class="row">
15
- <div class="col-xs-12">
16
- <%= text_field_tag :name, @name, placeholder: "Enter your name...", :autofocus => true, class: "form-control" %>
17
- </div>
18
- </div>
19
- </div>
20
- <%end%>
21
-
22
- <% if current_user && current_user.email %>
23
- <%= hidden_field_tag :email, current_user.email %>
24
- <%else%>
25
- <div class="form-group">
26
- <%= label_tag :email, "Your email" %>
27
- <div class="row">
28
- <div class="col-xs-12">
29
- <%= text_field_tag :email, @email, placeholder: "Enter your email...", class: "form-control" %>
30
- </div>
31
- </div>
32
- </div>
33
- <%end%>
34
-
35
- <div class="form-group">
36
- <%= label_tag :message, "Your message" %>
37
- <div class="row">
38
- <div class="col-xs-12">
39
- <%= text_area_tag :message, @message, placeholder: "Enter your message...", rows: 10, class: "form-control" %>
40
- </div>
41
- </div>
42
- </div>
43
-
44
- <div class="row">
45
- <div class="col-xs-12 padded">
46
- <button class='btn btn-primary'>
47
- <i class='fa fa-envelope'></i> Send
48
- </button>
49
- </div>
50
- </div>
51
- <% end %>
52
-
53
- </div>
54
- </div>
@@ -1,2 +0,0 @@
1
- <% title("Home Page") %>
2
- <h1><i class="fa fa-home"></i> Home Page <small>views/pages/home.html.erb</small></h1>
@@ -1,4 +0,0 @@
1
- <% title("Protected page") %>
2
- <h1>Protected Page</h1>
3
- <p>This page is only visible to signed in users. Edit it at: <em>views/pages/inside.html.erb</em></p>
4
- <p>You can change the page users see after successfully signing in within the method <em>after_sign_in_path_for</em> inside <strong>application_controller.rb</strong></p>
@@ -1,16 +0,0 @@
1
- <h2>Resend confirmation instructions</h2>
2
-
3
- <%= simple_form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
4
- <%= f.error_notification %>
5
- <%= f.full_error :confirmation_token %>
6
-
7
- <div class="form-inputs">
8
- <%= f.input :email, required: true, autofocus: true %>
9
- </div>
10
-
11
- <div class="form-actions">
12
- <%= f.button :submit, "Resend confirmation instructions" %>
13
- </div>
14
- <% end %>
15
-
16
- <%= render "users/shared/links" %>
@@ -1,5 +0,0 @@
1
- <p>Welcome <%= @email %>!</p>
2
-
3
- <p>You can confirm your account email through the link below:</p>
4
-
5
- <p><%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %></p>
@@ -1,3 +0,0 @@
1
- <p>Hello <%= @resource.email %>!</p>
2
-
3
- <p>We're contacting you to notify you that your password has been changed.</p>
@@ -1,8 +0,0 @@
1
- <p>Hello <%= @resource.email %>!</p>
2
-
3
- <p>Someone has requested a link to change your password. You can do this through the link below.</p>
4
-
5
- <p><%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %></p>
6
-
7
- <p>If you didn't request this, please ignore this email.</p>
8
- <p>Your password won't change until you access the link above and create a new one.</p>
@@ -1,7 +0,0 @@
1
- <p>Hello <%= @resource.email %>!</p>
2
-
3
- <p>Your account has been locked due to an excessive number of unsuccessful sign in attempts.</p>
4
-
5
- <p>Click the link below to unlock your account:</p>
6
-
7
- <p><%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %></p>
@@ -1,19 +0,0 @@
1
- <h2>Change your password</h2>
2
-
3
- <%= simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
4
- <%= f.error_notification %>
5
-
6
- <%= f.input :reset_password_token, as: :hidden %>
7
- <%= f.full_error :reset_password_token %>
8
-
9
- <div class="form-inputs">
10
- <%= f.input :password, label: "New password", required: true, autofocus: true, hint: ("#{@minimum_password_length} characters minimum" if @minimum_password_length) %>
11
- <%= f.input :password_confirmation, label: "Confirm your new password", required: true %>
12
- </div>
13
-
14
- <div class="form-actions">
15
- <%= f.button :submit, "Change my password" %>
16
- </div>
17
- <% end %>
18
-
19
- <%= render "users/shared/links" %>
@@ -1,15 +0,0 @@
1
- <h2>Forgot your password?</h2>
2
-
3
- <%= simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
4
- <%= f.error_notification %>
5
-
6
- <div class="form-inputs">
7
- <%= f.input :email, required: true, autofocus: true %>
8
- </div>
9
-
10
- <div class="form-actions">
11
- <%= f.button :submit, "Send me reset password instructions" %>
12
- </div>
13
- <% end %>
14
-
15
- <%= render "users/shared/links" %>
@@ -1,27 +0,0 @@
1
- <h2>Edit <%= resource_name.to_s.humanize %></h2>
2
-
3
- <%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
4
- <%= f.error_notification %>
5
-
6
- <div class="form-inputs">
7
- <%= f.input :email, required: true, autofocus: true %>
8
-
9
- <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
10
- <p>Currently waiting confirmation for: <%= resource.unconfirmed_email %></p>
11
- <% end %>
12
-
13
- <%= f.input :password, autocomplete: "off", hint: "leave it blank if you don't want to change it", required: false %>
14
- <%= f.input :password_confirmation, required: false %>
15
- <%= f.input :current_password, hint: "we need your current password to confirm your changes", required: true %>
16
- </div>
17
-
18
- <div class="form-actions">
19
- <%= f.button :submit, "Update" %>
20
- </div>
21
- <% end %>
22
-
23
- <h3>Cancel my account</h3>
24
-
25
- <p>Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete %></p>
26
-
27
- <%= link_to "Back", :back %>
@@ -1,17 +0,0 @@
1
- <h2>Sign up</h2>
2
-
3
- <%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
4
- <%= f.error_notification %>
5
-
6
- <div class="form-inputs">
7
- <%= f.input :email, required: true, autofocus: true %>
8
- <%= f.input :password, required: true, hint: ("#{@minimum_password_length} characters minimum" if @minimum_password_length) %>
9
- <%= f.input :password_confirmation, required: true %>
10
- </div>
11
-
12
- <div class="form-actions">
13
- <%= f.button :submit, "Sign up" %>
14
- </div>
15
- <% end %>
16
-
17
- <%= render "users/shared/links" %>
@@ -1,37 +0,0 @@
1
- <div class="container-fluid container-fluid-devise bckg-login" align="center">
2
- <div class="login-form-user">
3
- <div class="app-logo">
4
- <img src="<%= asset_path('app_logo.png') %>" alt="" class="img-responsive"/>
5
- </div>
6
- <div class="row">
7
- <div class="content-width content-login bckg-blue">
8
- <h2 class="text-center fix-title-login"><i class="fa fa-lock"></i> LOGIN</h2>
9
- <%= simple_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
10
- <div class="input-group">
11
- <%= f.input :email, required: false, autofocus: true, label: false, placeholder: 'Adresse Email' %>
12
- </div>
13
- <div class="input-group">
14
- <%= f.input :password, required: false, label: false, placeholder: 'Mot de passe' %>
15
- </div>
16
- <div class="form-actions">
17
- <div class="col-sm-6 col-xs-12">
18
- <div class="input-group">
19
- <% if devise_mapping.rememberable? %>
20
- <div class="checkbox">
21
- <label>
22
- <%= f.check_box :remember_me %> Se souvenir de moi
23
- </label>
24
- </div>
25
- <% end %>
26
- </div>
27
- </div>
28
- <div class="col-sm-6 col-xs-12">
29
- <%= f.button :submit, 'SE CONNECTER' %>
30
- </div>
31
- </div>
32
- <% end %>
33
- <div class="lost_id">Vous avez perdu vos identifiants ?</div>
34
- </div>
35
- </div>
36
- </div>
37
- </div>
@@ -1,26 +0,0 @@
1
- <% if controller_name != 'sessions' %>
2
- <%= link_to "Log in", new_session_path(resource_name) %>
3
- <br/>
4
- <% end %>
5
- <% if devise_mapping.registerable? && controller_name != 'registrations' %>
6
- <%= link_to "Sign up", new_registration_path(resource_name) %>
7
- <br/>
8
- <% end %>
9
- <% if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
10
- <%= link_to "Forgot your password?", new_password_path(resource_name) %>
11
- <br/>
12
- <% end %>
13
- <% if devise_mapping.confirmable? && controller_name != 'confirmations' %>
14
- <%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %>
15
- <br/>
16
- <% end %>
17
- <% if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
18
- <%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %>
19
- <br/>
20
- <% end %>
21
- <% if devise_mapping.omniauthable? %>
22
- <% resource_class.omniauth_providers.each do |provider| %>
23
- <%= link_to "Sign in with #{OmniAuth::Utils.camelize(provider)}", omniauth_authorize_path(resource_name, provider) %>
24
- <br/>
25
- <% end %>
26
- <% end %>
@@ -1,16 +0,0 @@
1
- <h2>Resend unlock instructions</h2>
2
-
3
- <%= simple_form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %>
4
- <%= f.error_notification %>
5
- <%= f.full_error :unlock_token %>
6
-
7
- <div class="form-inputs">
8
- <%= f.input :email, required: true, autofocus: true %>
9
- </div>
10
-
11
- <div class="form-actions">
12
- <%= f.button :submit, "Resend unlock instructions" %>
13
- </div>
14
- <% end %>
15
-
16
- <%= render "users/shared/links" %>