From b6ca062670b342344df08b53fb216db619ef42bc Mon Sep 17 00:00:00 2001 From: Nicolas Braud-Santoni Date: Sun, 7 Aug 2016 16:39:42 +0200 Subject: Import legacy manman source Copied from www.ffgraz.net --- app/views/location/_form.rhtml | 34 ++++++++++++++++++++++++++++++++++ app/views/location/_plist.rhtml | 19 +++++++++++++++++++ app/views/location/_pshow.rhtml | 29 +++++++++++++++++++++++++++++ app/views/location/edit.rhtml | 40 ++++++++++++++++++++++++++++++++++++++++ app/views/location/list.rhtml | 4 ++++ app/views/location/new.rhtml | 25 +++++++++++++++++++++++++ app/views/location/show.rhtml | 21 +++++++++++++++++++++ 7 files changed, 172 insertions(+) create mode 100644 app/views/location/_form.rhtml create mode 100644 app/views/location/_plist.rhtml create mode 100644 app/views/location/_pshow.rhtml create mode 100644 app/views/location/edit.rhtml create mode 100644 app/views/location/list.rhtml create mode 100644 app/views/location/new.rhtml create mode 100644 app/views/location/show.rhtml (limited to 'app/views/location') 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' %> + + +


+<%= text_field 'location', 'pixel_x' %>

+ +


+<%= text_field 'location', 'pixel_y' %>

+ +


+<%= text_field 'location', 'gps_lon' %>

+ +


+<%= text_field 'location', 'gps_lat' %>

+ +


+<%= text_field 'location', 'name' %>

+ +


+<%= text_field 'location', 'street' %>

+ +


+<%= text_field 'location', 'number' %>

+ +


+<%= text_field 'location', 'creator_ip' %>

+ +


+<%= datetime_select 'location', 'time' %>

+ +


+<%= text_field 'location', 'comment' %>

+ + 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 @@ + + + + + + +<% @locations.each do |location| %> + + + + + + + + + +<% end %> +
NameStrasseHausnr.Kommentar
<%= location.name %><%= location.street %><%= location.streetnr %><%= location.comment %><%= link_to 'Show', :action => 'show', :controller => 'location', :id => location %><%= link_to 'Edit', :action => 'edit', :controller => 'location', :id => location %><%= link_to 'Destroy', { :action => 'destroy', :controller => 'location', :id => location }, :confirm => 'Are you sure?', :post => true %>
+ 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 %> + + + + + + + + + + + + + + + + + + + +
Name:<%= @location.name %>
Strasse:<%= @location.street %>
Hausnr.:<%= @location.streetnr %>
Kommentar:<%= @location.comment %>
changed:<%= @location.time %>
Links: + <%= link_to('Smokeping','http://stats.ffgraz.net/smokeping/index.cgi?target=Funkfeuer.' + @location.name) %>
+ <% if @location.gallery_link != nil %> + <%= link_to 'Gallery', @location.gallery_link %>
+ <% end %> + <%= link_to 'google maps', @googlemap %>
+

<%= 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" %> + +

Location

+<%= form_tag :action => 'update', :id => @location %> + + + + + + + + + + + + + + + + + + + +
Name<%= text_field 'location', 'name' %>
Strasse<%= text_field 'location', 'street' %>
Hausnummer<%= text_field 'location', 'streetnr' %>
Kommentar<%= text_field 'location', 'comment' %>
Administrator + +
Gallery<%= text_field 'location', 'gallery_link' %>
+ <%= 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" %> +

Locations

+<%= 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" %> + +

New Location

+ +<%= start_form_tag :action => 'create', :id => @location %> + + + + + + + + + + + + <%= hidden_field 'location', 'pixel_x' %> + <%= hidden_field 'location', 'pixel_y' %> + +
Name<%= text_field 'location', 'name' %>*
Strasse<%= text_field 'location', 'street' %>
Hausnr.<%= text_field 'location', 'streetnr' %>
Kommentar<%= text_area 'location', 'comment' %>
+ <%= submit_tag 'Create' %> +<%= end_form_tag %> + +

Bitte Felder mit * eintragen

+

Unter Name bitte nur Kleinbuchstaben und Ziffern ohne Leerzeichen eintragen

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" %> + +

Location

+<%= render :partial => "location/pshow", :object => { @location, @mappe } %> + +
+

Nodes

+<%= render :partial => "node/pshow", :object => @nodes %> +<%= link_to 'New Node', :controller => 'node', :action => 'new', :location => @location.id %> + +
+

IP Netze

+<%= render :partial => "net/plist", :object => @nets %> + +
+

Administrator

+<% if @person != nil %> + <%= render :partial => "person/pshow", :object => @person %> +<% end %> +
+edit location in DBMS -- cgit v1.2.1