commit 2e04e41bfa05c123bab0b436dccb0c344d7ee417
Author: Ohad Levy <ohadlevy@gmail.com>
Date:   Thu May 27 22:19:06 2010 +0800

    CSS rework, aligned view on all pages
    removed google JS from pages which do not require it

diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index f37cf994e..cb8b4945e 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -64,4 +64,12 @@ module ApplicationHelper
       page['tabs'].toggle
     end
   end
+
+  # a simple helper to load the google JS only on pages which requires it
+  def gcharts_script
+    content_for :head do
+      "<script src=http://www.google.com/jsapi></script>"
+    end
+  end
+
 end
diff --git a/app/views/common_parameters/index.html.erb b/app/views/common_parameters/index.html.erb
index 2b06c5dad..fac3ed0df 100644
--- a/app/views/common_parameters/index.html.erb
+++ b/app/views/common_parameters/index.html.erb
@@ -4,6 +4,7 @@
   <tr>
     <th>Name</th>
     <th>Value</th>
+    <th></th>
   </tr>
   <% for common_parameter in @common_parameters %>
     <tr>
diff --git a/app/views/dashboard/index.html.erb b/app/views/dashboard/index.html.erb
index f57053376..959c32373 100644
--- a/app/views/dashboard/index.html.erb
+++ b/app/views/dashboard/index.html.erb
@@ -1,8 +1,9 @@
+<% gcharts_script %>
 <div id="dashboard">
-  <h2>Overview</h2>
+  <h1>Overview</h1>
   <p>Generated at <%= Time.now.to_s(:short) %></p>
   <p>Good Host Reports in the last <%= SETTINGS[:puppet_interval] %> minutes <%= "#{@good_hosts} / #{@total_hosts}" %> hosts (<%=@percentage%>%) </p>
-  <h2>Summary</h2>
+  <h1>Summary</h1>
   <p>Hosts that had performed modifications <%= link_to @active_hosts, :action => "active" %></p>
   <p>Out Of Sync Hosts <%= link_to @out_of_sync_hosts, :action => "OutOfSync" %></p>
   <p>Hosts in Error State <%= link_to @bad_hosts, :action => "errors" %></p>
diff --git a/app/views/hosts/_minilist.html.erb b/app/views/hosts/_minilist.html.erb
index 9eeb52562..889682091 100644
--- a/app/views/hosts/_minilist.html.erb
+++ b/app/views/hosts/_minilist.html.erb
@@ -1,39 +1,37 @@
-<div id="hostlist" style="clear:both;">
-  <% if hosts.size > 0 -%>
-    <% form_tag(multiple_actions_hosts_path,:method => "get", :id => "host_select_form") do %>
-      <% title header ||= "" %>
-      <table class="list">
-        <tr>
-          <th><%= order @search, :by => :name %></th>
-          <th>Operating system</th>
-          <th>Environment</th>
-          <th>Model</th>
-          <th>Host Group</th>
-          <th><%= order @search, :by => :last_report %></th>
-          <th></th>
-        </tr>
-        <% hosts.each do |host| -%>
-          <tr class="<%= cycle("even", "odd") -%>">
-            <td>
-              <%= check_box_tag "host_ids[]", host.id, selected?(host), :class => 'host_select_boxes', :onClick => 'insertHostVal(this)' if hosts_controller? -%>
-              <%=name_column(host) %>
-            </td>
-            <td><%=h host.try(:os) %></td>
-            <td><%=h host.try(:environment) %></td>
-            <td><%=h host.try(:model) %></td>
-            <td><%=h host.try(:hostgroup) %></td>
-            <td><%=last_report_column(host) %></td>
-            <td>
-              <%= link_to 'Edit', edit_host_url(host)  %>
-              <%= link_to 'Clone', clone_host_url(host)  %>
-              <%= link_to 'Destroy', host, :confirm => "Delete #{host.name}?", :method => :delete %>
-            </td>
-          <% end -%>
-        </tr>
-      </table>
-      <%= submit_tag("Edit Multiple Hosts", :title => "Mass assign values to many hosts") if hosts_controller? %><br />
-    <% end -%>
+<% if hosts.size > 0 -%>
+  <% form_tag(multiple_actions_hosts_path,:method => "get", :id => "host_select_form") do %>
+    <% title header ||= "" %>
+    <table class="list">
+      <tr>
+        <th><%= order @search, :by => :name %></th>
+        <th>Operating system</th>
+        <th>Environment</th>
+        <th>Model</th>
+        <th>Host Group</th>
+        <th><%= order @search, :by => :last_report %></th>
+        <th></th>
+      </tr>
+      <% hosts.each do |host| -%>
+        <tr class="<%= cycle("even", "odd") -%>">
+          <td>
+            <%= check_box_tag "host_ids[]", host.id, selected?(host), :class => 'host_select_boxes', :onClick => 'insertHostVal(this)' if hosts_controller? -%>
+            <%=name_column(host) %>
+          </td>
+          <td><%=h host.try(:os) %></td>
+          <td><%=h host.try(:environment) %></td>
+          <td><%=h host.try(:model) %></td>
+          <td><%=h host.try(:hostgroup) %></td>
+          <td><%=last_report_column(host) %></td>
+          <td>
+            <%= link_to 'Edit', edit_host_url(host)  %>
+            <%= link_to 'Clone', clone_host_url(host)  %>
+            <%= link_to 'Destroy', host, :confirm => "Delete #{host.name}?", :method => :delete %>
+          </td>
+        <% end -%>
+      </tr>
+    </table>
+    <%= submit_tag("Edit Multiple Hosts", :title => "Mass assign values to many hosts") if hosts_controller? %><br />
   <% end -%>
-  <%= page_entries_info hosts %>
-  <%= will_paginate hosts %>
-</div>
+<% end -%>
+<%= page_entries_info hosts %>
+<%= will_paginate hosts %>
diff --git a/app/views/hosts/index.html.erb b/app/views/hosts/index.html.erb
index 48b00cdd9..50fbb32bf 100644
--- a/app/views/hosts/index.html.erb
+++ b/app/views/hosts/index.html.erb
@@ -1,7 +1,8 @@
 <%= javascript "host_checkbox" %>
-<span id=host_index_links>
-  <%= link_to "New Host", new_host_path %>
+<%= render 'minilist', :hosts => @hosts, :header => "Hosts" %>
+<span class=title_action>
+  <%= link_to "New Host", new_host_path %> |
   <%= link_to_function "Toggle All", "toggleCheck()" %>
 </span>
 
-<%= render 'minilist', :hosts => @hosts, :header => "Hosts" %>
+
diff --git a/app/views/hosts/show.html.erb b/app/views/hosts/show.html.erb
index 4b0735b92..70b4812b1 100644
--- a/app/views/hosts/show.html.erb
+++ b/app/views/hosts/show.html.erb
@@ -1,3 +1,4 @@
+<% gcharts_script %>
 <div id="title">
   <%= @host.to_label %>
   <span id="host_actions">
diff --git a/app/views/layouts/standard.rhtml b/app/views/layouts/standard.rhtml
index a21c58188..69a123a7e 100644
--- a/app/views/layouts/standard.rhtml
+++ b/app/views/layouts/standard.rhtml
@@ -5,8 +5,7 @@
     <title><%= h(yield(:title) || "The Foreman") %></title>
     <%= stylesheet_link_tag 'style' %>
     <%= yield(:head) %>
-    <script src='http://www.google.com/jsapi'></script>
-    <%= javascript_include_tag :defaults %>
+    <%= javascript_include_tag :defaults, :cache => true %>
     <%= active_scaffold_includes %>
   </head>
   <body>
diff --git a/app/views/lookup_keys/index.html.erb b/app/views/lookup_keys/index.html.erb
index 469142b78..eaff80beb 100644
--- a/app/views/lookup_keys/index.html.erb
+++ b/app/views/lookup_keys/index.html.erb
@@ -1,11 +1,12 @@
-<table>
+<table class=list>
   <tr>
     <th>Variable</th>
     <th>Number of Values</th>
+    <th</th>
   </tr>
 
 <% @lookup_key.each do |lookup_key| %>
-  <tr>
+  <tr class="<%= cycle("even", "odd") -%>">
     <td><%= link_to h(lookup_key.key), edit_lookup_key_path(lookup_key) %></td>
     <td><%=h lookup_key.lookup_values.count %></td>
     <td><%= link_to 'Destroy', lookup_key, :confirm => 'Are you sure?', :method => :delete %></td>
diff --git a/app/views/medias/index.html.erb b/app/views/medias/index.html.erb
index 5d9749fef..ba6863e5f 100644
--- a/app/views/medias/index.html.erb
+++ b/app/views/medias/index.html.erb
@@ -8,7 +8,7 @@
     <th></th>
   </tr>
   <% for media in @medias %>
-    <tr>
+    <tr class="<%= cycle("even", "odd") -%>">
       <td><%= link_to h(media), edit_media_path(media) %></td>
       <td><%=h media.path %></td>
       <td><%=h media.operatingsystems.to_sentence %></td>
diff --git a/public/stylesheets/style.css b/public/stylesheets/style.css
index fb02895bf..56882764b 100644
--- a/public/stylesheets/style.css
+++ b/public/stylesheets/style.css
@@ -1,17 +1,28 @@
 body {
-  font-family: Verdana, sans-serif;
-  font-size: medium;
+  font-family: Verdana, Helvetica, Arial;
+  font-size: 14px;
   color:#484848;
   margin: 0;
   padding: 0;
-  min-width: 900px;
   background-color: #E6DFCF;
 }
 
-h1, h2, h3, h4 {
-  font-family: "Trebuchet MS", Verdana, sans-serif;
+h1 {
+  font-variant:small-caps;
+  font-size:18px;
+  padding:0;
+  margin:0;
+}
+
+a img {
+  border: none;
 }
 
+a {
+  color: #0000FF;
+}
+
+
 th.underlined { 
   text-decoration: underline 
 }
@@ -28,7 +39,7 @@ input {
 p { 
   line-height: 130%;
 }
-#header {height:3.7em;margin:0;background-color:#406480;color:#E6DFCF;padding: 4px 8px 4px 6px; position:relative;}
+#header {height:3.5em;background-color:#406480;color:#E6DFCF; position:relative;}
 
 #header a {
   float:right;
@@ -58,28 +69,29 @@ p {
   list-style-type:none;
 }
 #menu li a {
-  display: block;
+  font-variant: small-caps;
   float:left;
   color: #fff;
   text-decoration: none;
-  font-weight: bold;
-  margin: 0;
   padding: 4px 10px 4px 10px;
+  height:1.2em;
+  font-size: 100%;
 }
 #menu li a:hover {background:#759FCF; color:#fff;}
-#menu li a.active, li a.selected:hover {background:#fff; color:#555;}
+#menu li a:active {background:#fff; color:#555;}
 
-div#content {
+#content {
   position:relative;
   float: center;
-  padding: 10px;
+  padding: 1%;
+  margin: 0 auto;
   clear: both;
 }
-div#content h3 {
+#content h3 {
   margin-top: 15px;
 }
 
-div#footer {
+#footer {
   clear: both;
   border-top: 1px solid #bbb;
   font-size: 0.9em;
@@ -146,8 +158,24 @@ div.flash.notice {
 
 
 /* Tables */
-table.list { border: 1px solid #e4e4e4;  border-collapse: collapse; width: 100%; margin-bottom: 4px; }
-table.list th {  background-color:#EEEEEE; padding: 4px; white-space:nowrap; text-align:left; }
+
+table.list { border: 1px solid #e4e4e4;  border-collapse: collapse; width: 100%; margin:1em auto;}
+table.list th { 
+  text-decoration:none;
+  text-align:left;
+  background:#555555;
+  color:#FFFFFF;
+}
+table.list th p {
+  display:block;
+  font:bold 11px arial,sans-serif;
+}
+table.list th a, th a:visited {
+  padding:2px 15px 2px 5px;
+  color:#FFFFFF;
+}
+
+table.list td, th { line-height:1.3em; }
 table.list td { vertical-align: top; border: 1px #eeeeee solid; padding: 4px }
 table.list td.id { width: 2%; text-align: center;}
 table.list td.checkbox { width: 15px; padding: 0px;}
@@ -195,11 +223,6 @@ table p {margin:0;}
 }
 #border-it { border: 2px solid #ddd; }
 
-.simple_search {
-  position: absolute;
-  top:40px;
-  right:20px;
-}
 div#dashboard {
   text-align: center;
   position: relative;
@@ -227,9 +250,10 @@ div#run_distribution {
   color: #333;
 }
 
-#host_index_links {
-  position: relative;
-  float: right;
+#content .title_action {
+  position: absolute;
+  top: 1em;
+  right: 1em;
 }
 #searchbar ul {
 	margin: 0; padding: 0;
@@ -271,3 +295,13 @@ div#run_distribution {
 #searchbar li a.close:hover {background:#e4e4e4; color:red;}
 #searchbar li a.active, li a.selected:hover {background:#fff; color:#555;}
 */
+.clear {
+  clear: both;
+  height: 0;
+  overflow: hidden;
+}
+
+#settings li {
+  list-style-type:none;
+  padding:0 0 8px;
+}
