I'm using the Projects view to play around with a new layout for the
site. I'm dialing back the amount and layout of information on the site
to make it more visually appealing.
This patch is looking for feedback more than an ACK.
Signed-off-by: Darryl L. Pierce <mcpierce(a)gmail.com>
---
app/controllers/projects_controller.rb | 31 +++----
app/views/home/error.html.erb | 5 +
app/views/layouts/default.html.erb | 72 ++++++++---------
app/views/products/_shortlist.html.erb | 15 ++++
app/views/projects/_edit.html.erb | 108 +++++++++++-------------
app/views/projects/index.html.erb | 118 +++++++++------------------
app/views/projects/show.html.erb | 90 ++++++++++++---------
db/migrate/003_create_projects.rb | 2 +-
public/stylesheets/details.css | 65 ++-------------
public/stylesheets/forms.css | 44 +----------
public/stylesheets/navbar.css | 5 +-
public/stylesheets/projxp.css | 62 +++++++++++----
public/stylesheets/tables.css | 76 +++++++++++++++++
test/functional/projects_controller_test.rb | 11 ---
14 files changed, 343 insertions(+), 361 deletions(-)
create mode 100644 app/views/products/_shortlist.html.erb
create mode 100644 public/stylesheets/tables.css
diff --git a/app/controllers/projects_controller.rb
b/app/controllers/projects_controller.rb
index 4b561cc..e13c6e8 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -23,16 +23,15 @@ class ProjectsController < ApplicationController
before_filter :load_project, :except => [:index, :new, :create, :destroy]
before_filter :filter_approved, :only => [:approve, :reject]
before_filter :can_approve, :only => [:approve, :reject]
- before_filter :setup_for_edit, :only => [:new, :create, :edit]
+ before_filter :setup_for_edit, :only => [:new, :create, :edit, :update]
# GET /projects
def index
@title = "All Projects"
- conditions = 'approved = true'
- conditions = "#{conditions} or approved = false" if @user &&
@user.can_create_projects?
+ @order = "id"
@projects = Project.paginate(:page => params[:page],
:per_page => 10,
- :conditions => conditions)
+ :order => @order)
respond_to do |format|
format.html
@@ -96,21 +95,17 @@ class ProjectsController < ApplicationController
def update
respond_to do |format|
if @project.can_edit?(@user)
- begin
- Project.transaction do
- @project.update_attributes(params[:project])
- if @project.save!
- flash[:message] = "Project was successfully updated."
- format.html { redirect_to params[:source] ? params[:source] :
project_path(@project) }
- else
- @title = "#{(a)project.name} (Edit)"
- @project.valid?
- format.html { render :action => 'edit'}
- end
+ @project.update_attributes(params[:project])
+ puts "PROJECT UPDATED"
+ Project.transaction do
+ if @project.save
+ flash[:message] = "Project was successfully updated."
+ format.html { redirect_to params[:source] ? params[:source] :
project_path(@project) }
+ else
+ @title = "#{(a)project.name} (Edit)"
+ @project.valid?
+ format.html { render :action => 'edit'}
end
- rescue Exception => error
- flash[:error] = "ERROR: #{error.message}"
- format.html { redirect_to error_url }
end
else
flash[:error] = "You are not authorized to edit this project."
diff --git a/app/views/home/error.html.erb b/app/views/home/error.html.erb
index 139597f..08ffb82 100644
--- a/app/views/home/error.html.erb
+++ b/app/views/home/error.html.erb
@@ -1,2 +1,7 @@
+<% if flash[:error] %>
+<div id="errors">
+ <%= flash[:error] %>
+</div>
+<% end %>
diff --git a/app/views/layouts/default.html.erb b/app/views/layouts/default.html.erb
index c765abe..a8b508e 100644
--- a/app/views/layouts/default.html.erb
+++ b/app/views/layouts/default.html.erb
@@ -9,50 +9,48 @@
<%= stylesheet_link_tag "lists.css" %>
<%= stylesheet_link_tag "forms.css" %>
<%= stylesheet_link_tag "details.css" %>
+ <%= stylesheet_link_tag "tables.css" %>
</head>
<body>
- <ul id="user-bar">
- <% if @user %>
- <li id="t-dashboard"><%= link_to
"#{(a)user.display_name}", dashboard_url %></li>
- <li id="t-logout"><%= link_to "Logout", logout_path
%></li>
- <% else %>
- <li id="t-login"><%= link_to "Login", login_path
%></li>
- <li id="t-register"><%= link_to "Register",
register_path %></li>
+ <div id="wrap">
+ <div id="header">
+ <div id="user-bar">
+ <ul id="user-bar">
+ <% if @user %>
+ <li id="t-dashboard"><%= link_to
"#{(a)user.display_name}", dashboard_url %></li>
+ <li id="t-logout"><%= link_to "Logout", logout_path
%></li>
+ <% else %>
+ <li id="t-login"><%= link_to "Login", login_path
%></li>
+ <li id="t-register"><%= link_to "Register",
register_path %></li>
+ <% end %>
+ </ul>
+ </div>
+
+ <div id="logo-box">
+ <%= link_to "ProjXP", 'http://projxp.fedorahosted.org/' %>
+ </div>
+
+ <ul id="site-nav">
+ <li><%= link_to "Home", :controller => :home %></li>
+ <li><%= link_to "Projects (#{@project_count})", projects_path
%></li>
+ <li><%= link_to "Products (#{@product_count})", products_path
%></li>
+ <li><%= link_to "Users (#{@user_count})", users_path
%></li>
+ <li><%= link_to "Reports", :controller => :report, :action =>
:index %></li>
+ </ul>
+ </div>
+
+ <% if flash[:message] %>
+ <div id="messages">
+ <%= flash[:message] %>
+ </div>
<% end %>
- </ul>
- <div id="logo-box">
- <%= link_to "ProjXP", 'http://projxp.fedorahosted.org/' %>
- </div>
-
- <ul id="site-nav">
- <li><%= link_to "Home", :controller => :home
%></li>
- <li><%= link_to "Projects (#{@project_count})", projects_path
%></li>
- <li><%= link_to "Products (#{@product_count})", products_path
%></li>
- <li><%= link_to "Users (#{@user_count})", users_path
%></li>
- <li><%= link_to "Reports", :controller => :report, :action
=> :index %></li>
- </ul>
-
- <% if flash[:message] %>
- <div id="messages">
- <%= flash[:message] %>
- </div>
- <% end %>
-
- <% if flash[:error] %>
- <div id="errors">
- <%= flash[:error] %>
- </div>
- <% end %>
-
- <div id="content">
<%= yield :layout %>
- </div>
- <div id="footer">
- Copyright © 2006-2008, Darryl L. Pierce. Usage subject to licensing
agreement.
+ <div id="footer">
+ Copyright © 2006-2008, Darryl L. Pierce. Usage subject to licensing agreement.
+ </div>
</div>
-
</body>
</html>
diff --git a/app/views/products/_shortlist.html.erb
b/app/views/products/_shortlist.html.erb
new file mode 100644
index 0000000..0749aba
--- /dev/null
+++ b/app/views/products/_shortlist.html.erb
@@ -0,0 +1,15 @@
+<table>
+ <caption>Product List</caption>
+ <thead>
+ <th scope="col">#</th>
+ <th scope="col" class="name">Name</th>
+ </thead>
+ <tbody>
+ <% @products.each do |product| %>
+ <tr class="<%= cycle('odd', 'even') %>">
+ <td><%= product.id %></td>
+ <td class="name"><%= link_to product.name, product_path(product)
%></td>
+ </tr>
+ <% end %>
+ </tbody>
+</table>
diff --git a/app/views/projects/_edit.html.erb b/app/views/projects/_edit.html.erb
index 72bd335..3709a70 100644
--- a/app/views/projects/_edit.html.erb
+++ b/app/views/projects/_edit.html.erb
@@ -1,62 +1,52 @@
-<fieldset id="project">
- <legend>Edit Project</legend>
-
+<div id="content">
<% html = @project.new_record? ? {:method => :post} : {:method => :put} %>
-
<% form_for :project, @project, :url => project_path(@project), :html => html
do |form| %>
-
- <%= hidden_field_tag :source, @source if @source %>
-
- <table class="edit">
- <colgroup>
- <col class="label" />
- <col class="value" />
- </colgroup>
-
- <tbody>
- <tr>
- <td class="label-required">Project name</td>
- <td class="value">
- <%= form.text_field :name %>
- <%= error_message_on(:project, :name) %>
- </td>
- </tr>
-
- <tr>
- <td class="label">Website</td>
- <td class="value">
- <%= form.text_field :url %>
- <%= error_message_on(:project, :url) %>
- </td>
- </tr>
-
- <tr>
- <td class="label-required">Owner</td>
- <td class="value">
- <%= collection_select :project, :owner_id, @users, :id,
- :display_name, {:include_blank => false} %>
- <%= error_message_on(:project, :owner) %>
- </td>
- </tr>
-
- <tr>
- <td class="label">Description</td>
- <td class="value">
- <%= form.text_area :description %>
- <%= error_message_on(:project, :description) %>
- </td>
- </tr>
-
- <tr>
- <td class="buttons" colspan="2">
- <% if @project.new_record? %>
- <%= submit_tag "Create", :class => 'button' %>
- <% else %>
- <%= submit_tag "Update", :class => 'button' %>
- <% end %>
- </td>
- </tr>
- </tbody>
- </table>
+ <%= hidden_field_tag :source, @source if @source %>
+ <table class="edit">
+ <caption><%= "#{(a)project.new_record? ? 'Create' :
'Edit'} A Project" %></caption>
+ <tbody>
+ <tr>
+ <td class="label-required">Project name:</td>
+ <td class="value">
+ <%= form.text_field :name, :size => 50, :maxlength => 50 %>
+ <%= error_message_on(:project, :name) %>
+ </td>
+ </tr>
+ <tr>
+ <td class="label">Website:</td>
+ <td class="value">
+ <%= form.text_field :url, :size => 50, :maxlength => 255 %>
+ <%= error_message_on(:project, :url) %>
+ </td>
+ </tr>
+ <tr>
+ <td class="label-required">Owner:</td>
+ <td class="value">
+ <%= collection_select :project, :owner_id, @users, :id,
+ :display_name, {:include_blank => false} %>
+ <%= error_message_on(:project, :owner) %>
+ </td>
+ </tr>
+ <tr>
+ <td class="label">
+ Description:<br />
+ (You can use wiki markup.)
+ </td>
+ <td class="value">
+ <%= form.text_area :description, :cols => 100, :rows => 10 %>
+ <%= error_message_on(:project, :description) %>
+ </td>
+ </tr>
+ <tr>
+ <td class="buttons" colspan="2">
+ <% if @project.new_record? %>
+ <%= submit_tag "Create", :class => 'button' %>
+ <% else %>
+ <%= submit_tag "Update", :class => 'button' %>
+ <% end %>
+ </td>
+ </tr>
+ </tbody>
+ </table>
<% end %>
-</fieldset>
+</div>
diff --git a/app/views/projects/index.html.erb b/app/views/projects/index.html.erb
index 5f196a4..8ae5108 100644
--- a/app/views/projects/index.html.erb
+++ b/app/views/projects/index.html.erb
@@ -1,82 +1,38 @@
-<table class="detail">
- <colgroup>
- <col class="label" />
- <col class="value" />
- </colgroup>
-
- <tbody>
- <tr>
- <td class="toolbar" colspan="2">
- <%= link_to(image_tag("icons/new.png", :title => "Create a
new project..."),
- new_project_path) if @user %>
- </td>
- </tr>
- </tbody>
-</table>
-
-<%= will_paginate @projects %>
-
-<table class="list">
- <colgroup>
- <col class="row_id" />
- <col class="name" />
- <col class="description" />
- <col class="user" />
- <col class="date" />
- <col class="actions" />
- </colgroup>
- <thead>
- <tr>
- <th class="title" colspan="6">Projects</th>
- </tr>
- <tr>
- <th>#</th>
- <th>Name</th>
- <th>Description</th>
- <th>Owner</th>
- <th>Created</th>
- <th>Actions</th>
- </tr>
- </thead>
-
- <tbody>
- <% if @projects.empty? %>
- <tr><td colspan="6">There are no projects
defined.</td></tr>
- <% else %>
- <% @projects.each_with_index do |project, i| %>
- <% row_class = i%2 == 0 ? 'even' : 'odd' %>
-
- <tr class="<%= row_class %>">
- <td class="row_id"><%= "#{project.id}"
%></td>
- <td>
- <%= project.name %>
- <%= project.approved ? "" : " (Pending)" %>
- </td>
- <td><%= RedCloth.new(get_first_sentence(project.description)).to_html
%></td>
- <td><%= link_to project.owner.display_name, user_path(project.owner)
%></td>
- <td><%= show_date(project.created_at) %></td>
- <td>
- <%= link_to(image_tag("icons/view.png", :title => "View
this project..."),
- project_path(project)) %>
-
- <%= link_to(image_tag("icons/edit.png", :title => "Edit
this project..."),
- edit_project_path(project, :source => request.request_uri)) if
project.can_edit?(@user)%>
-
- <% unless project.approved %>
- <%= link_to(image_tag("icons/approve.png", :title => "Approve
this project..."),
- approve_project_path(project), :method => :put,
- :confirm => "Approve this project? Are you sure?") if
project.can_approve?(@user)
- %>
-
- <%= link_to(image_tag("icons/reject.png", :title => "Reject
this project..."),
- reject_project_path(project), :method => :put,
- :confirm => "Reject this project? Are you sure?") if
project.can_approve?(@user)
- %>
+<div>
+ <div>
+ <%= will_paginate @projects %>
+ </div>
+ <div>
+ <table class="main-list">
+ <caption>List Of Projects</caption>
+ <thead>
+ <tr>
+ <th scope="col">#</th>
+ <th scope="col" class="name">Project Name</th>
+ <th scope="col">Epics</th>
+ <th scope="col">Products</th>
+ <th scope="col">Owner</th>
+ <th scope="col">Created</th>
+ </tr>
+ </thead>
+ <tbody>
+ <% @projects.each do |project| %>
+ <tr class="<%= cycle('odd', 'even') %>">
+ <td><%= project.id %></td>
+ <td class="name">
+ <%= link_to project.name, project_path(project) %>
+ <% if project.description %>
+ <%= RedCloth.new(get_first_sentence(project.description)).to_html %>
<% end %>
- </td>
- </tr>
-
- <% end %>
- <% end %>
- </tbody>
-</table>
+ <% if project.url %><%= link_to "Homepage", project.url
%><% end %>
+ </td>
+ <td>0</td>
+ <td><%= project.products.count %></td>
+ <td><%= link_to project.owner.display_name, user_path(project.owner)
%></td>
+ <td><%= show_date project.created_at, false %></td>
+ </tr>
+ <% end %>
+ </tbody>
+ </table>
+ </div>
+</div>
diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb
index 01e65d4..1d3f198 100644
--- a/app/views/projects/show.html.erb
+++ b/app/views/projects/show.html.erb
@@ -1,44 +1,58 @@
-<table class="detail">
- <colgroup>
- <col class="label" />
- <col class="value" />
- </colgroup>
+<div id="content">
+ <div id="page-details">
+ <div id="menubar">
+ <ul>
+ <li><%= link_to("Epics (0 total)","#") %></li>
- <thead>
- <tr>
- <th class="title" colspan="2"><%= "Details For
#{(a)project.name}" %></th>
- </tr>
- </thead>
+ <li><%= link_to("Products (#{(a)project.products.size} total)",
products_path(:project => @project)) %></li>
- <tbody>
- <tr>
- <td class="toolbar" colspan="2">
- <%= link_to(image_tag("icons/add.png", :title => "Request a new
project..."), new_project_path) if @user %>
- <%= link_to(image_tag("icons/back.png", :title =>
"Back..."),
- projects_path) %>
- <%= link_to(image_tag("icons/edit.png", :title => "Edit this
project..."),
- edit_project_path(@project)) if @project.can_edit?(@user) %>
- <%= link_to(image_tag("icons/new.png", :title => "Create a
new product..."),
- new_product_path(:project => @project)) if
@project.can_create_products?(@user) && @project.approved %>
- </td>
- </tr>
+ <% if @project.can_edit?(@user) %>
+ <li><%= link_to("Edit this project", edit_project_path(@project))
%></li>
+ <% end %>
- <tr>
- <td class="label">Owner:</td>
- <td class="value"><%= link_to @project.owner.display_name,
user_path((a)project.owner) %></td>
- </tr>
+ </ul>
+ </div>
+ <div style="clear:both;">
+ <dl>
+ <dt>Owner</dt>
+ <dd><%= link_to @project.owner.display_name, user_path((a)project.owner)
%></dd>
- <tr>
- <td class="label">Homepage:</td>
- <td class="value"><%= link_to_homepage @project %>
- </tr>
+ <dt>Project homepage</dt>
+ <dd>
+ <% if @project.url %>
+ <%= link_to @project.url, @project.url %>
+ <% else %>
+ Not provided.
+ <% end %>
+ </dd>
- <tr>
- <td class="text" colspan="2">
- <%= RedCloth.new((a)project.description).to_html %>
- </td>
- </tr>
- </tbody>
-</table>
+ <dt>Description</dt>
+ <dd>
+ <% if @project.description %>
+ <%= RedCloth.new((a)project.description).to_html %>
+ <% end %>
+ </dd>
+ </dl>
+ </div>
+ </div>
+</div>
-<%= render :partial => 'products/list', :locals => {:project =>
@project} %>
+<div id="navigation">
+ <div>
+ <dl>
+ <dt>Reports</dt>
+ <dd>
+ <ul>
+ <li>Overall sprint status</li>
+ </ul>
+ </dd>
+ <dt>RSS Feeds</dt>
+ <dd>
+ <ul>
+ <li>Sprint updates</li>
+ <li>Epics</li>
+ </ul>
+ </dd>
+ </dl>
+ </div>
+</div>
diff --git a/db/migrate/003_create_projects.rb b/db/migrate/003_create_projects.rb
index 14de0b0..eba15f6 100644
--- a/db/migrate/003_create_projects.rb
+++ b/db/migrate/003_create_projects.rb
@@ -23,7 +23,7 @@ class CreateProjects < ActiveRecord::Migration
t.timestamps
end
-
+
add_index :projects, :name, :unique => true
execute 'alter table projects add constraint fk_project_owner
diff --git a/public/stylesheets/details.css b/public/stylesheets/details.css
index 515b06e..070d8aa 100644
--- a/public/stylesheets/details.css
+++ b/public/stylesheets/details.css
@@ -1,65 +1,18 @@
-table.detail col.label {
- min-width: 25%;
+#page-details {
+ clear: both;
+ margin: 5px;
}
-table.detail col.value {
- width: 90%;
-}
-
-table.detail {
- width: 100%;
- padding: 5px 15px 5px 15px;
-}
-
-table.detail th.title, table.detail td.title {
+#page-details dt {
+ font-size: larger;
font-weight: bold;
- text-align: center;
- border-bottom: 1px solid #000000;
- background-color: #f3f3f3;
-}
-
-table.detail td.label {
- padding-left: 50px;
- background-color: #ffffff;
- color: #070707;
- font-weight: bold;
- text-align: right;
-}
-
-table.detail td.value {
- width: 100%;
+ color: #0e0e0e;
}
-table.detail td.text {
+#page-details dd {
font-size: 90%;
- padding: 5px 10px 1px 10px;
-}
-
-table.detail td.user_details {
- width: 300px;
- padding: 10px 0;
- border: 2px solid #ccdd2;
-}
-
-table.detail td.user_details dl {
- margin: 10px 20px;
- padding: 0;
-}
-
-table.detail td.user_details dt {
- margin: 0;
- padding: 0;
- font-size: 130%;
- letter-spacing: 1px;
-}
-
-table.detail td.user_details dd {
- margin: 0;
- padding: 0;
- font-size: 85%;
- line-height: 1.5em;
}
-table.detail td.user_details dd img {
- float:left;
+#page-details dd a {
+ color: #0f0f0f;
}
diff --git a/public/stylesheets/forms.css b/public/stylesheets/forms.css
index 07dc248..d021d2b 100644
--- a/public/stylesheets/forms.css
+++ b/public/stylesheets/forms.css
@@ -1,5 +1,5 @@
.formError {
- color: #ff0000;
+ color: #7f0000;
font-weight: bold;
}
@@ -16,44 +16,4 @@ legend {
color: #ffffff;
padding: 2px 6px;
font-weight: bold;
-}
-
-table.edit {
- table-layout: fixed;
-}
-
-table.edit col.label {
- width: 15em;
-}
-
-table.edit col.value {
- width: 100%;
-}
-
-table.edit {
- width: 700px;
- padding: 5px 15px 5px 15px;
- margin: 15px 0px 0px 15px;
-}
-
-table.edit td.label, table.edit td.label-required {
- text-align: right;
- font-weight: bold;
-
- color: #0f0f0f;
-
- padding: 1px 5px 1px 15px;
-}
-
-table.edit td.label-required:before {
- color: #ff0000;
- content: "* ";
-}
-
-table.edit td.label:after, table.edit td.label-required:after {
- content: ":";
-}
-
-table.edit input {
- border: 1px groove #000000;
-}
+}
\ No newline at end of file
diff --git a/public/stylesheets/navbar.css b/public/stylesheets/navbar.css
index 9b3dcd9..a054b8b 100644
--- a/public/stylesheets/navbar.css
+++ b/public/stylesheets/navbar.css
@@ -15,11 +15,11 @@
color: #ffff00;
}
-#user-bar {
+#user-bar ul {
right: 0;
width: auto;
- position: absolute;
list-style: none;
+ right: 0px;
}
#site-nav {
@@ -49,7 +49,6 @@
#logo-box {
padding: 5px 0 10px 25px;
clear: left;
- width: 100%;
font-size: 300%;
font-weight: bold;
background-color: #336699;
diff --git a/public/stylesheets/projxp.css b/public/stylesheets/projxp.css
index d18d5a5..c1ec4ba 100644
--- a/public/stylesheets/projxp.css
+++ b/public/stylesheets/projxp.css
@@ -1,7 +1,7 @@
body {
- height: 100%;
- width: 100%;
+ background: #070707;
margin: 0;
+ padding-left: 50px;
font-family: arial,sans-serif;
font-size: small;
}
@@ -10,28 +10,45 @@ img {
border: 0px;
}
-table {
- border-spacing: 0;
+#wrap {
+ background-color: #fff;
+ margin-left: 5%;
+ width: 90%;
+ min-width: 750px;
+ max-width: 1200px;
+}
+
+#header {
+ background: #369;
+}
+
+#user-bar {
+ float: right;
+}
+
+#content {
+ float: left;
+ width: 70%;
}
-tr {
- vertical-align: top;
+#navigation {
+ float: right;
+ width: 30%;
+ background-color: #ff0;
}
-td {
- padding: 0px 5px 0px 5px;
+#content > div, #navigation > div {
+ padding: 5px 10px;
}
-table .toolbar {
- text-align: right;
- padding-right: 15px;
+#sidebar table {
+ font-size: smaller;
}
#footer {
- width: 100%;
- border-top: 1px solid #000000;
- font-size: 100%;
- border-top: solid 1px #000000;
+ clear: both;
+ background: #cc9;
+ padding: 5px 0px 10px 0px;
text-align: center;
}
@@ -41,6 +58,21 @@ div.pagination {
font-weight: bold;
}
+#menubar {
+ float: left;
+}
+
+#menubar li {
+ float: left;
+ margin: 0;
+ list-style: none;
+}
+
+#menubar li a {
+ text-decoration: none;
+ padding-left: 25px;
+}
+
div#errors, div#messages {
width: 90%;
margin: 10px 0px 10px 5%;
diff --git a/public/stylesheets/tables.css b/public/stylesheets/tables.css
new file mode 100644
index 0000000..ab63c3c
--- /dev/null
+++ b/public/stylesheets/tables.css
@@ -0,0 +1,76 @@
+tr {
+ vertical-align: top;
+}
+
+td {
+ padding: 5px;
+ text-align: center;
+}
+
+table caption {
+ margin: 0;
+ padding: 8px 20px;
+ text-align: left;
+ border-bottom: none;
+}
+
+table .name {
+ text-align: left;
+}
+
+table tr.odd {
+ background: #e6e6e6;
+}
+
+table tr.even {
+ background: #f1f1f1;
+}
+
+table td a {
+ display: block;
+ font-weight: bold;
+}
+
+/* lists that are the primary page content */
+
+table.main-list {
+ font-size: 90%;
+ width: 100%;
+ background: #fff;
+}
+
+table.main-list thead tr th {
+ background-color: #7f7fff;
+ font-size: larger;
+}
+
+/* edit table styles */
+
+table.edit {
+ border: 0;
+ border-collapse: collapse;
+ background-color: #f0f0f0;
+}
+
+table.edit caption {
+ background-color: #f0f0f0;
+ font-weight: bold;
+ text-align: right;
+}
+
+table.edit td.label, table.edit td.label-required {
+ text-align: right;
+ font-size: smaller;
+ font-weight: bold;
+ padding-left: 15px;
+}
+
+table.edit td.label-required:before {
+ color: #ff0000;
+ content: "* ";
+ text-decoration: blink;
+}
+
+table.edit td.value {
+ padding-right: 15px;
+}
\ No newline at end of file
diff --git a/test/functional/projects_controller_test.rb
b/test/functional/projects_controller_test.rb
index 81312f3..4092d2f 100644
--- a/test/functional/projects_controller_test.rb
+++ b/test/functional/projects_controller_test.rb
@@ -55,17 +55,6 @@ class ProjectsControllerTest < ActionController::TestCase
assert_response :success
assert assigns['projects'], "Didn't load any projects."
- assigns['projects'].each do |project|
- assert project.approved?, "Unapproved projects should not be shown to normal
users."
- end
- end
-
- # Ensures that admins can see all projects, even those that aren't approved.
- def test_index_as_admin
- get :index, {}, {:user_id => @admin.id}
-
- assert_response :success
- assert assigns['projects'], "Didn't load any projects."
end
# Ensures that showing a single project requires an id.
--
1.6.0.6