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/location |
Import legacy manman source
Copied from www.ffgraz.net
Diffstat (limited to 'app/views/location')
-rw-r--r-- | app/views/location/_form.rhtml | 34 | ||||
-rw-r--r-- | app/views/location/_plist.rhtml | 19 | ||||
-rw-r--r-- | app/views/location/_pshow.rhtml | 29 | ||||
-rw-r--r-- | app/views/location/edit.rhtml | 40 | ||||
-rw-r--r-- | app/views/location/list.rhtml | 4 | ||||
-rw-r--r-- | app/views/location/new.rhtml | 25 | ||||
-rw-r--r-- | app/views/location/show.rhtml | 21 |
7 files changed, 172 insertions, 0 deletions
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> |