thecore_ui_rails_admin 2.1.3 → 2.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/rails_admin/custom/ckeditor_ajax.js.coffee +7 -0
- data/app/assets/javascripts/rails_admin/custom/timer.js +135 -0
- data/app/assets/javascripts/rails_admin/custom/ui.js +115 -0
- data/app/assets/javascripts/rails_admin/ra.widgets.coffee +233 -0
- data/app/assets/stylesheets/rails_admin/custom/flashing.scss +28 -0
- data/app/assets/stylesheets/rails_admin/custom/theming.scss +199 -0
- data/app/assets/stylesheets/rails_admin/custom/togglable-sidebar.scss +112 -0
- data/app/views/contact_mailer/contact_message.html.erb +5 -0
- data/app/views/devise/confirmations/new.html.erb +16 -0
- data/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
- data/app/views/devise/mailer/password_change.html.erb +5 -0
- data/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
- data/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
- data/app/views/devise/menu/_login_items.html.erb +7 -0
- data/app/views/devise/passwords/edit.html.erb +25 -0
- data/app/views/devise/passwords/new.html.erb +18 -0
- data/app/views/devise/registrations/edit.html.erb +45 -0
- data/app/views/devise/registrations/new.html.erb +29 -0
- data/app/views/devise/sessions/new.html.erb +28 -0
- data/app/views/devise/shared/_links.html.erb +25 -0
- data/app/views/devise/unlocks/new.html.erb +16 -0
- data/app/views/home/index.html.erb +5 -0
- data/app/views/kaminari/_first_page.html.erb +3 -0
- data/app/views/kaminari/_gap.html.erb +3 -0
- data/app/views/kaminari/_last_page.html.erb +3 -0
- data/app/views/kaminari/_next_page.html.erb +3 -0
- data/app/views/kaminari/_page.html.erb +9 -0
- data/app/views/kaminari/_paginator.html.erb +15 -0
- data/app/views/kaminari/_prev_page.html.erb +3 -0
- data/app/views/layouts/_footer.html.erb +3 -0
- data/app/views/layouts/_messages.html.erb +9 -0
- data/app/views/layouts/_navigation.html.erb +20 -0
- data/app/views/layouts/_navigation_links.html.erb +7 -0
- data/app/views/layouts/mailer.html.erb +6 -0
- data/app/views/layouts/mailer.text.erb +1 -0
- data/app/views/layouts/rails_admin/_navigation.html.haml +13 -0
- data/app/views/layouts/rails_admin/_secondary_navigation.html.haml +3 -0
- data/app/views/layouts/rails_admin/_sidebar_navigation.html.haml +4 -0
- data/app/views/layouts/rails_admin/_user_navigation.html.haml +7 -0
- data/app/views/layouts/rails_admin/application.html.haml +59 -0
- data/app/views/layouts/rails_admin/pjax.html.haml +25 -0
- data/app/views/layouts/thecore.html.erb +42 -0
- data/app/views/pages/contact.html.erb +54 -0
- data/app/views/pages/home.html.erb +2 -0
- data/app/views/pages/inside.html.erb +4 -0
- data/app/views/rails_admin/main/_card.html.haml +17 -0
- data/app/views/rails_admin/main/_modal_interaction.html.erb +53 -0
- data/app/views/rails_admin/main/dashboard.html.haml +25 -0
- data/app/views/rails_admin/main/index.html.haml +90 -0
- data/app/views/shared/_flash.html.erb +10 -0
- data/app/views/users/confirmations/new.html.erb +16 -0
- data/app/views/users/mailer/confirmation_instructions.html.erb +5 -0
- data/app/views/users/mailer/password_change.html.erb +3 -0
- data/app/views/users/mailer/reset_password_instructions.html.erb +8 -0
- data/app/views/users/mailer/unlock_instructions.html.erb +7 -0
- data/app/views/users/passwords/edit.html.erb +19 -0
- data/app/views/users/passwords/new.html.erb +15 -0
- data/app/views/users/registrations/edit.html.erb +27 -0
- data/app/views/users/registrations/new.html.erb +17 -0
- data/app/views/users/sessions/new.html.erb +37 -0
- data/app/views/users/shared/_links.html.erb +26 -0
- data/app/views/users/unlocks/new.html.erb +16 -0
- data/config/initializers/rails_admin.rb +49 -0
- data/config/initializers/thecore_concern.rb +125 -0
- data/config/locales/en.index_cards.custom.yml +8 -0
- data/config/locales/en.main.yml +27 -0
- data/config/locales/en.rails_admin.yml +34 -0
- data/config/locales/en.rollincode.yml +5 -0
- data/config/locales/it.index_cards.custom.yml +20 -0
- data/config/locales/it.main.yml +27 -0
- data/config/locales/it.rails_admin.yml +4 -0
- data/config/locales/it.rollincode.yml +5 -0
- data/config/routes.rb +10 -0
- data/lib/thecore_ui_rails_admin.rb +3 -0
- data/lib/thecore_ui_rails_admin/engine.rb +7 -0
- data/lib/thecore_ui_rails_admin/version.rb +1 -1
- metadata +88 -2
@@ -0,0 +1,4 @@
|
|
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>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
%div.panel.panel-success
|
2
|
+
%div.panel-heading
|
3
|
+
%ul.inline.list-inline.pull-right
|
4
|
+
= menu_for :member, @abstract_model, object, true
|
5
|
+
%h4.panel-title
|
6
|
+
= check_box_tag "bulk_ids[]", object.id, false, id: "bulk_ids_#{object.id}"
|
7
|
+
%a{:"data-toggle" => "collapse", href: "#object-id-#{object.id}"}
|
8
|
+
= (object.resume rescue false || object.display_name rescue false || object.title rescue false || object.name rescue false || object.code rescue false)
|
9
|
+
%div{id: "object-id-#{object.id}", class: "panel-collapse collapse"}
|
10
|
+
%div.panel-body
|
11
|
+
- properties.map{ |property| property.bind(:object, object) }.each do |property|
|
12
|
+
- key = capitalize_first_letter(property.label)
|
13
|
+
- value = property.pretty_value
|
14
|
+
%p.card-text{class: "#{property.css_class} #{property.type_css_class}", title: strip_tags(value.to_s)}
|
15
|
+
%strong
|
16
|
+
= key + ":"
|
17
|
+
= value
|
@@ -0,0 +1,53 @@
|
|
1
|
+
<div id="modal-interaction" class="modal fade" tabindex="-1" role="dialog">
|
2
|
+
<div class="modal-dialog" role="document">
|
3
|
+
<div class="modal-content">
|
4
|
+
<div class="modal-header">
|
5
|
+
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
6
|
+
<span aria-hidden="true">×</span>
|
7
|
+
</button>
|
8
|
+
<h4 class="modal-title" id="modal-interaction-label"> </h4>
|
9
|
+
</div>
|
10
|
+
<div class="modal-body" id="modal-interaction-body">
|
11
|
+
|
12
|
+
</div>
|
13
|
+
<div class="modal-footer" id="modal-interaction-footer">
|
14
|
+
<button type="button" class="btn btn-default" data-dismiss="modal" id="modal-interaction-secondary"> </button>
|
15
|
+
<button type="button" class="btn btn-primary" id="modal-interaction-primary"> </button>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
<!-- /.modal-content -->
|
19
|
+
</div>
|
20
|
+
<!-- /.modal-dialog -->
|
21
|
+
</div>
|
22
|
+
<!-- /.modal -->
|
23
|
+
|
24
|
+
<script>
|
25
|
+
function openModal(title, message, buttonPrimary, buttonSecondary) {
|
26
|
+
$('#modal-interaction-label').html(title);
|
27
|
+
$('#modal-interaction-body').html(message);
|
28
|
+
if (buttonPrimary != null) {
|
29
|
+
$('#modal-interaction-primary').html(buttonPrimary.lbl);
|
30
|
+
$('#modal-interaction-primary').on('click', buttonPrimary.func);
|
31
|
+
$('#modal-interaction-primary').show();
|
32
|
+
}
|
33
|
+
if (buttonSecondary != null) {
|
34
|
+
$('#modal-interaction-secondary').html(buttonSecondary.lbl);
|
35
|
+
$('#modal-interaction-secondary').on('click', buttonSecondary.func);
|
36
|
+
$('#modal-interaction-secondary').show();
|
37
|
+
}
|
38
|
+
(buttonPrimary != null || buttonSecondary != null) ? $("#modal-interaction-footer").show() : $("#modal-interaction-footer").hide();
|
39
|
+
$('#modal-interaction').modal('show');
|
40
|
+
}
|
41
|
+
function closeModal() {
|
42
|
+
$('#modal-interaction').modal('hide');
|
43
|
+
$('#modal-interaction-label').html(" ");
|
44
|
+
$('#modal-interaction-body').html(" ");
|
45
|
+
$('#modal-interaction-primary').html(" ");
|
46
|
+
$('#modal-interaction-secondary').html(" ");
|
47
|
+
$('#modal-interaction-primary').hide();
|
48
|
+
$('#modal-interaction-secondary').hide();
|
49
|
+
$("#modal-interaction-footer").hide();
|
50
|
+
$('#modal-interaction-primary').off();
|
51
|
+
$('#modal-interaction-secondary').off();
|
52
|
+
}
|
53
|
+
</script>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
= breadcrumb
|
2
|
+
- @list_bg = ['info', 'success', 'danger', 'success', 'info', 'warning', 'danger', 'info', 'success']
|
3
|
+
- if @abstract_models
|
4
|
+
.row
|
5
|
+
- index = 0
|
6
|
+
- @abstract_models.each do |abstract_model|
|
7
|
+
- index_path = index_path(model_name: abstract_model.to_param)
|
8
|
+
- if authorized?(:index, abstract_model) && !index_path.include?("ckeditor")
|
9
|
+
- if index == @list_bg.length
|
10
|
+
- index = 0
|
11
|
+
- row_class = "box bg-#{ @list_bg[index].to_s } #{"link" if index_path} #{abstract_model.param_key}_links #{abstract_model.config.label_plural}"
|
12
|
+
.col-sm-4
|
13
|
+
.box{class: row_class, :"data-link" => index_path}
|
14
|
+
%i{class: "icon-bg #{abstract_model.config.navigation_icon.present? ? abstract_model.config.navigation_icon : 'file' }"}
|
15
|
+
.text-center
|
16
|
+
%p= capitalize_first_letter(abstract_model.config.label_plural)
|
17
|
+
%strong= @count[abstract_model.model.name].to_s
|
18
|
+
%p= link_to t('admin.rollincode.show'), index_path, class: 'btn btn-black pjax'
|
19
|
+
- index += 1
|
20
|
+
|
21
|
+
- if @auditing_adapter && authorized?(:history_index)
|
22
|
+
#block-tables.block
|
23
|
+
.content
|
24
|
+
%h2= t("admin.actions.history_index.menu")
|
25
|
+
= render partial: 'rails_admin/main/dashboard_history'
|
@@ -0,0 +1,90 @@
|
|
1
|
+
:ruby
|
2
|
+
query = params[:query]
|
3
|
+
params = request.params.except(:authenticity_token, :action, :controller, :utf8, :bulk_export, :_pjax)
|
4
|
+
params.delete(:query) if params[:query].blank?
|
5
|
+
params.delete(:sort_reverse) unless params[:sort_reverse] == 'true'
|
6
|
+
sort_reverse = params[:sort_reverse]
|
7
|
+
sort = params[:sort]
|
8
|
+
params.delete(:sort) if params[:sort] == @model_config.list.sort_by.to_s
|
9
|
+
export_action = RailsAdmin::Config::Actions.find(:export, { controller: self.controller, abstract_model: @abstract_model })
|
10
|
+
export_action = nil unless export_action && authorized?(export_action.authorization_key, @abstract_model)
|
11
|
+
description = RailsAdmin.config(@abstract_model.model_name).description
|
12
|
+
properties = @model_config.list.with(controller: self.controller, view: self, object: @abstract_model.model.new).visible_fields
|
13
|
+
checkboxes = @model_config.list.checkboxes?
|
14
|
+
# columns paginate
|
15
|
+
unless (frozen_columns = @model_config.list.sidescroll_frozen_columns)
|
16
|
+
sets = get_column_sets(properties)
|
17
|
+
properties = sets[params[:set].to_i] || []
|
18
|
+
other_left = ((params[:set].to_i - 1) >= 0) && sets[params[:set].to_i - 1].present?
|
19
|
+
other_right = sets[params[:set].to_i + 1].present?
|
20
|
+
end
|
21
|
+
|
22
|
+
- content_for :contextual_tabs do
|
23
|
+
- if checkboxes
|
24
|
+
= bulk_menu
|
25
|
+
- if filterable_fields.present?
|
26
|
+
%li.dropdown{style: 'float:right'}
|
27
|
+
%a.dropdown-toggle{href: '#', :'data-toggle' => "dropdown"}
|
28
|
+
= t('admin.misc.add_filter')
|
29
|
+
%b.caret
|
30
|
+
%ul.dropdown-menu#filters{style: 'left:auto; right:0;'}
|
31
|
+
- filterable_fields.each do |field|
|
32
|
+
- field_options = case field.type
|
33
|
+
- when :enum
|
34
|
+
- options_for_select(field.with(object: @abstract_model.model.new).enum)
|
35
|
+
- else
|
36
|
+
- ''
|
37
|
+
%li
|
38
|
+
%a{href: '#', :"data-field-label" => field.label, :"data-field-name" => field.name, :"data-field-options" => field_options.html_safe, :"data-field-type" => field.type, :"data-field-value" => "", :"data-field-datetimepicker-format" => (field.try(:parser) && field.parser.to_momentjs)}= capitalize_first_letter(field.label)
|
39
|
+
|
40
|
+
%style
|
41
|
+
- properties.select{ |p| p.column_width.present? }.each do |property|
|
42
|
+
= "#list th.#{property.css_class} { width: #{property.column_width}px; min-width: #{property.column_width}px; }"
|
43
|
+
= "#list td.#{property.css_class} { max-width: #{property.column_width}px; }"
|
44
|
+
|
45
|
+
#list
|
46
|
+
= form_tag(index_path(params.except(*%w[page f query])), method: :get, class: "pjax-form form-inline") do
|
47
|
+
.well
|
48
|
+
%span#filters_box{data: {options: ordered_filter_options.to_json}}
|
49
|
+
%hr.filters_box{style: "display:#{ordered_filters.empty? ? 'none' : 'block'}"}
|
50
|
+
.input-group
|
51
|
+
%input.form-control.input-small{name: "query", type: "search", value: query, placeholder: t("admin.misc.filter")}
|
52
|
+
%span.input-group-btn
|
53
|
+
%button.btn.btn-primary{type: 'submit', :'data-disable-with' => '<i class="icon-white icon-refresh"></i> '.html_safe + t('admin.misc.refresh')}
|
54
|
+
%i.icon-white.icon-refresh
|
55
|
+
= t('admin.misc.refresh')
|
56
|
+
%button#remove_filter.btn.btn-info{title: "Reset filters"}
|
57
|
+
%i.icon-white.icon-remove
|
58
|
+
- if export_action
|
59
|
+
%span{style: 'float:right'}= link_to wording_for(:link, export_action), export_path(params.except('set').except('page')), class: 'btn btn-info'
|
60
|
+
|
61
|
+
- unless @model_config.list.scopes.empty?
|
62
|
+
%ul.nav.nav-tabs#scope_selector
|
63
|
+
- @model_config.list.scopes.each_with_index do |scope, index|
|
64
|
+
- scope = '_all' if scope.nil?
|
65
|
+
%li{class: "#{'active' if scope.to_s == params[:scope] || (params[:scope].blank? && index == 0)}"}
|
66
|
+
%a{href: index_path(params.merge(scope: scope, page: nil)), class: 'pjax'}= I18n.t("admin.scopes.#{@abstract_model.to_param}.#{scope}", default: I18n.t("admin.scopes.#{scope}", default: scope.to_s.titleize))
|
67
|
+
|
68
|
+
= form_tag bulk_action_path(model_name: @abstract_model.to_param), method: :post, id: "bulk_form", class: ["form", frozen_columns ? 'ra-sidescroll' : nil], data: (frozen_columns ? {ra_sidescroll: frozen_columns} : {}) do
|
69
|
+
= hidden_field_tag :bulk_action
|
70
|
+
- if description.present?
|
71
|
+
%p
|
72
|
+
%strong= description
|
73
|
+
|
74
|
+
- @objects.each do |object|
|
75
|
+
= render partial: "card", locals: {object: object, properties: properties, sort: sort, sort_reverse: sort_reverse}
|
76
|
+
|
77
|
+
- if @model_config.list.limited_pagination
|
78
|
+
.row
|
79
|
+
.col-md-6= paginate(@objects, theme: 'ra-twitter-bootstrap/without_count', total_pages: Float::INFINITY, remote: true)
|
80
|
+
|
81
|
+
- elsif @objects.respond_to?(:total_count)
|
82
|
+
- total_count = @objects.total_count.to_i
|
83
|
+
.row
|
84
|
+
.col-md-6= paginate(@objects, theme: 'ra-twitter-bootstrap', remote: true)
|
85
|
+
.row
|
86
|
+
.col-md-6= link_to(t("admin.misc.show_all"), index_path(params.merge(all: true)), class: "show-all btn btn-default clearfix pjax") unless total_count > 100 || total_count <= @objects.to_a.size
|
87
|
+
.clearfix.total-count= "#{total_count} #{@model_config.pluralize(total_count).downcase}"
|
88
|
+
|
89
|
+
- else
|
90
|
+
.clearfix.total-count= "#{@objects.size} #{@model_config.pluralize(@objects.size).downcase}"
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<% flash.each do |type, message| %>
|
2
|
+
<%-unless [true, "true", :true].include? message%>
|
3
|
+
<div class="alert <%= bootstrap_class_for(type) %> fade in" role='alert'>
|
4
|
+
<button class="close" data-dismiss="alert">×</button>
|
5
|
+
<span class="glyphicon <%= bootstrap_glyphs_icon(type)%>" aria-hidden="true"></span>
|
6
|
+
<span class="sr-only"><%= type.capitalize%>:</span>
|
7
|
+
<%= message %>
|
8
|
+
</div>
|
9
|
+
<%-end%>
|
10
|
+
<% end %>
|
@@ -0,0 +1,16 @@
|
|
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" %>
|
@@ -0,0 +1,8 @@
|
|
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>
|
@@ -0,0 +1,7 @@
|
|
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>
|
@@ -0,0 +1,19 @@
|
|
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" %>
|
@@ -0,0 +1,15 @@
|
|
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" %>
|
@@ -0,0 +1,27 @@
|
|
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 %>
|
@@ -0,0 +1,17 @@
|
|
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" %>
|
@@ -0,0 +1,37 @@
|
|
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>
|
@@ -0,0 +1,26 @@
|
|
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 %>
|
@@ -0,0 +1,16 @@
|
|
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" %>
|
@@ -0,0 +1,49 @@
|
|
1
|
+
require 'rails_admin'
|
2
|
+
|
3
|
+
require "thecore_actions"
|
4
|
+
|
5
|
+
include TheCoreActions
|
6
|
+
|
7
|
+
RailsAdmin.config do |config|
|
8
|
+
# config.main_app_name = Proc.new { |controller|
|
9
|
+
# [(Settings.app_name rescue (ENV["APP_NAME"] || "TheCore App")), "#{controller.params[:action].try(:titleize)} (#{Time.zone.now.to_s(:time)})"]
|
10
|
+
# }
|
11
|
+
### Popular gems integration
|
12
|
+
config.model "ActiveStorage::Blob" do
|
13
|
+
visible false
|
14
|
+
end
|
15
|
+
|
16
|
+
config.model "ActiveStorage::Attachment" do
|
17
|
+
visible false
|
18
|
+
end
|
19
|
+
|
20
|
+
## == Devise ==
|
21
|
+
config.authenticate_with do
|
22
|
+
warden.authenticate! scope: :user
|
23
|
+
end
|
24
|
+
config.current_user_method(&:current_user)
|
25
|
+
|
26
|
+
## == Cancan ==
|
27
|
+
config.authorize_with :cancancan
|
28
|
+
|
29
|
+
## == PaperTrail ==
|
30
|
+
# config.audit_with :paper_trail, 'User', 'PaperTrail::Version' # PaperTrail >= 3.0.0
|
31
|
+
|
32
|
+
### More at https://github.com/sferik/rails_admin/wiki/Base-configuration
|
33
|
+
config.label_methods.unshift(:display_name)
|
34
|
+
|
35
|
+
config.actions do
|
36
|
+
# show_in_app
|
37
|
+
dashboard # mandatory
|
38
|
+
index # mandatory
|
39
|
+
new
|
40
|
+
export
|
41
|
+
bulk_delete
|
42
|
+
show
|
43
|
+
edit
|
44
|
+
delete
|
45
|
+
toggle
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
# require "thecore_rails_admin_main_controller_concern"
|