Updated db files to reflect new column in projects table.

git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@92 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
bsag 2005-05-29 12:57:44 +00:00
parent 8a08515227
commit e202abac89
7 changed files with 11 additions and 8 deletions

View file

@ -17,7 +17,7 @@ class ProjectController < ApplicationController
#
def list
@page_title = "TRACKS::List Projects"
@projects = Project.find(:all, :conditions => nil, :order => "position ASC")
@projects = Project.find(:all, :conditions => nil, :order => "done ASC, position ASC")
end
# Filter the projects to show just the one passed in the URL

View file

@ -25,7 +25,7 @@
<% end %>
<%= link_to_function(image_tag( "edit", :title => "Edit item", :width=>"10", :height=>"10", :border=>"0"), "Element.toggle('context-#{context.id}','context-#{context.id}-edit-form'); new Effect.Appear('context-#{context.id}-edit-form'); Form.focus_first('form-context-#{context.id}');" ) + " " +
link_to_remote( image_tag("delete", :title =>"Delete this context"),
link_to_remote( image_tag("delete", :title =>"Delete this context", :height=>"10", :width=>"10", :border=>"0"),
:update => "context-#{context.id}-container",
:loading => "new Effect.Squish('context-#{context.id}-container')",
:url => { :controller => "context", :action => "destroy", :id => context.id }, :confirm => "Are you sure that you want to delete the context \'#{context.name}\'?" ) %>

View file

@ -24,7 +24,7 @@
<% end -%>
<%= link_to_function(image_tag( "edit", :title => "Edit item", :width=>"10", :height=>"10", :border=>"0"), "Element.toggle('project-#{project.id}','project-#{project.id}-edit-form'); new Effect.Appear('project-#{project.id}-edit-form'); Form.focus_first('form-project-#{project.id}');" ) + " " +
link_to_remote( image_tag("delete", :title =>"Delete this project"),
link_to_remote( image_tag("delete", :title =>"Delete this project",:width=>"10", :height=>"10", :border=>"0"),
:update => "project-#{project.id}-container",
:loading => "new Effect.Squish('project-#{project.id}-container')",
:url => { :controller => "project", :action => "destroy", :id => project.id }, :confirm => "Are you sure that you want to delete the project \'#{project.name}\'?" ) %>

View file

@ -24,9 +24,9 @@ INSERT INTO contexts (id,name,hide, position) VALUES (11,'waiting-for',0, 8);
-- Dump of table projects
-- ------------------------------------------------------------
INSERT INTO projects (id,name, position) VALUES (1,'Build a working time machine', 0);
INSERT INTO projects (id,name, position) VALUES (2,'Make more money than Billy Gates', 1);
INSERT INTO projects (id,name, position) VALUES (3,'Evict dinosaurs from the garden', 2);
INSERT INTO projects (id,name,position,done) VALUES (1,'Build a working time machine',1,0);
INSERT INTO projects (id,name,position,done) VALUES (2,'Make more money than Billy Gates',2,0);
INSERT INTO projects (id,name,position,done) VALUES (3,'Evict dinosaurs from the garden',3,0);
-- Dump of table todos

View file

@ -18,6 +18,7 @@ create table projects (
id serial not null,
name varchar(255) not null default '',
position int NOT NULL,
done int not null default 0,
primary key (id)
);

View file

@ -8,7 +8,7 @@ CREATE TABLE 'contexts' (
'id' INTEGER PRIMARY KEY,
'name' varchar(255) NOT NULL default '',
'hide' tinyint(4) NOT NULL default '0',
position int NOT NULL
'position' int NOT NULL
) ;
@ -19,7 +19,8 @@ CREATE TABLE 'contexts' (
CREATE TABLE 'projects' (
'id' INTEGER PRIMARY KEY,
'name' varchar(255) NOT NULL default '',
position int NOT NULL
'position' int NOT NULL,
'done' tinyint(4) NOT NULL default '0'
) ;

View file

@ -27,6 +27,7 @@ CREATE TABLE `projects` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(255) NOT NULL default '',
`position` int(11) NOT NULL,
`done` tinyint(4) NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM;