From 56d9761844b2665e9e48d50f15f7ac3a63d60618 Mon Sep 17 00:00:00 2001 From: gitlabhq Date: Thu, 27 Oct 2011 18:46:30 +0300 Subject: [PATCH] moving out of body --- app/models/issue.rb | 6 +++--- app/views/issues/_form.html.haml | 8 ++++---- app/views/issues/_show.html.haml | 2 +- app/views/issues/show.html.haml | 8 ++------ db/migrate/20111027152724_issue_conten_to_note.rb | 11 +++++++++++ 5 files changed, 21 insertions(+), 14 deletions(-) create mode 100644 db/migrate/20111027152724_issue_conten_to_note.rb diff --git a/app/models/issue.rb b/app/models/issue.rb index ca1c5eaf5..9fb7ef306 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -14,9 +14,9 @@ class Issue < ActiveRecord::Base :presence => true, :length => { :within => 0..255 } - validates :content, - :presence => true, - :length => { :within => 0..2000 } + #validates :content, + #:presence => true, + #:length => { :within => 0..2000 } scope :critical, where(:critical => true) scope :non_critical, where(:critical => false) diff --git a/app/views/issues/_form.html.haml b/app/views/issues/_form.html.haml index eae0ee0f5..80f19d627 100644 --- a/app/views/issues/_form.html.haml +++ b/app/views/issues/_form.html.haml @@ -7,10 +7,10 @@ .span-8 = f.label :title - = f.text_field :title, :style => "width:450px" - .span-8 - = f.label :content - = f.text_area :content, :style => "width:450px; height:130px" + = f.text_area :title, :style => "width:450px; height:100px", :maxlength => 255 + -#.span-8 + -#= f.label :content + -#= f.text_area :content, :style => "width:450px; height:130px" .span-8.append-bottom = f.label :assignee_id = f.select(:assignee_id, @project.users.all.collect {|p| [ p.name, p.id ] }, { :include_blank => "Select user" }) diff --git a/app/views/issues/_show.html.haml b/app/views/issues/_show.html.haml index ebcaae29e..9cce28713 100644 --- a/app/views/issues/_show.html.haml +++ b/app/views/issues/_show.html.haml @@ -7,7 +7,7 @@ = truncate issue.assignee.name, :lenght => 20 %td ##{issue.id} %td - = html_escape issue.title + = truncate(html_escape(issue.title), :length => 50) %br - if issue.critical %span.tag.high critical diff --git a/app/views/issues/show.html.haml b/app/views/issues/show.html.haml index 58bebe9b3..eb972d33a 100644 --- a/app/views/issues/show.html.haml +++ b/app/views/issues/show.html.haml @@ -1,12 +1,8 @@ %h2 - = "Issue ##{@issue.id} - #{@issue.title}" + = "Issue ##{@issue.id} - #{truncate @issue.title, :length => 50}" .span-15 - = simple_format html_escape(@issue.content) - - - .clear - %br + -#= simple_format html_escape(@issue.content) .issue_notes= render "notes/notes" .span-8.right .span-8 diff --git a/db/migrate/20111027152724_issue_conten_to_note.rb b/db/migrate/20111027152724_issue_conten_to_note.rb new file mode 100644 index 000000000..15d96c30b --- /dev/null +++ b/db/migrate/20111027152724_issue_conten_to_note.rb @@ -0,0 +1,11 @@ +class IssueContenToNote < ActiveRecord::Migration + def up + raise "Not ready" + Issue.find_each(:batch_size => 100) do |issue| + + end + end + + def down + end +end -- 2.11.0