diff --git a/.gitignore b/.gitignore index 08a043ec2..8c710f80b 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,4 @@ log/* *~ .DS_Store *.tmproj -Gemfile.lock +public/stylesheets/application.css diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..c9d82e4f7 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "vendor/plugins/fast_remote_cache"] + path = vendor/plugins/fast_remote_cache + url = https://github.com/37signals/fast_remote_cache.git +[submodule "vendor/plugins/encrypted_copy"] + path = vendor/plugins/encrypted_copy + url = git://github.com/Yggdrasil/cap_encrypted_copy.git diff --git a/Gemfile b/Gemfile index 2a4a0eb8a..3503d1b4c 100644 --- a/Gemfile +++ b/Gemfile @@ -5,6 +5,7 @@ gem "rails", "2.3.11" gem "mysql" gem "erubis" gem "rake" +gem "rdoc" gem "syntax", "1.0.0" gem "capistrano", "2.6.0" gem "open4", "0.9.3" diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 000000000..5112a1a2e --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,62 @@ +GEM + remote: http://rubygems.org/ + specs: + actionmailer (2.3.11) + actionpack (= 2.3.11) + actionpack (2.3.11) + activesupport (= 2.3.11) + rack (~> 1.1.0) + activerecord (2.3.11) + activesupport (= 2.3.11) + activeresource (2.3.11) + activesupport (= 2.3.11) + activesupport (2.3.11) + capistrano (2.6.0) + highline + net-scp (>= 1.0.0) + net-sftp (>= 2.0.0) + net-ssh (>= 2.0.14) + net-ssh-gateway (>= 1.1.0) + erubis (2.7.0) + exception_notification (2.3.3.0) + highline (1.6.19) + json (1.8.0) + mocha (0.9.8) + rake + mysql (2.9.1) + net-scp (1.1.1) + net-ssh (>= 2.6.5) + net-sftp (2.1.2) + net-ssh (>= 2.6.5) + net-ssh (2.6.7) + net-ssh-gateway (1.2.0) + net-ssh (>= 2.6.5) + open4 (0.9.3) + rack (1.1.6) + rails (2.3.11) + actionmailer (= 2.3.11) + actionpack (= 2.3.11) + activerecord (= 2.3.11) + activeresource (= 2.3.11) + activesupport (= 2.3.11) + rake (>= 0.8.3) + rake (10.1.0) + rdoc (4.0.1) + json (~> 1.4) + syntax (1.0.0) + +PLATFORMS + ruby + +DEPENDENCIES + bundler (~> 1.0.10) + capistrano (= 2.6.0) + erubis + exception_notification (= 2.3.3.0) + mocha (= 0.9.8) + mysql + open4 (= 0.9.3) + rails (= 2.3.11) + rake + rdoc + syntax (= 1.0.0) diff --git a/Rakefile b/Rakefile index 3bb0e8592..21b697a66 100644 --- a/Rakefile +++ b/Rakefile @@ -5,6 +5,7 @@ require(File.join(File.dirname(__FILE__), 'config', 'boot')) require 'rake' require 'rake/testtask' -require 'rake/rdoctask' + +require 'rdoc/task' require 'tasks/rails' diff --git a/app/models/project.rb b/app/models/project.rb index cf3cc5395..27fb3bc32 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -10,7 +10,7 @@ class Project < ActiveRecord::Base after_create :create_template_defaults - attr_accessible :name, :description, :template + attr_accessible :name, :description, :template, :favorite # creates the default configuration parameters based on the template def create_template_defaults diff --git a/app/views/layouts/_favorites.html.erb b/app/views/layouts/_favorites.html.erb new file mode 100644 index 000000000..7879fa80f --- /dev/null +++ b/app/views/layouts/_favorites.html.erb @@ -0,0 +1,16 @@ +
+<% projects = Project.find(:all, :conditions => { :favorite => 1 }, :order => "name ASC") %> + <% if projects.count > 0 %> + <%= render(:partial => 'layouts/project_view', :locals => { :projects => projects } )%> + <% else %> + + New project + <% end %> +
+
+ + + +
diff --git a/app/views/layouts/_menu.html.erb b/app/views/layouts/_menu.html.erb index 04793cb3b..0721b3973 100644 --- a/app/views/layouts/_menu.html.erb +++ b/app/views/layouts/_menu.html.erb @@ -1,3 +1,7 @@ +<%= render(:partial => 'layouts/menu_box', :locals => { + :box_type => 'favorites', + :status => controller_in_use_or(ProjectsController, :open, Project), + :path => projects_path } )%> <%= render(:partial => 'layouts/menu_box', :locals => { :box_type => 'projects', diff --git a/app/views/layouts/_project_view.html.erb b/app/views/layouts/_project_view.html.erb new file mode 100644 index 000000000..0ecada317 --- /dev/null +++ b/app/views/layouts/_project_view.html.erb @@ -0,0 +1,26 @@ +<% for project in projects %> + + + + +
+ <% if project.stages.count > 0 %> + <% for stage in project.stages %> + + + + <% end %> + <% else %> + + + + <% end %> +
+<% end %> + diff --git a/app/views/layouts/_projects.html.erb b/app/views/layouts/_projects.html.erb index 606a1e6ea..b3d77a58f 100644 --- a/app/views/layouts/_projects.html.erb +++ b/app/views/layouts/_projects.html.erb @@ -1,30 +1,7 @@
- <% if Project.count > 0 %> - <% for project in Project.find(:all, :order => "name ASC") %> - - - - -
- <% if project.stages.count > 0 %> - <% for stage in project.stages %> - - - - <% end %> - <% else %> - - - - <% end %> -
- <% end %> + <% projects = Project.find(:all, :conditions => { :favorite => 0 }, :order => "name ASC") %> + <% if projects.count > 0 %> + <%= render(:partial => 'layouts/project_view', :locals => { :projects => projects } )%> <% else %> New project @@ -33,7 +10,7 @@
diff --git a/app/views/projects/_form.html.erb b/app/views/projects/_form.html.erb index 78db90a08..44f92507d 100644 --- a/app/views/projects/_form.html.erb +++ b/app/views/projects/_form.html.erb @@ -11,7 +11,10 @@ Description
<%= text_area 'project', 'description', :style =>'width:330px; height: 100px' %>

- +

+ <%= check_box 'project', 'favorite' %> + Favorite Project?
+

<% content_for(:page_scripts) do %>