##// END OF EJS Templates
Fixed: 10342 Creation of Schema in Oracle...
Jean-Philippe Lang -
r476:52547466f0f1
parent child
Show More
@@ -0,0 +1,13
1 class RenameCommentToComments < ActiveRecord::Migration
2 def self.up
3 rename_column(:comments, :comment, :comments) if ActiveRecord::Base.connection.columns("comments").detect{|c| c.name == "comment"}
4 rename_column(:wiki_contents, :comment, :comments) if ActiveRecord::Base.connection.columns("wiki_contents").detect{|c| c.name == "comment"}
5 rename_column(:wiki_content_versions, :comment, :comments) if ActiveRecord::Base.connection.columns("wiki_content_versions").detect{|c| c.name == "comment"}
6 rename_column(:time_entries, :comment, :comments) if ActiveRecord::Base.connection.columns("time_entries").detect{|c| c.name == "comment"}
7 rename_column(:changesets, :comment, :comments) if ActiveRecord::Base.connection.columns("changesets").detect{|c| c.name == "comment"}
8 end
9
10 def self.down
11 raise IrreversibleMigration
12 end
13 end
@@ -503,7 +503,7 class ProjectsController < ApplicationController
503 end
503 end
504
504
505 unless params[:show_wiki_edits] == "0"
505 unless params[:show_wiki_edits] == "0"
506 select = "#{WikiContent.versioned_table_name}.updated_on, #{WikiContent.versioned_table_name}.comment, " +
506 select = "#{WikiContent.versioned_table_name}.updated_on, #{WikiContent.versioned_table_name}.comments, " +
507 "#{WikiContent.versioned_table_name}.#{WikiContent.version_column}, #{WikiPage.table_name}.title"
507 "#{WikiContent.versioned_table_name}.#{WikiContent.version_column}, #{WikiPage.table_name}.title"
508 joins = "LEFT JOIN #{WikiPage.table_name} ON #{WikiPage.table_name}.id = #{WikiContent.versioned_table_name}.page_id " +
508 joins = "LEFT JOIN #{WikiPage.table_name} ON #{WikiPage.table_name}.id = #{WikiContent.versioned_table_name}.page_id " +
509 "LEFT JOIN #{Wiki.table_name} ON #{Wiki.table_name}.id = #{WikiPage.table_name}.wiki_id "
509 "LEFT JOIN #{Wiki.table_name} ON #{Wiki.table_name}.id = #{WikiPage.table_name}.wiki_id "
@@ -624,7 +624,7 class ProjectsController < ApplicationController
624 # no more than 5 tokens to search for
624 # no more than 5 tokens to search for
625 @tokens.slice! 5..-1 if @tokens.size > 5
625 @tokens.slice! 5..-1 if @tokens.size > 5
626 # strings used in sql like statement
626 # strings used in sql like statement
627 like_tokens = @tokens.collect {|w| "%#{w}%"}
627 like_tokens = @tokens.collect {|w| "%#{w.downcase}%"}
628 operator = @all_words ? " AND " : " OR "
628 operator = @all_words ? " AND " : " OR "
629 limit = 10
629 limit = 10
630 @results = []
630 @results = []
@@ -632,7 +632,7 class ProjectsController < ApplicationController
632 @results += @project.news.find(:all, :limit => limit, :conditions => [ (["(LOWER(title) like ? OR LOWER(description) like ?)"] * like_tokens.size).join(operator), * (like_tokens * 2).sort], :include => :author ) if @scope.include? 'news'
632 @results += @project.news.find(:all, :limit => limit, :conditions => [ (["(LOWER(title) like ? OR LOWER(description) like ?)"] * like_tokens.size).join(operator), * (like_tokens * 2).sort], :include => :author ) if @scope.include? 'news'
633 @results += @project.documents.find(:all, :limit => limit, :conditions => [ (["(LOWER(title) like ? OR LOWER(description) like ?)"] * like_tokens.size).join(operator), * (like_tokens * 2).sort] ) if @scope.include? 'documents'
633 @results += @project.documents.find(:all, :limit => limit, :conditions => [ (["(LOWER(title) like ? OR LOWER(description) like ?)"] * like_tokens.size).join(operator), * (like_tokens * 2).sort] ) if @scope.include? 'documents'
634 @results += @project.wiki.pages.find(:all, :limit => limit, :include => :content, :conditions => [ (["(LOWER(title) like ? OR LOWER(text) like ?)"] * like_tokens.size).join(operator), * (like_tokens * 2).sort] ) if @project.wiki && @scope.include?('wiki')
634 @results += @project.wiki.pages.find(:all, :limit => limit, :include => :content, :conditions => [ (["(LOWER(title) like ? OR LOWER(text) like ?)"] * like_tokens.size).join(operator), * (like_tokens * 2).sort] ) if @project.wiki && @scope.include?('wiki')
635 @results += @project.repository.changesets.find(:all, :limit => limit, :conditions => [ (["(LOWER(comment) like ?)"] * like_tokens.size).join(operator), * (like_tokens).sort] ) if @project.repository && @scope.include?('changesets')
635 @results += @project.repository.changesets.find(:all, :limit => limit, :conditions => [ (["(LOWER(comments) like ?)"] * like_tokens.size).join(operator), * (like_tokens).sort] ) if @project.repository && @scope.include?('changesets')
636 @question = @tokens.join(" ")
636 @question = @tokens.join(" ")
637 else
637 else
638 @question = ""
638 @question = ""
@@ -59,7 +59,7 private
59 l(:field_activity),
59 l(:field_activity),
60 l(:field_issue),
60 l(:field_issue),
61 l(:field_hours),
61 l(:field_hours),
62 l(:field_comment)
62 l(:field_comments)
63 ]
63 ]
64 csv << headers.collect {|c| ic.iconv(c) }
64 csv << headers.collect {|c| ic.iconv(c) }
65 # csv lines
65 # csv lines
@@ -69,7 +69,7 private
69 entry.activity.name,
69 entry.activity.name,
70 (entry.issue ? entry.issue.id : nil),
70 (entry.issue ? entry.issue.id : nil),
71 entry.hours,
71 entry.hours,
72 entry.comment
72 entry.comments
73 ]
73 ]
74 csv << fields.collect {|c| ic.iconv(c.to_s) }
74 csv << fields.collect {|c| ic.iconv(c.to_s) }
75 end
75 end
@@ -47,7 +47,7 class WikiController < ApplicationController
47 @content = @page.content_for_version(params[:version])
47 @content = @page.content_for_version(params[:version])
48 @content.text = "h1. #{@page.pretty_title}" if @content.text.blank?
48 @content.text = "h1. #{@page.pretty_title}" if @content.text.blank?
49 # don't keep previous comment
49 # don't keep previous comment
50 @content.comment = nil
50 @content.comments = nil
51 if request.post?
51 if request.post?
52 if @content.text == params[:content][:text]
52 if @content.text == params[:content][:text]
53 # don't save if text wasn't changed
53 # don't save if text wasn't changed
@@ -55,7 +55,7 class WikiController < ApplicationController
55 return
55 return
56 end
56 end
57 @content.text = params[:content][:text]
57 @content.text = params[:content][:text]
58 @content.comment = params[:content][:comment]
58 @content.comments = params[:content][:comments]
59 @content.author = logged_in_user
59 @content.author = logged_in_user
60 # if page is new @page.save will also save content, but not if page isn't a new record
60 # if page is new @page.save will also save content, but not if page isn't a new record
61 if (@page.new_record? ? @page.save : @content.save)
61 if (@page.new_record? ? @page.save : @content.save)
@@ -69,7 +69,7 class WikiController < ApplicationController
69 @page = @wiki.find_page(params[:page])
69 @page = @wiki.find_page(params[:page])
70 # don't load text
70 # don't load text
71 @versions = @page.content.versions.find :all,
71 @versions = @page.content.versions.find :all,
72 :select => "id, author_id, comment, updated_on, version",
72 :select => "id, author_id, comments, updated_on, version",
73 :order => 'version DESC'
73 :order => 'version DESC'
74 end
74 end
75
75
@@ -113,6 +113,8 module ApplicationHelper
113
113
114 # textilize text according to system settings and RedCloth availability
114 # textilize text according to system settings and RedCloth availability
115 def textilizable(text, options = {})
115 def textilizable(text, options = {})
116 return "" if text.blank?
117
116 # different methods for formatting wiki links
118 # different methods for formatting wiki links
117 case options[:wiki_links]
119 case options[:wiki_links]
118 when :local
120 when :local
@@ -34,7 +34,7 class Changeset < ActiveRecord::Base
34 end
34 end
35
35
36 def scan_comment_for_issue_ids
36 def scan_comment_for_issue_ids
37 return if comment.blank?
37 return if comments.blank?
38 # keywords used to reference issues
38 # keywords used to reference issues
39 ref_keywords = Setting.commit_ref_keywords.downcase.split(",")
39 ref_keywords = Setting.commit_ref_keywords.downcase.split(",")
40 # keywords used to fix issues
40 # keywords used to fix issues
@@ -48,7 +48,7 class Changeset < ActiveRecord::Base
48 # remove any associated issues
48 # remove any associated issues
49 self.issues.clear
49 self.issues.clear
50
50
51 comment.scan(Regexp.new("(#{kw_regexp})[\s:]+(([\s,;&]*#?\\d+)+)", Regexp::IGNORECASE)).each do |match|
51 comments.scan(Regexp.new("(#{kw_regexp})[\s:]+(([\s,;&]*#?\\d+)+)", Regexp::IGNORECASE)).each do |match|
52 action = match[0]
52 action = match[0]
53 target_issue_ids = match[1].scan(/\d+/)
53 target_issue_ids = match[1].scan(/\d+/)
54 target_issues = repository.project.issues.find_all_by_id(target_issue_ids)
54 target_issues = repository.project.issues.find_all_by_id(target_issue_ids)
@@ -19,5 +19,5 class Comment < ActiveRecord::Base
19 belongs_to :commented, :polymorphic => true, :counter_cache => true
19 belongs_to :commented, :polymorphic => true, :counter_cache => true
20 belongs_to :author, :class_name => 'User', :foreign_key => 'author_id'
20 belongs_to :author, :class_name => 'User', :foreign_key => 'author_id'
21
21
22 validates_presence_of :commented, :author, :comment
22 validates_presence_of :commented, :author, :comments
23 end
23 end
@@ -22,7 +22,7 class CustomValue < ActiveRecord::Base
22 protected
22 protected
23 def validate
23 def validate
24 errors.add(:value, :activerecord_error_blank) and return if custom_field.is_required? and value.empty?
24 errors.add(:value, :activerecord_error_blank) and return if custom_field.is_required? and value.empty?
25 errors.add(:value, :activerecord_error_invalid) unless custom_field.regexp.empty? or value =~ Regexp.new(custom_field.regexp)
25 errors.add(:value, :activerecord_error_invalid) unless custom_field.regexp.blank? or value =~ Regexp.new(custom_field.regexp)
26 errors.add(:value, :activerecord_error_too_short) if custom_field.min_length > 0 and value.length < custom_field.min_length and value.length > 0
26 errors.add(:value, :activerecord_error_too_short) if custom_field.min_length > 0 and value.length < custom_field.min_length and value.length > 0
27 errors.add(:value, :activerecord_error_too_long) if custom_field.max_length > 0 and value.length > custom_field.max_length
27 errors.add(:value, :activerecord_error_too_long) if custom_field.max_length > 0 and value.length > custom_field.max_length
28 case custom_field.field_format
28 case custom_field.field_format
@@ -62,7 +62,7 class Repository < ActiveRecord::Base
62 :revision => revision.identifier,
62 :revision => revision.identifier,
63 :committer => revision.author,
63 :committer => revision.author,
64 :committed_on => revision.time,
64 :committed_on => revision.time,
65 :comment => revision.message)
65 :comments => revision.message)
66
66
67 revision.paths.each do |change|
67 revision.paths.each do |change|
68 Change.create(:changeset => changeset,
68 Change.create(:changeset => changeset,
@@ -10,7 +10,7 class TimeEntry < ActiveRecord::Base
10
10
11 validates_presence_of :user_id, :activity_id, :project_id, :hours, :spent_on
11 validates_presence_of :user_id, :activity_id, :project_id, :hours, :spent_on
12 validates_numericality_of :hours, :allow_nil => true
12 validates_numericality_of :hours, :allow_nil => true
13 validates_length_of :comment, :maximum => 255
13 validates_length_of :comments, :maximum => 255
14
14
15 def before_validation
15 def before_validation
16 self.project = issue.project if issue && project.nil?
16 self.project = issue.project if issue && project.nil?
@@ -28,6 +28,6 class TimeEntry < ActiveRecord::Base
28 super
28 super
29 self.tyear = spent_on ? spent_on.year : nil
29 self.tyear = spent_on ? spent_on.year : nil
30 self.tmonth = spent_on ? spent_on.month : nil
30 self.tmonth = spent_on ? spent_on.month : nil
31 self.tweek = spent_on ? spent_on.cweek : nil
31 self.tweek = spent_on ? Date.civil(spent_on.year, spent_on.month, spent_on.day).cweek : nil
32 end
32 end
33 end
33 end
@@ -26,11 +26,15 class UserPreference < ActiveRecord::Base
26 self.others ||= {}
26 self.others ||= {}
27 end
27 end
28
28
29 def before_save
30 self.others ||= {}
31 end
32
29 def [](attr_name)
33 def [](attr_name)
30 if attribute_present? attr_name
34 if attribute_present? attr_name
31 super
35 super
32 else
36 else
33 others[attr_name]
37 others ? others[attr_name] : nil
34 end
38 end
35 end
39 end
36
40
@@ -38,7 +42,8 class UserPreference < ActiveRecord::Base
38 if attribute_present? attr_name
42 if attribute_present? attr_name
39 super
43 super
40 else
44 else
41 others.store attr_name, value
45 self.others ||= {}
46 self.others.store attr_name, value
42 end
47 end
43 end
48 end
44 end
49 end
@@ -19,14 +19,14
19 <div class="contextual">
19 <div class="contextual">
20 <%= link_to_if_authorized l(:button_delete), {:controller => 'news', :action => 'destroy_comment', :id => @news, :comment_id => comment}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
20 <%= link_to_if_authorized l(:button_delete), {:controller => 'news', :action => 'destroy_comment', :id => @news, :comment_id => comment}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
21 </div>
21 </div>
22 <%= simple_format(auto_link(h comment.comment))%>
22 <%= simple_format(auto_link(h comment.comments))%>
23 <% end if @news.comments_count > 0 %>
23 <% end if @news.comments_count > 0 %>
24 </div>
24 </div>
25
25
26 <% if authorize_for 'news', 'add_comment' %>
26 <% if authorize_for 'news', 'add_comment' %>
27 <p><%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comment" %></p>
27 <p><%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comments" %></p>
28 <% form_tag({:action => 'add_comment', :id => @news}, :id => "add_comment_form", :style => "display:none;") do %>
28 <% form_tag({:action => 'add_comment', :id => @news}, :id => "add_comment_form", :style => "display:none;") do %>
29 <%= text_area 'comment', 'comment', :cols => 60, :rows => 6 %>
29 <%= text_area 'comment', 'comments', :cols => 60, :rows => 6 %>
30 <p><%= submit_tag l(:button_add) %></p>
30 <p><%= submit_tag l(:button_add) %></p>
31 <% end %>
31 <% end %>
32 <% end %> No newline at end of file
32 <% end %>
@@ -39,10 +39,10
39 <%= e.created_on.strftime("%H:%M") %> <%=l(:label_document)%>: <%= link_to h(e.title), :controller => 'documents', :action => 'show', :id => e %><br />
39 <%= e.created_on.strftime("%H:%M") %> <%=l(:label_document)%>: <%= link_to h(e.title), :controller => 'documents', :action => 'show', :id => e %><br />
40 <% elsif e.is_a? WikiContent.versioned_class %>
40 <% elsif e.is_a? WikiContent.versioned_class %>
41 <%= e.created_on.strftime("%H:%M") %> <%=l(:label_wiki_edit)%>: <%= link_to h(WikiPage.pretty_title(e.title)), :controller => 'wiki', :page => e.title %> (<%= link_to '#' + e.version.to_s, :controller => 'wiki', :page => e.title, :version => e.version %>)<br />
41 <%= e.created_on.strftime("%H:%M") %> <%=l(:label_wiki_edit)%>: <%= link_to h(WikiPage.pretty_title(e.title)), :controller => 'wiki', :page => e.title %> (<%= link_to '#' + e.version.to_s, :controller => 'wiki', :page => e.title, :version => e.version %>)<br />
42 <% unless e.comment.blank? %><em><%=h e.comment %></em><% end %>
42 <% unless e.comments.blank? %><em><%=h e.comments %></em><% end %>
43 <% elsif e.is_a? Changeset %>
43 <% elsif e.is_a? Changeset %>
44 <%= e.created_on.strftime("%H:%M") %> <%=l(:label_revision)%> <%= link_to h(e.revision), :controller => 'repositories', :action => 'revision', :id => @project, :rev => e.revision %><br />
44 <%= e.created_on.strftime("%H:%M") %> <%=l(:label_revision)%> <%= link_to h(e.revision), :controller => 'repositories', :action => 'revision', :id => @project, :rev => e.revision %><br />
45 <em><%=h e.committer.blank? ? "anonymous" : e.committer %><%= h(": #{truncate(e.comment, 500)}") unless e.comment.blank? %></em>
45 <em><%=h e.committer.blank? ? "anonymous" : e.committer %><%= h(": #{truncate(e.comments, 500)}") unless e.comments.blank? %></em>
46 <% end %>
46 <% end %>
47 </p></li>
47 </p></li>
48
48
@@ -41,7 +41,7
41 <i><%= e.content.author ? e.content.author.name : "Anonymous" %>, <%= format_time(e.content.updated_on) %></i>
41 <i><%= e.content.author ? e.content.author.name : "Anonymous" %>, <%= format_time(e.content.updated_on) %></i>
42 <% elsif e.is_a? Changeset %>
42 <% elsif e.is_a? Changeset %>
43 <%=l(:label_revision)%> <%= link_to h(e.revision), :controller => 'repositories', :action => 'revision', :id => @project, :rev => e.revision %><br />
43 <%=l(:label_revision)%> <%= link_to h(e.revision), :controller => 'repositories', :action => 'revision', :id => @project, :rev => e.revision %><br />
44 <%= highlight_tokens(e.comment, @tokens) %><br />
44 <%= highlight_tokens(e.comments, @tokens) %><br />
45 <em><%= e.committer.blank? ? e.committer : "Anonymous" %>, <%= format_time(e.committed_on) %></em>
45 <em><%= e.committer.blank? ? e.committer : "Anonymous" %>, <%= format_time(e.committed_on) %></em>
46 <% end %>
46 <% end %>
47 </p></li>
47 </p></li>
@@ -7,7 +7,7
7 <div class="splitcontentleft">
7 <div class="splitcontentleft">
8 <%= textilizable @project.description %>
8 <%= textilizable @project.description %>
9 <ul>
9 <ul>
10 <% unless @project.homepage.empty? %><li><%=l(:field_homepage)%>: <%= auto_link @project.homepage %></li><% end %>
10 <% unless @project.homepage.blank? %><li><%=l(:field_homepage)%>: <%= auto_link @project.homepage %></li><% end %>
11 <li><%=l(:field_created_on)%>: <%= format_date(@project.created_on) %></li>
11 <li><%=l(:field_created_on)%>: <%= format_date(@project.created_on) %></li>
12 <% unless @project.parent.nil? %>
12 <% unless @project.parent.nil? %>
13 <li><%=l(:field_parent)%>: <%= link_to @project.parent.name, :controller => 'projects', :action => 'show', :id => @project.parent %></li>
13 <li><%=l(:field_parent)%>: <%= link_to @project.parent.name, :controller => 'projects', :action => 'show', :id => @project.parent %></li>
@@ -3,7 +3,7
3 <th>#</th>
3 <th>#</th>
4 <th><%= l(:label_date) %></th>
4 <th><%= l(:label_date) %></th>
5 <th><%= l(:field_author) %></th>
5 <th><%= l(:field_author) %></th>
6 <th><%= l(:field_comment) %></th>
6 <th><%= l(:field_comments) %></th>
7 <th></th>
7 <th></th>
8 </tr></thead>
8 </tr></thead>
9 <tbody>
9 <tbody>
@@ -12,7 +12,7
12 <th align="center" style="width:5%"><%= link_to changeset.revision, :action => 'revision', :id => project, :rev => changeset.revision %></th>
12 <th align="center" style="width:5%"><%= link_to changeset.revision, :action => 'revision', :id => project, :rev => changeset.revision %></th>
13 <td align="center" style="width:15%"><%= format_time(changeset.committed_on) %></td>
13 <td align="center" style="width:15%"><%= format_time(changeset.committed_on) %></td>
14 <td align="center" style="width:15%"><em><%=h changeset.committer %></em></td>
14 <td align="center" style="width:15%"><em><%=h changeset.committer %></em></td>
15 <td align="left"><%= textilizable(changeset.comment) %></td>
15 <td align="left"><%= textilizable(changeset.comments) %></td>
16 <td align="center"><%= link_to l(:label_view_diff), :action => 'diff', :id => project, :path => path, :rev => changeset.revision if entry && entry.is_file? && changeset != changesets.last %></td>
16 <td align="center"><%= link_to l(:label_view_diff), :action => 'diff', :id => project, :path => path, :rev => changeset.revision if entry && entry.is_file? && changeset != changesets.last %></td>
17 </tr>
17 </tr>
18 <% end %>
18 <% end %>
@@ -8,7 +8,7
8 <h2><%= l(:label_revision) %> <%= @changeset.revision %></h2>
8 <h2><%= l(:label_revision) %> <%= @changeset.revision %></h2>
9
9
10 <p><em><%= @changeset.committer %>, <%= format_time(@changeset.committed_on) %></em></p>
10 <p><em><%= @changeset.committer %>, <%= format_time(@changeset.committed_on) %></em></p>
11 <%= textilizable @changeset.comment %>
11 <%= textilizable @changeset.comments %>
12
12
13 <% if @changeset.issues.any? %>
13 <% if @changeset.issues.any? %>
14 <h3><%= l(:label_related_issues) %></h3>
14 <h3><%= l(:label_related_issues) %></h3>
@@ -16,7 +16,7
16 <%= sort_header_tag('user_id', :caption => l(:label_member)) %>
16 <%= sort_header_tag('user_id', :caption => l(:label_member)) %>
17 <%= sort_header_tag('activity_id', :caption => l(:label_activity)) %>
17 <%= sort_header_tag('activity_id', :caption => l(:label_activity)) %>
18 <%= sort_header_tag('issue_id', :caption => l(:label_issue)) %>
18 <%= sort_header_tag('issue_id', :caption => l(:label_issue)) %>
19 <th><%= l(:label_comment) %></th>
19 <th><%= l(:label_comments) %></th>
20 <%= sort_header_tag('hours', :caption => l(:field_hours)) %>
20 <%= sort_header_tag('hours', :caption => l(:field_hours)) %>
21 <th></th>
21 <th></th>
22 </thead>
22 </thead>
@@ -36,7 +36,7
36 </div>
36 </div>
37 <% end %>
37 <% end %>
38 </td>
38 </td>
39 <td><%=h entry.comment %></td>
39 <td><%=h entry.comments %></td>
40 <td align="center"><strong><%= entry.hours %></strong></td>
40 <td align="center"><strong><%= entry.hours %></strong></td>
41 <td align="center"><%= link_to_if_authorized(l(:button_edit), {:controller => 'timelog', :action => 'edit', :id => entry}, :class => "icon icon-edit") if entry.user_id == @owner_id %></td>
41 <td align="center"><%= link_to_if_authorized(l(:button_edit), {:controller => 'timelog', :action => 'edit', :id => entry}, :class => "icon icon-edit") if entry.user_id == @owner_id %></td>
42 </tr>
42 </tr>
@@ -7,7 +7,7
7 <p><%= f.text_field :issue_id, :size => 6 %> <em><%= h("#{@time_entry.issue.tracker.name} ##{@time_entry.issue.id}: #{@time_entry.issue.subject}") if @time_entry.issue %></em></p>
7 <p><%= f.text_field :issue_id, :size => 6 %> <em><%= h("#{@time_entry.issue.tracker.name} ##{@time_entry.issue.id}: #{@time_entry.issue.subject}") if @time_entry.issue %></em></p>
8 <p><%= f.text_field :spent_on, :size => 10, :required => true %><%= calendar_for('time_entry_spent_on') %></p>
8 <p><%= f.text_field :spent_on, :size => 10, :required => true %><%= calendar_for('time_entry_spent_on') %></p>
9 <p><%= f.text_field :hours, :size => 6, :required => true %></p>
9 <p><%= f.text_field :hours, :size => 6, :required => true %></p>
10 <p><%= f.text_field :comment, :size => 100 %></p>
10 <p><%= f.text_field :comments, :size => 100 %></p>
11 <p><%= f.select :activity_id, (@activities.collect {|p| [p.name, p.id]}), :required => true %></p>
11 <p><%= f.select :activity_id, (@activities.collect {|p| [p.name, p.id]}), :required => true %></p>
12 </div>
12 </div>
13
13
@@ -12,7 +12,7
12 :onclick => "window.open('#{ url_for :controller => 'help', :ctrl => 'wiki', :page => 'syntax' }', '', 'resizable=yes, location=no, width=300, height=500, menubar=no, status=no, scrollbars=yes'); return false;" %>
12 :onclick => "window.open('#{ url_for :controller => 'help', :ctrl => 'wiki', :page => 'syntax' }', '', 'resizable=yes, location=no, width=300, height=500, menubar=no, status=no, scrollbars=yes'); return false;" %>
13 </div>
13 </div>
14 <p><%= f.text_area :text, :cols => 100, :rows => 25, :class => 'wiki-edit' %></p>
14 <p><%= f.text_area :text, :cols => 100, :rows => 25, :class => 'wiki-edit' %></p>
15 <p><label><%= l(:field_comment) %></label><br /><%= f.text_field :comment, :size => 120 %></p>
15 <p><label><%= l(:field_comments) %></label><br /><%= f.text_field :comments, :size => 120 %></p>
16 <p><%= submit_tag l(:button_save) %>
16 <p><%= submit_tag l(:button_save) %>
17 <%= link_to_remote l(:label_preview),
17 <%= link_to_remote l(:label_preview),
18 { :url => { :controller => 'wiki', :action => 'preview', :id => @project, :page => @page.title },
18 { :url => { :controller => 'wiki', :action => 'preview', :id => @project, :page => @page.title },
@@ -11,7 +11,7
11 <th>#</th>
11 <th>#</th>
12 <th><%= l(:field_updated_on) %></th>
12 <th><%= l(:field_updated_on) %></th>
13 <th><%= l(:field_author) %></th>
13 <th><%= l(:field_author) %></th>
14 <th><%= l(:field_comment) %></th>
14 <th><%= l(:field_comments) %></th>
15 </tr></thead>
15 </tr></thead>
16 <tbody>
16 <tbody>
17 <% @versions.each do |ver| %>
17 <% @versions.each do |ver| %>
@@ -19,7 +19,7
19 <th align="center"><%= link_to ver.version, :action => 'index', :page => @page.title, :version => ver.version %></th>
19 <th align="center"><%= link_to ver.version, :action => 'index', :page => @page.title, :version => ver.version %></th>
20 <td align="center"><%= format_time(ver.updated_on) %></td>
20 <td align="center"><%= format_time(ver.updated_on) %></td>
21 <td><em><%= ver.author ? ver.author.name : "anonyme" %></em></td>
21 <td><em><%= ver.author ? ver.author.name : "anonyme" %></em></td>
22 <td><%=h ver.comment %></td>
22 <td><%=h ver.comments %></td>
23 </tr>
23 </tr>
24 <% end %>
24 <% end %>
25 </tbody>
25 </tbody>
@@ -13,7 +13,7
13 <%= link_to(l(:label_current_version), :action => 'index', :page => @page.title) %>
13 <%= link_to(l(:label_current_version), :action => 'index', :page => @page.title) %>
14 <br />
14 <br />
15 <em><%= @content.author ? @content.author.name : "anonyme" %>, <%= format_time(@content.updated_on) %> </em><br />
15 <em><%= @content.author ? @content.author.name : "anonyme" %>, <%= format_time(@content.updated_on) %> </em><br />
16 <%=h @content.comment %>
16 <%=h @content.comments %>
17 </p>
17 </p>
18 <hr />
18 <hr />
19 <% end %>
19 <% end %>
@@ -4,7 +4,7
4 # test suite. You never need to work with it otherwise. Remember that
4 # test suite. You never need to work with it otherwise. Remember that
5 # your test database is "scratch space" for the test suite and is wiped
5 # your test database is "scratch space" for the test suite and is wiped
6 # and recreated between test runs. Don't rely on the data there!
6 # and recreated between test runs. Don't rely on the data there!
7 config.cache_classes = true
7 config.cache_classes = false
8
8
9 # Log error messages when you accidentally call methods on nil.
9 # Log error messages when you accidentally call methods on nil.
10 config.whiny_nils = true
10 config.whiny_nils = true
@@ -4,7 +4,7 class CreateComments < ActiveRecord::Migration
4 t.column :commented_type, :string, :limit => 30, :default => "", :null => false
4 t.column :commented_type, :string, :limit => 30, :default => "", :null => false
5 t.column :commented_id, :integer, :default => 0, :null => false
5 t.column :commented_id, :integer, :default => 0, :null => false
6 t.column :author_id, :integer, :default => 0, :null => false
6 t.column :author_id, :integer, :default => 0, :null => false
7 t.column :comment, :text
7 t.column :comments, :text
8 t.column :created_on, :datetime, :null => false
8 t.column :created_on, :datetime, :null => false
9 t.column :updated_on, :datetime, :null => false
9 t.column :updated_on, :datetime, :null => false
10 end
10 end
@@ -4,7 +4,7 class CreateWikiContents < ActiveRecord::Migration
4 t.column :page_id, :integer, :null => false
4 t.column :page_id, :integer, :null => false
5 t.column :author_id, :integer
5 t.column :author_id, :integer
6 t.column :text, :text
6 t.column :text, :text
7 t.column :comment, :string, :limit => 255, :default => ""
7 t.column :comments, :string, :limit => 255, :default => ""
8 t.column :updated_on, :datetime, :null => false
8 t.column :updated_on, :datetime, :null => false
9 t.column :version, :integer, :null => false
9 t.column :version, :integer, :null => false
10 end
10 end
@@ -16,7 +16,7 class CreateWikiContents < ActiveRecord::Migration
16 t.column :author_id, :integer
16 t.column :author_id, :integer
17 t.column :data, :binary
17 t.column :data, :binary
18 t.column :compression, :string, :limit => 6, :default => ""
18 t.column :compression, :string, :limit => 6, :default => ""
19 t.column :comment, :string, :limit => 255, :default => ""
19 t.column :comments, :string, :limit => 255, :default => ""
20 t.column :updated_on, :datetime, :null => false
20 t.column :updated_on, :datetime, :null => false
21 t.column :version, :integer, :null => false
21 t.column :version, :integer, :null => false
22 end
22 end
@@ -5,7 +5,7 class CreateTimeEntries < ActiveRecord::Migration
5 t.column :user_id, :integer, :null => false
5 t.column :user_id, :integer, :null => false
6 t.column :issue_id, :integer
6 t.column :issue_id, :integer
7 t.column :hours, :float, :null => false
7 t.column :hours, :float, :null => false
8 t.column :comment, :string, :limit => 255
8 t.column :comments, :string, :limit => 255
9 t.column :activity_id, :integer, :null => false
9 t.column :activity_id, :integer, :null => false
10 t.column :spent_on, :date, :null => false
10 t.column :spent_on, :date, :null => false
11 t.column :tyear, :integer, :null => false
11 t.column :tyear, :integer, :null => false
@@ -5,7 +5,7 class CreateChangesets < ActiveRecord::Migration
5 t.column :revision, :integer, :null => false
5 t.column :revision, :integer, :null => false
6 t.column :committer, :string, :limit => 30
6 t.column :committer, :string, :limit => 30
7 t.column :committed_on, :datetime, :null => false
7 t.column :committed_on, :datetime, :null => false
8 t.column :comment, :text
8 t.column :comments, :text
9 end
9 end
10 add_index :changesets, [:repository_id, :revision], :unique => true, :name => :changesets_repos_rev
10 add_index :changesets, [:repository_id, :revision], :unique => true, :name => :changesets_repos_rev
11 end
11 end
@@ -139,7 +139,7 field_start_date: Beginn
139 field_done_ratio: %% erledigt
139 field_done_ratio: %% erledigt
140 field_auth_source: Authentifizierungs-Modus
140 field_auth_source: Authentifizierungs-Modus
141 field_hide_mail: Email Adresse nicht anzeigen
141 field_hide_mail: Email Adresse nicht anzeigen
142 field_comment: Kommentar
142 field_comments: Kommentar
143 field_url: URL
143 field_url: URL
144 field_start_page: Hauptseite
144 field_start_page: Hauptseite
145 field_subproject: Subprojekt von
145 field_subproject: Subprojekt von
@@ -139,7 +139,7 field_start_date: Start
139 field_done_ratio: %% Done
139 field_done_ratio: %% Done
140 field_auth_source: Authentication mode
140 field_auth_source: Authentication mode
141 field_hide_mail: Hide my email address
141 field_hide_mail: Hide my email address
142 field_comment: Comment
142 field_comments: Comment
143 field_url: URL
143 field_url: URL
144 field_start_page: Start page
144 field_start_page: Start page
145 field_subproject: Subproject
145 field_subproject: Subproject
@@ -139,7 +139,7 field_start_date: Comienzo
139 field_done_ratio: %% Realizado
139 field_done_ratio: %% Realizado
140 field_auth_source: Modo de la autentificación
140 field_auth_source: Modo de la autentificación
141 field_hide_mail: Ocultar mi email address
141 field_hide_mail: Ocultar mi email address
142 field_comment: Comentario
142 field_comments: Comentario
143 field_url: URL
143 field_url: URL
144 field_start_page: Página principal
144 field_start_page: Página principal
145 field_subproject: Proyecto secundario
145 field_subproject: Proyecto secundario
@@ -139,7 +139,7 field_start_date: Début
139 field_done_ratio: %% Réalisé
139 field_done_ratio: %% Réalisé
140 field_auth_source: Mode d'authentification
140 field_auth_source: Mode d'authentification
141 field_hide_mail: Cacher mon adresse mail
141 field_hide_mail: Cacher mon adresse mail
142 field_comment: Commentaire
142 field_comments: Commentaire
143 field_url: URL
143 field_url: URL
144 field_start_page: Page de démarrage
144 field_start_page: Page de démarrage
145 field_subproject: Sous-projet
145 field_subproject: Sous-projet
@@ -139,7 +139,7 field_start_date: Inizio
139 field_done_ratio: %% completo
139 field_done_ratio: %% completo
140 field_auth_source: Modalità di autenticazione
140 field_auth_source: Modalità di autenticazione
141 field_hide_mail: Nascondi il mio indirizzo di e-mail
141 field_hide_mail: Nascondi il mio indirizzo di e-mail
142 field_comment: Commento
142 field_comments: Commento
143 field_url: URL
143 field_url: URL
144 field_start_page: Pagina principale
144 field_start_page: Pagina principale
145 field_subproject: Sottoprogetto
145 field_subproject: Sottoprogetto
@@ -140,7 +140,7 field_start_date: 開始日
140 field_done_ratio: 進捗 %%
140 field_done_ratio: 進捗 %%
141 field_auth_source: 認証モード
141 field_auth_source: 認証モード
142 field_hide_mail: メールアドレスを隠す
142 field_hide_mail: メールアドレスを隠す
143 field_comment: コメント
143 field_comments: コメント
144 field_url: URL
144 field_url: URL
145 field_start_page: メインページ
145 field_start_page: メインページ
146 field_subproject: サブプロジェクト
146 field_subproject: サブプロジェクト
@@ -139,7 +139,7 field_start_date: Inicio
139 field_done_ratio: %% Terminado
139 field_done_ratio: %% Terminado
140 field_auth_source: Modo de autenticacao
140 field_auth_source: Modo de autenticacao
141 field_hide_mail: Esconder meu email
141 field_hide_mail: Esconder meu email
142 field_comment: Comentario
142 field_comments: Comentario
143 field_url: URL
143 field_url: URL
144 field_start_page: Pagina inicial
144 field_start_page: Pagina inicial
145 field_subproject: Sub-projeto
145 field_subproject: Sub-projeto
@@ -142,7 +142,7 field_start_date: 开始
142 field_done_ratio: %% 完成
142 field_done_ratio: %% 完成
143 field_auth_source: 认证模式
143 field_auth_source: 认证模式
144 field_hide_mail: 隐藏我的邮件
144 field_hide_mail: 隐藏我的邮件
145 field_comment: 注释
145 field_comments: 注释
146 field_url: URL
146 field_url: URL
147 field_start_page: 起始页
147 field_start_page: 起始页
148 field_subproject: 子项目
148 field_subproject: 子项目
@@ -4,7 +4,7 changesets_001:
4 committed_on: 2007-04-11 15:14:44 +02:00
4 committed_on: 2007-04-11 15:14:44 +02:00
5 revision: 1
5 revision: 1
6 id: 100
6 id: 100
7 comment: My very first commit
7 comments: My very first commit
8 repository_id: 10
8 repository_id: 10
9 committer: dlopper
9 committer: dlopper
10 changesets_002:
10 changesets_002:
@@ -12,7 +12,7 changesets_002:
12 committed_on: 2007-04-12 15:14:44 +02:00
12 committed_on: 2007-04-12 15:14:44 +02:00
13 revision: 2
13 revision: 2
14 id: 101
14 id: 101
15 comment: 'This commit fixes #1, #2 and references #3'
15 comments: 'This commit fixes #1, #2 and references #3'
16 repository_id: 10
16 repository_id: 10
17 committer: dlopper
17 committer: dlopper
18 changesets_003:
18 changesets_003:
@@ -20,7 +20,7 changesets_003:
20 committed_on: 2007-04-12 15:14:44 +02:00
20 committed_on: 2007-04-12 15:14:44 +02:00
21 revision: 3
21 revision: 3
22 id: 102
22 id: 102
23 comment: |-
23 comments: |-
24 A commit with wrong issue ids
24 A commit with wrong issue ids
25 IssueID 666 3
25 IssueID 666 3
26 repository_id: 10
26 repository_id: 10
@@ -30,7 +30,7 changesets_004:
30 committed_on: 2007-04-12 15:14:44 +02:00
30 committed_on: 2007-04-12 15:14:44 +02:00
31 revision: 4
31 revision: 4
32 id: 103
32 id: 103
33 comment: |-
33 comments: |-
34 A commit with an issue id of an other project
34 A commit with an issue id of an other project
35 IssueID 4 2
35 IssueID 4 2
36 repository_id: 10
36 repository_id: 10
@@ -4,7 +4,7 comments_001:
4 commented_id: 1
4 commented_id: 1
5 id: 1
5 id: 1
6 author_id: 1
6 author_id: 1
7 comment: my first comment
7 comments: my first comment
8 created_on: 2006-12-10 18:10:10 +01:00
8 created_on: 2006-12-10 18:10:10 +01:00
9 updated_on: 2006-12-10 18:10:10 +01:00
9 updated_on: 2006-12-10 18:10:10 +01:00
10 No newline at end of file
10
@@ -5,7 +5,7 wiki_content_versions_001:
5 id: 1
5 id: 1
6 version: 1
6 version: 1
7 author_id: 1
7 author_id: 1
8 comment: Page creation
8 comments: Page creation
9 wiki_content_id: 1
9 wiki_content_id: 1
10 compression: ""
10 compression: ""
11 data: |-
11 data: |-
@@ -18,7 +18,7 wiki_content_versions_002:
18 updated_on: 2007-03-07 00:08:34 +01:00
18 updated_on: 2007-03-07 00:08:34 +01:00
19 page_id: 1
19 page_id: 1
20 id: 2
20 id: 2
21 version: 2
21 version: 2
22 author_id: 1
22 author_id: 1
23 comment: Small update
23 comments: Small update
24 wiki_content_id: 1
24 wiki_content_id: 1
@@ -31,7 +31,7 wiki_content_versions_003:
31 Some updated [[documentation]] here...
31 Some updated [[documentation]] here...
32 wiki_content_versions_003:
32 wiki_content_versions_003:
33 updated_on: 2007-03-07 00:10:51 +01:00
33 updated_on: 2007-03-07 00:10:51 +01:00
34 page_id: 1
34 page_id: 1
35 id: 3
35 id: 3
36 version: 3
36 version: 3
37 author_id: 1
37 author_id: 1
@@ -9,4 +9,4 wiki_contents_001:
9 updated_on: 2007-03-07 00:10:51 +01:00
9 updated_on: 2007-03-07 00:10:51 +01:00
10 page_id: 1
10 page_id: 1
11 id: 1
11 id: 1
12 version: 3
12 version: 3
@@ -26,7 +26,7 class CommentTest < Test::Unit::TestCase
26 end
26 end
27
27
28 def test_create
28 def test_create
29 comment = Comment.new(:commented => @news, :author => @jsmith, :comment => "my comment")
29 comment = Comment.new(:commented => @news, :author => @jsmith, :comments => "my comment")
30 assert comment.save
30 assert comment.save
31 @news.reload
31 @news.reload
32 assert_equal 2, @news.comments_count
32 assert_equal 2, @news.comments_count
@@ -27,7 +27,7 class WikiContentTest < Test::Unit::TestCase
27
27
28 def test_create
28 def test_create
29 page = WikiPage.new(:wiki => @wiki, :title => "Page")
29 page = WikiPage.new(:wiki => @wiki, :title => "Page")
30 page.content = WikiContent.new(:text => "Content text", :author => User.find(1), :comment => "My comment")
30 page.content = WikiContent.new(:text => "Content text", :author => User.find(1), :comments => "My comment")
31 assert page.save
31 assert page.save
32 page.reload
32 page.reload
33
33
@@ -36,7 +36,7 class WikiContentTest < Test::Unit::TestCase
36 assert_equal 1, content.version
36 assert_equal 1, content.version
37 assert_equal 1, content.versions.length
37 assert_equal 1, content.versions.length
38 assert_equal "Content text", content.text
38 assert_equal "Content text", content.text
39 assert_equal "My comment", content.comment
39 assert_equal "My comment", content.comments
40 assert_equal User.find(1), content.author
40 assert_equal User.find(1), content.author
41 assert_equal content.text, content.versions.last.text
41 assert_equal content.text, content.versions.last.text
42 end
42 end
General Comments 0
You need to be logged in to leave comments. Login now