From: Tomas Sedovic tsedovic@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 !@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 !@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"
On Tue, 2010-07-20 at 17:27 +0200, tsedovic@redhat.com wrote:
From: Tomas Sedovic tsedovic@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.
I am off tomorrow, but if no one has beaten me to it, I will review this on Thursday when I get back.
On Tue, 2010-07-20 at 17:27 +0200, tsedovic@redhat.com wrote:
From: Tomas Sedovic tsedovic@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(-)
ACK, this look fine, and is a good first step toward completely removing that sidebar. Other remaining bits I see from this that need doing are: * Remove sidebar from instances page. If you have more than one pool, you should go to a grid view entry page - I can dig up jeremy's mockup for this if it is not readily available. * Bunch of references (and one sass file) with name dcloud. This is an old reference that should go away. * Start making more use of sass' mixin modules and blueprint.css, otherwise we aren't getting the real benefit of using compass here.
On Fri, 2010-07-23 at 13:18 -0400, Jason Guiditta wrote:
On Tue, 2010-07-20 at 17:27 +0200, tsedovic@redhat.com wrote:
ACK, this look fine, and is a good first step toward completely removing that sidebar. Other remaining bits I see from this that need doing are:
- Remove sidebar from instances page. If you have more than one pool,
you should go to a grid view entry page - I can dig up jeremy's mockup for this if it is not readily available.
- Bunch of references (and one sass file) with name dcloud. This is an
old reference that should go away.
- Start making more use of sass' mixin modules and blueprint.css,
otherwise we aren't getting the real benefit of using compass here.
Shame of me for forget to running 'rake cucumber' before ACKing this. Said command produces the following errors as a result of these UI changes:
......F--------.....F---.....F----.....F---...................................
(::) failed steps (::)
Could not find link with text or title or id "Add a pool" (Webrat::NotFoundError) ./features/step_definitions/web_steps.rb:28:in `/^(?:|I )follow "([^"]*)"$/' features/pool.feature:13:in `When I follow "Add a pool"'
Could not find link with text or title or id "mockpool" (Webrat::NotFoundError) ./features/step_definitions/web_steps.rb:28:in `/^(?:|I )follow "([^"]*)"$/' features/pool.feature:31:in `When I follow "mockpool"'
Could not find link with text or title or id "mockpool" (Webrat::NotFoundError) ./features/step_definitions/web_steps.rb:28:in `/^(?:|I )follow "([^"]*)"$/' features/pool.feature:43:in `When I follow "mockpool"'
Could not find link with text or title or id "mockpool" (Webrat::NotFoundError) ./features/step_definitions/web_steps.rb:28:in `/^(?:|I )follow "([^"]*)"$/' features/pool.feature:65:in `When I follow "mockpool"'
Failing Scenarios: cucumber features/pool.feature:10 # Scenario: Create a new Pool cucumber features/pool.feature:23 # Scenario: View Pool's Hardware Profiles cucumber features/pool.feature:39 # Scenario: View Pool's Realms cucumber features/pool.feature:50 # Scenario: View Pool's Quota Usage
9 scenarios (4 failed, 5 passed) 76 steps (4 failed, 18 skipped, 54 passed) 0m4.757s rake aborted!
Patch to repair this will be sent momentarily.
-j
deltacloud-devel@lists.fedorahosted.org