diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-04-05 12:03:03 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-04-05 12:03:03 +0000 |
commit | 2679cc2045a77b55cbef23dfc33970c12d674f70 (patch) | |
tree | dc3278b065a54f169504bc2d7875bf7364af5160 /app | |
parent | b6600d5fe97261ef03fc334b36af877499225d07 (diff) | |
download | redmine-2679cc2045a77b55cbef23dfc33970c12d674f70.tar.gz redmine-2679cc2045a77b55cbef23dfc33970c12d674f70.zip |
Merged r2574, r2578, r2589, r2615, r2641, r2645, r2646 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.8-stable@2651 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/models/journal.rb | 2 | ||||
-rw-r--r-- | app/models/news.rb | 2 | ||||
-rw-r--r-- | app/models/project.rb | 2 | ||||
-rw-r--r-- | app/views/issues/_sidebar.rhtml | 4 | ||||
-rw-r--r-- | app/views/mailer/layout.text.plain.rhtml | 2 | ||||
-rw-r--r-- | app/views/projects/_form.rhtml | 2 | ||||
-rw-r--r-- | app/views/wiki/show.rhtml | 2 |
7 files changed, 9 insertions, 7 deletions
diff --git a/app/models/journal.rb b/app/models/journal.rb index 72e7eb91c..a0e1ae877 100644 --- a/app/models/journal.rb +++ b/app/models/journal.rb @@ -38,7 +38,7 @@ class Journal < ActiveRecord::Base :conditions => "#{Journal.table_name}.journalized_type = 'Issue' AND" + " (#{JournalDetail.table_name}.prop_key = 'status_id' OR #{Journal.table_name}.notes <> '')"} - def save + def save(*args) # Do not save an empty journal (details.empty? && notes.blank?) ? false : super end diff --git a/app/models/news.rb b/app/models/news.rb index 5949a731b..c53fb05f9 100644 --- a/app/models/news.rb +++ b/app/models/news.rb @@ -24,7 +24,7 @@ class News < ActiveRecord::Base validates_length_of :title, :maximum => 60 validates_length_of :summary, :maximum => 255 - acts_as_searchable :columns => ['title', "#{table_name}.description"], :include => :project + acts_as_searchable :columns => ['title', 'summary', "#{table_name}.description"], :include => :project acts_as_event :url => Proc.new {|o| {:controller => 'news', :action => 'show', :id => o.id}} acts_as_activity_provider :find_options => {:include => [:project, :author]}, :author_key => :author_id diff --git a/app/models/project.rb b/app/models/project.rb index c792b9c3b..a04c5ad77 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -60,7 +60,7 @@ class Project < ActiveRecord::Base validates_associated :repository, :wiki validates_length_of :name, :maximum => 30 validates_length_of :homepage, :maximum => 255 - validates_length_of :identifier, :in => 2..20 + validates_length_of :identifier, :in => 1..20 validates_format_of :identifier, :with => /^[a-z0-9\-]*$/ before_destroy :delete_all_members diff --git a/app/views/issues/_sidebar.rhtml b/app/views/issues/_sidebar.rhtml index bbc00f091..de0c538fb 100644 --- a/app/views/issues/_sidebar.rhtml +++ b/app/views/issues/_sidebar.rhtml @@ -7,8 +7,8 @@ <%= call_hook(:view_issues_sidebar_issues_bottom) %> <% planning_links = [] - planning_links << link_to(l(:label_calendar), :action => 'calendar', :project_id => @project) if User.current.allowed_to?(:view_calendar, @project, :global => true) - planning_links << link_to(l(:label_gantt), :action => 'gantt', :project_id => @project) if User.current.allowed_to?(:view_gantt, @project, :global => true) + planning_links << link_to(l(:label_calendar), :controller => 'issues', :action => 'calendar', :project_id => @project) if User.current.allowed_to?(:view_calendar, @project, :global => true) + planning_links << link_to(l(:label_gantt), :controller => 'issues', :action => 'gantt', :project_id => @project) if User.current.allowed_to?(:view_gantt, @project, :global => true) %> <% unless planning_links.empty? %> <h3><%= l(:label_planning) %></h3> diff --git a/app/views/mailer/layout.text.plain.rhtml b/app/views/mailer/layout.text.plain.rhtml index ec3e1bfa0..1cbcbc236 100644 --- a/app/views/mailer/layout.text.plain.rhtml +++ b/app/views/mailer/layout.text.plain.rhtml @@ -1,3 +1,3 @@ <%= yield %> ----------------------------------------- +-- <%= Setting.emails_footer %> diff --git a/app/views/projects/_form.rhtml b/app/views/projects/_form.rhtml index f0c9fda55..747e85eea 100644 --- a/app/views/projects/_form.rhtml +++ b/app/views/projects/_form.rhtml @@ -11,7 +11,7 @@ <p><%= f.text_area :description, :rows => 5, :class => 'wiki-edit' %></p> <p><%= f.text_field :identifier, :required => true, :disabled => @project.identifier_frozen? %> <% unless @project.identifier_frozen? %> -<br /><em><%= l(:text_length_between, 2, 20) %> <%= l(:text_project_identifier_info) %></em> +<br /><em><%= l(:text_length_between, 1, 20) %> <%= l(:text_project_identifier_info) %></em> <% end %></p> <p><%= f.text_field :homepage, :size => 60 %></p> <p><%= f.check_box :is_public %></p> diff --git a/app/views/wiki/show.rhtml b/app/views/wiki/show.rhtml index 1cb67dfd4..a3b072420 100644 --- a/app/views/wiki/show.rhtml +++ b/app/views/wiki/show.rhtml @@ -31,6 +31,7 @@ <%= link_to_attachments @page %> <% if @editable && authorize_for('wiki', 'add_attachment') %> +<div id="wiki_add_attachment"> <p><%= link_to l(:label_attachment_new), {}, :onclick => "Element.show('add_attachment_form'); Element.hide(this); Element.scrollTo('add_attachment_form'); return false;", :id => 'attach_files_link' %></p> <% form_tag({ :controller => 'wiki', :action => 'add_attachment', :page => @page.title }, :multipart => true, :id => "add_attachment_form", :style => "display:none;") do %> @@ -40,6 +41,7 @@ <%= submit_tag l(:button_add) %> <%= link_to l(:button_cancel), {}, :onclick => "Element.hide('add_attachment_form'); Element.show('attach_files_link'); return false;" %> <% end %> +</div> <% end %> <p class="other-formats"> |