Commit 96298eac authored by Eric Davis's avatar Eric Davis

Merge branch 'ticket/unstable/262-line-endings' into unstable

parents bc249871 a85b6780
<h2><%=h @status %></h2>
<p id="errorExplanation"><%=h @message %></p>
<p><a href="javascript:history.back()">Back</a></p>
<% html_title @status %>
<h2><%=h @status %></h2>
<p id="errorExplanation"><%=h @message %></p>
<p><a href="javascript:history.back()">Back</a></p>
<% html_title @status %>
<% form_tag(project_project_enumerations_path(@project), :method => :put, :class => "tabular") do %>
<table class="list">
<thead><tr>
<th><%= l(:field_name) %></th>
<th><%= l(:enumeration_system_activity) %></th>
<% TimeEntryActivity.new.available_custom_fields.each do |value| %>
<th><%= h value.name %></th>
<% end %>
<th style="width:15%;"><%= l(:field_active) %></th>
</tr></thead>
<% @project.activities(true).each do |enumeration| %>
<% fields_for "enumerations[#{enumeration.id}]", enumeration do |ff| %>
<tr class="<%= cycle('odd', 'even') %>">
<td>
<%= ff.hidden_field :parent_id, :value => enumeration.id unless enumeration.project %>
<%= h(enumeration) %>
</td>
<td align="center" style="width:15%;"><%= checked_image !enumeration.project %></td>
<% enumeration.custom_field_values.each do |value| %>
<td align="center">
<%= custom_field_tag "enumerations[#{enumeration.id}]", value %>
</td>
<% end %>
<td align="center" style="width:15%;">
<%= ff.check_box :active %>
</td>
</tr>
<% end %>
<% end %>
</table>
<div class="contextual">
<%= link_to(l(:button_reset), project_project_enumerations_path(@project),
:method => :delete,
:confirm => l(:text_are_you_sure),
:class => 'icon icon-del') %>
</div>
<%= submit_tag l(:button_save) %>
<% end %>
<% form_tag(project_project_enumerations_path(@project), :method => :put, :class => "tabular") do %>
<table class="list">
<thead><tr>
<th><%= l(:field_name) %></th>
<th><%= l(:enumeration_system_activity) %></th>
<% TimeEntryActivity.new.available_custom_fields.each do |value| %>
<th><%= h value.name %></th>
<% end %>
<th style="width:15%;"><%= l(:field_active) %></th>
</tr></thead>
<% @project.activities(true).each do |enumeration| %>
<% fields_for "enumerations[#{enumeration.id}]", enumeration do |ff| %>
<tr class="<%= cycle('odd', 'even') %>">
<td>
<%= ff.hidden_field :parent_id, :value => enumeration.id unless enumeration.project %>
<%= h(enumeration) %>
</td>
<td align="center" style="width:15%;"><%= checked_image !enumeration.project %></td>
<% enumeration.custom_field_values.each do |value| %>
<td align="center">
<%= custom_field_tag "enumerations[#{enumeration.id}]", value %>
</td>
<% end %>
<td align="center" style="width:15%;">
<%= ff.check_box :active %>
</td>
</tr>
<% end %>
<% end %>
</table>
<div class="contextual">
<%= link_to(l(:button_reset), project_project_enumerations_path(@project),
:method => :delete,
:confirm => l(:text_are_you_sure),
:class => 'icon icon-del') %>
</div>
<%= submit_tag l(:button_save) %>
<% end %>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
namespace :code do
desc "Fix line endings of all source files"
task :fix_line_endings do
unless `which fromdos`.present?
raise "fromdos command not found"
end
Dir['**/**{.rb,.html.erb,.rhtml,.rjs,.rsb,.plain.erb,.rxml,.yml,.rake,.eml}'].each do |file_name|
next if file_name.include?("vendor")
system("fromdos #{file_name}")
end
end
end
This diff is collapsed.
desc 'Create YAML test fixtures from data in an existing database.
Defaults to development database. Set RAILS_ENV to override.'
task :extract_fixtures => :environment do
sql = "SELECT * FROM %s"
skip_tables = ["schema_info"]
ActiveRecord::Base.establish_connection
(ActiveRecord::Base.connection.tables - skip_tables).each do |table_name|
i = "000"
File.open("#{RAILS_ROOT}/#{table_name}.yml", 'w' ) do |file|
data = ActiveRecord::Base.connection.select_all(sql % table_name)
file.write data.inject({}) { |hash, record|
# cast extracted values
ActiveRecord::Base.connection.columns(table_name).each { |col|
record[col.name] = col.type_cast(record[col.name]) if record[col.name]
}
hash["#{table_name}_#{i.succ!}"] = record
hash
}.to_yaml
end
end
desc 'Create YAML test fixtures from data in an existing database.
Defaults to development database. Set RAILS_ENV to override.'
task :extract_fixtures => :environment do
sql = "SELECT * FROM %s"
skip_tables = ["schema_info"]
ActiveRecord::Base.establish_connection
(ActiveRecord::Base.connection.tables - skip_tables).each do |table_name|
i = "000"
File.open("#{RAILS_ROOT}/#{table_name}.yml", 'w' ) do |file|
data = ActiveRecord::Base.connection.select_all(sql % table_name)
file.write data.inject({}) { |hash, record|
# cast extracted values
ActiveRecord::Base.connection.columns(table_name).each { |col|
record[col.name] = col.type_cast(record[col.name]) if record[col.name]
}
hash["#{table_name}_#{i.succ!}"] = record
hash
}.to_yaml
end
end
end
\ No newline at end of file
# redMine - project management software
# Copyright (C) 2006-2008 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.
desc 'Fetch changesets from the repositories'
namespace :redmine do
task :fetch_changesets => :environment do
Repository.fetch_changesets
end
end
# redMine - project management software
# Copyright (C) 2006-2008 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.
desc 'Fetch changesets from the repositories'
namespace :redmine do
task :fetch_changesets => :environment do
Repository.fetch_changesets
end
end
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment