Skip to content
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
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ gem 'rails', '3.2.2'

gem 'sqlite3'

gem 'devise'

# Gems used only for assets and not required
# in production environments by default.
Expand Down
13 changes: 13 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ GEM
i18n (~> 0.6)
multi_json (~> 1.0)
arel (3.0.2)
bcrypt-ruby (3.0.1)
bcrypt-ruby (3.0.1-x86-mingw32)
builder (3.0.0)
coffee-rails (3.2.2)
coffee-script (>= 2.2.0)
Expand All @@ -37,6 +39,11 @@ GEM
coffee-script-source
execjs
coffee-script-source (1.2.0)
devise (2.0.4)
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.0.3)
railties (~> 3.1)
warden (~> 1.1.1)
erubis (2.7.0)
execjs (1.3.0)
multi_json (~> 1.0)
Expand All @@ -53,6 +60,7 @@ GEM
treetop (~> 1.4.8)
mime-types (1.17.2)
multi_json (1.1.0)
orm_adapter (0.0.7)
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.2)
Expand Down Expand Up @@ -89,6 +97,7 @@ GEM
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.5)
sqlite3 (1.3.5-x86-mingw32)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
Expand All @@ -98,12 +107,16 @@ GEM
uglifier (1.2.3)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
warden (1.1.1)
rack (>= 1.0)

PLATFORMS
ruby
x86-mingw32

DEPENDENCIES
coffee-rails (~> 3.2.1)
devise
jquery-rails
rails (= 3.2.2)
sass-rails (~> 3.2.3)
Expand Down
Binary file added app/assets/images/alberto.jpg
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/arbol1.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/florencia.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/francisco.jpg
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/logo3.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/pedriza.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/pergamo.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/reichstag.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions app/assets/javascripts/comments.js.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
3 changes: 3 additions & 0 deletions app/assets/javascripts/sites.js.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
3 changes: 3 additions & 0 deletions app/assets/stylesheets/comments.css.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Place all the styles related to the comments controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
163 changes: 163 additions & 0 deletions app/assets/stylesheets/planet.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
/* Global styles (no utilizados de momento) */

#planet #notice {
color: #000;
border: 2px solid red;
padding: 1em;
margin-bottom: 2em;
background-color: #f0f0f0;
font: bold smaller sans-serif;
}


#planet h1 {
font: 150% sans-serif;
color: #226;
border-bottom: 3px dotted #77d;
}

/* Styles for products/index */

#site_list table {
border-collapse: collapse;
}

#site_list table tr td {
padding: 5px;
vertical-align: top;
}

#site_list .list_image {
width: 60px;
height: 70px;
}

#site_list .list_description {
width: 60%;
}

#site_list .list_description dl {
margin: 0;
}

#site_list .list_description dt {
color: #244;
font-weight: bold;
font-size: larger;
}

#site_list .list_description dd {
margin: 0;
}

#site_list .list_actions {
font-size: x-small;
text-align: right;
padding-left: 1em;
}

#site_list .list_line_even {
background: #a8b8f8;
}

#site_list .list_line_odd {
background: #88b0f8;
}


/* START:mainlayout */
/* Styles for main page */

#banner {
background: #668;
padding-top: 10px;
padding-bottom: 10px;
border-bottom: 2px solid;
font: small-caps 40px/40px "Times New Roman", serif;
color: #bfb;
text-align: center;
}

#banner img {
float: left;
padding-left: 10px;
}

#planet .user {
float: right;
color: #bfb;
font-size: small;
}

#columns {
background: #446;
}

#main {
margin-left: 14em; /* Ajuste de borde izquierdo */
padding-top: 4ex;
padding-left: 2em;
background: white;
}

#side {
float: left;
padding-top: 1em;
padding-left: 1em;
padding-bottom: 1em;
background: #446;
width: 13em;
}

#side a {
color: #bfb;
font-size: small;
}
/* END:mainlayout */

/* An entry in the store catalog (no utilizados de momento) */

#planet .entry {
overflow: auto;
margin-top: 1em;
border-bottom: 1px dotted #77d;
}

#planet .name {
font-size: 120%;
font-family: sans-serif;
}

#store .entry img {
width: 80px;
margin-right: 5px;
margin-bottom: 5px;
float: left;
}


#store .entry h3 {
margin-top: 0;
margin-bottom: 2px;
color: #227;
}

#store .entry p {
margin-top: 0.5em;
margin-bottom: 0.8em;
}

#store .entry .price_line {
clear: both;
margin-bottom: 0.5em;
}

#store .entry .add_to_cart {
position: relative;
}

#store .entry .price {
color: #44a;
font-weight: bold;
margin-right: 2em;
}
3 changes: 3 additions & 0 deletions app/assets/stylesheets/sites.css.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Place all the styles related to the sites controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
92 changes: 92 additions & 0 deletions app/controllers/comments_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
class CommentsController < ApplicationController

# authenticate_user! ejecuta acción solo si sesión existe
before_filter :authenticate_user!, :except => [ :index, :show ]

# GET /comments
# GET /comments.json
def index
@site = Site.find(params[:site_id])
@comments = @site.comments
@comment = current_user.comments.build

respond_to do |format|
format.html # index.html.erb
format.json { render json: @comments }
end
end

# GET /comments/1
# GET /comments/1.json
def show
@comment = Comment.find(params[:id])

respond_to do |format|
format.html # show.html.erb
format.json { render json: @comment }
end
end

# GET /comments/new
# GET /comments/new.json
def new
@comment = current_user.comments.build

respond_to do |format|
format.html # new.html.erb
format.json { render json: @comment }
end
end

# GET /comments/1/edit
def edit
@comment = current_user.comments.find(params[:id])
@site = @comment.site
end

# POST /comments
# POST /comments.json
def create
@comment = current_user.comments.build(params[:comment])
@site = @comment.site

respond_to do |format|
if @comment.save
format.html { redirect_to site_path(@site), notice: 'Comment was successfully created.' }
format.json { render json: @comment, status: :created, location: @comment }
else
format.html { render action: "new" }
format.json { render json: @comment.errors, status: :unprocessable_entity }
end
end
end

# PUT /comments/1
# PUT /comments/1.json
def update
@comment = current_user.comments.find(params[:id])

respond_to do |format|
if @comment.update_attributes(params[:comment])
format.html { redirect_to site_path(@comment.site), notice: 'Comment was successfully updated.' }
format.json { head :no_content }
else
format.html { render action: "edit" }
format.json { render json: @comment.errors, status: :unprocessable_entity }
end
end
end

# DELETE /comments/1
# DELETE /comments/1.json
def destroy
@comment = current_user.comments.find(params[:id])
site = @comment.site
@comment.destroy

respond_to do |format|
format.html { redirect_to site_path(site) }
format.json { head :no_content }
end
end
end
3 changes: 3 additions & 0 deletions app/controllers/planet_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@ def contact

def ejemplo
end

def author
end

end
Loading