tkh_authentication 0.0.12 → 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.
data/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
 
4
4
 
5
+ ## 0.1
6
+
7
+ * Styled login form the simple_form way
8
+ * Changed some text and translations in login form
9
+ * Worked on text and translation in signup form
10
+ * The shared/menus partial is called from all authentication pages
11
+
12
+
5
13
  ## 0.0.12
6
14
 
7
15
  * Added an administrator? method
@@ -3,6 +3,8 @@
3
3
  <%= label_tag :email %>
4
4
  <%= text_field_tag :email, params[:email] %>
5
5
  </div>
6
- <div class="actions"><%= submit_tag t('authentication.reset_your_password') %></div>
6
+ <div class="actions"><%= submit_tag t('authentication.reset_your_password'), class: 'btn btn-primary' %></div>
7
7
  <% end %>
8
8
 
9
+ <%# partial in tkh_menus gem or has to be added in host app %>
10
+ <%= render './shared/menus' %>
@@ -1,22 +1,38 @@
1
- <h1>Log In</h1>
1
+ <h1><%= t('authentication.login_now') %></h1>
2
2
 
3
- <%= form_tag sessions_path do %>
4
- <div class="field">
5
- <%= label_tag :email %><br />
6
- <%= text_field_tag :email, params[:email] %><br />
7
- <%= link_to t('authentication.not_registered'), signup_path %>
8
- </div>
3
+ <%= form_tag sessions_path, class: 'simple_form form-horizontal' do %>
9
4
 
10
- <div class="field">
11
- <%= label_tag :password %><br />
12
- <%= password_field_tag :password %><br />
13
- <%= link_to t('authentication.forgot_password'), new_password_reset_path %>
14
- </div>
15
- <p></p>
5
+ <div class="form-inputs">
6
+
7
+ <div class="control-group email required">
8
+ <%= label_tag :email, t('activerecord.attributes.user.email'), class: "email required control-label" %>
9
+ <div class="controls">
10
+ <%= text_field_tag :email, params[:email], :html => { class: 'string email required' } %>
11
+ <p class="help-block"><%= link_to t('authentication.not_registered'), signup_path %></p>
12
+ </div>
13
+ </div>
14
+
15
+ <div class="control-group password required">
16
+ <%= label_tag :password, t('activerecord.attributes.user.password'), class: "password required control-label" %>
17
+ <div class="controls">
18
+ <%= password_field_tag :password %>
19
+ <p class="help-block"><%= link_to t('authentication.forgot_password'), new_password_reset_path %></p>
20
+ </div>
21
+ </div>
22
+
23
+ <div class="control-group boolean optional">
24
+ <div class="controls">
25
+ <label class="checkbox"><input class="boolean optional" id="remember_me" name="remember_me" type="checkbox" value="1" /><%= t('authentication.remember_me') %></label>
26
+ </div>
27
+ </div>
16
28
 
17
- <div class="field">
18
- <%= check_box_tag :remember_me, 1, params[:remember_me] %>
19
- <%= label_tag :remember_me %>
20
29
  </div>
21
- <div class="actions"><%= submit_tag t('authentication.login_now') %></div>
30
+
31
+ <div class="form-actions">
32
+ <%= submit_tag t('authentication.login_now'), class: 'btn btn-primary' %>
33
+ </div>
34
+
22
35
  <% end %>
36
+
37
+ <%# partial in tkh_menus gem or has to be added in host app %>
38
+ <%= render './shared/menus' %>
@@ -0,0 +1,11 @@
1
+ <% if current_user %>
2
+ <h3>You are logged in as</h3>
3
+ <p><%= current_user.name %><br />
4
+ <%= current_user.email %><br /><br />
5
+ <%= link_to "Log Out", logout_path, class: 'btn' %>
6
+ </p>
7
+ <% else %>
8
+ <h3>You are not logged in</h3>
9
+ <p><%= link_to t('authentication.login_now'), login_path %> or <%= link_to t('authentication.create_account'), signup_path %>
10
+ </p>
11
+ <% end %>
@@ -1,4 +1,6 @@
1
- <%= simple_form_for @user do |f| %>
1
+ <h1><%= t('authentication.create_account') %></h1>
2
+
3
+ <%= simple_form_for @user, :html => { class: 'form-horizontal' } do |f| %>
2
4
  <%= f.error_notification %>
3
5
 
4
6
  <div class="form-inputs">
@@ -6,10 +8,13 @@
6
8
  <%= f.input :first_name %>
7
9
  <%= f.input :last_name %>
8
10
  <%= f.input :password %>
9
- <%= f.input :password_confirmation %>
11
+ <%= f.input :password_confirmation, required: true %>
10
12
  </div>
11
13
 
12
14
  <div class="form-actions">
13
- <%= f.button :submit, label: t('authentication.create_account'), :class => 'btn btn-primary' %>
15
+ <%= f.button :submit, t('authentication.create_account'), :class => 'btn btn-primary' %>
14
16
  </div>
15
17
  <% end %>
18
+
19
+ <%# partial in tkh_menus gem or has to be added in host app %>
20
+ <%= render './shared/menus' %>
@@ -24,6 +24,7 @@ de:
24
24
  not_registered: "Hast Du schon ein Nutzerkonto?"
25
25
  password_reset_confirmation: "Dein Kennwort wurde erfolgreich zurückgesetzt!"
26
26
  password_reset_email_subject: "Kennwort zurücksetzen"
27
+ remember_me: "mich erinnern"
27
28
  reset_instructions: "Um das Kennwort zurückzusetzen, klicke auf folgenden Link: %{reset_url} \n\nIf hast Du das Zurücksetzen des Kennworts nicht angefordert, dann ignoriere bitte diese Email. Dein Kennwort bleibt unverändert."
28
29
  reset_password_email_sent_confirmation: "Wir haben Dir einen Link zum Zurücksetzen Deines Kennworts geschickt."
29
30
  reset_your_password: "Kennwort zurücksetzen"
@@ -12,7 +12,7 @@ en:
12
12
  authentication:
13
13
  admin_disabled_confirmation: 'you have stripped this user of the administrator privileges'
14
14
  admin_enabled_confirmation: 'you have empowered this user to be an administrator'
15
- create_account: 'create your account'
15
+ create_account: 'create an account'
16
16
  disable_admin: 'disable'
17
17
  enable_admin: 'enable'
18
18
  forgot_password: "forgot your password?"
@@ -24,6 +24,7 @@ en:
24
24
  not_registered: "you don't have an account yet?"
25
25
  password_reset_confirmation: "Your password has been successfully reset!"
26
26
  password_reset_email_subject: "Password reset"
27
+ remember_me: "stay logged in"
27
28
  reset_instructions: "To reset your password, click or visit this link: %{reset_url} \n\nIf you did not request your password to be reset, please ignore this email. Your password will stay as it is."
28
29
  reset_password_email_sent_confirmation: "We have emailed you a link to reset your password."
29
30
  reset_your_password: "Reset Password"
@@ -24,6 +24,7 @@ es:
24
24
  not_registered: 'no tienes una cuenta todavía'
25
25
  password_reset_confirmation: 'Tu contraseña se ha restablecido correctamente.'
26
26
  password_reset_email_subject: 'Restablecimiento de contraseña.'
27
+ remember_me: "recordar en este equipo"
27
28
  reset_instructions: "Para restablecer tu contraseña click o visita este enlace: %{reset_url} \n\n si no has pedido que se reestablezca tu contraseña, por favor ignora este e-mail. Tu contraseña seguirá igual."
28
29
  reset_password_email_sent_confirmation: 'Te hemos enviado un enlace para reestablecer tu contraseña.'
29
30
  reset_your_password: 'Restablece tu contraseña.'
@@ -12,7 +12,7 @@ fr:
12
12
  authentication:
13
13
  admin_disabled_confirmation: "cet utilisateur n'est plus un administrateur"
14
14
  admin_enabled_confirmation: 'cet utilisateur est maintenant un administrateur'
15
- create_your_account: 'créez votre compte'
15
+ create_account: 'créez un compte'
16
16
  disable_admin: 'enlever le pouvoir'
17
17
  enable_admin: 'donner le pouvoir'
18
18
  forgot_password: "avez vous oublié votre mot de passe ?"
@@ -24,6 +24,7 @@ fr:
24
24
  not_registered: "vous n'avez pas encore de compte ?"
25
25
  password_reset_confirmation: "Votre mot de passe a été réinitialisé avec succès !"
26
26
  password_reset_email_subject: "Réinitialisation du mot de passe"
27
+ remember_me: "restez identifié"
27
28
  reset_password_email_sent_confirmation: "Nous vous avons envoyé un lien pour réinitialiser votre mot de passe."
28
29
  reset_your_password: "Réinitialisez votre mot de passe."
29
30
  signup_confirmation: "Votre compte a été créé et vous êtes identifié !"
@@ -1,3 +1,3 @@
1
1
  module TkhAuthentication
2
- VERSION = "0.0.12"
2
+ VERSION = "0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tkh_authentication
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: '0.1'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-08 00:00:00.000000000 Z
12
+ date: 2013-01-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -108,6 +108,7 @@ files:
108
108
  - app/views/password_resets/new.html.erb
109
109
  - app/views/sessions/new.html.erb
110
110
  - app/views/shared/_login_info.html.erb
111
+ - app/views/shared/_login_info_for_sidebar.html.erb
111
112
  - app/views/user_mailer/password_reset.text.erb
112
113
  - app/views/users/index.html.erb
113
114
  - app/views/users/new.html.erb
@@ -172,7 +173,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
172
173
  version: '0'
173
174
  segments:
174
175
  - 0
175
- hash: 3442867698929455310
176
+ hash: -3397420184449379494
176
177
  required_rubygems_version: !ruby/object:Gem::Requirement
177
178
  none: false
178
179
  requirements:
@@ -181,7 +182,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
181
182
  version: '0'
182
183
  segments:
183
184
  - 0
184
- hash: 3442867698929455310
185
+ hash: -3397420184449379494
185
186
  requirements: []
186
187
  rubyforge_project:
187
188
  rubygems_version: 1.8.23