Applied the new sidebar layout to all pages.
Signed-off-by: Darryl L. Pierce <mcpierce(a)gmail.com>
---
app/views/epics/index.html.erb | 4 +-
app/views/home/_sidebar.html.erb | 19 ++++++++++
app/views/items/index.html.erb | 4 +-
app/views/items/show.html.erb | 4 +-
app/views/products/index.html.erb | 5 +--
app/views/products/show.html.erb | 10 +----
app/views/projects/_edit.html.erb | 3 --
app/views/projects/index.html.erb | 4 +-
app/views/projects/show.html.erb | 15 ++-------
app/views/sprints/index.html.erb | 4 +-
app/views/sprints/show.html.erb | 17 +++++----
app/views/stories/index.html.erb | 4 +-
app/views/stories/show.html.erb | 4 +-
app/views/tasks/show.html.erb | 4 +-
app/views/users/index.html.erb | 3 --
app/views/users/show.html.erb | 4 +-
public/stylesheets/sidebar.css | 66 ++++++++++++++++++++++++++++++++++--
public/stylesheets/tables.css | 1 +
18 files changed, 116 insertions(+), 59 deletions(-)
create mode 100644 app/views/home/_sidebar.html.erb
diff --git a/app/views/epics/index.html.erb b/app/views/epics/index.html.erb
index d1a1d35..acda0cb 100644
--- a/app/views/epics/index.html.erb
+++ b/app/views/epics/index.html.erb
@@ -32,7 +32,7 @@
</div>
</div>
-<div id="sidebar">
+<% render :layout => 'home/sidebar', :locals => {:title =>
"Commands"} do %>
<%= link_to "View parent project",
project_path(@project), :class => "command" %>
@@ -40,4 +40,4 @@
<%= link_to "Write new epic...",
new_project_epic_path(@project), :class => "command" %>
<% end %>
-</div>
+<% end %>
diff --git a/app/views/home/_sidebar.html.erb b/app/views/home/_sidebar.html.erb
new file mode 100644
index 0000000..78c5692
--- /dev/null
+++ b/app/views/home/_sidebar.html.erb
@@ -0,0 +1,19 @@
+<div id="sidebar">
+ <div id="interior">
+ <b class="b1h"></b>
+ <b class="b2h"></b>
+ <b class="b3h"></b>
+ <b class="b4h"></b>
+
+ <% if title %>
+ <div class="header"><span class="title"><%= title
%></span></div>
+ <% end %>
+
+ <%= yield %>
+
+ <b class="b4bh"></b>
+ <b class="b3bh"></b>
+ <b class="b2bh"></b>
+ <b class="b1bh"></b>
+ </div>
+</div>
diff --git a/app/views/items/index.html.erb b/app/views/items/index.html.erb
index 3bc5fcd..033b14c 100644
--- a/app/views/items/index.html.erb
+++ b/app/views/items/index.html.erb
@@ -2,7 +2,7 @@
<%= render :partial => 'list', :locals => {:items =>
@backlog_items} %>
</div>
-<div id="sidebar">
+<% render :layout => 'home/sidebar', :locals => {:title =>
'Commands'} do %>
<% if @sprint %>
<%= link_to "View sprint",
product_sprint_path(@product, @sprint), :class => "command" %>
@@ -12,4 +12,4 @@
plan_product_sprint_path(@product, @sprint), :class => "command"
%>
<% end %>
<% end %>
-</div>
+<% end %>
diff --git a/app/views/items/show.html.erb b/app/views/items/show.html.erb
index c6c1263..9bc2fce 100644
--- a/app/views/items/show.html.erb
+++ b/app/views/items/show.html.erb
@@ -17,7 +17,7 @@
</div>
</div>
-<div id="sidebar">
+<% render :layout => 'home/sidebar', :locals => {:title =>
'Backlog Item Commands'} do %>
<%= link_to "View sprint",
product_sprint_path(@product, @sprint), :class => "command" %>
@@ -50,4 +50,4 @@
reopen_product_sprint_item_path(@product, @sprint, @backlog_item,
:url => request.request_uri), :confirm => "Reopen this item? Are you
sure?", :class => "command" %>
<% end %>
-</div>
+<% end %>
diff --git a/app/views/products/index.html.erb b/app/views/products/index.html.erb
index 222602e..9ed1404 100644
--- a/app/views/products/index.html.erb
+++ b/app/views/products/index.html.erb
@@ -48,7 +48,7 @@
</div>
</div>
-<div id="sidebar">
+<% render :layout => 'home/sidebar', :locals => {:title =>
"Commands"} do %>
<% if @project %>
<%= link_to "View parent project",
project_path(@project), :class => "command" %>
@@ -58,5 +58,4 @@
<%= link_to "Add new product...",
new_product_path(:project => @project.id), :class => "command"
%>
<% end %>
-</div>
-
+<% end %>
diff --git a/app/views/products/show.html.erb b/app/views/products/show.html.erb
index ce3b941..db89399 100644
--- a/app/views/products/show.html.erb
+++ b/app/views/products/show.html.erb
@@ -17,7 +17,7 @@
</div>
</div>
-<div id="sidebar">
+<% render :layout => 'home/sidebar', :locals => {:title =>
"Product Commands"} do %>
<%= link_to "View parent project",
project_path((a)product.project), :class => "command" %>
@@ -31,10 +31,4 @@
<%= link_to "Sprints (#{(a)product.sprints.size} total)",
product_sprints_path(@product), :class => "command" %>
-
- <div>
- <dl>
- <dt>Reports</dt>
- </dl>
- </div>
-</div>
+<% end %>
diff --git a/app/views/projects/_edit.html.erb b/app/views/projects/_edit.html.erb
index 48a2062..3709a70 100644
--- a/app/views/projects/_edit.html.erb
+++ b/app/views/projects/_edit.html.erb
@@ -50,6 +50,3 @@
</table>
<% end %>
</div>
-
-<div class="sidebar">
-</div>
diff --git a/app/views/projects/index.html.erb b/app/views/projects/index.html.erb
index 9df2d87..74781d2 100644
--- a/app/views/projects/index.html.erb
+++ b/app/views/projects/index.html.erb
@@ -37,8 +37,8 @@
</div>
</div>
-<div id="sidebar">
+<% render :layout => 'home/sidebar', :locals => {:title =>
'Options'} do %>
<% if @user %>
<%= link_to "Request A New Project", new_project_path, :class =>
"command" %>
<% end %>
-</div>
+<% end %>
diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb
index 9864ef2..440a1cc 100644
--- a/app/views/projects/show.html.erb
+++ b/app/views/projects/show.html.erb
@@ -23,8 +23,8 @@
</div>
</div>
-<div id="sidebar">
- <% if @project.can_edit?(@user) %>
+<% render :layout => 'home/sidebar', :locals => {:title =>
'Project Commands'} do %>
+ <% if @project.can_edit?(@user) %>
<%= link_to "Edit this project",
edit_project_path(@project), :class => "command" %>
<% end %>
@@ -39,13 +39,4 @@
<%= link_to "Show all products (#{(a)project.products.size} total)",
products_path(:project => @project), :class => "command" %>
- <div>
- <dl>
- <dt>Reports</dt>
- <dd>
- <ul class="options">
- </ul>
- </dd>
- </dl>
- </div>
-</div>
+<% end %>
diff --git a/app/views/sprints/index.html.erb b/app/views/sprints/index.html.erb
index 5087c3f..7a00032 100644
--- a/app/views/sprints/index.html.erb
+++ b/app/views/sprints/index.html.erb
@@ -39,7 +39,7 @@
</div>
</div>
-<div id="sidebar">
+<% render :layout => 'home/sidebar', :locals => {:title =>
'Commands'} do %>
<%= link_to "View parent product",
product_path(@product), :class => "command" %>
@@ -47,4 +47,4 @@
<%= link_to "Create sprint...",
new_product_sprint_path(@product), :class => "command" %>
<% end %>
-</div>
+<% end %>
diff --git a/app/views/sprints/show.html.erb b/app/views/sprints/show.html.erb
index 37f6d7c..38988b1 100644
--- a/app/views/sprints/show.html.erb
+++ b/app/views/sprints/show.html.erb
@@ -17,7 +17,7 @@
</div>
</div>
-<div id="sidebar">
+<% render :layout => 'home/sidebar', :locals => {:title =>
'Sprint Commands'} do %>
<%= link_to "View parent product",
product_path(@product), :class => "command" %>
@@ -26,12 +26,19 @@
edit_product_sprint_path(@product, @sprint), :class => "command"
%>
<% end %>
+ <%= link_to "View sprint members (#{(a)sprint.members.size} total
members)...",
+ members_product_sprint_path(@product, @sprint), :class => "command"
%>
+ <%= link_to "View sprint backlog (#{(a)sprint.backlog_items.size} total
items)...",
+ product_sprint_items_path(@product, @sprint), :class => "command"
%>
+
<% if @sprint.can_edit?(@user) %>
<% if @sprint.can_populate?(@user) %>
<%= link_to "Plan this sprint...",
plan_product_sprint_path(@product, @sprint), :class => "command"
%>
<% end %>
+ <div class="header"><span class="title">Change Sprint
Status</span></div>
+
<% if @sprint.allowed_status?(Sprint::STATUS_PLANNED) %>
<%= link_to "Move sprint back to planning...",
status_product_sprint_path(@product, @sprint, :status =>
Sprint::STATUS_PLANNED),
@@ -60,11 +67,5 @@
:class => "command" %>
<% end %>
-
<% end %>
-
- <%= link_to "View sprint members (#{(a)sprint.members.size} total
members)...",
- members_product_sprint_path(@product, @sprint), :class => "command"
%>
- <%= link_to "View sprint backlog (#{(a)sprint.backlog_items.size} total
items)...",
- product_sprint_items_path(@product, @sprint), :class => "command"
%>
-</div>
+<% end %>
diff --git a/app/views/stories/index.html.erb b/app/views/stories/index.html.erb
index 2c19a5a..af56881 100644
--- a/app/views/stories/index.html.erb
+++ b/app/views/stories/index.html.erb
@@ -39,7 +39,7 @@
</div>
</div>
-<div id="sidebar">
+<% render :layout => 'home/sidebar', :locals => {:title =>
'Commands'} do %>
<%= link_to "Return to product page...",
product_path(@product), :class => "command" %>
@@ -47,4 +47,4 @@
<%= link_to "Write user stories...",
new_product_story_path(@product), :class => "command" %>
<% end %>
-</div>
+<% end %>
diff --git a/app/views/stories/show.html.erb b/app/views/stories/show.html.erb
index 9e707ea..c0b8013 100644
--- a/app/views/stories/show.html.erb
+++ b/app/views/stories/show.html.erb
@@ -7,7 +7,7 @@
</div>
</div>
-<div id="sidebar">
+<% render :layout => 'home/sidebar', :locals => {:title => 'User
Story Commands'} do %>
<%= link_to "Return to user stories list...",
product_stories_path(@product), :class => "command" %>
@@ -15,4 +15,4 @@
<%= link_to "Edit user story...",
edit_product_story_path(@product, @user_story), :class => "command"
%>
<% end %>
-</div>
+<% end %>
diff --git a/app/views/tasks/show.html.erb b/app/views/tasks/show.html.erb
index 486d7a5..60d9ca4 100644
--- a/app/views/tasks/show.html.erb
+++ b/app/views/tasks/show.html.erb
@@ -13,7 +13,7 @@
</div>
</div>
-<div id="sidebar">
+<% render :layout => 'home/sidebar', :locals => {:title => 'Task
Commands'} do %>
<%= link_to "View backlog item",
product_sprint_item_path(@product, @sprint, @backlog_item), :class =>
"command" %>
@@ -27,4 +27,4 @@
user_task_path((a)task.primary, @task), :method => :delete,
:confirm => "Delete this task? Are you sure?", :class =>
"command" %>
<% end %>
-</div>
+<% end %>
diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb
index 9440abe..e08b04c 100644
--- a/app/views/users/index.html.erb
+++ b/app/views/users/index.html.erb
@@ -28,6 +28,3 @@
</table>
</div>
-<div id="sidebar">
-</div>
-
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
index 3c75f53..6762daa 100644
--- a/app/views/users/show.html.erb
+++ b/app/views/users/show.html.erb
@@ -25,7 +25,7 @@
</div>
</div>
-<div id="sidebar">
+<% render :layout => 'home/sidebar', :locals => {:title => 'User
Commands'} do %>
<% if @this_user.can_edit?(@user) %>
<%= link_to "Edit #{(a)this_user.id == @user.id ? 'your details' :
'this user'}",
edit_user_path(@this_user), :class => "command" %>
@@ -35,4 +35,4 @@
<%= link_to "Change password",
password_user_path(@this_user), :class => "command" %>
<% end %>
-</div>
+<% end %>
diff --git a/public/stylesheets/sidebar.css b/public/stylesheets/sidebar.css
index e5e0444..592dc65 100644
--- a/public/stylesheets/sidebar.css
+++ b/public/stylesheets/sidebar.css
@@ -1,16 +1,74 @@
+/* rounded corners */
+
+div#sidebar #interior {
+ padding: 5px;
+}
+
+.b1h, .b2h, .b3h, .b4h, .b2bh, .b3bh, .b4bh {
+ font-size:1px;
+ overflow:hidden;
+ display:block;
+}
+
+.b1h {
+ height:1px;
+ background:#f00;
+ margin:0 5px;
+}
+
+.b2h, .b2bh {
+ height:1px;
+ background:#f00;
+ border-right:2px solid #f00;
+ border-left:2px solid #f00;
+ margin:0 3px;
+}
+
+.b3h, .b3bh {
+ height:1px;
+ background:#f00;
+ border-right:1px solid #f00;
+ border-left:1px solid #f00;
+ margin:0 2px;
+}
+
+.b4h, .b4bh {
+ height:2px;
+ background:#f00;
+ border-right:1px solid #f00;
+ border-left:1px solid #f00;
+ margin:0 1px;
+}
+
+.b2bh, .b3bh, .b4bh {
+ background: #f00;
+}
+
+div#sidebar .header {
+ background: #f00;
+ border-right:1px solid #f00;
+ border-left:1px solid #f00;
+}
+
+div#sidebar .header span.title {
+ color: #ff0;
+ margin: 0px 10px 0px 10px;
+ padding-bottom: 3px;
+ font-weight: bold;
+ text-align: center;
+ text-transform: uppercase;
+}
+
div#sidebar a.command {
text-align: left;
text-indent: 25px;
text-decoration: none;
- width: 90%;
- margin-left: 5%;
+ width: 100%;
display: block;
padding: 2px 0px 3px 0px;
background: #f00;
color: #fff;
font-weight: bold;
- border-bottom: 1px solid #000;
- border-right: 1px solid #000;
}
div#sidebar a.command:hover {
diff --git a/public/stylesheets/tables.css b/public/stylesheets/tables.css
index 784cfb0..839a827 100644
--- a/public/stylesheets/tables.css
+++ b/public/stylesheets/tables.css
@@ -122,3 +122,4 @@ table.edit td.value {
padding-right: 15px;
text-align: left;
}
+
--
1.6.2