Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entrega de la práctica 1 por Roberto Bermejo y Pedro García #19

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added app/assets/images/pedro.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/roberto.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions app/controllers/planet_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ def contact
def ejemplo
end

def author
end
end
14 changes: 14 additions & 0 deletions app/controllers/planet_controller.rb~
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
class PlanetController < ApplicationController
def index
end

def contact
end

# GET /planet/ejemplo
def ejemplo
end

def author
end
end
6 changes: 4 additions & 2 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@
<%= link_to "Contact", planet_contact_path %>
</div>
<div id="main">
<%= link_to "Home", planet_index_path %> | <%= link_to "Contact", planet_contact_path %> | <%= link_to "Ejemplo", planet_ejemplo_path %> | <%= link_to "Author", planet_author_path %><br />
<%= yield %>
</div>
<%= link_to "Home", planet_index_path %> | <%= link_to "Contact", planet_contact_path %> | <%= link_to "Ejemplo", planet_ejemplo_path %> | <%= link_to "Author", planet_author_path %><br />
</div>
</div>
</body>
</html>
</html>
41 changes: 41 additions & 0 deletions app/views/layouts/application.html.erb~
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!DOCTYPE html>
<html>
<head>
<title>Planet</title>
<%= stylesheet_link_tag "application" %>

<%= javascript_include_tag "application" %>

<%= csrf_meta_tags %>


<script type="text/javascript">
$(function() {
$( "#trip_description" ).cleditor();
$( "#trip_date" ).datepicker({
changeMonth: true,
changeYear: true
});
});
</script>

</head>
<body id="planet">
<div id="banner">
<%= image_tag("logo3.png") %>
<%= @page_title || "Planet Travel Site" %>
</div>
<div id="columns">
<div id="side">
<%= link_to "Home", planet_index_path %><br />
<%= link_to "Tipos", types_path %><br />
<%= link_to "Sitios", sites_path %><br />
<%= link_to "Viajes", trips_path %><br />
<%= link_to "Contact", planet_contact_path %>
</div>
<div id="main">
<%= yield %>
</div>
</div>
</body>
</html>
1 change: 1 addition & 0 deletions app/views/planet/author.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<h1>Autores</h1><%= image_tag('roberto.jpg') %><p>Roberto Bermejo del Valle.</p><p>Correo electrónico: [email protected]</p><%= image_tag('pedro.png') %><p>Pedro García Chas.</p><p>Correo electrónico: [email protected]</p>
Expand Down
2 changes: 1 addition & 1 deletion app/views/planet/index.html.erb
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<h1>Wecome to the Planet Travel Site</h1><p>This site gathers information of touristic sites from all over the world and should help you to organize your trips and your holidays.</p><%= image_tag('pedriza2-m.png') %><p>Feel free to use it for your convenience and pleasure.</p>
<h1>Bienvenido</h1><p>This site gathers information of touristic sites from all over the world and should help you to organize your trips and your holidays.</p><%= image_tag('pedriza2-m.png') %><p>Feel free to use it for your convenience and pleasure.</p>
Expand Down
1 change: 1 addition & 0 deletions app/views/planet/index.html.erb~
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<h1>Wecome to the Planet Travel Site</h1><p>This site gathers information of touristic sites from all over the world and should help you to organize your trips and your holidays.</p><%= image_tag('pedriza2-m.png') %><p>Feel free to use it for your convenience and pleasure.</p>
Expand Down
2 changes: 2 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

get "planet/ejemplo" # Se añade una nueva ruta a la acción ejemplo

get "planet/author"

# The priority is based upon order of creation:
# first created -> highest priority.

Expand Down
78 changes: 78 additions & 0 deletions config/routes.rb~
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
Planet::Application.routes.draw do

resources :trips

resources :sites

resources :types

resources :types do
resources :sites
end

get "planet/index"

get "planet/contact"

get "planet/ejemplo" # Se añade una nueva ruta a la acción ejemplo

# The priority is based upon order of creation:
# first created -> highest priority.

# Sample of regular route:
# match 'products/:id' => 'catalog#view'
# Keep in mind you can assign values other than :controller and :action

# Sample of named route:
# match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
# This route can be invoked with purchase_url(:id => product.id)

# Sample resource route (maps HTTP verbs to controller actions automatically):
# resources :products

# Sample resource route with options:
# resources :products do
# member do
# get 'short'
# post 'toggle'
# end
#
# collection do
# get 'sold'
# end
# end

# Sample resource route with sub-resources:
# resources :products do
# resources :comments, :sales
# resource :seller
# end

# Sample resource route with more complex sub-resources
# resources :products do
# resources :comments
# resources :sales do
# get 'recent', :on => :collection
# end
# end

# Sample resource route within a namespace:
# namespace :admin do
# # Directs /admin/products/* to Admin::ProductsController
# # (app/controllers/admin/products_controller.rb)
# resources :products
# end

# You can have the root of your site routed with "root"
# just remember to delete public/index.html.
# root :to => 'welcome#index'

root :to => "planet#index"


# See how all your routes lay out with "rake routes"

# This is a legacy wild controller route that's not recommended for RESTful applications.
# Note: This route will make all actions in every controller accessible via GET requests.
# match ':controller(/:action(/:id(.:format)))'
end