Added in most of Tony Shadwick's patches. The main change is that projects now have an optional description field, in which you can describe the aims or main point of the project. If present, it's displayed just below the project name on the [tracks_url]/show/[project_name] page.

A placeholder page is also added for future configuration of users: [tracks_url]/user/index and [tracks_url]/user/admin. It doesn't do anything useful yet ;-).

I added the database changes as a migrate task, so running:

{{{
  rake migrate
}}}

at the command line inside your tracks directory will automatically update your database (if you are using either MySQL or PostgreSQL.

Fixes #84.


git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@137 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
bsag 2005-08-20 10:40:20 +00:00
parent 0a7a50c7c3
commit db7084dabe
10 changed files with 45 additions and 7 deletions

View file

@ -6,9 +6,17 @@
<%= @project.position %>
</div>
<div class="data">
<label for="project_name">Name</label>
<%= text_field 'project', 'name', :class => 'project-name' %>
<p>
<label for="project_done">Project done?</label>
<%= check_box 'project', 'done', :class => 'project-done' %>
</p>
<p>
<label for="project_name">Name:</label><br>
<%= text_field 'project', 'name', :class => 'project-name' %>
</p>
<p>
<label for="project_description">Description (optional):</label><br>
<%= text_area 'project', 'description', "cols" => 30, "rows" => 4, :class => 'project-description' %>
</p>
</div>
<% @project = nil %>

View file

@ -38,7 +38,7 @@
</div><!-- [end:project-project.id-display] -->
<div id="project-<%= project.id %>-edit-form" class="edit-form" style="display:none;">
<%= form_remote_tag :url => { :controller => 'project', :action => 'update', :id => project.id },
:html => { :id => "form-project-#{project.id}", :class => "inline-form" },
:html => { :id => "form-project-#{project.id}", :class => "form" },
:update => "project-#{project.id}-container",
:complete => "new Effect.Appear('project-#{project.id}-container');" %>
<%= render_partial 'project_form', project %>

View file

@ -16,9 +16,10 @@
:loading => "project.reset()",
:complete => "Form.focus_first('project-form');",
:html=> { :id=>'project-form', :name=>'project', :class => 'inline-form' } %>
<label for="project_name">Name</label>
<%= text_field 'project', 'name' %>
<input type="submit" value="Add" />
<label for="project_name">Name:</label><br />
<%= text_field 'project', 'name' %><br />
<label for="project_description">Description (optional):</label><br />
<%= text_area 'project', 'description', "cols" => 30, "rows" => 4 %> <input type="submit" value="Add" />
<%= end_form_tag %>
<!--[eoform:project]-->
</div>
@ -30,4 +31,4 @@
<div class="warning"><%= @flash["warning"] %></div>
<% end %>
</div><!- End of display_box -->
</div><!-- End of display_box -->

View file

@ -2,6 +2,9 @@
<div class="contexts">
<h2><%= @project.name %></h2>
<% if @project.description -%>
<div class="project_description"><%= @project.description %></div>
<% end -%>
<div id="next_actions">
<% if @project.done == 1 -%>

View file

@ -26,6 +26,7 @@ CREATE TABLE `projects` (
`position` int(11) NOT NULL default '0',
`done` tinyint(1) default '0',
`user_id` int(11) NOT NULL default '1',
`description` varchar(255) default '',
PRIMARY KEY (`id`)
) TYPE=InnoDB;

View file

@ -28,6 +28,7 @@ create table projects (
position int not null,
done int not null default 0,
user_id int not null default 1,
description varchar(255) default '',
primary key (id)
);

View file

@ -22,6 +22,7 @@ CREATE TABLE 'projects' (
'name' varchar(255) NOT NULL default '',
'position' int NOT NULL,
'done' tinyint(4) NOT NULL default '0',
'description' varchar(255) default '',
'user_id' int NOT NULL default '1'
) ;

View file

@ -24,6 +24,7 @@ Wiki (deprecated - please use Trac): http://www.rousette.org.uk/projects/wiki/
7. Added loginhash to settings.yml.
8. Modify signup to prevent is_admin being set by malicious user. Begin work on standardising layout for login controller.
9. BIGGEST NEW FEATURE: Tracks is now properly multi-user, thanks to the work of Nicholas Lee. Any new users that you sign up can't view any of your next actions, contexts, projects or notes, and they get a clean slate to add their own. Great Things are planned in this direction...
10. Projects now have a description field which you can edit in the form on [tracks_url]/projects. It's optional, but you can use it to remind you of the aims or purpose of the project. If you have a description, it's displayed in italics just under the project name.
== Version 1.03

View file

@ -121,6 +121,7 @@ a.show_notes:hover {background-image: url(../images/notes_on.png); background-re
margin-top: 0px;
margin-left: -5px;
margin-right: -5px;
margin-bottom: 0px; /* CHECK */
color: #fff;
text-shadow: rgba(0,0,0,.4) 0px 2px 5px;
}
@ -422,6 +423,21 @@ div#list-projects, div#list-contexts {
padding-bottom: 5px;
}
div.project_description {
background: #eee;
padding: 5px;
margin-top: 0px;
margin-left: -5px;
margin-right: -5px;
color: #666;
font-style: italic;
font-size: 12px;
font-weight: normal;
/* Uncomment line below if you want the description to have
shadowed text */
/* text-shadow: rgba(0,0,0,.4) 0px 2px 5px; */
}
/* Form elements */
form {
border: 1px solid #CCC;

View file

@ -3,14 +3,20 @@
timemachine:
id: 1
name: Build a working time machine
description: ''
done: 0
user_id: 1
moremoney:
id: 2
name: Make more money than Billy Gates
description: ''
done: 0
user_id: 1
gardenclean:
id: 3
name: Evict dinosaurs from the garden
description: ''
done: 0
user_id: 1