tooltips added on calendar
git-svn-id: http://redmine.rubyforge.org/svn/trunk@161 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -41,11 +41,12 @@ while day <= @date_to
|
||||
if day.cwday == 1 %>
|
||||
<th><%= day.cweek %></th>
|
||||
<% end %>
|
||||
<td valign="top" style="width:14%" class="<%= day.month==@month ? "even" : "odd" %>">
|
||||
<td valign="top" class="<%= day.month==@month ? "even" : "odd" %>" style="width:14%; <%= Date.today == day ? 'background:#FDFED0;' : '' %>">
|
||||
<p class="textright"><%= day==Date.today ? "<b>#{day.day}</b>" : day.day %></p>
|
||||
<% 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| %>
|
||||
<div class="tooltip">
|
||||
<%= 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 %>
|
||||
<small><%= link_to "#{i.tracker.name} ##{i.id}", { :controller => 'issues', :action => 'show', :id => i }, :title => "#{i.subject}" %>: <%=h i.subject.sub(/^(.{30}[^\s]*\s).*$/, '\1 (...)') %></small><br />
|
||||
<small><%= link_to "#{i.tracker.name} ##{i.id}", { :controller => 'issues', :action => 'show', :id => i } %>: <%=h i.subject.sub(/^(.{30}[^\s]*\s).*$/, '\1 (...)') %></small>
|
||||
<span class="tip">
|
||||
<%= render :partial => "issues/tooltip", :locals => { :issue => i }%>
|
||||
</span>
|
||||
</div>
|
||||
<% end %>
|
||||
</td>
|
||||
<%= '</tr><tr style="height:100px">' if day.cwday >= 7 and day!=@date_to %>
|
||||
|
||||
@@ -196,13 +196,9 @@ top = headers_heigth + 10
|
||||
<%= (i.done_ratio).to_i %>%
|
||||
</div>
|
||||
<% # === tooltip === %>
|
||||
<div style="position: absolute;top:<%= top %>px;left:<%= i_left %>px;width:<%= i_width %>px;height:12px;" class="tooltip"><span class="tip">
|
||||
<strong><%= "#{i.tracker.name} ##{i.id}" %></strong>: <%=h i.subject %><br />
|
||||
<br />
|
||||
<strong><%= l(:field_start_date) %></strong>: <%= format_date(i.start_date) %><br />
|
||||
<strong><%= l(:field_due_date) %></strong>: <%= format_date(i.due_date) %><br />
|
||||
<strong><%= l(:field_assigned_to) %></strong>: <%= i.assigned_to ? i.assigned_to.name : "-" %><br />
|
||||
<strong><%=l(:field_priority)%></strong>: <%= i.priority.name %>
|
||||
<div class="tooltip" style="position: absolute;top:<%= top %>px;left:<%= i_left %>px;width:<%= i_width %>px;height:12px;">
|
||||
<span class="tip">
|
||||
<%= render :partial => "issues/tooltip", :locals => { :issue => i }%>
|
||||
</span></div>
|
||||
<% top = top + 20
|
||||
end %>
|
||||
|
||||
Reference in New Issue
Block a user