From fe28193e4eb9af2dc5262535a29ffde5249568fc Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 21 Feb 2009 11:04:50 +0000 Subject: Merged Rails 2.2 branch. Redmine now requires Rails 2.2.2. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2493 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/common/_calendar.rhtml | 2 +- app/views/common/feed.atom.rxml | 6 +++--- app/views/custom_fields/index.rhtml | 2 +- app/views/documents/_document.rhtml | 2 +- app/views/issues/_relations.rhtml | 2 +- app/views/issues/show.rhtml | 4 ++-- app/views/mailer/issue_add.text.html.rhtml | 2 +- app/views/mailer/issue_add.text.plain.rhtml | 2 +- app/views/mailer/issue_edit.text.html.rhtml | 2 +- app/views/mailer/issue_edit.text.plain.rhtml | 2 +- app/views/mailer/reminder.text.html.rhtml | 2 +- app/views/mailer/reminder.text.plain.rhtml | 2 +- app/views/my/blocks/_issueswatched.rhtml | 3 ++- app/views/news/_news.rhtml | 2 +- app/views/news/index.rhtml | 2 +- app/views/projects/_form.rhtml | 2 +- app/views/projects/add.rhtml | 2 +- app/views/projects/settings/_modules.rhtml | 2 +- app/views/projects/show.rhtml | 7 ++++--- app/views/repositories/_dir_list_content.rhtml | 2 +- app/views/search/index.rhtml | 2 +- app/views/settings/_authentication.rhtml | 2 +- app/views/timelog/_list.rhtml | 2 +- app/views/timelog/details.rhtml | 2 +- app/views/timelog/report.rhtml | 6 +++--- app/views/versions/_overview.rhtml | 6 ++---- app/views/versions/show.rhtml | 4 ++-- 27 files changed, 38 insertions(+), 38 deletions(-) (limited to 'app/views') diff --git a/app/views/common/_calendar.rhtml b/app/views/common/_calendar.rhtml index 1095cd501..6ac9ddce6 100644 --- a/app/views/common/_calendar.rhtml +++ b/app/views/common/_calendar.rhtml @@ -20,7 +20,7 @@ while day <= calendar.enddt %> image_tag('arrow_to.png') end %> <%= h("#{i.project} -") unless @project && @project == i.project %> - <%= link_to_issue i %>: <%= h(truncate(i.subject, 30)) %> + <%= link_to_issue i %>: <%= h(truncate(i.subject, :length => 30)) %> <%= render_issue_tooltip i %> <% else %> diff --git a/app/views/common/feed.atom.rxml b/app/views/common/feed.atom.rxml index 8d07cf208..811140152 100644 --- a/app/views/common/feed.atom.rxml +++ b/app/views/common/feed.atom.rxml @@ -1,6 +1,6 @@ xml.instruct! xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do - xml.title truncate_single_line(@title, 100) + xml.title truncate_single_line(@title, :length => 100) xml.link "rel" => "self", "href" => url_for(params.merge({:format => nil, :only_path => false})) xml.link "rel" => "alternate", "href" => url_for(:controller => 'welcome', :only_path => false) xml.id url_for(:controller => 'welcome', :only_path => false) @@ -11,9 +11,9 @@ xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do xml.entry do url = url_for(item.event_url(:only_path => false)) if @project - xml.title truncate_single_line(item.event_title, 100) + xml.title truncate_single_line(item.event_title, :length => 100) else - xml.title truncate_single_line("#{item.project} - #{item.event_title}", 100) + xml.title truncate_single_line("#{item.project} - #{item.event_title}", :length => 100) end xml.link "rel" => "alternate", "href" => url xml.id url diff --git a/app/views/custom_fields/index.rhtml b/app/views/custom_fields/index.rhtml index 43ddd99c8..70b7197ff 100644 --- a/app/views/custom_fields/index.rhtml +++ b/app/views/custom_fields/index.rhtml @@ -35,7 +35,7 @@ <%= image_tag 'true.png' if custom_field.is_required? %> <% if tab[:name] == 'IssueCustomField' %> <%= image_tag 'true.png' if custom_field.is_for_all? %> - <%= custom_field.projects.count.to_s + ' ' + lwr(:label_project, custom_field.projects.count) if custom_field.is_a? IssueCustomField and !custom_field.is_for_all? %> + <%= l(:label_x_projects, :count => custom_field.projects.count) if custom_field.is_a? IssueCustomField and !custom_field.is_for_all? %> <% end %> <%= link_to image_tag('2uparrow.png', :alt => l(:label_sort_highest)), {:action => 'move', :id => custom_field, :position => 'highest'}, :method => :post, :title => l(:label_sort_highest) %> diff --git a/app/views/documents/_document.rhtml b/app/views/documents/_document.rhtml index ddfdb9eec..47b450000 100644 --- a/app/views/documents/_document.rhtml +++ b/app/views/documents/_document.rhtml @@ -1,3 +1,3 @@

<%= link_to h(document.title), :controller => 'documents', :action => 'show', :id => document %>
-<% unless document.description.blank? %><%=h(truncate(document.description, 250)) %>
<% end %> +<% unless document.description.blank? %><%=h(truncate(document.description, :length => 250)) %>
<% end %> <%= format_time(document.created_on) %>

\ No newline at end of file diff --git a/app/views/issues/_relations.rhtml b/app/views/issues/_relations.rhtml index f99976f5c..6f02d1937 100644 --- a/app/views/issues/_relations.rhtml +++ b/app/views/issues/_relations.rhtml @@ -10,7 +10,7 @@ <% @issue.relations.select {|r| r.other_issue(@issue).visible? }.each do |relation| %> - diff --git a/app/views/issues/show.rhtml b/app/views/issues/show.rhtml index 6b79ba841..cd18dfa09 100644 --- a/app/views/issues/show.rhtml +++ b/app/views/issues/show.rhtml @@ -34,13 +34,13 @@ <% if User.current.allowed_to?(:view_time_entries, @project) %> - + <% end %> <% if @issue.estimated_hours %> - + <% end %> diff --git a/app/views/mailer/issue_add.text.html.rhtml b/app/views/mailer/issue_add.text.html.rhtml index b1c4605e6..ef1d0dec4 100644 --- a/app/views/mailer/issue_add.text.html.rhtml +++ b/app/views/mailer/issue_add.text.html.rhtml @@ -1,3 +1,3 @@ -<%= l(:text_issue_added, "##{@issue.id}", @issue.author) %> +<%= l(:text_issue_added, :id => "##{@issue.id}", :author => @issue.author) %>
<%= render :partial => "issue_text_html", :locals => { :issue => @issue, :issue_url => @issue_url } %> diff --git a/app/views/mailer/issue_add.text.plain.rhtml b/app/views/mailer/issue_add.text.plain.rhtml index c6cb0837f..19c1dcf5b 100644 --- a/app/views/mailer/issue_add.text.plain.rhtml +++ b/app/views/mailer/issue_add.text.plain.rhtml @@ -1,4 +1,4 @@ -<%= l(:text_issue_added, "##{@issue.id}", @issue.author) %> +<%= l(:text_issue_added, :id => "##{@issue.id}", :author => @issue.author) %> ---------------------------------------- <%= render :partial => "issue_text_plain", :locals => { :issue => @issue, :issue_url => @issue_url } %> diff --git a/app/views/mailer/issue_edit.text.html.rhtml b/app/views/mailer/issue_edit.text.html.rhtml index 48affaf77..b4a1f953e 100644 --- a/app/views/mailer/issue_edit.text.html.rhtml +++ b/app/views/mailer/issue_edit.text.html.rhtml @@ -1,4 +1,4 @@ -<%= l(:text_issue_updated, "##{@issue.id}", @journal.user) %> +<%= l(:text_issue_updated, :id => "##{@issue.id}", :author => @journal.user) %> - + <% end %> diff --git a/app/views/search/index.rhtml b/app/views/search/index.rhtml index cb5b70a4c..128937288 100644 --- a/app/views/search/index.rhtml +++ b/app/views/search/index.rhtml @@ -26,7 +26,7 @@

<%= l(:label_result_plural) %> (<%= @results_by_type.values.sum %>)

<% @results.each do |e| %> -
<%= content_tag('span', h(e.project), :class => 'project') unless @project == e.project %> <%= link_to highlight_tokens(truncate(e.event_title, 255), @tokens), e.event_url %>
+
<%= content_tag('span', h(e.project), :class => 'project') unless @project == e.project %> <%= link_to highlight_tokens(truncate(e.event_title, :length => 255), @tokens), e.event_url %>
<%= highlight_tokens(e.event_description, @tokens) %> <%= format_time(e.event_datetime) %>
<% end %> diff --git a/app/views/settings/_authentication.rhtml b/app/views/settings/_authentication.rhtml index a3ac555ed..ec8a0be96 100644 --- a/app/views/settings/_authentication.rhtml +++ b/app/views/settings/_authentication.rhtml @@ -5,7 +5,7 @@ <%= check_box_tag 'settings[login_required]', 1, Setting.login_required? %><%= hidden_field_tag 'settings[login_required]', 0 %>

-<%= select_tag 'settings[autologin]', options_for_select( [[l(:label_disabled), "0"]] + [1, 7, 30, 365].collect{|days| [lwr(:actionview_datehelper_time_in_words_day, days), days.to_s]}, Setting.autologin) %>

+<%= select_tag 'settings[autologin]', options_for_select( [[l(:label_disabled), "0"]] + [1, 7, 30, 365].collect{|days| [l('datetime.distance_in_words.x_days', :count => days), days.to_s]}, Setting.autologin) %>

<%= select_tag 'settings[self_registration]', diff --git a/app/views/timelog/_list.rhtml b/app/views/timelog/_list.rhtml index 1144d42cc..019eda2ec 100644 --- a/app/views/timelog/_list.rhtml +++ b/app/views/timelog/_list.rhtml @@ -20,7 +20,7 @@

diff --git a/app/views/timelog/details.rhtml b/app/views/timelog/details.rhtml index f4ae68aa9..950b37dc1 100644 --- a/app/views/timelog/details.rhtml +++ b/app/views/timelog/details.rhtml @@ -15,7 +15,7 @@ already in the URI %> <% end %>
-

<%= l(:label_total) %>: <%= html_hours(lwr(:label_f_hour, @total_hours)) %>

+

<%= l(:label_total) %>: <%= html_hours(l_hours(@total_hours)) %>

<% unless @entries.empty? %> diff --git a/app/views/timelog/report.rhtml b/app/views/timelog/report.rhtml index 5f3ed09bd..6ff61ff75 100644 --- a/app/views/timelog/report.rhtml +++ b/app/views/timelog/report.rhtml @@ -20,7 +20,7 @@ [l(:label_day_plural).titleize, 'day']], @columns), :onchange => "this.form.onsubmit();" %> - <%= l(:button_add) %>: <%= select_tag('criterias[]', options_for_select([[]] + (@available_criterias.keys - @criterias).collect{|k| [l(@available_criterias[k][:label]), k]}), + <%= l(:button_add) %>: <%= select_tag('criterias[]', options_for_select([[]] + (@available_criterias.keys - @criterias).collect{|k| [l_or_humanize(@available_criterias[k][:label]), k]}), :onchange => "this.form.onsubmit();", :style => 'width: 200px', :id => nil, @@ -33,7 +33,7 @@ <% unless @criterias.empty? %>
-

<%= l(:label_total) %>: <%= html_hours(lwr(:label_f_hour, @total_hours)) %>

+

<%= l(:label_total) %>: <%= html_hours(l_hours(@total_hours)) %>

<% unless @hours.empty? %> @@ -41,7 +41,7 @@ <% @criterias.each do |criteria| %> - + <% end %> <% columns_width = (40 / (@periods.length+1)).to_i %> <% @periods.each do |period| %> diff --git a/app/views/versions/_overview.rhtml b/app/views/versions/_overview.rhtml index 377e9178b..724f9f923 100644 --- a/app/views/versions/_overview.rhtml +++ b/app/views/versions/_overview.rhtml @@ -9,12 +9,10 @@ <% if version.fixed_issues.count > 0 %> <%= progress_bar([version.closed_pourcent, version.completed_pourcent], :width => '40em', :legend => ('%0.0f%' % version.completed_pourcent)) %>

- <%= link_to(version.closed_issues_count, :controller => 'issues', :action => 'index', :project_id => version.project, :status_id => 'c', :fixed_version_id => version, :set_filter => 1) %> - <%= lwr(:label_closed_issues, version.closed_issues_count) %> + <%= link_to_if(version.closed_issues_count > 0, l(:label_x_closed_issues_abbr, :count => version.closed_issues_count), :controller => 'issues', :action => 'index', :project_id => version.project, :status_id => 'c', :fixed_version_id => version, :set_filter => 1) %> (<%= '%0.0f' % (version.closed_issues_count.to_f / version.fixed_issues.count * 100) %>%)   - <%= link_to(version.open_issues_count, :controller => 'issues', :action => 'index', :project_id => version.project, :status_id => 'o', :fixed_version_id => version, :set_filter => 1) %> - <%= lwr(:label_open_issues, version.open_issues_count)%> + <%= link_to_if(version.open_issues_count > 0, l(:label_x_open_issues_abbr, :count => version.open_issues_count), :controller => 'issues', :action => 'index', :project_id => version.project, :status_id => 'o', :fixed_version_id => version, :set_filter => 1) %> (<%= '%0.0f' % (version.open_issues_count.to_f / version.fixed_issues.count * 100) %>%)

<% else %> diff --git a/app/views/versions/show.rhtml b/app/views/versions/show.rhtml index 7e5264562..ef5375198 100644 --- a/app/views/versions/show.rhtml +++ b/app/views/versions/show.rhtml @@ -10,12 +10,12 @@
<%= l(relation.label_for(@issue)) %> <%= "(#{lwr(:actionview_datehelper_time_in_words_day, relation.delay)})" if relation.delay && relation.delay != 0 %> +<%= l(relation.label_for(@issue)) %> <%= "(#{l('datetime.distance_in_words.x_days', :count => relation.delay)})" if relation.delay && relation.delay != 0 %> <%= h(relation.other_issue(@issue).project) + ' - ' if Setting.cross_project_issue_relations? %> <%= link_to_issue relation.other_issue(@issue) %> <%=h relation.other_issue(@issue).subject %> <%= relation.other_issue(@issue).status.name %><%=l(:field_category)%>:<%=h @issue.category ? @issue.category.name : "-" %><%=l(:label_spent_time)%>:<%= @issue.spent_hours > 0 ? (link_to lwr(:label_f_hour, @issue.spent_hours), {:controller => 'timelog', :action => 'details', :project_id => @project, :issue_id => @issue}) : "-" %><%= @issue.spent_hours > 0 ? (link_to l_hours(@issue.spent_hours), {:controller => 'timelog', :action => 'details', :project_id => @project, :issue_id => @issue}) : "-" %>
<%=l(:field_fixed_version)%>:<%= @issue.fixed_version ? link_to_version(@issue.fixed_version) : "-" %><%=l(:field_estimated_hours)%>:<%= lwr(:label_f_hour, @issue.estimated_hours) %><%=l(:field_estimated_hours)%>:<%= l_hours(@issue.estimated_hours) %>
<%= link_to(format_revision(entry.lastrev.name), :action => 'revision', :id => @project, :rev => entry.lastrev.identifier) if entry.lastrev && entry.lastrev.identifier %> <%= distance_of_time_in_words(entry.lastrev.time, Time.now) if entry.lastrev && entry.lastrev.time %> <%= changeset.nil? ? h(entry.lastrev.author.to_s.split('<').first) : changeset.author if entry.lastrev %><%=h truncate(changeset.comments, 50) unless changeset.nil? %><%=h truncate(changeset.comments, :length => 50) unless changeset.nil? %>
<%=h entry.project %> <% if entry.issue -%> -<%= link_to_issue entry.issue %>: <%= h(truncate(entry.issue.subject, 50)) -%> +<%= link_to_issue entry.issue %>: <%= h(truncate(entry.issue.subject, :length => 50)) -%> <% end -%> <%=h entry.comments %>
<%= l(@available_criterias[criteria][:label]) %><%= l_or_humanize(@available_criterias[criteria][:label]) %>
- + <% if User.current.allowed_to?(:view_time_entries, @project) %> - + <% end %>
<%= l(:field_estimated_hours) %><%= html_hours(lwr(:label_f_hour, @version.estimated_hours)) %><%= html_hours(l_hours(@version.estimated_hours)) %>
<%= l(:label_spent_time) %><%= html_hours(lwr(:label_f_hour, @version.spent_hours)) %><%= html_hours(l_hours(@version.spent_hours)) %>
-- cgit v1.2.3