devise-bootstrap-views 1.0.0.alpha1 → 1.0.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: b577437581b06dffb063c28424e4bcff8683e947
4
- data.tar.gz: f7037c4921d87f2502bea9ad8e54380d89091441
2
+ SHA256:
3
+ metadata.gz: de9c03f83d78e026c4acf19cb4e83a4413d5ad5377697721eac149d792605305
4
+ data.tar.gz: d0c235873bd5f6d7dda0bcc5e9cec00034c9add6a3847304b64c568fceaf5f14
5
5
  SHA512:
6
- metadata.gz: 4c4d649dabff58148a6002b4945308b7f55b8f7c07c36d24788c21699c05c29e6078613d9b3767a67f7eded549159237439c672e88af4a754936ed013a433783
7
- data.tar.gz: d98418a9f010ff1058afb6ae655bbefed520b7273e8e8e4720d83495ee2ec0dc9da40e3e79eafc759107c0b6ec24f6cd0618ffd67f80263f6f2114f7ac00390f
6
+ metadata.gz: 4e2a60f25b81b1fc8eca3fdc8fd8e6621b3b655d8605fc76d3f6585d39e42fc0c51c9854084f69d99937fddb1dfbae4a4c44780eb00e750c507942c321c8f455
7
+ data.tar.gz: 31fe3e80889eef3e54fba3ec43b6e40d9b6ca99cfec08e5ec587829557ec105b20cb0b90233d41e3c970cfc4c12c6c0c632b7c546abc5970107016153c4c6033
data/.gitignore CHANGED
@@ -9,3 +9,6 @@
9
9
  /tmp/
10
10
 
11
11
  *.gem
12
+
13
+ # macOS
14
+ .DS_Store
@@ -1,4 +1,4 @@
1
- Copyright (c) 2014 Yinghai Zhao
1
+ Copyright (c) 2018 Yinghai Zhao
2
2
 
3
3
  MIT License
4
4
 
data/README.md CHANGED
@@ -2,46 +2,53 @@
2
2
 
3
3
  Here are some of the highlights:
4
4
 
5
- * Devise views with Bootstrap 4
6
- * Used Bootstrap responsive columns
7
- * I18n Support
5
+ - Devise views with Bootstrap 4
6
+ - Used Bootstrap responsive columns
7
+ - I18n Support
8
+
9
+ ***WARNING***
8
10
 
9
- WARNING:
10
11
  This gem copies lots of its code from [devise-i18n-views](https://github.com/mcasimir/devise-i18n-views) gem.
11
12
 
12
13
  ## Screenshot
14
+
13
15
  ![Screenshot](https://raw.githubusercontent.com/hisea/devise-bootstrap-views/master/Screenshot.png)
14
16
 
15
17
  ## Installation
16
18
 
19
+ Make sure Bootstrap 4 is installed, either as a Ruby gem or using CDN:
20
+
21
+ ```html
22
+ <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
23
+ ```
24
+
25
+
17
26
  Add this line to your application's Gemfile:
18
27
 
19
- gem 'devise-bootstrap-views'
28
+ ```ruby
29
+ gem 'devise-bootstrap-views', '~> 1.0'
30
+ ```
20
31
 
21
32
  And then execute:
22
33
 
23
- $ bundle
34
+ $ bundle install
24
35
 
25
36
  Then you can install the required translations in your `config/locales`. Use [devise-i18n](https://github.com/tigrish/devise-i18n) — the best source for updated Devise translations. You can manually generate locale files by executing `rails generate devise:views:locale <chosen_locale>`:
26
37
 
27
38
  ``` sh
28
- rails generate devise:views:locale it
39
+ rails generate devise:views:locale de
29
40
  ```
30
41
 
31
- will generate `config/locales/devise.views.it.yml`.
42
+ will generate `config/locales/devise.views.de.yml`.
32
43
 
33
44
  ## Customizing Views
34
45
 
35
46
  The `devise:views:bootstrap_templates` generator will copy all views to your application, so you can modify the files as you wish:
36
47
 
37
- ``` sh
38
- rails generate devise:views:bootstrap_templates
48
+ ```sh
49
+ $ rails generate devise:views:bootstrap_templates
39
50
  ```
40
51
 
41
- ## Example
42
-
43
- Sample Application can be found at this link - [Devise Boostrap Views Application](https://github.com/ethiraj-srinivasan/devise-boostrap-views)
44
-
45
52
  ## Contributing
46
53
 
47
54
  1. Fork it ( https://github.com/hisea/devise-bootstrap-views/fork )
Binary file
@@ -1,8 +1,8 @@
1
- <%= bootstrap_devise_error_messages! %>
2
-
3
1
  <h1><%= t('.resend_confirmation_instructions', default: 'Resend confirmation instructions') %></h1>
4
2
 
5
- <%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post, role: 'form' }) do |f| %>
3
+ <%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
4
+ <%= bootstrap_devise_error_messages! %>
5
+
6
6
  <div class="form-group">
7
7
  <%= f.label :email %>
8
8
  <%= f.email_field :email, autofocus: true, class: "form-control" %>
@@ -1,8 +1,8 @@
1
- <%= bootstrap_devise_error_messages! %>
2
-
3
1
  <h1><%= t('.change_your_password', default: 'Change your password') %></h1>
4
2
 
5
- <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put, role: 'form' }) do |f| %>
3
+ <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
4
+ <%= bootstrap_devise_error_messages! %>
5
+
6
6
  <%= f.hidden_field :reset_password_token %>
7
7
 
8
8
  <div class="form-group">
@@ -1,8 +1,8 @@
1
- <%= bootstrap_devise_error_messages! %>
2
-
3
1
  <h1><%= t('.forgot_your_password', default: 'Forgot your password?') %></h1>
4
2
 
5
- <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post, role: 'form' }) do |f| %>
3
+ <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
4
+ <%= bootstrap_devise_error_messages! %>
5
+
6
6
  <div class="form-group">
7
7
  <%= f.label :email %>
8
8
  <%= f.email_field :email, autofocus: true, class: 'form-control' %>
@@ -1,20 +1,23 @@
1
- <%= bootstrap_devise_error_messages! %>
2
-
3
1
  <h1><%= t('.title', resource: resource_class.model_name.human , default: "Edit #{resource_name.to_s.humanize}") %></h1>
4
2
 
5
3
  <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
4
+ <%= bootstrap_devise_error_messages! %>
5
+
6
6
  <div class="form-group">
7
7
  <%= f.label :email %>
8
8
  <%= f.email_field :email, autofocus: true, class: 'form-control' %>
9
9
  </div>
10
+
10
11
  <div class="form-group">
11
12
  <%= f.label :password %> <i>(<%= t('.leave_blank_if_you_don_t_want_to_change_it', default: "leave blank if you don't want to change it") %>)</i>
12
13
  <%= f.password_field :password, autocomplete: "off", class: 'form-control' %>
13
14
  </div>
15
+
14
16
  <div class="form-group">
15
17
  <%= f.label :password_confirmation %>
16
18
  <%= f.password_field :password_confirmation, class: 'form-control' %>
17
19
  </div>
20
+
18
21
  <div class="form-group">
19
22
  <%= f.label :current_password %> <i>(<%= t('.we_need_your_current_password_to_confirm_your_changes', default: 'we need your current password to confirm your changes') %>)</i>
20
23
  <%= f.password_field :current_password, class: 'form-control' %>
@@ -1,16 +1,18 @@
1
- <%= bootstrap_devise_error_messages! %>
2
-
3
1
  <h1><%= t('.sign_up', default: 'Sign up') %></h1>
4
2
 
5
- <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { role: 'form' }) do |f| %>
3
+ <%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
4
+ <%= bootstrap_devise_error_messages! %>
5
+
6
6
  <div class="form-group">
7
7
  <%= f.label :email %>
8
8
  <%= f.email_field :email, autofocus: true, class: 'form-control' %>
9
9
  </div>
10
+
10
11
  <div class="form-group">
11
12
  <%= f.label :password %>
12
13
  <%= f.password_field :password, class: 'form-control' %>
13
14
  </div>
15
+
14
16
  <div class="form-group">
15
17
  <%= f.label :password_confirmation %>
16
18
  <%= f.password_field :password_confirmation, class: 'form-control' %>
@@ -1,21 +1,21 @@
1
1
  <h1><%= t('.sign_in', default: 'Sign in') %></h1>
2
2
 
3
-
4
- <%= form_for(resource, as: resource_name, url: session_path(resource_name), html: { role: 'form' }) do |f| %>
3
+ <%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
5
4
  <div class="form-group">
6
5
  <%= f.label :email %>
7
6
  <%= f.email_field :email, autofocus: true, class: 'form-control' %>
8
7
  </div>
8
+
9
9
  <div class="form-group">
10
10
  <%= f.label :password %>
11
11
  <%= f.password_field :password, autocomplete: 'off', class: 'form-control' %>
12
12
  </div>
13
13
 
14
14
  <% if devise_mapping.rememberable? %>
15
- <div class="form-check">
15
+ <div class="form-group form-check">
16
+ <%= f.check_box :remember_me, class: 'form-check-input' %>
16
17
  <%= f.label :remember_me, class: 'form-check-label' do %>
17
- <%= f.check_box :remember_me, class: 'form-check-input' %>
18
- <%= t('.remember_me', default: 'Remember me') %>
18
+ <%= t('activerecord.attributes.user.remember_me', default: 'Remember me') %>
19
19
  <% end %>
20
20
  </div>
21
21
  <% end %>
@@ -1,8 +1,8 @@
1
- <%= bootstrap_devise_error_messages! %>
2
-
3
1
  <h1><%= t('.resend_unlock_instructions', default: 'Resend unlock instructions') %></h1>
4
2
 
5
- <%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post, html: { role: 'form' } }) do |f| %>
3
+ <%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %>
4
+ <%= bootstrap_devise_error_messages! %>
5
+
6
6
  <div class="form-group">
7
7
  <%= f.label :email %>
8
8
  <%= f.email_field :email, autofocus: true, class: 'form-control' %>
@@ -1,3 +1,5 @@
1
+ require 'net/http'
2
+
1
3
  module Devise
2
4
  module Views
3
5
  class LocaleGenerator < Rails::Generators::NamedBase
@@ -1,3 +1,3 @@
1
1
  module DeviseBootstrapViews
2
- VERSION = '1.0.0.alpha1'
2
+ VERSION = '1.0.0'
3
3
  end
@@ -99,7 +99,7 @@ pt:
99
99
  didn_t_receive_confirmation_instructions: Não recebeu instruções de confirmação?
100
100
  didn_t_receive_unlock_instructions: Não recebeu instruções de desbloqueio?
101
101
  forgot_your_password: Equeceu a palavra-passe?
102
- sign_in: Login
102
+ sign_in: Entrar
103
103
  sign_in_with_provider: Entrar com %{provider}
104
104
  sign_up: Criar conta
105
105
  unlocks:
@@ -2,20 +2,20 @@ sl:
2
2
  activerecord:
3
3
  attributes:
4
4
  user:
5
- current_password:
6
- email:
7
- password:
8
- password_confirmation:
9
- remember_me:
10
- reset_password_token:
11
- unlock_token:
5
+ current_password: Trenutno geslo
6
+ email: E-pošta
7
+ password: Geslo
8
+ password_confirmation: Potrditev gesla
9
+ remember_me: Zapomni si me
10
+ reset_password_token: Znak za ponastavitev gesla
11
+ unlock_token: Znak za odklep
12
12
  models:
13
- user:
13
+ user: Uporabnik
14
14
  devise:
15
15
  confirmations:
16
16
  confirmed: Vaš račun je bil uspešno potrjen. Sedaj ste prijavljeni.
17
17
  new:
18
- resend_confirmation_instructions:
18
+ resend_confirmation_instructions: Ponovno pošlji navodila za potrditev
19
19
  send_instructions: Prejeli boste e-pošto z navodili kako potrditi vaš račun.
20
20
  send_paranoid_instructions: "Če vaša e-pošta obstaja v naši bazi, boste v naslednjih minutah prejeli e-pošto z navodili kako potrditi vaš uporabniški račun."
21
21
  failure:
@@ -30,39 +30,45 @@ sl:
30
30
  unconfirmed: Pred nadaljevanjem morate potrditi vaš račun.
31
31
  mailer:
32
32
  confirmation_instructions:
33
- action:
34
- greeting:
35
- instruction:
33
+ action: Potrdi moj račun
34
+ greeting: 'Dobrodošli, %{recipient}!'
35
+ instruction: 'E-pošto uporabniškega računa lahko potrdite s spodnjo povezavo:'
36
36
  subject: Navodila potrditve
37
37
  password_change:
38
- greeting:
39
- message:
40
- subject:
38
+ greeting: 'Pozdravljeni, %{recipient}!'
39
+ message: 'Obveščamo vas, da je bilo vaše geslo spremenjeno.'
40
+ subject: Geslo spremenjeno
41
41
  reset_password_instructions:
42
- action:
43
- greeting:
44
- instruction:
45
- instruction_2:
46
- instruction_3:
42
+ action: Spremeni geslo
43
+ greeting: 'Pozdravljeni %{recipient}!'
44
+ instruction: >-
45
+ Nekdo je zahteval povezavo za spremembo gesla. To lahko storite s
46
+ sledečo povezavo.
47
+ instruction_2: 'Če tega niste zahtevali, vas prosimo, da ignorirate to sporočilo.'
48
+ instruction_3: >-
49
+ Vaše geslo se ne bo spremenilo dokler ne pristopite k zgornji povezavi
50
+ in ustvarite novega.
47
51
  subject: Navodila za ponastavitev gesla
48
52
  unlock_instructions:
49
- action:
50
- greeting:
51
- instruction:
52
- message:
53
+ action: Odkleni moj račun
54
+ greeting: 'Pozdravljeni %{recipient}!'
55
+ instruction: 'Pritisnite na spodnjo povezavo, da odklenete vaš račun:'
56
+ message: >-
57
+ Vaš račun je bil zaklenjen zaradi prekomernega števila neuspešnih
58
+ poskusov vpisa.
53
59
  subject: Navodila odklepa
54
60
  omniauth_callbacks:
55
61
  failure: Preverjanje pristnosti ni uspelo iz %{kind} zaradi "%{reason}".
56
62
  success: Uspešno preverjena pristnost iz računa %{kind}.
57
63
  passwords:
58
64
  edit:
59
- change_my_password:
60
- change_your_password:
61
- confirm_new_password:
62
- new_password:
65
+ change_my_password: Spremeni geslo
66
+ change_your_password: Spremenite vaše geslo
67
+ confirm_new_password: Potrdite novo geslo
68
+ new_password: Novo geslo
63
69
  new:
64
- forgot_your_password:
65
- send_me_reset_password_instructions:
70
+ forgot_your_password: Pozabili geslo?
71
+ send_me_reset_password_instructions: Pošljite mi navodila za ponastavitev gesla
66
72
  no_token: Do te strani lahko dostopate samo iz povezave v e-pošti za ponastavitev gesla. Če pa ste prišli do te strani preko omenjene povezave, preverite, da ste uporabili celotni URL.
67
73
  send_instructions: V naslednjih minutah boste prejeli e-pošto z navodili kako ponastaviti vaše geslo.
68
74
  send_paranoid_instructions: "Če vaša e-pošta obstaja v bazi, boste v naslednjih minutah na vašo e-pošto prejeli povezavo za obnovitev gesla."
@@ -71,16 +77,16 @@ sl:
71
77
  registrations:
72
78
  destroyed: Nasvidenje. Vaš račun je bil uspešno preklican. Upamo, da se kmalu vrnete.
73
79
  edit:
74
- are_you_sure:
75
- cancel_my_account:
76
- currently_waiting_confirmation_for_email:
77
- leave_blank_if_you_don_t_want_to_change_it:
78
- title:
79
- unhappy:
80
- update:
81
- we_need_your_current_password_to_confirm_your_changes:
80
+ are_you_sure: Ali ste prepričani?
81
+ cancel_my_account: Preklic mojega računa
82
+ currently_waiting_confirmation_for_email: 'Trenutno se čaka na potrditev za: %{email}'
83
+ leave_blank_if_you_don_t_want_to_change_it: 'pustite prazno, če ne želite opraviti sprememb'
84
+ title: 'Uredi %{resource}'
85
+ unhappy: Nesrečen
86
+ update: Posodobitev
87
+ we_need_your_current_password_to_confirm_your_changes: 'potrebujemo vaše trenutno geslo, da potrdimo spremembe'
82
88
  new:
83
- sign_up:
89
+ sign_up: Prijava
84
90
  signed_up: Dobrodošli. Uspešno ste se registrirali.
85
91
  signed_up_but_inactive: Uspešno ste se registrirali, vendar pred prvo prijavo je potrebno vaš račun še aktivirati.
86
92
  signed_up_but_locked: Uspešno ste se registrirali, vendar prijava ni mogoča, ker je vaš račun zaklenjen.
@@ -88,23 +94,23 @@ sl:
88
94
  update_needs_confirmation: Vaš račun je uspešno posodobljen, vendar potrebno je preveriti vaš novi e-poštni naslov. Prosimo, preverite vašo e-pošto in kliknite na potrditveno povezavo za dokončanje potrditve vašega novega e-poštnega naslova.
89
95
  updated: Uspešno ste posodobili vaš račun.
90
96
  sessions:
91
- already_signed_out:
97
+ already_signed_out: Odjava je bila uspešna.
92
98
  new:
93
- sign_in:
99
+ sign_in: Vpis
94
100
  signed_in: Prijava je bila uspešna.
95
101
  signed_out: Odjava je bila uspešna.
96
102
  shared:
97
103
  links:
98
- back:
99
- didn_t_receive_confirmation_instructions:
100
- didn_t_receive_unlock_instructions:
101
- forgot_your_password:
102
- sign_in:
103
- sign_in_with_provider:
104
- sign_up:
104
+ back: Nazaj
105
+ didn_t_receive_confirmation_instructions: Niste prejeli potrditvenih navodil?
106
+ didn_t_receive_unlock_instructions: Niste prejeli navodil za odklep?
107
+ forgot_your_password: Pozabljeno geslo?
108
+ sign_in: Vpis
109
+ sign_in_with_provider: 'Vpis z %{provider}'
110
+ sign_up: Prijava
105
111
  unlocks:
106
112
  new:
107
- resend_unlock_instructions:
113
+ resend_unlock_instructions: Ponovno pošlji navodila za odklep
108
114
  send_instructions: V naslednjih minutah boste prejeli e-pošto z navodili, kako odkleniti vaš račun.
109
115
  send_paranoid_instructions: "Če vaš račun obstaja, boste v naslednjih minutah prejeli e-pošto z navodili kako odkleniti vaš račun."
110
116
  unlocked: Vaš račun je bil uspešno odklenjen. Prosimo, prijavite se za nadaljevanje.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise-bootstrap-views
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.alpha1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yinghai Zhao
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-20 00:00:00.000000000 Z
11
+ date: 2018-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -51,12 +51,7 @@ files:
51
51
  - README.md
52
52
  - Rakefile
53
53
  - Screenshot.png
54
- - app/assets/stylesheets/devise_bootstrap_views.scss
55
- - app/assets/stylesheets/devise_bootstrap_views_less.less
56
54
  - app/views/devise/confirmations/new.html.erb
57
- - app/views/devise/mailer/confirmation_instructions.html.erb
58
- - app/views/devise/mailer/reset_password_instructions.html.erb
59
- - app/views/devise/mailer/unlock_instructions.html.erb
60
55
  - app/views/devise/passwords/edit.html.erb
61
56
  - app/views/devise/passwords/new.html.erb
62
57
  - app/views/devise/registrations/edit.html.erb
@@ -140,12 +135,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
140
135
  version: '0'
141
136
  required_rubygems_version: !ruby/object:Gem::Requirement
142
137
  requirements:
143
- - - ">"
138
+ - - ">="
144
139
  - !ruby/object:Gem::Version
145
- version: 1.3.1
140
+ version: '0'
146
141
  requirements: []
147
142
  rubyforge_project:
148
- rubygems_version: 2.6.4
143
+ rubygems_version: 2.7.6
149
144
  signing_key:
150
145
  specification_version: 4
151
146
  summary: Bootstrap views for Devise.
@@ -1,8 +0,0 @@
1
- <p><%= t('.greeting', recipient: @resource.email, default: "Welcome #{@resource.email}!") %></p>
2
-
3
- <p><%= t('.instruction', default: 'You can confirm your account email through the link below:') %></p>
4
-
5
- <p>
6
- <%= link_to t('.action', default: 'Confirm my account'),
7
- confirmation_url(@resource, confirmation_token: @token, locale: I18n.locale) %>
8
- </p>
@@ -1,9 +0,0 @@
1
- <p><%= t('.greeting', recipient: @resource.email, default: "Hello #{@resource.email}!") %></p>
2
-
3
- <p><%= t('.instruction', default: 'Someone has requested a link to change your password, and you can do this through the link below.') %></p>
4
-
5
- <p><%= link_to t('.action', default: 'Change my password'), edit_password_url(@resource, reset_password_token: @token, locale: I18n.locale) %></p>
6
-
7
- <p><%= t('.instruction_2', default: "If you didn't request this, please ignore this email.") %></p>
8
-
9
- <p><%= t('.instruction_3', default: "Your password won't change until you access the link above and create a new one.") %></p>
@@ -1,7 +0,0 @@
1
- <p><%= t('.greeting', recipient: @resource.email, default: "Hello #{@resource.email}!") %></p>
2
-
3
- <p><%= t('.message', default: 'Your account has been locked due to an excessive amount of unsuccessful sign in attempts.') %></p>
4
-
5
- <p><%= t('.instruction', default: 'Click the link below to unlock your account:') %></p>
6
-
7
- <p><%= link_to t('.action', default: 'Unlock my account'), unlock_url(@resource, unlock_token: @resource.unlock_token, locale: I18n.locale) %></p>