Index: app/models/project.rb =================================================================== --- app/models/project.rb (revision 4265) +++ app/models/project.rb (working copy) @@ -411,7 +411,14 @@ # Returns a short description of the projects (first lines) def short_description(length = 255) - description.gsub(/^(.{#{length}}[^\n\r]*).*$/m, '\1...').strip if description + case + when summary.present? + summary + when description.present? + description.gsub(/^(.{#{length}}[^\n\r]*).*$/m, '\1...').strip + else + "" + end end def css_classes Index: app/views/projects/_form.rhtml =================================================================== --- app/views/projects/_form.rhtml (revision 4265) +++ app/views/projects/_form.rhtml (working copy) @@ -8,6 +8,7 @@

<%= label(:project, :parent_id, l(:field_parent)) %><%= parent_project_select_tag(@project) %>

<% end %> +

<%= f.text_area :summary, :rows => 2, :class => 'wiki-edit' %>

<%= f.text_area :description, :rows => 5, :class => 'wiki-edit' %>

<%= f.text_field :identifier, :required => true, :disabled => @project.identifier_frozen?, :maxlength => 20 %> <% unless @project.identifier_frozen? %> Index: db/migrate/20101021153830_add_summary_to_projects.rb =================================================================== --- db/migrate/20101021153830_add_summary_to_projects.rb (revision 0) +++ db/migrate/20101021153830_add_summary_to_projects.rb (revision 0) @@ -0,0 +1,9 @@ +class AddSummaryToProjects < ActiveRecord::Migration + def self.up + add_column :projects, :summary, :string, :limit => 255, :default => '' + end + + def self.down + remove_column :projects, :summary + end +end