diff options
author | Nicolas Braud-Santoni <nicoo@ffgraz.net> | 2016-08-07 16:39:42 +0200 |
---|---|---|
committer | Nicolas Braud-Santoni <nicoo@ffgraz.net> | 2016-08-07 16:39:42 +0200 |
commit | b6ca062670b342344df08b53fb216db619ef42bc (patch) | |
tree | 7680ac6b407239f6b7272c937e42f688b8de542c /app/views/person |
Import legacy manman source
Copied from www.ffgraz.net
Diffstat (limited to 'app/views/person')
-rw-r--r-- | app/views/person/_form.rhtml | 25 | ||||
-rw-r--r-- | app/views/person/_nav.rhtml | 11 | ||||
-rw-r--r-- | app/views/person/_pshow.rhtml | 20 | ||||
-rw-r--r-- | app/views/person/change_pass.rhtml | 22 | ||||
-rw-r--r-- | app/views/person/edit.rhtml | 26 | ||||
-rw-r--r-- | app/views/person/list.rhtml | 20 | ||||
-rw-r--r-- | app/views/person/login.rhtml | 19 | ||||
-rw-r--r-- | app/views/person/new.rhtml | 8 | ||||
-rw-r--r-- | app/views/person/register.rhtml | 35 | ||||
-rw-r--r-- | app/views/person/revoke_pass.rhtml | 15 | ||||
-rw-r--r-- | app/views/person/show.rhtml | 8 |
11 files changed, 209 insertions, 0 deletions
diff --git a/app/views/person/_form.rhtml b/app/views/person/_form.rhtml new file mode 100644 index 0000000..a640109 --- /dev/null +++ b/app/views/person/_form.rhtml @@ -0,0 +1,25 @@ +<%= error_messages_for 'person' %> + +<!--[form:person]--> +<p><label for="person_name">Name</label><br/> +<%= text_field 'person', 'name' %></p> + +<p><label for="person_nick">Nick</label><br/> +<%= text_field 'person', 'nick' %></p> + +<p><label for="person_firstname">Firstname</label><br/> +<%= text_field 'person', 'firstname' %></p> + +<p><label for="person_lastname">Lastname</label><br/> +<%= text_field 'person', 'lastname' %></p> + +<p><label for="person_email">Email</label><br/> +<%= text_field 'person', 'email' %></p> + +<p><label for="person_tel">Tel</label><br/> +<%= text_field 'person', 'tel' %></p> + +<p><label for="person_password">Password</label><br/> +<%= password_field 'person', 'password' %></p> +<!--[eoform:person]--> + diff --git a/app/views/person/_nav.rhtml b/app/views/person/_nav.rhtml new file mode 100644 index 0000000..bcde756 --- /dev/null +++ b/app/views/person/_nav.rhtml @@ -0,0 +1,11 @@ +<div> + <p> + <strong>Navigation:</strong> + <%= link_to "Locations", :action => "list", :controller => "location" %> | + <%= link_to "Persons", :action => 'list', :controller => 'person' %> <br /> + <strong>Benutzer:</strong> + <%= link_to session[:person].email , :action => 'show', :controller => 'person', :id => session[:person].id %> | + <%= link_to 'Logout', :action => 'logout', :controller => 'person' %> + </p> +</div> +<hr /> diff --git a/app/views/person/_pshow.rhtml b/app/views/person/_pshow.rhtml new file mode 100644 index 0000000..61a1f32 --- /dev/null +++ b/app/views/person/_pshow.rhtml @@ -0,0 +1,20 @@ +<% if @person != nil %> +<table> + <tr> + <td>Nick:</td><td><%= @person.nick %></td> + </tr> + <tr> + <td>Email:</td><td><%= mail_to @person.email, @person.email, :encode => 'hex' %></td> + </tr> + <tr> + <td>Tel:</td><td><%= @person.tel %></td> + </tr> +</table> +<p> + <%= link_to 'Show', { :action => 'show', :controller => 'person', :id => @person.id } %> | + <%= link_to 'Edit', { :action => 'edit', :controller => 'person', :id => @person.id } %> | + <%= link_to 'Change Password', { :action => 'change_pass', + :controller => 'person', + :id => @person.id } %> +</p> +<% end %> diff --git a/app/views/person/change_pass.rhtml b/app/views/person/change_pass.rhtml new file mode 100644 index 0000000..f1d62fa --- /dev/null +++ b/app/views/person/change_pass.rhtml @@ -0,0 +1,22 @@ +<%= render :partial => "person/nav" %> +<h1>Passwort aendern</h1> + +<%= form_tag :action => "do_change_pass", :id => @person.id %> +<table> + <tr> + <td>altes Passwort:</td> + <td><%= password_field_tag 'oldpassword' %></td> + </tr> + <tr> + <td>neues Passwort:</td> + <td><%= password_field_tag 'password' %></td> + </tr> + <tr> + <td>nochmals:</td> + <td><%= password_field_tag 'password2' %></td> + </tr> +</table> + +<%= submit_tag 'Change' %> +<%= end_form_tag %> + diff --git a/app/views/person/edit.rhtml b/app/views/person/edit.rhtml new file mode 100644 index 0000000..7c0f1da --- /dev/null +++ b/app/views/person/edit.rhtml @@ -0,0 +1,26 @@ +<%= render :partial => "person/nav" %> +<h1>Person</h1> +<%= start_form_tag :action => 'update', :id => @person %> + <table> + <tr> + <td>nick</td><td><%= text_field 'person', 'nick' %></td> + </tr> + <tr> + <td>Vorname</td><td><%= text_field 'person', 'firstname' %></td> + </tr> + <tr> + <td>Nachname</td><td><%= text_field 'person', 'lastname' %></td> + </tr> + <tr> + <td>Email:</td><td><%= text_field 'person', 'email' %></td> + </tr> + <tr> + <td>Tel:</td><td><%= text_field 'person', 'tel' %></td> + </tr> + </table> + <%= submit_tag 'Edit' %> +<%= end_form_tag %> + +<%= link_to 'Show', :action => 'show', :id => @person %> | +<%= link_to 'Back', :action => 'list' %> + diff --git a/app/views/person/list.rhtml b/app/views/person/list.rhtml new file mode 100644 index 0000000..37b8128 --- /dev/null +++ b/app/views/person/list.rhtml @@ -0,0 +1,20 @@ + +<%= render :partial => "person/nav" %> +<h1>Personen</h1> +<table> + <th>Nickname</th> + <th>Email</th> + <th>Tel.</th> + +<% @persons.each do |person| %> + <tr> + <td><%= person.nick %></td> + <td><%= mail_to person.email, person.email, :encode => "hex" %></td> + <td><%= person.tel %></td> + <td><%= link_to 'Show', :action => 'show', :id => person %></td> + <td><%= link_to 'Edit', :action => 'edit', :id => person %></td> + <td><%= link_to 'Destroy', { :action => 'destroy', :id => person }, :confirm => 'Are you sure?', :post => true %></td> + </tr> +<% end %> +</table> + diff --git a/app/views/person/login.rhtml b/app/views/person/login.rhtml new file mode 100644 index 0000000..a8d8fc3 --- /dev/null +++ b/app/views/person/login.rhtml @@ -0,0 +1,19 @@ +<% %> +<h1>Login</h1> +<%= form_tag :action => "sign_on" %> +<table> + <tr> + <td>Email:</td> + <td><%= text_field 'person', 'email' %> + </tr> + <tr> + <td>Passwort:</td> + <td><%= password_field 'person', 'password' %></td> + </tr> +</table> + +<%= submit_tag 'Login' %> +<%= end_form_tag %> +<hr /> +<%= link_to 'Passwort vergessen', :action => 'revoke_pass' %> | +<%= link_to 'Registrieren', :action => 'register' %> diff --git a/app/views/person/new.rhtml b/app/views/person/new.rhtml new file mode 100644 index 0000000..0e79d24 --- /dev/null +++ b/app/views/person/new.rhtml @@ -0,0 +1,8 @@ +<h1>New person</h1> + +<%= start_form_tag :action => 'create' %> + <%= render :partial => 'form' %> + <%= submit_tag "Create" %> +<%= end_form_tag %> + +<%= link_to 'Back', :action => 'list' %> diff --git a/app/views/person/register.rhtml b/app/views/person/register.rhtml new file mode 100644 index 0000000..4c670a4 --- /dev/null +++ b/app/views/person/register.rhtml @@ -0,0 +1,35 @@ +<h1>register Person</h1> +<p>Hier kannst du dich fuer FunkFeuer Graz registrieren damit wir dir IP Adressen und + Locations zuordnen koennen. +</p> +<%= start_form_tag :action => 'create', :id => @person %> + <table> + <tr> + <td>Nickname</td><td><%= text_field 'person', 'nick' %></td> + </tr> + <tr> + <td>Vorname</td><td><%= text_field 'person', 'firstname' %>*</td> + </tr> + <tr> + <td>Nachname</td><td><%= text_field 'person', 'lastname' %>*</td> + </tr> + <tr> + <td>Email:</td><td><%= text_field 'person', 'email' %>*</td> + </tr> + <tr> + <td>Tel:</td><td><%= text_field 'person', 'tel' %></td> + </tr> + <tr> + <td>Passwort</td><td><%= password_field_tag 'password' %>*</td> + </tr> + <tr> + <td>Passwort</td><td><%= password_field_tag 'password2' %>*</td> + </tr> + + </table> + <%= submit_tag 'Create' %> +<%= end_form_tag %> + +<p>Bitte mindestens Felder mit <strong>*</strong> eintragen</p> +<p>Die Felder <strong>Nickname</strong>, <strong>Email</strong> und <strong>Tel</strong> + koennen von allen angemeldeten Benutzern eingesehen werden.</p> diff --git a/app/views/person/revoke_pass.rhtml b/app/views/person/revoke_pass.rhtml new file mode 100644 index 0000000..99c3a27 --- /dev/null +++ b/app/views/person/revoke_pass.rhtml @@ -0,0 +1,15 @@ +<h1>Revoke Passwort</h1> +<p>Bitte geben Sie Ihre email Adresse ein.<br/> +Ein neues Passwort wird Ihnen dann zugesendet.</p> + +<%= form_tag :action => "do_revoke" %> +<table> + <tr> + <td>Email:</td> + <td><%= text_field 'person', 'email' %> + </tr> +</table> + +<%= submit_tag 'Revoke' %> +<%= end_form_tag %> + diff --git a/app/views/person/show.rhtml b/app/views/person/show.rhtml new file mode 100644 index 0000000..be5541f --- /dev/null +++ b/app/views/person/show.rhtml @@ -0,0 +1,8 @@ +<%= render :partial => "person/nav" %> +<h1>Person</h1> +<%= render :partial => "person/pshow", :object => @person %> +<hr> +<h2>Locations</h2> +<%= render :partial => "location/plist", + :object => @locations %> + |