From 8b7a775419073af56c50827d45a7e97f8ae5d9c8 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 9 Oct 2014 16:24:12 +0800 Subject: [PATCH] =?UTF-8?q?#1269=20=E4=BF=AE=E5=A4=8D=E9=A1=B9=E7=9B=AE--?= =?UTF-8?q?=E6=97=A5=E5=8E=86=E4=BF=A1=E6=81=AF=E6=98=BE=E7=A4=BA=E8=B6=85?= =?UTF-8?q?=E5=87=BA=E8=BE=B9=E6=A1=86=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/calendars/show.html.erb | 53 +++++++++++----------- app/views/common/_calendar.html.erb | 68 ++++++++++++++++------------- 2 files changed, 62 insertions(+), 59 deletions(-) diff --git a/app/views/calendars/show.html.erb b/app/views/calendars/show.html.erb index 9166974fa..65b740203 100644 --- a/app/views/calendars/show.html.erb +++ b/app/views/calendars/show.html.erb @@ -2,38 +2,35 @@ <%= form_tag({:controller => 'calendars', :action => 'show', :project_id => @project}, :method => :get, :id => 'query_form') do %> -<%= hidden_field_tag 'set_filter', '1' %> -
- -- <%= link_to_previous_month(@year, @month) %> | <%= link_to_next_month(@year, @month) %> -
- - + <%= hidden_field_tag 'set_filter', '1' %> + ++ <%= link_to_previous_month(@year, @month) %> | <%= link_to_next_month(@year, @month) %> +
+ <% end %> <%= error_messages_for 'query' %> <% if @query.valid? %> -<%= render :partial => 'common/calendar', :locals => {:calendar => @calendar} %> - -- <%= l(:text_tip_issue_begin_day) %> - <%= l(:text_tip_issue_end_day) %> - <%= l(:text_tip_issue_begin_end_day) %> -
+ <%= render :partial => 'common/calendar', :locals => {:calendar => @calendar} %> ++ <%= l(:text_tip_issue_begin_day) %> + <%= l(:text_tip_issue_end_day) %> + <%= l(:text_tip_issue_begin_end_day) %> +
<% end %> <% content_for :sidebar do %> diff --git a/app/views/common/_calendar.html.erb b/app/views/common/_calendar.html.erb index 7951b68ce..83f8e217b 100644 --- a/app/views/common/_calendar.html.erb +++ b/app/views/common/_calendar.html.erb @@ -1,32 +1,38 @@ -<% 7.times do |i| %> | <%= day_name( (calendar.first_wday+i)%7 ) %> | <% end %>
---|---|
#{(day+(11-day.cwday)%7).cweek} | ".html_safe) if day.cwday == calendar.first_wday %> -
- <%= day.day %> -<% calendar.events_on(day).each do |i| %> - <% if i.is_a? Issue %> -
- <%= h("#{i.project} -") unless @project && @project == i.project %>
- <%= link_to_issue i, :truncate => 30 %>
- <%= render_issue_tooltip i %>
-
- <% else %>
-
- <%= h("#{i.project} -") unless @project && @project == i.project %>
- <%= link_to_version i%>
-
- <% end %>
-<% end %>
- |
-<%= '
+ <% 7.times do |i| %> + + <% end %> + | |
---|---|
#{(day+(11-day.cwday)%7).cweek} | ".html_safe) if day.cwday == calendar.first_wday %> +
+ <%= day.day %> + <% calendar.events_on(day).each do |i| %> + <% if i.is_a? Issue %> +
+ <%= h("#{i.project} -") unless @project && @project == i.project %>
+ <%= link_to_issue i, :truncate => 30 %>
+ <%= render_issue_tooltip i %>
+
+ <% else %>
+
+ <%= h("#{i.project} -") unless @project && @project == i.project %>
+ <%= link_to_version i%>
+
+ <% end %>
+ <% end %>
+ |
+ <%= '