From 2679cc2045a77b55cbef23dfc33970c12d674f70 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 5 Apr 2009 12:03:03 +0000 Subject: [PATCH] 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 --- app/models/journal.rb | 2 +- app/models/news.rb | 2 +- app/models/project.rb | 2 +- app/views/issues/_sidebar.rhtml | 4 ++-- app/views/mailer/layout.text.plain.rhtml | 2 +- app/views/projects/_form.rhtml | 2 +- app/views/wiki/show.rhtml | 2 ++ doc/CHANGELOG | 6 ++++++ public/stylesheets/application.css | 7 ++++--- 9 files changed, 19 insertions(+), 10 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? %>

<%= l(:label_planning) %>

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 @@

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

<%= f.text_field :identifier, :required => true, :disabled => @project.identifier_frozen? %> <% unless @project.identifier_frozen? %> -
<%= l(:text_length_between, 2, 20) %> <%= l(:text_project_identifier_info) %> +
<%= l(:text_length_between, 1, 20) %> <%= l(:text_project_identifier_info) %> <% end %>

<%= f.text_field :homepage, :size => 60 %>

<%= f.check_box :is_public %>

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') %> +

<%= 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' %>

<% 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 %> +
<% end %>

diff --git a/doc/CHANGELOG b/doc/CHANGELOG index 9c85e4bfb..5ffacce0c 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -11,9 +11,15 @@ http://www.redmine.org/ * Ability to set language for redmine:load_default_data task using REDMINE_LANG environment variable * Rescue Redmine::DefaultData::DataAlreadyLoaded in redmine:load_default_data task * CSS classes to highlight own and assigned issues +* Hide "New file" link on wiki pages from printing * Flush buffer when asking for language in redmine:load_default_data task +* Minimum project identifier length set to 1 * Fixed: Time entries csv export links for all projects are malformed * Fixed: Files without Version aren't visible in the Activity page +* Fixed: Commit logs are centered in the repo browser +* Fixed: News summary field content is not searchable +* Fixed: Journal#save has a wrong signature +* Fixed: Email footer signature convention == 2009-03-07 v0.8.2 diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 2e60ee4bc..383ea7505 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -104,9 +104,9 @@ tr.entry.file td.filename a { margin-left: 16px; } tr.changeset td.author { text-align: center; width: 15%; } tr.changeset td.committed_on { text-align: center; width: 15%; } -tr.file td { text-align: center; } -tr.file td.filename { text-align: left; padding-left: 24px; } -tr.file td.digest { font-size: 80%; } +table.files tr.file td { text-align: center; } +table.files tr.file td.filename { text-align: left; padding-left: 24px; } +table.files tr.file td.digest { font-size: 80%; } tr.message { height: 2.6em; } tr.message td.last_message { font-size: 80%; } @@ -683,4 +683,5 @@ h2 img { vertical-align:middle; } #top-menu, #header, #main-menu, #sidebar, #footer, .contextual, .other-formats { display:none; } #main { background: #fff; } #content { width: 99%; margin: 0; padding: 0; border: 0; background: #fff; overflow: visible !important;} + #wiki_add_attachment { display:none; } }