If a page has no sidebar, then the content area is widened to 100%.
Signed-off-by: Darryl L. Pierce <mcpierce(a)gmail.com>
---
app/views/products/index.html.erb | 6 +++++-
app/views/projects/index.html.erb | 6 +++++-
app/views/users/index.html.erb | 2 +-
app/views/users/roles.html.erb | 2 +-
public/stylesheets/projxp.css | 5 +++++
5 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/app/views/products/index.html.erb b/app/views/products/index.html.erb
index 0d25bde..ba66031 100644
--- a/app/views/products/index.html.erb
+++ b/app/views/products/index.html.erb
@@ -1,4 +1,4 @@
-<div id="content">
+<div id="<%= @project && @project.can_create_products?(@user) ?
'content' : 'content-no-sidebar' %>">
<div>
<%= will_paginate @products %>
</div>
@@ -49,6 +49,8 @@
</div>
</div>
+<% if @project %>
+
<% render :layout => 'home/sidebar', :locals => {:title =>
"Commands"} do %>
<% if @project %>
<%= link_to "View parent project",
@@ -60,3 +62,5 @@
new_product_path(:project => @project.id), :class => "command"
%>
<% end %>
<% end %>
+
+<% end %>
diff --git a/app/views/projects/index.html.erb b/app/views/projects/index.html.erb
index 85fc6e2..cc91b3c 100644
--- a/app/views/projects/index.html.erb
+++ b/app/views/projects/index.html.erb
@@ -1,4 +1,4 @@
-<div id="content">
+<div id="<%= @user ? 'content' : 'content-no-sidebar'
%>">
<div>
<%= will_paginate @projects %>
</div>
@@ -38,8 +38,12 @@
</div>
</div>
+<% if @user %>
+
<% render :layout => 'home/sidebar', :locals => {:title =>
'Options'} do %>
<% if @user %>
<%= link_to "Request A New Project", new_project_path, :class =>
"command" %>
<% end %>
<% end %>
+
+<% end %>
diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb
index 83b2a48..7e4d194 100644
--- a/app/views/users/index.html.erb
+++ b/app/views/users/index.html.erb
@@ -1,4 +1,4 @@
-<div id="content">
+<div id="content-no-sidebar">
<div>
<%= will_paginate @users %>
</div>
diff --git a/app/views/users/roles.html.erb b/app/views/users/roles.html.erb
index a71b38d..89f8e8d 100644
--- a/app/views/users/roles.html.erb
+++ b/app/views/users/roles.html.erb
@@ -1,4 +1,4 @@
-<div id="content">
+<div id="content-no-sidebar">
<div>
<%= will_paginate @product_roles %>
</div>
diff --git a/public/stylesheets/projxp.css b/public/stylesheets/projxp.css
index 356ed61..ad5d642 100644
--- a/public/stylesheets/projxp.css
+++ b/public/stylesheets/projxp.css
@@ -31,6 +31,11 @@ img {
width: 70%;
}
+#content-no-sidebar {
+ float: left;
+ width: 100%;
+}
+
#sidebar {
float: right;
width: 30%;
--
1.6.0.6
Show replies by date
On Sat, Apr 25, 2009 at 2:17 PM, Darryl L. Pierce <mcpierce(a)gmail.com>wrote:
If a page has no sidebar, then the content area is widened to 100%.
Signed-off-by: Darryl L. Pierce <mcpierce(a)gmail.com>
---
Pushed.
--
Darryl L. Pierce <mcpierce(a)gmail.com>
Visit the Infobahn Offramp: <
http://mcpierce.multiply.com>
"Bury me next to my wife. Nothing too fancy..." - Ulysses S. Grant