moving out of body
This commit is contained in:
parent
2258db66c2
commit
56d9761844
5 changed files with 21 additions and 14 deletions
|
@ -14,9 +14,9 @@ class Issue < ActiveRecord::Base
|
||||||
:presence => true,
|
:presence => true,
|
||||||
:length => { :within => 0..255 }
|
:length => { :within => 0..255 }
|
||||||
|
|
||||||
validates :content,
|
#validates :content,
|
||||||
:presence => true,
|
#:presence => true,
|
||||||
:length => { :within => 0..2000 }
|
#:length => { :within => 0..2000 }
|
||||||
|
|
||||||
scope :critical, where(:critical => true)
|
scope :critical, where(:critical => true)
|
||||||
scope :non_critical, where(:critical => false)
|
scope :non_critical, where(:critical => false)
|
||||||
|
|
|
@ -7,10 +7,10 @@
|
||||||
|
|
||||||
.span-8
|
.span-8
|
||||||
= f.label :title
|
= f.label :title
|
||||||
= f.text_field :title, :style => "width:450px"
|
= f.text_area :title, :style => "width:450px; height:100px", :maxlength => 255
|
||||||
.span-8
|
-#.span-8
|
||||||
= f.label :content
|
-#= f.label :content
|
||||||
= f.text_area :content, :style => "width:450px; height:130px"
|
-#= f.text_area :content, :style => "width:450px; height:130px"
|
||||||
.span-8.append-bottom
|
.span-8.append-bottom
|
||||||
= f.label :assignee_id
|
= f.label :assignee_id
|
||||||
= f.select(:assignee_id, @project.users.all.collect {|p| [ p.name, p.id ] }, { :include_blank => "Select user" })
|
= f.select(:assignee_id, @project.users.all.collect {|p| [ p.name, p.id ] }, { :include_blank => "Select user" })
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
= truncate issue.assignee.name, :lenght => 20
|
= truncate issue.assignee.name, :lenght => 20
|
||||||
%td ##{issue.id}
|
%td ##{issue.id}
|
||||||
%td
|
%td
|
||||||
= html_escape issue.title
|
= truncate(html_escape(issue.title), :length => 50)
|
||||||
%br
|
%br
|
||||||
- if issue.critical
|
- if issue.critical
|
||||||
%span.tag.high critical
|
%span.tag.high critical
|
||||||
|
|
|
@ -1,12 +1,8 @@
|
||||||
%h2
|
%h2
|
||||||
= "Issue ##{@issue.id} - #{@issue.title}"
|
= "Issue ##{@issue.id} - #{truncate @issue.title, :length => 50}"
|
||||||
|
|
||||||
.span-15
|
.span-15
|
||||||
= simple_format html_escape(@issue.content)
|
-#= simple_format html_escape(@issue.content)
|
||||||
|
|
||||||
|
|
||||||
.clear
|
|
||||||
%br
|
|
||||||
.issue_notes= render "notes/notes"
|
.issue_notes= render "notes/notes"
|
||||||
.span-8.right
|
.span-8.right
|
||||||
.span-8
|
.span-8
|
||||||
|
|
11
db/migrate/20111027152724_issue_conten_to_note.rb
Normal file
11
db/migrate/20111027152724_issue_conten_to_note.rb
Normal file
|
@ -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
|
Loading…
Reference in a new issue