diff --git a/README.rdoc b/README.rdoc index fb70acaac..10c170474 100644 --- a/README.rdoc +++ b/README.rdoc @@ -2,4 +2,4 @@ Redmine is a flexible project management web application written using Ruby on Rails framework. -More details can be found at http://www.redmine.org +More details can be found at in the doc directory or on the official website http://www.redmine.org diff --git a/app/controllers/gantts_controller.rb b/app/controllers/gantts_controller.rb index bc2d6350c..e762c19c8 100644 --- a/app/controllers/gantts_controller.rb +++ b/app/controllers/gantts_controller.rb @@ -37,7 +37,7 @@ class GanttsController < ApplicationController respond_to do |format| format.html { render :action => "show", :layout => !request.xhr? } - format.png { send_data(@gantt.to_image, :disposition => 'inline', :type => 'image/png', :filename => "#{basename}.png") } if @gantt.respond_to?('to_image') + format.png { send_data(@gantt.to_image(@project), :disposition => 'inline', :type => 'image/png', :filename => "#{basename}.png") } if @gantt.respond_to?('to_image') format.pdf { send_data(gantt_to_pdf(@gantt, @project), :type => 'application/pdf', :filename => "#{basename}.pdf") } end end diff --git a/app/controllers/versions_controller.rb b/app/controllers/versions_controller.rb index 05c9743eb..46b4778d4 100644 --- a/app/controllers/versions_controller.rb +++ b/app/controllers/versions_controller.rb @@ -27,6 +27,9 @@ class VersionsController < ApplicationController helper :projects def show + @issues = @version.fixed_issues.visible.find(:all, + :include => [:status, :tracker, :priority], + :order => "#{Tracker.table_name}.position, #{Issue.table_name}.id") end def new diff --git a/app/models/change.rb b/app/models/change.rb index e5c1585b4..657652c9d 100644 --- a/app/models/change.rb +++ b/app/models/change.rb @@ -19,12 +19,13 @@ class Change < ActiveRecord::Base belongs_to :changeset validates_presence_of :changeset_id, :action, :path + before_save :init_path def relative_path changeset.repository.relative_path(path) end - def before_save - path ||= "" + def init_path + self.path ||= "" end end diff --git a/app/models/issue_status.rb b/app/models/issue_status.rb index fdda12a8c..f376d5d15 100644 --- a/app/models/issue_status.rb +++ b/app/models/issue_status.rb @@ -17,8 +17,10 @@ class IssueStatus < ActiveRecord::Base before_destroy :check_integrity - has_many :workflows, :foreign_key => "old_status_id", :dependent => :delete_all + has_many :workflows, :foreign_key => "old_status_id" acts_as_list + + before_destroy :delete_workflows validates_presence_of :name validates_uniqueness_of :name @@ -89,4 +91,9 @@ private def check_integrity raise "Can't delete status" if Issue.find(:first, :conditions => ["status_id=?", self.id]) end + + # Deletes associated workflows + def delete_workflows + Workflow.delete_all(["old_status_id = :id OR new_status_id = :id", {:id => id}]) + end end diff --git a/app/models/user.rb b/app/models/user.rb index 8148ae3a9..db18db49e 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -79,6 +79,10 @@ class User < Principal super end + def mail=(arg) + write_attribute(:mail, arg.to_s.strip) + end + def identity_url=(url) if url.blank? write_attribute(:identity_url, '') diff --git a/app/views/admin/_menu.rhtml b/app/views/admin/_menu.rhtml index 9b3bc66b4..a8de88850 100644 --- a/app/views/admin/_menu.rhtml +++ b/app/views/admin/_menu.rhtml @@ -3,7 +3,6 @@
  • <%= link_to l(:label_project_plural), {:controller => 'admin', :action => 'projects'}, :class => 'projects' %>
  • <%= link_to l(:label_user_plural), {:controller => 'users'}, :class => 'users' %>
  • <%= link_to l(:label_group_plural), {:controller => 'groups'}, :class => 'groups' %>
  • -
  • <%= link_to l(:label_ldap_authentication), :controller => 'ldap_auth_sources', :action => 'index' %>
  • <%= link_to l(:label_role_and_permissions), {:controller => 'roles'}, :class => 'roles' %>
  • <%= link_to l(:label_tracker_plural), {:controller => 'trackers'}, :class => 'trackers' %>
  • <%= link_to l(:label_issue_status_plural), {:controller => 'issue_statuses'}, :class => 'issue_statuses' %>
  • @@ -11,6 +10,7 @@
  • <%= link_to l(:label_custom_field_plural), {:controller => 'custom_fields'}, :class => 'custom_fields' %>
  • <%= link_to l(:label_enumerations), {:controller => 'enumerations'}, :class => 'enumerations' %>
  • <%= link_to l(:label_settings), {:controller => 'settings'}, :class => 'settings' %>
  • +
  • <%= link_to l(:label_ldap_authentication), {:controller => 'ldap_auth_sources', :action => 'index'}, :class => 'server_authentication' %>
  • <% menu_items_for(:admin_menu) do |item| -%>
  • <%= link_to h(item.caption), item.url, item.html_options %>
  • <% end -%> diff --git a/app/views/attachments/_form.rhtml b/app/views/attachments/_form.rhtml index 7702f92e2..6d387d1c2 100644 --- a/app/views/attachments/_form.rhtml +++ b/app/views/attachments/_form.rhtml @@ -1,6 +1,5 @@ -<%= file_field_tag 'attachments[1][file]', :size => 30, :id => nil -%> -
    diff --git a/app/views/issues/context_menu.rhtml b/app/views/issues/context_menu.rhtml index e8d67ce41..d9e92a4f8 100644 --- a/app/views/issues/context_menu.rhtml +++ b/app/views/issues/context_menu.rhtml @@ -8,7 +8,7 @@ <%= l(:field_status) %> @@ -34,7 +34,7 @@ @@ -83,7 +83,7 @@ diff --git a/app/views/issues/index.rhtml b/app/views/issues/index.rhtml index beece6275..1778f4d64 100644 --- a/app/views/issues/index.rhtml +++ b/app/views/issues/index.rhtml @@ -70,6 +70,7 @@ <% end %> <% end %> +<%= call_hook(:view_issues_index_bottom, { :issues => @issues, :project => @project, :query => @query }) %> <% content_for :sidebar do %> <%= render :partial => 'issues/sidebar' %> diff --git a/app/views/messages/show.rhtml b/app/views/messages/show.rhtml index 5c949d48f..a27b5d114 100644 --- a/app/views/messages/show.rhtml +++ b/app/views/messages/show.rhtml @@ -30,7 +30,7 @@

    <%= avatar(message.author, :size => "24") %> - <%= link_to h(message.subject), { :controller => 'messages', :action => 'show', :board_id => @board, :id => @topic, :anchor => "message-#{message.id}" } %> + <%= link_to h(message.subject), { :controller => 'messages', :action => 'show', :board_id => @board, :id => @topic, :r => message, :anchor => "message-#{message.id}" } %> - <%= authoring message.created_on, message.author %>

    diff --git a/app/views/settings/_authentication.rhtml b/app/views/settings/_authentication.rhtml index 7e8e693df..da29bb704 100644 --- a/app/views/settings/_authentication.rhtml +++ b/app/views/settings/_authentication.rhtml @@ -20,7 +20,7 @@
    - <%= link_to l(:label_ldap_authentication), :controller => 'ldap_auth_sources', :action => 'index' %> + <%= link_to l(:label_ldap_authentication), {:controller => 'ldap_auth_sources', :action => 'index'}, :class => 'icon icon-server-authentication' %>
    <%= submit_tag l(:button_save) %> diff --git a/app/views/versions/show.rhtml b/app/views/versions/show.rhtml index 18bc6bc45..79de5984b 100644 --- a/app/views/versions/show.rhtml +++ b/app/views/versions/show.rhtml @@ -32,13 +32,10 @@ <%= render :partial => 'versions/overview', :locals => {:version => @version} %> <%= render(:partial => "wiki/content", :locals => {:content => @version.wiki_page.content}) if @version.wiki_page %> -<% issues = @version.fixed_issues.find(:all, - :include => [:status, :tracker, :priority], - :order => "#{Tracker.table_name}.position, #{Issue.table_name}.id") %> -<% if issues.size > 0 %> +<% if @issues.present? %>