On Fri, 2010-01-22 at 10:59 +0100, Michal Fojtik wrote:
From: Michal Fojtik mfojtik@redhat.com
- Replaced almost every ERB view with HAML
- Fixed year in copyright (application layout)
ACK. There's a few small nits, but feel free to commit this after addressing them:
diff --git a/server/libexec/app/views/accounts/index.html.haml b/server/libexec/app/views/accounts/index.html.haml new file mode 100644 index 0000000..7aee4c9 --- /dev/null +++ b/server/libexec/app/views/accounts/index.html.haml @@ -0,0 +1,10 @@ +%h1 Accounts
+%table
- %thead
- %th ID
There's a %tr missing here.
diff --git a/server/libexec/app/views/accounts/show.html.haml b/server/libexec/app/views/accounts/show.html.haml new file mode 100644 index 0000000..c09e63c --- /dev/null +++ b/server/libexec/app/views/accounts/show.html.haml @@ -0,0 +1,14 @@ +%h1
- = @account[:id]
+%h2 Instances
+%table
- %thead
- %tr
%th Instance ID
- %tbody
- @account[:instance_ids].each do |instance_id|
%tr
%td
= link_to instance_id, instance_url( instance_id )
The '%h2 Images' part from the ERB went missing
diff --git a/server/libexec/app/views/images/show.html.haml b/server/libexec/app/views/images/show.html.haml new file mode 100644 index 0000000..f50f496 --- /dev/null +++ b/server/libexec/app/views/images/show.html.haml @@ -0,0 +1,22 @@ +%h1 Image +%h2
- = @image.id
+%dl
- %di
<di> isn't an HTML element. The content model of <dl> is (dt+ dd+)*. This should be removed from all the templates.
diff --git a/server/libexec/app/views/instances/show.html.haml b/server/libexec/app/views/instances/show.html.haml new file mode 100644 index 0000000..5ef1306 --- /dev/null +++ b/server/libexec/app/views/instances/show.html.haml @@ -0,0 +1,41 @@
- %di
- %dt Flavor
- %dd
= @instance.flavor_id ? link_to(@instance.flavor_id, flavor_url(@instance.flavor_id)) ? default
- %di
- %dt Realm
- %dd
= @instance.realm_id ? link_to(@instance.realm_id, realm_url(@instance.realm_id)) ? default
The 'default' needs to be a string, i.e. "default"
diff --git a/server/libexec/app/views/layouts/application.html.haml b/server/libexec/app/views/layouts/application.html.haml index 5a5e096..a218e22 100644 --- a/server/libexec/app/views/layouts/application.html.haml +++ b/server/libexec/app/views/layouts/application.html.haml @@ -19,6 +19,8 @@ #driver_info Driver: #{DRIVER} #copyright
Copyright 2009 #{link_to 'Red Hat', 'http://redhat.com'} and individual contributors.
Copyright
= Time.now.year
#{link_to 'Red Hat', 'http://redhat.com'} and individual contributors.
IANAL, but the recommended way is to write 'Copyright 2009, 2010 Red Hat ..' - I would just leave it as literal text.
David