From: Tomas Sedovic <tsedovic(a)redhat.com>
It doesn't make sense to display the sidebar all the time -- even when
nobody's logged in. This removes it from most of the pages.
To select a specific pool, go to Instances in the main menu.
To see a list of providers, go to the Settings menu.
Note that the layout is likely to change in the near future.
---
src/app/stylesheets/dcloud.sass | 4 ++--
src/app/stylesheets/layout.sass | 16 +++++++++++-----
src/app/views/layouts/_main_nav.html.erb | 23 +----------------------
src/app/views/layouts/aggregator.haml | 12 ++++++------
src/app/views/settings/index.haml | 11 +++++++++--
5 files changed, 29 insertions(+), 37 deletions(-)
diff --git a/src/app/stylesheets/dcloud.sass b/src/app/stylesheets/dcloud.sass
index 841dda4..92da051 100644
--- a/src/app/stylesheets/dcloud.sass
+++ b/src/app/stylesheets/dcloud.sass
@@ -103,7 +103,7 @@ input, select
/* Styles for table
-#content_area table
+#main table
width: 100%
border-collapse: collapse
th, td
@@ -132,7 +132,6 @@ input, select
ul#providers + a.actionlink
display: block
- border-bottom: 1px solid #ccc
.submit_link
background: none
@@ -169,6 +168,7 @@ ul
display: block
line-height: 36px
padding-left: 32px
+ width: 224px
&:hover
background: #efefef url($provider_icon) no-repeat 2px 50%
color: #000
diff --git a/src/app/stylesheets/layout.sass b/src/app/stylesheets/layout.sass
index 7a0667f..129571e 100644
--- a/src/app/stylesheets/layout.sass
+++ b/src/app/stylesheets/layout.sass
@@ -35,13 +35,22 @@ h2, h3
overflow: hidden
background: #535353 url(/images/bg_header.png) repeat-x top
+#content
+ position: absolute
+ top: 70px
+ left: 0px
+ right: 0px
+ bottom: 0px
+ overflow: hidden
+ background-color: #FFFFFF
+
#side
padding: 5px 0 0 5px
+ float: left
margin: 0
- position: absolute
top: 70px
left: 0px
- bottom: 0px
+ height: 100%
overflow: auto
width: 224px
background-color: #FFFFFF
@@ -55,10 +64,7 @@ h2, h3
#main
padding: 0
margin-left: 0
- position: absolute
top: 70px
- left: 230px
- right: 0px
bottom: 0px
overflow: auto
background-color: #FFFFFF
diff --git a/src/app/views/layouts/_main_nav.html.erb b/src/app/views/layouts/_main_nav.html.erb
index 8f4612a..b764e19 100644
--- a/src/app/views/layouts/_main_nav.html.erb
+++ b/src/app/views/layouts/_main_nav.html.erb
@@ -1,26 +1,5 @@
+<% cur_id = params[:id].to_i %>
-
-<h3>Providers</h3>
-<ul id="providers">
- <% cur_id = params[:id].to_i %>
- <% if !(a)providers.nil? %>
- <% @providers.each { |provider| %>
- <%#Note that this is a temporary way to selected proper list item for demo, and is not expected to stay this way%>
- <% if controller.controller_name == "provider" && provider.id == cur_id
- selected_provider = "selected"
- else
- selected_provider = ""
- end %>
- <li><%= link_to provider.name,
- {:controller => "provider", :action => "show", :id => provider},
- :class => "providername #{selected_provider}"%>
- </li>
- <% } %>
- <% end %>
-</ul>
-<% if BasePermissionObject.general_permission_scope.has_privilege(@current_user, Privilege::PROVIDER_MODIFY) %>
- <%= link_to "Add a provider", {:controller => "provider", :action => "new"}, :class => "actionlink" %>
-<% end %>
<h3>Pools</h3>
<ul id="pools">
<% if !(a)pools.nil? %>
diff --git a/src/app/views/layouts/aggregator.haml b/src/app/views/layouts/aggregator.haml
index 8243ba1..ccaacdb 100644
--- a/src/app/views/layouts/aggregator.haml
+++ b/src/app/views/layouts/aggregator.haml
@@ -24,10 +24,10 @@
%body
#header
= render :partial => '/layouts/header'
- #side
- = render :partial => '/layouts/main_nav' unless @current_user.nil?
- #tabs-and-content-container
+ #content
+ - if ['instance', 'pool'].include? controller.controller_name
+ #side
+ = render :partial => '/layouts/main_nav' unless @current_user.nil?
#main
- #content_area
- = render :partial => '/layouts/notification'
- = (yield(:content) or yield) # content is set if we're using a sub template
+ = render :partial => '/layouts/notification'
+ = (yield(:content) or yield) # content is set if we're using a sub template
diff --git a/src/app/views/settings/index.haml b/src/app/views/settings/index.haml
index 1647eb1..e7030de 100644
--- a/src/app/views/settings/index.haml
+++ b/src/app/views/settings/index.haml
@@ -1,2 +1,9 @@
-%h1 Settings/index
-%p located in app/view/settings/index.haml
+%h1 Settings
+
+%h2 Providers
+%ul#providers
+ - @providers.each do |provider|
+ %li
+ = link_to provider.name, {:controller => "provider", :action => "show", :id => provider }, :class => "providername"
+- if BasePermissionObject.general_permission_scope.has_privilege(@current_user, Privilege::PROVIDER_MODIFY)
+ = link_to "Add a provider", {:controller => "provider", :action => "new"}, :class => "actionlink"
--
1.7.1.1