Fixed login, new_password and invitation views.
This commit is contained in:
parent
f20ae890dd
commit
1708df3f6c
18 changed files with 200 additions and 122 deletions
29
app/views/layouts/_header.html.haml
Normal file
29
app/views/layouts/_header.html.haml
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
!!! 5
|
||||
%html(lang="en")
|
||||
%head
|
||||
%meta(charset="utf-8")
|
||||
%meta(http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1")
|
||||
%meta(name="viewport" content="width=device-width, initial-scale=1.0")
|
||||
%title= content_for?(:title) ? yield(:title) : "Foodsoft"
|
||||
= csrf_meta_tags
|
||||
/ Le HTML5 shim, for IE6-8 support of HTML elements
|
||||
/[if lt IE 9]
|
||||
= javascript_include_tag "http://html5shim.googlecode.com/svn/trunk/html5.js"
|
||||
= stylesheet_link_tag "application", :media => "all"
|
||||
%link(href="images/apple-touch-icon-144x144.png" rel="apple-touch-icon-precomposed" sizes="144x144")
|
||||
%link(href="images/apple-touch-icon-114x114.png" rel="apple-touch-icon-precomposed" sizes="114x114")
|
||||
%link(href="images/apple-touch-icon-72x72.png" rel="apple-touch-icon-precomposed" sizes="72x72")
|
||||
%link(href="images/apple-touch-icon.png" rel="apple-touch-icon-precomposed")
|
||||
//%link(href="images/favicon.ico" rel="shortcut icon")
|
||||
|
||||
= yield(:head)
|
||||
|
||||
%body
|
||||
= yield
|
||||
|
||||
/
|
||||
Javascripts
|
||||
\==================================================
|
||||
/ Placed at the end of the document so the pages load faster
|
||||
= javascript_include_tag "application"
|
||||
= yield(:javascript)
|
||||
|
|
@ -1,58 +1,35 @@
|
|||
!!! 5
|
||||
%html(lang="en")
|
||||
%head
|
||||
%meta(charset="utf-8")
|
||||
%meta(http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1")
|
||||
%meta(name="viewport" content="width=device-width, initial-scale=1.0")
|
||||
%title= content_for?(:title) ? yield(:title) : "Foodsoft"
|
||||
= csrf_meta_tags
|
||||
/ Le HTML5 shim, for IE6-8 support of HTML elements
|
||||
/[if lt IE 9]
|
||||
= javascript_include_tag "http://html5shim.googlecode.com/svn/trunk/html5.js"
|
||||
= stylesheet_link_tag "application", :media => "all"
|
||||
%link(href="images/apple-touch-icon-144x144.png" rel="apple-touch-icon-precomposed" sizes="144x144")
|
||||
%link(href="images/apple-touch-icon-114x114.png" rel="apple-touch-icon-precomposed" sizes="114x114")
|
||||
%link(href="images/apple-touch-icon-72x72.png" rel="apple-touch-icon-precomposed" sizes="72x72")
|
||||
%link(href="images/apple-touch-icon.png" rel="apple-touch-icon-precomposed")
|
||||
%link(href="images/favicon.ico" rel="shortcut icon")
|
||||
= render layout: 'layouts/header' do
|
||||
.row-fluid
|
||||
|
||||
.navbar.navbar-fixed-top
|
||||
.navbar-inner
|
||||
.container-fluid
|
||||
%a.btn.btn-navbar(data-target=".nav-collapse" data-toggle="collapse")
|
||||
%span.icon-bar
|
||||
%span.icon-bar
|
||||
%span.icon-bar
|
||||
= link_to 'Foodsoft', root_path(anchor: ''), class: 'brand'
|
||||
.container.nav-collapse
|
||||
= render_navigation expand_all: true, renderer: :bootstrap
|
||||
|
||||
%body
|
||||
.container-fluid
|
||||
.row-fluid
|
||||
|
||||
.navbar.navbar-fixed-top
|
||||
.navbar-inner
|
||||
.container-fluid
|
||||
%a.btn.btn-navbar(data-target=".nav-collapse" data-toggle="collapse")
|
||||
%span.icon-bar
|
||||
%span.icon-bar
|
||||
%span.icon-bar
|
||||
= link_to 'Foodsoft', root_path(anchor: ''), class: 'brand'
|
||||
.container.nav-collapse
|
||||
= render_navigation expand_all: true, renderer: :bootstrap
|
||||
|
||||
.container-fluid
|
||||
.row-fluid
|
||||
- if content_for?(:sidebar)
|
||||
.span2
|
||||
= yield(:sidebar)
|
||||
.span10
|
||||
- if show_title?
|
||||
.page-header
|
||||
%h1= yield(:title)
|
||||
= yield
|
||||
- else
|
||||
- if content_for?(:sidebar)
|
||||
.span2
|
||||
= yield(:sidebar)
|
||||
.span10
|
||||
= bootstrap_flash
|
||||
- if show_title?
|
||||
.page-header
|
||||
%h1= yield(:title)
|
||||
= yield
|
||||
|
||||
%footer
|
||||
%p
|
||||
Foodsoft, open source software to manage a non-profit food coop.
|
||||
- else
|
||||
= bootstrap_flash
|
||||
- if show_title?
|
||||
.page-header
|
||||
%h1= yield(:title)
|
||||
= yield
|
||||
|
||||
/
|
||||
Javascripts
|
||||
\==================================================
|
||||
/ Placed at the end of the document so the pages load faster
|
||||
= javascript_include_tag "application"
|
||||
%footer
|
||||
%p
|
||||
Foodsoft, open source software to manage a non-profit food coop.
|
||||
|
|
|
|||
|
|
@ -1,19 +1,13 @@
|
|||
!!!
|
||||
%html
|
||||
%head
|
||||
%meta{"http-equiv" => "content-type", :content => "text/html;charset=UTF-8"}
|
||||
%title= "FoodSoft - " + (yield(:title) or controller.controller_name)
|
||||
= stylesheet_link_tag 'application'
|
||||
= javascript_include_tag 'application'
|
||||
= csrf_meta_tags
|
||||
= yield(:head)
|
||||
%body
|
||||
#login
|
||||
- if yield(:title)
|
||||
%h1= yield(:title)
|
||||
- flash.each do |name, msg|
|
||||
= content_tag :div, msg, :class => "flash #{name}"
|
||||
= yield
|
||||
#meta
|
||||
Foodcoop
|
||||
= link_to_if FoodsoftConfig[:homepage], FoodsoftConfig[:name], FoodsoftConfig[:homepage]
|
||||
= render layout: 'layouts/header' do
|
||||
.container
|
||||
.row
|
||||
.span6.offset3
|
||||
= bootstrap_flash
|
||||
- if show_title?
|
||||
.page-header
|
||||
%h1= yield(:title)
|
||||
= yield
|
||||
|
||||
%footer
|
||||
%p
|
||||
Foodsoft, open source software to manage a non-profit food coop.
|
||||
|
|
@ -1,3 +1,7 @@
|
|||
- content_for :javascript do
|
||||
:javascript
|
||||
$('user_nick').focus();
|
||||
|
||||
- title "Einladung in die #{FoodsoftConfig[:name]}"
|
||||
%p
|
||||
Du bist eingeladen worden als Mitglied der Gruppe
|
||||
|
|
@ -12,7 +16,8 @@
|
|||
Gründen, weitergeben. Du kannst auch entscheiden, wieviel deiner persönlichen
|
||||
Daten für alle einsehbar sein sollen. 'Alle' bedeutet hier alle Foodcoop-Mitglieder.
|
||||
Die Administratoren haben aber jederzeit Zugriff auf deine Daten.
|
||||
= simple_form_for @user, url: {action: 'invite'} do |form|
|
||||
= simple_form_for @user, url: accept_invitation_path do |form|
|
||||
= render partial: 'shared/user_form_fields', locals: {f: form}
|
||||
= submit_tag "Absenden"
|
||||
= javascript_tag("$('user_nick').focus()")
|
||||
.form-actions
|
||||
= submit_tag "Foodsoft Account erstellen", class: 'btn'
|
||||
|
||||
|
|
@ -7,5 +7,6 @@
|
|||
|
||||
= simple_form_for User.new, url: {action: 'reset_password'} do |form|
|
||||
= form.input :email
|
||||
= form.submit "Neues Passwort anfordern"
|
||||
= link_to "Abbrechen", :back
|
||||
.form-actions
|
||||
= form.submit "Neues Passwort anfordern", class: 'btn'
|
||||
= link_to "oder abbrechen", :back
|
||||
|
|
@ -3,4 +3,5 @@
|
|||
= simple_form_for @user, :url => {:action => 'update_password', :id => @user.id, :token => @user.reset_password_token} do |form|
|
||||
= form.input :password
|
||||
= form.input :password_confirmation
|
||||
= form.submit
|
||||
.form-actions
|
||||
= form.submit 'Neues Passwort speichern', class: 'btn'
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
Hallo <%= @user.nick %>,
|
||||
|
||||
du (oder jemand anderes) hat auf der FoodSoft-Website ein neues Passwort angefordert.
|
||||
Um ein neues Passwort einzugeben, gehe zu: <%= @link %>
|
||||
Um ein neues Passwort einzugeben, gehe zu: <%= raw @link %>
|
||||
Dieser Link kann nur einmal aufgerufen werden und läuft am <%= I18n.l @user.reset_password_expires %> ab.
|
||||
Wenn du das Passwort nicht ändern möchtest oder diese Email nicht ausgelöst hast, brauchst du nichts zu tun. Dein bisheriges Passwort wurde nicht geändert.
|
||||
|
||||
|
|
@ -11,7 +11,7 @@ Grüße sendet die Foodsoft! :)
|
|||
|
||||
Hi <%= @user.nick %>,
|
||||
you have (or someone else has) requested a new password.
|
||||
In order to choose a new password follow this link: <%= @link %>
|
||||
In order to choose a new password follow this link: <%= raw @link %>
|
||||
This link works only once and expires on <%= I18n.l @user.reset_password_expires, locale: :en %>.
|
||||
If you don't want to change your password, just ignore this message. Your password hasn't been changed yet.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
- content_for :head do
|
||||
- content_for :javascript do
|
||||
:javascript
|
||||
$(function() {
|
||||
$('#nick').focus();
|
||||
|
|
@ -7,21 +7,23 @@
|
|||
- title "FoodSoft login"
|
||||
|
||||
%noscript
|
||||
#javascript-warn.error(style="font-size:1.5em")
|
||||
.alert.alert-error
|
||||
Achtung, Cookies und Javascript müssen aktiviert sein!
|
||||
= link_to "NoScript", "http://noscript.net/"
|
||||
bitte abschalten.
|
||||
|
||||
#login-form.edit_form(style="width:25em")
|
||||
= form_tag sessions_path do
|
||||
%p
|
||||
%label{:for => 'user'} Benutzerin
|
||||
%br/
|
||||
= form_tag sessions_path, class: 'form-horizontal' do
|
||||
.control-group
|
||||
%label(for='nick' class='control-label') Benutzerin
|
||||
.controls
|
||||
= text_field_tag 'nick'
|
||||
%p
|
||||
%label{:for => 'password'} Passwort
|
||||
%br/
|
||||
|
||||
.control-group
|
||||
%label(for='password' class='control-label') Passwort
|
||||
.controls
|
||||
= password_field_tag 'password'
|
||||
= submit_tag "Anmelden"
|
||||
|
|
||||
= link_to "Passwort vergessen?", :controller => 'login', :action => 'forgot_password'
|
||||
|
||||
.control-group
|
||||
.controls
|
||||
= submit_tag "Anmelden", class: 'btn'
|
||||
= link_to "Passwort vergessen?", :controller => 'login', :action => 'forgot_password'
|
||||
|
|
@ -3,11 +3,12 @@
|
|||
= f.input :last_name
|
||||
= f.input :email
|
||||
= f.input :phone
|
||||
= f.input :password, :required => @user.new_record?
|
||||
= f.input :password, :required => f.object.new_record?
|
||||
= f.input :password_confirmation
|
||||
- for setting in User::setting_keys.keys
|
||||
.input.boolean
|
||||
= check_box_tag "user[setting_attributes][#{setting}]",
|
||||
'1', @user.settings[setting] == '1' || @user.settings_default(setting),
|
||||
:class => 'boolean'
|
||||
%label.boolean{:for => "user[setting_attributes][#{setting}]"}= h User::setting_keys[setting]
|
||||
.control-group
|
||||
.controls
|
||||
- for setting in User::setting_keys.keys
|
||||
%label.checkbox{:for => "user[setting_attributes][#{setting}]"}
|
||||
= check_box_tag "user[setting_attributes][#{setting}]", '1',
|
||||
f.object.settings[setting] == '1' || f.object.settings_default(setting)
|
||||
= User::setting_keys[setting]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue