Patch #966 ยป calendar_include_dry.patch
| app/helpers/application_helper.rb (working copy) | ||
|---|---|---|
|
end
|
||
|
|
||
|
def calendar_for(field_id)
|
||
|
include_calendar unless @calendar_included
|
||
|
image_tag("calendar.png", {:id => "#{field_id}_trigger",:class => "calendar-trigger"}) +
|
||
|
javascript_tag("Calendar.setup({inputField : '#{field_id}', ifFormat : '%Y-%m-%d', button : '#{field_id}_trigger' });")
|
||
|
end
|
||
|
def include_calendar
|
||
|
@calendar_included = true
|
||
|
content_for :header_tags do
|
||
|
javascript_include_tag('calendar/calendar') +
|
||
|
javascript_include_tag("calendar/lang/calendar-#{current_language}.js") +
|
||
|
javascript_include_tag('calendar/calendar-setup') +
|
||
|
stylesheet_link_tag('calendar')
|
||
|
end
|
||
|
end
|
||
|
|
||
|
def wikitoolbar_for(field_id)
|
||
|
return '' unless Setting.text_formatting == 'textile'
|
||
| app/views/timelog/report.rhtml (working copy) | ||
|---|---|---|
|
<% end %>
|
||
|
<% end %>
|
||
|
<% end %>
|
||
|
<% content_for :header_tags do %>
|
||
|
<%= javascript_include_tag 'calendar/calendar' %>
|
||
|
<%= javascript_include_tag "calendar/lang/calendar-#{current_language}.js" %>
|
||
|
<%= javascript_include_tag 'calendar/calendar-setup' %>
|
||
|
<%= stylesheet_link_tag 'calendar' %>
|
||
|
<% end %>
|
||
| app/views/timelog/details.rhtml (working copy) | ||
|---|---|---|
|
<span><%= link_to 'CSV', params.merge(:format => 'csv'), :class => 'csv' %></span>
|
||
|
</p>
|
||
|
<% end %>
|
||
|
|
||
|
<% content_for :header_tags do %>
|
||
|
<%= javascript_include_tag 'calendar/calendar' %>
|
||
|
<%= javascript_include_tag "calendar/lang/calendar-#{current_language}.js" %>
|
||
|
<%= javascript_include_tag 'calendar/calendar-setup' %>
|
||
|
<%= stylesheet_link_tag 'calendar' %>
|
||
|
<% end %>
|
||
| app/views/timelog/edit.rhtml (working copy) | ||
|---|---|---|
|
<%= submit_tag l(:button_save) %>
|
||
|
|
||
|
<% end %>
|
||
|
|
||
|
<% content_for :header_tags do %>
|
||
|
<%= javascript_include_tag 'calendar/calendar' %>
|
||
|
<%= javascript_include_tag "calendar/lang/calendar-#{current_language}.js" %>
|
||
|
<%= javascript_include_tag 'calendar/calendar-setup' %>
|
||
|
<%= stylesheet_link_tag 'calendar' %>
|
||
|
<% end %>
|
||
| app/views/users/_form.rhtml (working copy) | ||
|---|---|---|
|
</div>
|
||
|
</div>
|
||
|
<!--[eoform:user]-->
|
||
|
<% content_for :header_tags do %>
|
||
|
<%= javascript_include_tag 'calendar/calendar' %>
|
||
|
<%= javascript_include_tag "calendar/lang/calendar-#{current_language}.js" %>
|
||
|
<%= javascript_include_tag 'calendar/calendar-setup' %>
|
||
|
<%= stylesheet_link_tag 'calendar' %>
|
||
|
<% end %>
|
||
| app/views/versions/_form.rhtml (working copy) | ||
|---|---|---|
|
<p><%= f.text_field :wiki_page_title, :label => :label_wiki_page, :size => 60, :disabled => @project.wiki.nil? %></p>
|
||
|
<p><%= f.text_field :effective_date, :size => 10 %><%= calendar_for('version_effective_date') %></p>
|
||
|
</div>
|
||
|
<% content_for :header_tags do %>
|
||
|
<%= javascript_include_tag 'calendar/calendar' %>
|
||
|
<%= javascript_include_tag "calendar/lang/calendar-#{current_language}.js" %>
|
||
|
<%= javascript_include_tag 'calendar/calendar-setup' %>
|
||
|
<%= stylesheet_link_tag 'calendar' %>
|
||
|
<% end %>
|
||
| app/views/projects/_form.rhtml (working copy) | ||
|---|---|---|
|
</fieldset>
|
||
|
<% end %>
|
||
|
<!--[eoform:project]-->
|
||
|
<% content_for :header_tags do %>
|
||
|
<%= javascript_include_tag 'calendar/calendar' %>
|
||
|
<%= javascript_include_tag "calendar/lang/calendar-#{current_language}.js" %>
|
||
|
<%= javascript_include_tag 'calendar/calendar-setup' %>
|
||
|
<%= stylesheet_link_tag 'calendar' %>
|
||
|
<% end %>
|
||
| app/views/account/register.rhtml (working copy) | ||
|---|---|---|
|
<%= submit_tag l(:button_submit) %>
|
||
|
<% end %>
|
||
|
<% content_for :header_tags do %>
|
||
|
<%= javascript_include_tag 'calendar/calendar' %>
|
||
|
<%= javascript_include_tag "calendar/lang/calendar-#{current_language}.js" %>
|
||
|
<%= javascript_include_tag 'calendar/calendar-setup' %>
|
||
|
<%= stylesheet_link_tag 'calendar' %>
|
||
|
<% end %>
|
||
| app/views/issues/bulk_edit.rhtml (working copy) | ||
|---|---|---|
|
<p><%= submit_tag l(:button_submit) %>
|
||
|
<% end %>
|
||
|
<% content_for :header_tags do %>
|
||
|
<%= javascript_include_tag 'calendar/calendar' %>
|
||
|
<%= javascript_include_tag "calendar/lang/calendar-#{current_language}.js" %>
|
||
|
<%= javascript_include_tag 'calendar/calendar-setup' %>
|
||
|
<%= stylesheet_link_tag 'calendar' %>
|
||
|
<% end %>
|
||
| app/views/issues/_form.rhtml (working copy) | ||
|---|---|---|
|
<% end %>
|
||
|
<%= wikitoolbar_for 'issue_description' %>
|
||
|
<% content_for :header_tags do %>
|
||
|
<%= javascript_include_tag 'calendar/calendar' %>
|
||
|
<%= javascript_include_tag "calendar/lang/calendar-#{current_language}.js" %>
|
||
|
<%= javascript_include_tag 'calendar/calendar-setup' %>
|
||
|
<%= stylesheet_link_tag 'calendar' %>
|
||
|
<% end %>
|
||