Project

General

Profile

« Previous | Next » 

Revision 2e04e41b

Added by Ohad Levy almost 14 years ago

  • ID 2e04e41bfa05c123bab0b436dccb0c344d7ee417

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

View differences:

app/helpers/application_helper.rb
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
app/views/common_parameters/index.html.erb
<tr>
<th>Name</th>
<th>Value</th>
<th></th>
</tr>
<% for common_parameter in @common_parameters %>
<tr>
app/views/dashboard/index.html.erb
<% 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>
app/views/hosts/_minilist.html.erb
<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 %>
app/views/hosts/index.html.erb
<%= 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" %>
app/views/hosts/show.html.erb
<% gcharts_script %>
<div id="title">
<%= @host.to_label %>
<span id="host_actions">
app/views/layouts/standard.rhtml
<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>
app/views/lookup_keys/index.html.erb
<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>
app/views/medias/index.html.erb
<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>
public/stylesheets/style.css
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
}
......
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;
......
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;
......
/* 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;}
......
}
#border-it { border: 2px solid #ddd; }
.simple_search {
position: absolute;
top:40px;
right:20px;
}
div#dashboard {
text-align: center;
position: relative;
......
color: #333;
}
#host_index_links {
position: relative;
float: right;
#content .title_action {
position: absolute;
top: 1em;
right: 1em;
}
#searchbar ul {
margin: 0; padding: 0;
......
#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;
}

Also available in: Unified diff