您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

show.html.erb 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <h2><%= @query.new_record? ? l(:label_calendar) : @query.name %></h2>
  2. <%= form_tag({:controller => 'calendars', :action => 'show', :project_id => @project},
  3. :method => :get, :id => 'query_form') do %>
  4. <%= hidden_field_tag 'set_filter', '1' %>
  5. <%= hidden_field_tag 'calendar', '1' %>
  6. <div id="query_form_with_buttons" class="hide-when-print">
  7. <div id="query_form_content">
  8. <fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>">
  9. <legend onclick="toggleFieldset(this);" class="icon icon-<%= @query.new_record? ? "expanded" : "collapsed" %>"><%= l(:label_filter_plural) %></legend>
  10. <div style="<%= @query.new_record? ? "" : "display: none;" %>">
  11. <%= render :partial => 'queries/filters', :locals => {:query => @query} %>
  12. </div>
  13. </fieldset>
  14. </div>
  15. <span class="contextual pagination">
  16. <ul class="pages">
  17. <li class="previous page">
  18. <%= link_to_previous_month(@year, @month, :accesskey => accesskey(:previous)) %>
  19. </li><li class="next page">
  20. <%= link_to_next_month(@year, @month, :accesskey => accesskey(:next)) %>
  21. </li>
  22. </ul>
  23. </span>
  24. <p class="buttons">
  25. <%= label_tag('month', l(:label_month)) %>
  26. <%= select_month(@month, :prefix => "month", :discard_type => true) %>
  27. <%= label_tag('year', l(:label_year)) %>
  28. <%= select_year(@year, :prefix => "year", :discard_type => true) %>
  29. <%= link_to_function l(:button_apply), '$("#query_form").submit()', :class => 'icon icon-checked' %>
  30. <%= link_to l(:button_clear), { :project_id => @project, :set_filter => 1 }, :class => 'icon icon-reload' %>
  31. <% if @query.new_record? && User.current.allowed_to?(:save_queries, @project, :global => true) %>
  32. <%= link_to_function l(:button_save_object, object_name: l(:label_query).downcase),
  33. "$('#query_form').attr('action', '#{ @project ? new_project_query_path(@project) : new_query_path }').submit();",
  34. :class => 'icon icon-save' %>
  35. <% end %>
  36. <% if !@query.new_record? && @query.editable_by?(User.current) %>
  37. <%= link_to l(:button_edit_object, object_name: l(:label_query).downcase), edit_query_path(@query, :calendar => 1), :class => 'icon icon-edit' %>
  38. <%= delete_link query_path(@query, :calendar => 1), {}, l(:button_delete_object, object_name: l(:label_query).downcase) %>
  39. <% end %>
  40. </p>
  41. </div>
  42. <% end %>
  43. <%= error_messages_for 'query' %>
  44. <% if @query.valid? %>
  45. <%= render :partial => 'common/calendar', :locals => {:calendar => @calendar} %>
  46. <%= call_hook(:view_calendars_show_bottom, :year => @year, :month => @month, :project => @project, :query => @query) %>
  47. <p class="legend cal">
  48. <span class="starting"><%= l(:text_tip_issue_begin_day) %></span>
  49. <span class="ending"><%= l(:text_tip_issue_end_day) %></span>
  50. <span class="starting ending"><%= l(:text_tip_issue_begin_end_day) %></span>
  51. </p>
  52. <% end %>
  53. <% content_for :sidebar do %>
  54. <%= render :partial => 'issues/sidebar' %>
  55. <% end %>
  56. <% html_title(l(:label_calendar)) -%>