integration of the new MVC for subproject_addresses
This commit is contained in:
		
							
								
								
									
										24
									
								
								app/views/subproject_addresses/_form.html.erb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								app/views/subproject_addresses/_form.html.erb
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,24 @@ | ||||
| <%= form_with(model: subproject_address) do |form| %> | ||||
|   <% if subproject_address.errors.any? %> | ||||
|     <div style="color: red"> | ||||
|       <h2><%= pluralize(subproject_address.errors.count, "error") %> prohibited this client from being saved:</h2> | ||||
|  | ||||
|       <ul> | ||||
|         <% subproject_address.errors.each do |error| %> | ||||
|           <li><%= error.full_message %></li> | ||||
|         <% end %> | ||||
|       </ul> | ||||
|     </div> | ||||
|   <% end %> | ||||
|  | ||||
|   <% [:streetname, :zipcode, :city, :country].each do |attrib| %> | ||||
|   <div> | ||||
|     <%= form.label attrib, style: "display: block" %> | ||||
|     <%= form.text_field attrib %> | ||||
|   </div> | ||||
|   <% end %> | ||||
|  | ||||
|   <div> | ||||
|     <%= form.submit %> | ||||
|   </div> | ||||
| <% end %> | ||||
							
								
								
									
										22
									
								
								app/views/subproject_addresses/_subproject_address.erb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								app/views/subproject_addresses/_subproject_address.erb
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,22 @@ | ||||
| <div id="<%= dom_id subproject_address %>"> | ||||
|   <p> | ||||
|     <strong>Streetname:</strong> | ||||
|     <%= subproject_address.streetname %> | ||||
|   </p> | ||||
|  | ||||
|   <p> | ||||
|     <strong>Zipcode:</strong> | ||||
|     <%= subproject_address.zipcode %> | ||||
|   </p> | ||||
|  | ||||
|   <p> | ||||
|     <strong>City:</strong> | ||||
|     <%= subproject_address.city %> | ||||
|   </p> | ||||
|  | ||||
|   <p> | ||||
|     <strong>Country:</strong> | ||||
|     <%= subproject_address.country %> | ||||
|   </p> | ||||
|  | ||||
| </div> | ||||
							
								
								
									
										12
									
								
								app/views/subproject_addresses/edit.html.erb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								app/views/subproject_addresses/edit.html.erb
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,12 @@ | ||||
| <% content_for :title, "Editing subproject address" %> | ||||
|  | ||||
| <h1>Editing subproject address</h1> | ||||
|  | ||||
| <%= render "form", subproject_address: @subproject_address %> | ||||
|  | ||||
| <br> | ||||
|  | ||||
| <div> | ||||
|   <%= link_to "Show this subproject address", @subproject_address %> | | ||||
|   <%= link_to "Back to subproject addresses", subproject_addresses_path %> | ||||
| </div> | ||||
							
								
								
									
										18
									
								
								app/views/subproject_addresses/index.html.erb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								app/views/subproject_addresses/index.html.erb
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | ||||
| <p style="color: green"><%= notice %></p> | ||||
|  | ||||
| <% content_for :title, "Subproject addresses" %> | ||||
|  | ||||
| <h1>Subproject addresses</h1> | ||||
|  | ||||
| <div id="subproject_addresses"> | ||||
|   <% @subproject_addresses.each do |subproject_address| %> | ||||
|     <%= render subproject_address %> | ||||
|     <p> | ||||
|       <%= link_to "Show this subproject address", subproject_address %> | ||||
|     </p> | ||||
|   <% end %> | ||||
| </div> | ||||
|  | ||||
| <%= link_to "New subproject address", new_subproject_address_path %> | ||||
|  | ||||
| <%= link_to "Back to main", "/" %> | ||||
							
								
								
									
										11
									
								
								app/views/subproject_addresses/new.html.erb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								app/views/subproject_addresses/new.html.erb
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,11 @@ | ||||
| <% content_for :title, "New subproject address" %> | ||||
|  | ||||
| <h1>New subproject address</h1> | ||||
|  | ||||
| <%= render "form", subproject_address: @subproject_address %> | ||||
|  | ||||
| <br> | ||||
|  | ||||
| <div> | ||||
|   <%= link_to "Back to subproject addresses", subproject_addresses_path %> | ||||
| </div> | ||||
							
								
								
									
										10
									
								
								app/views/subproject_addresses/show.html.erb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								app/views/subproject_addresses/show.html.erb
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,10 @@ | ||||
| <p style="color: green"><%= notice %></p> | ||||
|  | ||||
| <%= render @subproject_address %> | ||||
|  | ||||
| <div> | ||||
|   <%= link_to "Edit this subproject address", edit_subproject_address_path(@subproject_address) %> | | ||||
|   <%= link_to "Back to subproject addresses", subproject_addresses_path %> | ||||
|  | ||||
|   <%= button_to "Destroy this subproject address", @subproject_address, method: :delete %> | ||||
| </div> | ||||
		Reference in New Issue
	
	Block a user
	 Stefan Tollkühn
					Stefan Tollkühn