diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 7b62312b..165333e7 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -463,7 +463,7 @@ class ProjectsController < ApplicationController # finish on sunday @date_to = @date_to + (7-@date_to.cwday) - @issues = @project.issues.find(:all, :include => :tracker, :conditions => ["((start_date>=? and start_date<=?) or (due_date>=? and due_date<=?))", @date_from, @date_to, @date_from, @date_to]) + @issues = @project.issues.find(:all, :include => [:tracker, :status, :assigned_to, :priority], :conditions => ["((start_date>=? and start_date<=?) or (due_date>=? and due_date<=?))", @date_from, @date_to, @date_from, @date_to]) render :layout => false if request.xhr? end @@ -485,7 +485,7 @@ class ProjectsController < ApplicationController @date_from = Date.civil(@year_from, @month_from, 1) @date_to = (@date_from >> @months) - 1 - @issues = @project.issues.find(:all, :order => "start_date, due_date", :include => [:tracker, :status, :author, :priority], :conditions => ["(((start_date>=? and start_date<=?) or (due_date>=? and due_date<=?) or (start_date?)) and start_date is not null and due_date is not null)", @date_from, @date_to, @date_from, @date_to, @date_from, @date_to]) + @issues = @project.issues.find(:all, :order => "start_date, due_date", :include => [:tracker, :status, :assigned_to, :priority], :conditions => ["(((start_date>=? and start_date<=?) or (due_date>=? and due_date<=?) or (start_date?)) and start_date is not null and due_date is not null)", @date_from, @date_to, @date_from, @date_to, @date_from, @date_to]) if params[:output]=='pdf' @options_for_rfpdf ||= {} diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index d7325893..cacc7f53 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -56,12 +56,12 @@ module IssuesHelper unless no_html label = content_tag('strong', label) - old_value = content_tag("i", h(old_value)) if old_value - old_value = content_tag("strike", h(old_value)) if old_value and !value + old_value = content_tag("i", h(old_value)) if detail.old_value + old_value = content_tag("strike", old_value) if detail.old_value and (!detail.value or detail.value.empty?) value = content_tag("i", h(value)) if value end - if value + if detail.value and !detail.value.empty? if old_value label + " " + l(:text_journal_changed, old_value, value) else diff --git a/app/views/issues/_tooltip.rhtml b/app/views/issues/_tooltip.rhtml new file mode 100644 index 00000000..d7b555e4 --- /dev/null +++ b/app/views/issues/_tooltip.rhtml @@ -0,0 +1,6 @@ +<%= link_to "#{issue.tracker.name} ##{issue.id}", { :controller => 'issues', :action => 'show', :id => issue } %>: <%=h issue.subject %>
+
+<%= l(:field_start_date) %>: <%= format_date(issue.start_date) %>
+<%= l(:field_due_date) %>: <%= format_date(issue.due_date) %>
+<%= l(:field_assigned_to) %>: <%= issue.assigned_to ? issue.assigned_to.name : "-" %>
+<%= l(:field_priority) %>: <%= issue.priority.name %> diff --git a/app/views/projects/calendar.rhtml b/app/views/projects/calendar.rhtml index b750b0b5..809d593d 100644 --- a/app/views/projects/calendar.rhtml +++ b/app/views/projects/calendar.rhtml @@ -41,11 +41,12 @@ while day <= @date_to if day.cwday == 1 %> <%= day.cweek %> <% end %> - "> + " style="width:14%; <%= Date.today == day ? 'background:#FDFED0;' : '' %>">

<%= day==Date.today ? "#{day.day}" : day.day %>

<% day_issues = [] @issues.each { |i| day_issues << i if i.start_date == day or i.due_date == day } - day_issues.each do |i| %> + day_issues.each do |i| %> +
<%= if day == i.start_date and day == i.due_date image_tag('arrow_bw.png') elsif day == i.start_date @@ -53,7 +54,11 @@ while day <= @date_to elsif day == i.due_date image_tag('arrow_to.png') end %> - <%= link_to "#{i.tracker.name} ##{i.id}", { :controller => 'issues', :action => 'show', :id => i }, :title => "#{i.subject}" %>: <%=h i.subject.sub(/^(.{30}[^\s]*\s).*$/, '\1 (...)') %>
+ <%= link_to "#{i.tracker.name} ##{i.id}", { :controller => 'issues', :action => 'show', :id => i } %>: <%=h i.subject.sub(/^(.{30}[^\s]*\s).*$/, '\1 (...)') %> + + <%= render :partial => "issues/tooltip", :locals => { :issue => i }%> + +
<% end %> <%= '' if day.cwday >= 7 and day!=@date_to %> diff --git a/app/views/projects/gantt.rhtml b/app/views/projects/gantt.rhtml index 5f6c96e9..f20e9282 100644 --- a/app/views/projects/gantt.rhtml +++ b/app/views/projects/gantt.rhtml @@ -196,13 +196,9 @@ top = headers_heigth + 10 <%= (i.done_ratio).to_i %>% <% # === tooltip === %> -
- <%= "#{i.tracker.name} ##{i.id}" %>: <%=h i.subject %>
-
- <%= l(:field_start_date) %>: <%= format_date(i.start_date) %>
- <%= l(:field_due_date) %>: <%= format_date(i.due_date) %>
- <%= l(:field_assigned_to) %>: <%= i.assigned_to ? i.assigned_to.name : "-" %>
- <%=l(:field_priority)%>: <%= i.priority.name %> +
+ + <%= render :partial => "issues/tooltip", :locals => { :issue => i }%>
<% top = top + 20 end %> diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 6fed472a..1e78b332 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -558,14 +558,14 @@ font-size: 1em; .task_todo { background:#aaa url(../images/task_todo.png); border: 1px solid #aaa; } /***** Tooltips ******/ -.tooltip{position:absolute;z-index:24;} +.tooltip{position:relative;z-index:24;} .tooltip:hover{z-index:25;color:#000;} .tooltip span.tip{display: none} div.tooltip:hover span.tip{ display:block; position:absolute; -top:12px; left:20px; width:270px; +top:12px; left:24px; width:270px; border:1px solid #555; background-color:#fff; padding: 4px;