summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-09-20 14:06:57 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-09-20 14:06:57 +0000
commit21e18c1eb4ac6a882c57ee3df2225851da23a57f (patch)
tree8889e4351130e1528ebb6bef07538c71f70d826f /app
parent52a6b0a21e5e28da4ed590383ae778c306cfaf1b (diff)
downloadredmine-21e18c1eb4ac6a882c57ee3df2225851da23a57f.tar.gz
redmine-21e18c1eb4ac6a882c57ee3df2225851da23a57f.zip
Adds missing native eol properties.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2895 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/models/principal.rb76
-rw-r--r--app/views/my/blocks/_issueswatched.rhtml32
-rw-r--r--app/views/queries/new.rhtml12
-rw-r--r--app/views/repositories/stats.rhtml24
-rw-r--r--app/views/search/index.rhtml102
-rw-r--r--app/views/timelog/details.rhtml70
-rw-r--r--app/views/timelog/edit.rhtml42
7 files changed, 179 insertions, 179 deletions
diff --git a/app/models/principal.rb b/app/models/principal.rb
index a4a946da5..f83cdd0a8 100644
--- a/app/models/principal.rb
+++ b/app/models/principal.rb
@@ -1,38 +1,38 @@
-# Redmine - project management software
-# Copyright (C) 2006-2009 Jean-Philippe Lang
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-class Principal < ActiveRecord::Base
- set_table_name 'users'
-
- has_many :members, :foreign_key => 'user_id', :dependent => :destroy
- has_many :memberships, :class_name => 'Member', :foreign_key => 'user_id', :include => [ :project, :roles ], :conditions => "#{Project.table_name}.status=#{Project::STATUS_ACTIVE}", :order => "#{Project.table_name}.name"
- has_many :projects, :through => :memberships
-
- # Groups and active users
- named_scope :active, :conditions => "#{Principal.table_name}.type='Group' OR (#{Principal.table_name}.type='User' AND #{Principal.table_name}.status = 1)"
-
- named_scope :like, lambda {|q|
- s = "%#{q.to_s.strip.downcase}%"
- {:conditions => ["LOWER(login) LIKE ? OR LOWER(firstname) LIKE ? OR LOWER(lastname) LIKE ?", s, s, s],
- :order => 'type, login, lastname, firstname'
- }
- }
-
- def <=>(principal)
- self.to_s.downcase <=> principal.to_s.downcase
- end
-end
+# Redmine - project management software
+# Copyright (C) 2006-2009 Jean-Philippe Lang
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+class Principal < ActiveRecord::Base
+ set_table_name 'users'
+
+ has_many :members, :foreign_key => 'user_id', :dependent => :destroy
+ has_many :memberships, :class_name => 'Member', :foreign_key => 'user_id', :include => [ :project, :roles ], :conditions => "#{Project.table_name}.status=#{Project::STATUS_ACTIVE}", :order => "#{Project.table_name}.name"
+ has_many :projects, :through => :memberships
+
+ # Groups and active users
+ named_scope :active, :conditions => "#{Principal.table_name}.type='Group' OR (#{Principal.table_name}.type='User' AND #{Principal.table_name}.status = 1)"
+
+ named_scope :like, lambda {|q|
+ s = "%#{q.to_s.strip.downcase}%"
+ {:conditions => ["LOWER(login) LIKE ? OR LOWER(firstname) LIKE ? OR LOWER(lastname) LIKE ?", s, s, s],
+ :order => 'type, login, lastname, firstname'
+ }
+ }
+
+ def <=>(principal)
+ self.to_s.downcase <=> principal.to_s.downcase
+ end
+end
diff --git a/app/views/my/blocks/_issueswatched.rhtml b/app/views/my/blocks/_issueswatched.rhtml
index 37f96f1b8..04f326c25 100644
--- a/app/views/my/blocks/_issueswatched.rhtml
+++ b/app/views/my/blocks/_issueswatched.rhtml
@@ -1,16 +1,16 @@
-<h3><%=l(:label_watched_issues)%> (<%= Issue.visible.count(:include => :watchers,
- :conditions => ["#{Watcher.table_name}.user_id = ?", user.id]) %>)</h3>
-<% watched_issues = Issue.visible.find(:all,
- :include => [:status, :project, :tracker, :watchers],
- :limit => 10,
- :conditions => ["#{Watcher.table_name}.user_id = ?", user.id],
- :order => "#{Issue.table_name}.updated_on DESC") %>
-
-<%= render :partial => 'issues/list_simple', :locals => { :issues => watched_issues } %>
-<% if watched_issues.length > 0 %>
-<p class="small"><%= link_to l(:label_issue_view_all), :controller => 'issues',
- :action => 'index',
- :set_filter => 1,
- :watcher_id => 'me',
- :sort => 'updated_on:desc' %></p>
-<% end %>
+<h3><%=l(:label_watched_issues)%> (<%= Issue.visible.count(:include => :watchers,
+ :conditions => ["#{Watcher.table_name}.user_id = ?", user.id]) %>)</h3>
+<% watched_issues = Issue.visible.find(:all,
+ :include => [:status, :project, :tracker, :watchers],
+ :limit => 10,
+ :conditions => ["#{Watcher.table_name}.user_id = ?", user.id],
+ :order => "#{Issue.table_name}.updated_on DESC") %>
+
+<%= render :partial => 'issues/list_simple', :locals => { :issues => watched_issues } %>
+<% if watched_issues.length > 0 %>
+<p class="small"><%= link_to l(:label_issue_view_all), :controller => 'issues',
+ :action => 'index',
+ :set_filter => 1,
+ :watcher_id => 'me',
+ :sort => 'updated_on:desc' %></p>
+<% end %>
diff --git a/app/views/queries/new.rhtml b/app/views/queries/new.rhtml
index 631fd6c02..a980d04ab 100644
--- a/app/views/queries/new.rhtml
+++ b/app/views/queries/new.rhtml
@@ -1,6 +1,6 @@
-<h2><%= l(:label_query_new) %></h2>
-
-<% form_tag({:action => 'new', :project_id => @query.project}, :onsubmit => 'selectAllOptions("selected_columns");') do %>
- <%= render :partial => 'form', :locals => {:query => @query} %>
- <%= submit_tag l(:button_save) %>
-<% end %>
+<h2><%= l(:label_query_new) %></h2>
+
+<% form_tag({:action => 'new', :project_id => @query.project}, :onsubmit => 'selectAllOptions("selected_columns");') do %>
+ <%= render :partial => 'form', :locals => {:query => @query} %>
+ <%= submit_tag l(:button_save) %>
+<% end %>
diff --git a/app/views/repositories/stats.rhtml b/app/views/repositories/stats.rhtml
index 1e617577e..e5e737506 100644
--- a/app/views/repositories/stats.rhtml
+++ b/app/views/repositories/stats.rhtml
@@ -1,12 +1,12 @@
-<h2><%= l(:label_statistics) %></h2>
-
-<p>
-<%= tag("embed", :width => 800, :height => 300, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :graph => "commits_per_month")) %>
-</p>
-<p>
-<%= tag("embed", :width => 800, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :graph => "commits_per_author")) %>
-</p>
-
-<p><%= link_to l(:button_back), :action => 'show', :id => @project %></p>
-
-<% html_title(l(:label_repository), l(:label_statistics)) -%>
+<h2><%= l(:label_statistics) %></h2>
+
+<p>
+<%= tag("embed", :width => 800, :height => 300, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :graph => "commits_per_month")) %>
+</p>
+<p>
+<%= tag("embed", :width => 800, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :graph => "commits_per_author")) %>
+</p>
+
+<p><%= link_to l(:button_back), :action => 'show', :id => @project %></p>
+
+<% html_title(l(:label_repository), l(:label_statistics)) -%>
diff --git a/app/views/search/index.rhtml b/app/views/search/index.rhtml
index 128937288..348421d3f 100644
--- a/app/views/search/index.rhtml
+++ b/app/views/search/index.rhtml
@@ -1,51 +1,51 @@
-<h2><%= l(:label_search) %></h2>
-
-<div class="box">
-<% form_tag({}, :method => :get) do %>
-<p><%= text_field_tag 'q', @question, :size => 60, :id => 'search-input' %>
-<%= javascript_tag "Field.focus('search-input')" %>
-<%= project_select_tag %>
-<label><%= check_box_tag 'all_words', 1, @all_words %> <%= l(:label_all_words) %></label>
-<label><%= check_box_tag 'titles_only', 1, @titles_only %> <%= l(:label_search_titles_only) %></label>
-</p>
-<p>
-<% @object_types.each do |t| %>
-<label><%= check_box_tag t, 1, @scope.include?(t) %> <%= type_label(t) %></label>
-<% end %>
-</p>
-
-<p><%= submit_tag l(:button_submit), :name => 'submit' %></p>
-<% end %>
-</div>
-
-<% if @results %>
- <div id="search-results-counts">
- <%= render_results_by_type(@results_by_type) unless @scope.size == 1 %>
- </div>
-
- <h3><%= l(:label_result_plural) %> (<%= @results_by_type.values.sum %>)</h3>
- <dl id="search-results">
- <% @results.each do |e| %>
- <dt class="<%= e.event_type %>"><%= 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 %></dt>
- <dd><span class="description"><%= highlight_tokens(e.event_description, @tokens) %></span>
- <span class="author"><%= format_time(e.event_datetime) %></span></dd>
- <% end %>
- </dl>
-<% end %>
-
-<p><center>
-<% if @pagination_previous_date %>
-<%= link_to_remote ('&#171; ' + l(:label_previous)),
- {:update => :content,
- :url => params.merge(:previous => 1, :offset => @pagination_previous_date.strftime("%Y%m%d%H%M%S"))
- }, :href => url_for(params.merge(:previous => 1, :offset => @pagination_previous_date.strftime("%Y%m%d%H%M%S"))) %>&nbsp;
-<% end %>
-<% if @pagination_next_date %>
-<%= link_to_remote (l(:label_next) + ' &#187;'),
- {:update => :content,
- :url => params.merge(:previous => nil, :offset => @pagination_next_date.strftime("%Y%m%d%H%M%S"))
- }, :href => url_for(params.merge(:previous => nil, :offset => @pagination_next_date.strftime("%Y%m%d%H%M%S"))) %>
-<% end %>
-</center></p>
-
-<% html_title(l(:label_search)) -%>
+<h2><%= l(:label_search) %></h2>
+
+<div class="box">
+<% form_tag({}, :method => :get) do %>
+<p><%= text_field_tag 'q', @question, :size => 60, :id => 'search-input' %>
+<%= javascript_tag "Field.focus('search-input')" %>
+<%= project_select_tag %>
+<label><%= check_box_tag 'all_words', 1, @all_words %> <%= l(:label_all_words) %></label>
+<label><%= check_box_tag 'titles_only', 1, @titles_only %> <%= l(:label_search_titles_only) %></label>
+</p>
+<p>
+<% @object_types.each do |t| %>
+<label><%= check_box_tag t, 1, @scope.include?(t) %> <%= type_label(t) %></label>
+<% end %>
+</p>
+
+<p><%= submit_tag l(:button_submit), :name => 'submit' %></p>
+<% end %>
+</div>
+
+<% if @results %>
+ <div id="search-results-counts">
+ <%= render_results_by_type(@results_by_type) unless @scope.size == 1 %>
+ </div>
+
+ <h3><%= l(:label_result_plural) %> (<%= @results_by_type.values.sum %>)</h3>
+ <dl id="search-results">
+ <% @results.each do |e| %>
+ <dt class="<%= e.event_type %>"><%= 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 %></dt>
+ <dd><span class="description"><%= highlight_tokens(e.event_description, @tokens) %></span>
+ <span class="author"><%= format_time(e.event_datetime) %></span></dd>
+ <% end %>
+ </dl>
+<% end %>
+
+<p><center>
+<% if @pagination_previous_date %>
+<%= link_to_remote ('&#171; ' + l(:label_previous)),
+ {:update => :content,
+ :url => params.merge(:previous => 1, :offset => @pagination_previous_date.strftime("%Y%m%d%H%M%S"))
+ }, :href => url_for(params.merge(:previous => 1, :offset => @pagination_previous_date.strftime("%Y%m%d%H%M%S"))) %>&nbsp;
+<% end %>
+<% if @pagination_next_date %>
+<%= link_to_remote (l(:label_next) + ' &#187;'),
+ {:update => :content,
+ :url => params.merge(:previous => nil, :offset => @pagination_next_date.strftime("%Y%m%d%H%M%S"))
+ }, :href => url_for(params.merge(:previous => nil, :offset => @pagination_next_date.strftime("%Y%m%d%H%M%S"))) %>
+<% end %>
+</center></p>
+
+<% html_title(l(:label_search)) -%>
diff --git a/app/views/timelog/details.rhtml b/app/views/timelog/details.rhtml
index eecfec2eb..a17c06e65 100644
--- a/app/views/timelog/details.rhtml
+++ b/app/views/timelog/details.rhtml
@@ -1,35 +1,35 @@
-<div class="contextual">
-<%= link_to_if_authorized l(:button_log_time), {:controller => 'timelog', :action => 'edit', :project_id => @project, :issue_id => @issue}, :class => 'icon icon-time-add' %>
-</div>
-
-<%= render_timelog_breadcrumb %>
-
-<h2><%= l(:label_spent_time) %></h2>
-
-<% form_remote_tag( :url => {}, :html => {:method => :get, :id => 'query_form'}, :method => :get, :update => 'content' ) do %>
-<%# TOOD: remove the project_id and issue_id hidden fields, that information is
-already in the URI %>
-<%= hidden_field_tag('project_id', params[:project_id]) if @project %>
-<%= hidden_field_tag 'issue_id', params[:issue_id] if @issue %>
-<%= render :partial => 'date_range' %>
-<% end %>
-
-<div class="total-hours">
-<p><%= l(:label_total) %>: <%= html_hours(l_hours(@total_hours)) %></p>
-</div>
-
-<% unless @entries.empty? %>
-<%= render :partial => 'list', :locals => { :entries => @entries }%>
-<p class="pagination"><%= pagination_links_full @entry_pages, @entry_count %></p>
-
-<% other_formats_links do |f| %>
- <%= f.link_to 'Atom', :url => params.merge({:issue_id => @issue, :key => User.current.rss_key}) %>
- <%= f.link_to 'CSV', :url => params %>
-<% end %>
-<% end %>
-
-<% html_title l(:label_spent_time), l(:label_details) %>
-
-<% content_for :header_tags do %>
- <%= auto_discovery_link_tag(:atom, {:issue_id => @issue, :format => 'atom', :key => User.current.rss_key}, :title => l(:label_spent_time)) %>
-<% end %>
+<div class="contextual">
+<%= link_to_if_authorized l(:button_log_time), {:controller => 'timelog', :action => 'edit', :project_id => @project, :issue_id => @issue}, :class => 'icon icon-time-add' %>
+</div>
+
+<%= render_timelog_breadcrumb %>
+
+<h2><%= l(:label_spent_time) %></h2>
+
+<% form_remote_tag( :url => {}, :html => {:method => :get, :id => 'query_form'}, :method => :get, :update => 'content' ) do %>
+<%# TOOD: remove the project_id and issue_id hidden fields, that information is
+already in the URI %>
+<%= hidden_field_tag('project_id', params[:project_id]) if @project %>
+<%= hidden_field_tag 'issue_id', params[:issue_id] if @issue %>
+<%= render :partial => 'date_range' %>
+<% end %>
+
+<div class="total-hours">
+<p><%= l(:label_total) %>: <%= html_hours(l_hours(@total_hours)) %></p>
+</div>
+
+<% unless @entries.empty? %>
+<%= render :partial => 'list', :locals => { :entries => @entries }%>
+<p class="pagination"><%= pagination_links_full @entry_pages, @entry_count %></p>
+
+<% other_formats_links do |f| %>
+ <%= f.link_to 'Atom', :url => params.merge({:issue_id => @issue, :key => User.current.rss_key}) %>
+ <%= f.link_to 'CSV', :url => params %>
+<% end %>
+<% end %>
+
+<% html_title l(:label_spent_time), l(:label_details) %>
+
+<% content_for :header_tags do %>
+ <%= auto_discovery_link_tag(:atom, {:issue_id => @issue, :format => 'atom', :key => User.current.rss_key}, :title => l(:label_spent_time)) %>
+<% end %>
diff --git a/app/views/timelog/edit.rhtml b/app/views/timelog/edit.rhtml
index 085f3d805..a0ff860f8 100644
--- a/app/views/timelog/edit.rhtml
+++ b/app/views/timelog/edit.rhtml
@@ -1,21 +1,21 @@
-<h2><%= l(:label_spent_time) %></h2>
-
-<% labelled_tabular_form_for :time_entry, @time_entry, :url => {:action => 'edit', :id => @time_entry, :project_id => @time_entry.project} do |f| %>
-<%= error_messages_for 'time_entry' %>
-<%= back_url_hidden_field_tag %>
-
-<div class="box">
-<p><%= f.text_field :issue_id, :size => 6 %> <em><%= h("#{@time_entry.issue.tracker.name} ##{@time_entry.issue.id}: #{@time_entry.issue.subject}") if @time_entry.issue %></em></p>
-<p><%= f.text_field :spent_on, :size => 10, :required => true %><%= calendar_for('time_entry_spent_on') %></p>
-<p><%= f.text_field :hours, :size => 6, :required => true %></p>
-<p><%= f.text_field :comments, :size => 100 %></p>
-<p><%= f.select :activity_id, activity_collection_for_select_options, :required => true %></p>
-<% @time_entry.custom_field_values.each do |value| %>
- <p><%= custom_field_tag_with_label :time_entry, value %></p>
-<% end %>
-<%= call_hook(:view_timelog_edit_form_bottom, { :time_entry => @time_entry, :form => f }) %>
-</div>
-
-<%= submit_tag l(:button_save) %>
-
-<% end %>
+<h2><%= l(:label_spent_time) %></h2>
+
+<% labelled_tabular_form_for :time_entry, @time_entry, :url => {:action => 'edit', :id => @time_entry, :project_id => @time_entry.project} do |f| %>
+<%= error_messages_for 'time_entry' %>
+<%= back_url_hidden_field_tag %>
+
+<div class="box">
+<p><%= f.text_field :issue_id, :size => 6 %> <em><%= h("#{@time_entry.issue.tracker.name} ##{@time_entry.issue.id}: #{@time_entry.issue.subject}") if @time_entry.issue %></em></p>
+<p><%= f.text_field :spent_on, :size => 10, :required => true %><%= calendar_for('time_entry_spent_on') %></p>
+<p><%= f.text_field :hours, :size => 6, :required => true %></p>
+<p><%= f.text_field :comments, :size => 100 %></p>
+<p><%= f.select :activity_id, activity_collection_for_select_options, :required => true %></p>
+<% @time_entry.custom_field_values.each do |value| %>
+ <p><%= custom_field_tag_with_label :time_entry, value %></p>
+<% end %>
+<%= call_hook(:view_timelog_edit_form_bottom, { :time_entry => @time_entry, :form => f }) %>
+</div>
+
+<%= submit_tag l(:button_save) %>
+
+<% end %>