Skip to content

Commit

Permalink
Vistas y CSS mejorado con marco externo
Browse files Browse the repository at this point in the history
  • Loading branch information
jquemada committed Nov 29, 2011
1 parent 619baa9 commit 7078b7b
Show file tree
Hide file tree
Showing 13 changed files with 113 additions and 113 deletions.
Binary file added app/assets/images/arbol1.png
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/arbol2.png
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/bruselas-m.png
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/florencia.png
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/llanes.png
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/logo3.png
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/pedriza.png
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/pergamo.png
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/reichstag.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 29 additions & 19 deletions app/views/layouts/application.html.erb
@@ -1,19 +1,29 @@
<!DOCTYPE html>
<html>
<head>
<title>Planet</title>
<%= stylesheet_link_tag "application" %>
<%= javascript_include_tag "application" %>
<%= csrf_meta_tags %>
</head>
<body>

<div>
<%= link_to "Sitios", sites_path %>
<%= link_to "Tipos", types_path %>
</div>

<%= yield %>

</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>Planet Travel Site</title>
<!-- START:stylesheet -->
<%= stylesheet_link_tag "scaffold" %>
<%= stylesheet_link_tag "planet", :media => "all" %><!-- <label id="code.slt"/> -->
<!-- END:stylesheet -->
<%= javascript_include_tag :defaults %>
<%= csrf_meta_tag %><!-- <label id="code.csrf"/> -->
</head>
<body id="planet">
<div id="banner">
<%= image_tag("logo3.png") %>
<%= @page_title || "Planet Travel Site" %><!-- <label id="code.depot.e.title"/> -->
</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 "Contact", planet_contact_path %>
</div>
<div id="main">
<%= yield %><!-- <label id="code.depot.e.include"/> -->
</div>
</div>
</body>
</html>
69 changes: 34 additions & 35 deletions app/views/sites/index.html.erb
@@ -1,35 +1,34 @@
<h1>Listing sites</h1>

<table>
<tr>
<th>Name</th>
<th>Description</th>
<th>Type</th>
<th>Latitude</th>
<th>Longitude</th>
<th>Zoom</th>
<th>Image url</th>
<th></th>
<th></th>
<th></th>
</tr>

<% @sites.each do |site| %>
<tr>
<td><%= site.name %></td>
<td><%= site.description %></td>
<td><%= site.type.name if site.type %></td>
<td><%= site.latitude %></td>
<td><%= site.longitude %></td>
<td><%= site.zoom %></td>
<td><%= site.image_url %></td>
<td><%= link_to 'Show', site %></td>
<td><%= link_to 'Edit', edit_site_path(site) %></td>
<td><%= link_to 'Destroy', site, confirm: 'Are you sure?', method: :delete %></td>
</tr>
<% end %>
</table>

<br />

<%= link_to 'New Site', new_site_path %>
<div id="site_list">
<h1>Listing Sites</h1>

<table>
<% @sites.each do |site| %>
<tr class="<%= cycle('list_line_odd', 'list_line_even') %>">

<td>
<%= link_to image_tag(site.image_url, :class => 'list_image'), site %>
</td>

<td class="list_description">
<dl>
<dt><%= link_to site.name, site %></dt>
<dd><%= truncate(strip_tags(site.description),
:length => 80) %></dd>
</dl>
</td>

<td class="list_actions">
<%= link_to 'Show', site %><br/>
<%= link_to 'Edit', edit_site_path(site) %><br/>
<%= link_to 'Destroy', site,
:confirm => 'Are you sure?',
:method => :delete %>
</td>
</tr>
<% end %>
</table>
</div>

<br />

<%= link_to 'New site', new_site_path %>
62 changes: 24 additions & 38 deletions app/views/sites/show.html.erb
@@ -1,40 +1,26 @@
<p id="notice"><%= notice %></p>

<p>
<b>Name:</b>
<%= @site.name %>
</p>

<p>
<b>Description:</b>
<%= @site.description %>
</p>

<p>
<b>Type:</b>
<%= @site.type.name if @site.type %>
</p>

<p>
<b>Latitude:</b>
<%= @site.latitude %>
</p>

<p>
<b>Longitude:</b>
<%= @site.longitude %>
</p>

<p>
<b>Zoom:</b>
<%= @site.zoom %>
</p>

<p>
<b>Image url:</b>
<%= @site.image_url %>
</p>


<div id="site">

<h1><%= @site.type.name if @site.type %></h1>

<%= image_tag(@site.image_url, :class => 'site_image') %>

<h3><%= @site.name %></h3>

<p><%=sanitize @site.description %></p>

<div class="position">
<span>
<b>Latitude:</b>
<%= @site.latitude %>
</span>

<span>
<b>Longitude:</b>
<%= @site.longitude %>
</span>
</div>
</div>

<p />
<%= link_to 'Edit', edit_site_path(@site) %> |
<%= link_to 'Back', sites_path %>
47 changes: 26 additions & 21 deletions app/views/types/index.html.erb
@@ -1,24 +1,29 @@
<h1>Listing types</h1>

<table>
<tr>
<th>Name</th>
<th>Description</th>
<th></th>
<th></th>
<th></th>
</tr>

<% @types.each do |type| %>
<tr>
<td><%= type.name %></td>
<td><%= type.description %></td>
<td><%= link_to 'Show', type %></td>
<td><%= link_to 'Edit', edit_type_path(type) %></td>
<td><%= link_to 'Destroy', type, confirm: 'Are you sure?', method: :delete %></td>
</tr>
<% end %>
</table>
<div id="site_list">
<h1>Listing Types</h1>

<table>
<% @types.each do |type| %>
<tr class="<%= cycle('list_line_odd', 'list_line_even') %>">

<td class="list_description">
<dl>
<dt><%= link_to type.name, type_sites_path(type) %></dt>
<dd><%= truncate(strip_tags(type.description),
:length => 80) %></dd>
</dl>
</td>

<td class="list_actions">
<%= link_to 'Show', type %><br/>
<%= link_to 'Edit', edit_type_path(type) %><br/>
<%= link_to 'Destroy', type,
:confirm => 'Are you sure?',
:method => :delete %>
</td>
</tr>
<% end %>
</table>
</div>

<br />

Expand Down

0 comments on commit 7078b7b

Please sign in to comment.