Move hardcoded calendar images to css classes.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3477 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2010-02-23 21:10:15 +00:00
parent a2537b3969
commit 01dbba72ab
8 changed files with 10 additions and 11 deletions

View File

@ -11,14 +11,7 @@ while day <= calendar.enddt %>
<p class="day-num"><%= day.day %></p> <p class="day-num"><%= day.day %></p>
<% calendar.events_on(day).each do |i| %> <% calendar.events_on(day).each do |i| %>
<% if i.is_a? Issue %> <% if i.is_a? Issue %>
<div class="<%= i.css_classes %> tooltip"> <div class="<%= i.css_classes %> <%= 'starting' if day == i.start_date %> <%= 'ending' if day == i.due_date %> tooltip">
<%= if day == i.start_date && day == i.due_date
image_tag('arrow_bw.png')
elsif day == i.start_date
image_tag('arrow_from.png')
elsif day == i.due_date
image_tag('arrow_to.png')
end %>
<%= h("#{i.project} -") unless @project && @project == i.project %> <%= h("#{i.project} -") unless @project && @project == i.project %>
<%= link_to_issue i, :truncate => 30 %> <%= link_to_issue i, :truncate => 30 %>
<span class="tip"><%= render_issue_tooltip i %></span> <span class="tip"><%= render_issue_tooltip i %></span>

View File

@ -40,9 +40,11 @@
<% if @query.valid? %> <% if @query.valid? %>
<%= render :partial => 'common/calendar', :locals => {:calendar => @calendar} %> <%= render :partial => 'common/calendar', :locals => {:calendar => @calendar} %>
<%= image_tag 'arrow_from.png' %>&nbsp;&nbsp;<%= l(:text_tip_task_begin_day) %><br /> <p class="legend cal">
<%= image_tag 'arrow_to.png' %>&nbsp;&nbsp;<%= l(:text_tip_task_end_day) %><br /> <span class="starting"><%= l(:text_tip_task_begin_day) %></span>
<%= image_tag 'arrow_bw.png' %>&nbsp;&nbsp;<%= l(:text_tip_task_begin_end_day) %><br /> <span class="ending"><%= l(:text_tip_task_end_day) %></span>
<span class="starting ending"><%= l(:text_tip_task_begin_end_day) %></span>
</p>
<% end %> <% end %>
<% content_for :sidebar do %> <% content_for :sidebar do %>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 885 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 882 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 884 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 329 B

View File

@ -481,6 +481,10 @@ table.cal td p.day-num {font-size: 1.1em; text-align:right;}
table.cal td.odd p.day-num {color: #bbb;} table.cal td.odd p.day-num {color: #bbb;}
table.cal td.today {background:#ffffdd;} table.cal td.today {background:#ffffdd;}
table.cal td.today p.day-num {font-weight: bold;} table.cal td.today p.day-num {font-weight: bold;}
table.cal .starting a, p.cal.legend .starting {background: url(../images/bullet_go.png) no-repeat -1px -2px; padding-left:16px;}
table.cal .ending a, p.cal.legend .ending {background: url(../images/bullet_end.png) no-repeat -1px -2px; padding-left:16px;}
table.cal .starting.ending a, p.cal.legend .starting.ending {background: url(../images/bullet_diamond.png) no-repeat -1px -2px; padding-left:16px;}
p.cal.legend span {display:block;}
/***** Tooltips ******/ /***** Tooltips ******/
.tooltip{position:relative;z-index:24;} .tooltip{position:relative;z-index:24;}