]> git.r.bdr.sh - rbdr/grita/blobdiff - views/index.haml
Fixes QR Codes.
[rbdr/grita] / views / index.haml
index 2b40431778e65cfe4535fdea9f738adafbfbbd8e..7801311e455345cc50ae1500d3c92d21e6fe188e 100644 (file)
                                Su texto ha sido guardado!
                                %a{:href=>"/#{@grito.gethash}"} De click aquí para verlo.
        %h1 Título
-       %input.title{:type => 'text', :name => 'title'}
+       -unless @grito.nil?
+               -unless @grito.errors.empty?
+                       %input.title{:type => 'text', :name => 'title', :Value => @grito.title}
+               -else
+                       %input.title{:type => 'text', :name => 'title'}
+       -else
+               %input.title{:type => 'text', :name => 'title'}
        %br
        %h1 Texto
        %textarea.text{:name => 'text', :cols => '76', :rows => '20'}
+               -unless @grito.nil?
+                       -unless @grito.errors.empty?
+                               =@grito.text
        %br
        %input.submit{:type => 'submit', :value => 'Gritalo!'}
\ No newline at end of file