diff options
Diffstat (limited to 'app/views')
33 files changed, 696 insertions, 0 deletions
diff --git a/app/views/export/all.rxml b/app/views/export/all.rxml new file mode 100644 index 0000000..d1aa10e --- /dev/null +++ b/app/views/export/all.rxml @@ -0,0 +1,31 @@ +xml.instruct! :xml, :version=>"1.0" + +xml.network{ + for location in @locations + xml.location do + xml.name(location.name) + xml.street(location.street) + xml.streetnr(location.streetnr) + xml.comment(location.comment) + xml.gallery(location.gallery_link) + xml.lat(location.lat) + xml.lon(location.lon) + + for node in location.node + xml.node do + xml.name(node.name) + xml.comment(node.comment) + + for ip in node.ip + xml.ip do + xml.name(ip.name) + xml.address(ip.ip) + xml.dns("#{ip.name}.#{node.name}.#{location.name}") + end + end + + end + end + end + end +} diff --git a/app/views/layouts/ip.rhtml b/app/views/layouts/ip.rhtml new file mode 100644 index 0000000..ad4cb1b --- /dev/null +++ b/app/views/layouts/ip.rhtml @@ -0,0 +1,13 @@ +<html> +<head> + <title>Ip: <%= controller.action_name %></title> + <%= stylesheet_link_tag 'scaffold' %> +</head> +<body> + +<p style="color: green"><%= flash[:notice] %></p> + +<%= @content_for_layout %> + +</body> +</html> diff --git a/app/views/layouts/location.rhtml b/app/views/layouts/location.rhtml new file mode 100644 index 0000000..a3fb66d --- /dev/null +++ b/app/views/layouts/location.rhtml @@ -0,0 +1,13 @@ +<html> +<head> + <title>Location: <%= controller.action_name %></title> + <%= stylesheet_link_tag 'scaffold' %> +</head> +<body> + +<p style="color: green"><%= flash[:notice] %></p> + +<%= yield %> + +</body> +</html> diff --git a/app/views/layouts/nettype.rhtml b/app/views/layouts/nettype.rhtml new file mode 100644 index 0000000..46e2cf5 --- /dev/null +++ b/app/views/layouts/nettype.rhtml @@ -0,0 +1,13 @@ +<html> +<head> + <title>Nettype: <%= controller.action_name %></title> + <%= stylesheet_link_tag 'scaffold' %> +</head> +<body> + +<p style="color: green"><%= flash[:notice] %></p> + +<%= @content_for_layout %> + +</body> +</html> diff --git a/app/views/layouts/node.rhtml b/app/views/layouts/node.rhtml new file mode 100644 index 0000000..1a9af20 --- /dev/null +++ b/app/views/layouts/node.rhtml @@ -0,0 +1,13 @@ +<html> +<head> + <title>Node: <%= controller.action_name %></title> + <%= stylesheet_link_tag 'scaffold' %> +</head> +<body> + +<p style="color: green"><%= flash[:notice] %></p> + +<%= @content_for_layout %> + +</body> +</html> diff --git a/app/views/layouts/person.rhtml b/app/views/layouts/person.rhtml new file mode 100644 index 0000000..0e7102e --- /dev/null +++ b/app/views/layouts/person.rhtml @@ -0,0 +1,13 @@ +<html> +<head> + <title>Person: <%= controller.action_name %></title> + <%= stylesheet_link_tag 'scaffold' %> +</head> +<body> + +<p style="color: green"><%= flash[:notice] %></p> + +<%= yield %> + +</body> +</html> diff --git a/app/views/layouts/wlparm.rhtml b/app/views/layouts/wlparm.rhtml new file mode 100644 index 0000000..9dfd37a --- /dev/null +++ b/app/views/layouts/wlparm.rhtml @@ -0,0 +1,13 @@ +<html> +<head> + <title>Wlparm: <%= controller.action_name %></title> + <%= stylesheet_link_tag 'scaffold' %> +</head> +<body> + +<p style="color: green"><%= flash[:notice] %></p> + +<%= @content_for_layout %> + +</body> +</html> diff --git a/app/views/location/_form.rhtml b/app/views/location/_form.rhtml new file mode 100644 index 0000000..c391f62 --- /dev/null +++ b/app/views/location/_form.rhtml @@ -0,0 +1,34 @@ +<%= error_messages_for 'location' %> + +<!--[form:location]--> +<p><label for="location_pixel_x">Pixel x</label><br/> +<%= text_field 'location', 'pixel_x' %></p> + +<p><label for="location_pixel_y">Pixel y</label><br/> +<%= text_field 'location', 'pixel_y' %></p> + +<p><label for="location_gps_lon">Gps lon</label><br/> +<%= text_field 'location', 'gps_lon' %></p> + +<p><label for="location_gps_lat">Gps lat</label><br/> +<%= text_field 'location', 'gps_lat' %></p> + +<p><label for="location_name">Name</label><br/> +<%= text_field 'location', 'name' %></p> + +<p><label for="location_street">Street</label><br/> +<%= text_field 'location', 'street' %></p> + +<p><label for="location_number">Number</label><br/> +<%= text_field 'location', 'number' %></p> + +<p><label for="location_creator_ip">Creator ip</label><br/> +<%= text_field 'location', 'creator_ip' %></p> + +<p><label for="location_time">Time</label><br/> +<%= datetime_select 'location', 'time' %></p> + +<p><label for="location_comment">Comment</label><br/> +<%= text_field 'location', 'comment' %></p> +<!--[eoform:location]--> + diff --git a/app/views/location/_plist.rhtml b/app/views/location/_plist.rhtml new file mode 100644 index 0000000..be4d644 --- /dev/null +++ b/app/views/location/_plist.rhtml @@ -0,0 +1,19 @@ +<table> + <th>Name</th> + <th>Strasse</th> + <th>Hausnr.</th> + <th>Kommentar</th> + +<% @locations.each do |location| %> + <tr> + <td><%= location.name %></td> + <td><%= location.street %></td> + <td><%= location.streetnr %></td> + <td><%= location.comment %></td> + <td><%= link_to 'Show', :action => 'show', :controller => 'location', :id => location %></td> + <td><%= link_to 'Edit', :action => 'edit', :controller => 'location', :id => location %></td> + <td><%= link_to 'Destroy', { :action => 'destroy', :controller => 'location', :id => location }, :confirm => 'Are you sure?', :post => true %></td> + </tr> +<% end %> +</table> + diff --git a/app/views/location/_pshow.rhtml b/app/views/location/_pshow.rhtml new file mode 100644 index 0000000..b1b042a --- /dev/null +++ b/app/views/location/_pshow.rhtml @@ -0,0 +1,29 @@ + +<% if @location != nil %> +<table> + <tr> + <td>Name:</td><td><%= @location.name %></td> + </tr> + <tr> + <td>Strasse:</td><td><%= @location.street %></td> + <tr> + <td>Hausnr.:</td><td><%= @location.streetnr %></td> + </tr> + <tr> + <td>Kommentar:</td><td><%= @location.comment %></td> + </tr> + <tr> + <td>changed:</td><td><%= @location.time %></td> + </tr> + <tr> + <td>Links:</td> + <td> + <%= link_to('Smokeping','http://stats.ffgraz.net/smokeping/index.cgi?target=Funkfeuer.' + @location.name) %><br /> + <% if @location.gallery_link != nil %> + <%= link_to 'Gallery', @location.gallery_link %><br /> + <% end %> + <%= link_to 'google maps', @googlemap %><br /></td> + </tr> +</table> +<p><%= link_to 'Edit', { :action => 'edit', :id => @location.id } %> +<% end %> diff --git a/app/views/location/edit.rhtml b/app/views/location/edit.rhtml new file mode 100644 index 0000000..20796b7 --- /dev/null +++ b/app/views/location/edit.rhtml @@ -0,0 +1,40 @@ +<%= render :partial => "person/nav" %> + +<h1>Location</h1> +<%= form_tag :action => 'update', :id => @location %> + <table> + <tr> + <td>Name</td><td><%= text_field 'location', 'name' %></td> + </tr> + <tr> + <td>Strasse</td><td><%= text_field 'location', 'street' %></td> + </tr> + <tr> + <td>Hausnummer</td><td><%= text_field 'location', 'streetnr' %></td> + </tr> + <tr> + <td>Kommentar</td><td><%= text_field 'location', 'comment' %></td> + </tr> + <tr> + <td>Administrator</td><td> + <select name="location[person_id]"> + <option value="0"> - </option + <% @persons.each do |person| %> + <option value="<%= person.id %>" + <%= ' selected' if @location.person != nil && person.id == @location.person.id %>> + <%= person.email %> + </option> + <% end %> + </select> + </td> + </tr> + <tr> + <td>Gallery</td><td><%= text_field 'location', 'gallery_link' %></td> + </tr> + </table> + <%= submit_tag 'Edit' %> +<%= end_form_tag %> + +<%= link_to 'Show', :action => 'show', :id => @location %> | +<%= link_to 'Back', :action => 'list' %> + diff --git a/app/views/location/list.rhtml b/app/views/location/list.rhtml new file mode 100644 index 0000000..1307dfa --- /dev/null +++ b/app/views/location/list.rhtml @@ -0,0 +1,4 @@ +<%= render :partial => "person/nav" %> +<h1>Locations</h1> +<%= render :partial => "plist", :object => @locations %> + diff --git a/app/views/location/new.rhtml b/app/views/location/new.rhtml new file mode 100644 index 0000000..60b5d2a --- /dev/null +++ b/app/views/location/new.rhtml @@ -0,0 +1,25 @@ +<%= render :partial => "person/nav" %> + +<h1>New Location</h1> + +<%= start_form_tag :action => 'create', :id => @location %> + <table> + <tr> + <td>Name</td><td><%= text_field 'location', 'name' %>*</td> + </tr> + <tr> + <td>Strasse</td><td><%= text_field 'location', 'street' %></td> + </tr> + <tr> + <td>Hausnr.</td><td><%= text_field 'location', 'streetnr' %></td> + </tr> +<td>Kommentar</td><td><%= text_area 'location', 'comment' %></td> + <%= hidden_field 'location', 'pixel_x' %> + <%= hidden_field 'location', 'pixel_y' %> + </tr> + </table> + <%= submit_tag 'Create' %> +<%= end_form_tag %> + +<p>Bitte Felder mit <strong>*</strong> eintragen</p> +<p>Unter <strong>Name</strong> bitte nur Kleinbuchstaben und Ziffern <strong>ohne</ohne> Leerzeichen eintragen</p> diff --git a/app/views/location/show.rhtml b/app/views/location/show.rhtml new file mode 100644 index 0000000..2666ff0 --- /dev/null +++ b/app/views/location/show.rhtml @@ -0,0 +1,21 @@ +<%= render :partial => "person/nav" %> + +<h1>Location</h1> +<%= render :partial => "location/pshow", :object => { @location, @mappe } %> + +<hr> +<h2>Nodes</h2> +<%= render :partial => "node/pshow", :object => @nodes %> +<%= link_to 'New Node', :controller => 'node', :action => 'new', :location => @location.id %> + +<hr> +<h2>IP Netze</h2> +<%= render :partial => "net/plist", :object => @nets %> + +<hr> +<h2>Administrator</h2> +<% if @person != nil %> + <%= render :partial => "person/pshow", :object => @person %> +<% end %> +<hr> +<a href="https://db.ffgraz.net/cgi-bin/funkfeuer/index.cgi?conf=conf/ff_location&q_id=<%= @location.id %>">edit location in DBMS</a> diff --git a/app/views/net/_plist.rhtml b/app/views/net/_plist.rhtml new file mode 100644 index 0000000..11bb8f4 --- /dev/null +++ b/app/views/net/_plist.rhtml @@ -0,0 +1,16 @@ + +<table> + <tr> + <th>Netz IP</th> + <th>Netmask</th> + <th>Kommentar</th> + </tr> + <% @nets.each do |net| %> + <tr> + <td><%= net.netip %></td> + <td><%= net.netmask %></td> + <td><%= net.comment %></td> + </tr> + <% end %> +</table> +<p></p> diff --git a/app/views/node/_plist.rhtml b/app/views/node/_plist.rhtml new file mode 100644 index 0000000..c329d4c --- /dev/null +++ b/app/views/node/_plist.rhtml @@ -0,0 +1,17 @@ +<table> + <th>Name</th> + <th>Location</th> + <th>Kommentar</th> + +<% @nodes.each do |node| %> + <tr> + <td><%= node.name %></td> + <td><%= node.location.name %></td> + <td><%= node.comment %></td> + <td><%= link_to 'Show', :action => 'show', :controller => 'node', :id => node %></td> + <td><%= link_to 'Edit', :action => 'edit', :controller => 'node', :id => node %></td> + <td><%= link_to 'Destroy', { :action => 'destroy', :controller => 'node', :id => node }, :confirm => 'Are you sure?', :post => true %></td> + </tr> +<% end %> +</table> + diff --git a/app/views/node/_pshow.rhtml b/app/views/node/_pshow.rhtml new file mode 100644 index 0000000..df7b132 --- /dev/null +++ b/app/views/node/_pshow.rhtml @@ -0,0 +1,54 @@ + +<% @nodes.each do |node| %> +<table border="1" width="600"> + <tr> + <td width="120"><strong>Name</strong></td> + <td colspan="5"><%= node.name %></td> + </tr> + <tr> + <td><strong>Kommentar</strong></td> + <td colspan="5"><%= node.comment %></td> + </tr> + <tr> + <% if node.person %> + <td><strong>Administrator</strong></td> + <td colspan="5"><%= node.person.email %></td> + <% end %> + <tr> + <td rowspan="<%= node.ip.length()+1 %>"><strong>Interfaces</strong></td> + <td><strong>Name</strong></td> + <td><strong>IP</strong></td> + <td><strong>Netmask</strong></td> + <td colspan="2"><strong>Link</strong></td> + <% node.ip.each do |ip| %> + <tr> + <td><%= ip.name %></td> + <td><%= link_to ip.ip, "http://#{ip.ip}" %></td> + <% if ip.nets != nil %> + <% if ip.nets.netmask != '255.255.255.255' %> + <td><%= ip.nets.netmask %></td> + <% else %> + <td><%= '255.255.0.0' %></td> + <% end %> + <% else %> + <td><%= ip.net_id %></td> + <% end %> + <td><%= link_to "intern", "http://#{ip.name}.#{node.name}.#{node.location.name}.graz.funkfeuer.at" %> | <%= link_to "extern", "http://#{ip.name}.#{node.name}.#{node.location.name}.ext.graz.funkfeuer.at" %></td> + </tr> + <% end %> + </tr> + <tr> + <td><strong>Smokeping</strong></td> + <% if node.smokeping %> + <td colspan="5">enabled</td> + <% else %> + <td colspan="5">disabled</td> + <% end %> + </tr> +</table> +<p> + <%= link_to 'Edit', { :controller =>'node', :action => 'edit' , :id => node.id } %> | + <%= link_to 'Destroy', { :controller => 'node', :action => 'destroy', :id => node.id } %> +</p> +<p></p> +<% end %> diff --git a/app/views/node/edit.rhtml b/app/views/node/edit.rhtml new file mode 100644 index 0000000..3686853 --- /dev/null +++ b/app/views/node/edit.rhtml @@ -0,0 +1,34 @@ +<%= render :partial => "person/nav" %> + +<h1>Node</h1> +<%= start_form_tag :action => 'update', :id => @node %> + <table> + <tr> + <td>Name</td><td><%= text_field 'node', 'name' %></td> + </tr> + <tr> + <td>Kommentar</td><td><%= text_area('node', 'comment', :cols => 40, :rows => 5) %></td> + </tr> + <tr> + <td>Administrator</td> + <td> + <select name="node[person_id]"> + <option value="0"> - </option + <% @persons.each do |person| %> + <option value="<%= person.id %>" + <%= ' selected' if @node.person != nil && @node.person.id == person.id %>> + <%= person.email %> + </option> + <% end %> + </select> + </td> + </tr> + <tr> + <td>Smokeping</td> + <td><%= check_box "node", "smokeping" %></td> + </tr> + </table> + <%= submit_tag 'Edit' %> +<%= end_form_tag %> +<hr /> +<%= link_to 'Back', { :controller => 'location', :action => 'show', :id => @node.location.id } %> diff --git a/app/views/node/edit.rhtml.bak b/app/views/node/edit.rhtml.bak new file mode 100644 index 0000000..c14bd94 --- /dev/null +++ b/app/views/node/edit.rhtml.bak @@ -0,0 +1,25 @@ +<h1>Node</h1> +<%= start_form_tag :action => 'update', :id => @node %> + <table> + <tr> + <td>Name</td><td><%= text_field 'node', 'name' %></td> + </tr> + <tr> + <td>Kommentar</td><td><%= text_field 'location', 'comment' %></td> + </tr> + <tr> + <td>Administrator</td><td> + <select name="node[person_id]"> + <option value="0"> - </option + <% @persons.each do |person| %> + <option value="<%= person.id %>" + <%= ' selected' if @node.person != nil && person.id == @node.person.id %>> + <%= person.email %> + </option> + <% end %> + </select> + </td> + </tr> + </table> + <%= submit_tag 'Edit' %> +<%= end_form_tag %> diff --git a/app/views/node/list.rhtml b/app/views/node/list.rhtml new file mode 100644 index 0000000..a6f4ed4 --- /dev/null +++ b/app/views/node/list.rhtml @@ -0,0 +1,2 @@ +<h1>Nodes</h1> +<%= render :partial => "plist", :object => @nodes %> diff --git a/app/views/node/new.rhtml b/app/views/node/new.rhtml new file mode 100644 index 0000000..a1585fc --- /dev/null +++ b/app/views/node/new.rhtml @@ -0,0 +1,44 @@ +<%= render :partial => "person/nav" %> + +<h1>Neuer Router</h1> + +<%= start_form_tag :action => 'do_new' %> + <table> + <tr> + <td>Location:</td> + <td> + <%= @node.location.name %> + </td> + </tr> + <tr> + <td>Name:</td><td><%= text_field 'node', 'name' %></td> + </tr> + <tr> + <td>Kommentar:</td><td><%= text_area 'node', 'comment', 'rows' => 4 %></td> + </tr> + <tr> + <td>Administrator</td> + <td> + <select name="node[person_id]"> + <option value="0"> - </option + <% @persons.each do |person| %> + <option value="<%= person.id %>" + <%= ' selected' if @session[:person].id == person.id %>> + <%= person.email %> + </option> + <% end %> + </select> + </td> + </tr> + <tr> + <td>Smokeping</td> + <td><%= check_box "node", "smokeping" %></td> + </tr> + </table> + <%= hidden_field 'node', 'location_id' %> + <%= submit_tag "Create" %> +<%= end_form_tag %> + + +<h2>Hinweise</h2> +<p>Als <strong>Name</strong> bitte z.B <strong>'omni'</strong> oder einen anden anderen, die Abstrahlcharakteristik bezeichenden Namen.</p> diff --git a/app/views/password_mailer/password.rhtml b/app/views/password_mailer/password.rhtml new file mode 100644 index 0000000..44a43c4 --- /dev/null +++ b/app/views/password_mailer/password.rhtml @@ -0,0 +1,14 @@ +Neues Passwort: +--------------- + +Person: <%= @person.firstname + ' ' + @person.lastname %> +Email: <%= @person.email %> +neues Passwort: <%= @password %> + +mfg +Funkfeuer Graz Admin + +-- +admin@graz.funkfeuer.at +http://graz.funkfeuer.at + 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 %> + |