Skip to content
Browse files

Mejora de vistas para añadir comentarios

  • Loading branch information...
1 parent 32ad377 commit 5de9dd80f39734630f7d569c21e931822b5bf153 Marina González committed Apr 13, 2012
View
6 app/views/comments/_comment.html.erb
@@ -1,3 +1,9 @@
<p>
<%= comment.coment %>
</p>
+
+<p>
+ <%= link_to 'Destroy Comment', [comment.site, comment],
+ :confirm => 'Are you sure?',
+ :method => :delete %>
+</p>
View
7 app/views/comments/_comment.html.erb~
@@ -0,0 +1,7 @@
+
+
+<p>
+ <%= link_to 'Destroy Comment', [comment.site, comment],
+ :confirm => 'Are you sure?',
+ :method => :delete %>
+</p>
View
1 app/views/comments/_form.html.erb
@@ -1,6 +1,5 @@
<%= form_for([@site, @site.comments.build]) do |f| %>
<div class="field">
- <%= f.label :coment %><br />
<%= f.text_area :coment %>
</div>
View
10 app/views/comments/_form.html.erb~
@@ -0,0 +1,10 @@
+<%= form_for([@site, @site.comments.build]) do |f| %>
+ <div class="field">
+ <%= f.label :coment %><br />
+ <%= f.text_area :coment %>
+ </div>
+
+ <div class="actions">
+ <%= f.submit %>
+ </div>
+<% end %>
View
9 app/views/sites/show.html.erb
@@ -12,11 +12,12 @@
</div>
-<b>Comentarios</b>
- <%= render @site.comments %>
+<b>Comentarios:</b>
+ <%= render @site.comments %></p
-<b>Añada su comentario:</b>
- <%= render "comments/form" %>
+<p><b>Añada su comentario:</b>
+ <%= render "comments/form" %></p
+
<p />
<% if @site.user == current_user %>
View
7 app/views/sites/show.html.erb~
@@ -13,10 +13,11 @@
</div>
<b>Comentarios</b>
- <%= render @site.comments %>
+ <%= render @site.comments %></p
-<b>Añada su comentario:</b>
- <%= render "comments/form" %>
+<p><b>Añada su comentario:</b>
+ <%= render "comments/form" %></p
+
<p />
<% if @site.user == current_user %>

0 comments on commit 5de9dd8

Please sign in to comment.
Something went wrong with that request. Please try again.