From: Jean-Philippe Lang Date: Sat, 2 Sep 2006 13:33:23 +0000 (+0000) Subject: tables and forms redesign, X-Git-Tag: 0.3.0~8 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=552d99d664b6c67d021e0b04fb5c6bde3a23c8ce;p=redmine.git tables and forms redesign, added form builder for several views git-svn-id: http://redmine.rubyforge.org/svn/trunk@21 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/redmine/app/helpers/application_helper.rb b/redmine/app/helpers/application_helper.rb index d45cf9b97..7a82bcd3a 100644 --- a/redmine/app/helpers/application_helper.rb +++ b/redmine/app/helpers/application_helper.rb @@ -104,4 +104,47 @@ module ApplicationHelper def lang_options_for_select (GLoc.valid_languages.sort {|x,y| x.to_s <=> y.to_s }).collect {|lang| [ l_lang_name(lang.to_s, lang), lang.to_s]} end + + def label_tag_for(name, option_tags = nil, options = {}) + label_text = l(("field_"+field.to_s.gsub(/\_id$/, "")).to_sym) + (options.delete(:required) ? @template.content_tag("span", " *", :class => "required"): "") + content_tag("label", label_text) + end + + def labelled_tabular_form_for(name, object, options, &proc) + options[:html] ||= {} + options[:html].store :class, "tabular" + form_for(name, object, options.merge({ :builder => TabularFormBuilder, :lang => current_language}), &proc) + end end + +class TabularFormBuilder < ActionView::Helpers::FormBuilder + include GLoc + + def initialize(object_name, object, template, options, proc) + set_language_if_valid options.delete(:lang) + @object_name, @object, @template, @options, @proc = object_name, object, template, options, proc + end + + (field_helpers - %w(radio_button) + %w(date_select)).each do |selector| + src = <<-END_SRC + def #{selector}(field, options = {}) + label_text = l(("field_"+field.to_s.gsub(/\_id$/, "")).to_sym) + (options.delete(:required) ? @template.content_tag("span", " *", :class => "required"): "") + label = @template.content_tag("label", label_text, + :class => (@object.errors[field] ? "error" : nil), + :for => (@object_name.to_s + "_" + field.to_s)) + label + super + end + END_SRC + class_eval src, __FILE__, __LINE__ + end + + def select(field, choices, options = {}) + label_text = l(("field_"+field.to_s.gsub(/\_id$/, "")).to_sym) + (options.delete(:required) ? @template.content_tag("span", " *", :class => "required"): "") + label = @template.content_tag("label", label_text, + :class => (@object.errors[field] ? "error" : nil), + :for => (@object_name.to_s + "_" + field.to_s)) + label + super + end + +end + diff --git a/redmine/app/helpers/custom_fields_helper.rb b/redmine/app/helpers/custom_fields_helper.rb index bc5a15e9a..eb4d47a83 100644 --- a/redmine/app/helpers/custom_fields_helper.rb +++ b/redmine/app/helpers/custom_fields_helper.rb @@ -39,18 +39,13 @@ module CustomFieldsHelper def custom_field_label_tag(custom_value) content_tag "label", custom_value.custom_field.name + (custom_value.custom_field.is_required? ? " *" : ""), - :for => "custom_fields_#{custom_value.custom_field.id}" + :for => "custom_fields_#{custom_value.custom_field.id}", + :class => (custom_value.errors.empty? ? nil : "error" ) end # Return custom field tag with its label tag def custom_field_tag_with_label(custom_value) - case custom_value.custom_field.field_format - when "bool" - # label is displayed inline after the checkbox - custom_field_tag(custom_value) + " " + custom_field_label_tag(custom_value) - else - custom_field_label_tag(custom_value) + "
" + custom_field_tag(custom_value) - end + custom_field_label_tag(custom_value) + custom_field_tag(custom_value) end # Return a string used to display a custom value diff --git a/redmine/app/views/account/login.rhtml b/redmine/app/views/account/login.rhtml index 2c806b421..74c075516 100644 --- a/redmine/app/views/account/login.rhtml +++ b/redmine/app/views/account/login.rhtml @@ -2,24 +2,17 @@

<%= image_tag 'login' %>  <%=l(:label_please_login)%>

-<%= start_form_tag :action=> "login" %> - - - - - - - - - -
<%= text_field_tag 'login', nil, :size => 25 %>
<%= password_field_tag 'password', nil, :size => 25 %>
+<%= start_form_tag({:action=> "login"}, :class => "tabular") %> +

+<%= text_field_tag 'login', nil, :size => 25 %>

-  - -

+

+<%= password_field_tag 'password', nil, :size => 25 %>

+ +

<%= end_form_tag %> -
-<% unless $RDM_SELF_REGISTRATION == false %><%= link_to l(:label_register), :action => 'register' %> |<% end %> -<%= link_to l(:label_password_lost), :action => 'lost_password' %> + +
<% unless $RDM_SELF_REGISTRATION == false %><%= link_to l(:label_register), :action => 'register' %> |<% end %> +<%= link_to l(:label_password_lost), :action => 'lost_password' %>

\ No newline at end of file diff --git a/redmine/app/views/account/lost_password.rhtml b/redmine/app/views/account/lost_password.rhtml index cd392f243..3f32e7153 100644 --- a/redmine/app/views/account/lost_password.rhtml +++ b/redmine/app/views/account/lost_password.rhtml @@ -2,9 +2,9 @@

<%=l(:label_password_lost)%>

-<%= start_form_tag %> +<%= start_form_tag({:action=> "lost_password"}, :class => "tabular") %> -


+

<%= text_field_tag 'mail', nil, :size => 40 %>

<%= submit_tag l(:button_submit) %>

diff --git a/redmine/app/views/account/my_account.rhtml b/redmine/app/views/account/my_account.rhtml index e401ef3eb..9f561e8b1 100644 --- a/redmine/app/views/account/my_account.rhtml +++ b/redmine/app/views/account/my_account.rhtml @@ -6,52 +6,49 @@ <%= error_messages_for 'user' %> -

<%=l(:label_information_plural)%>

- <%= start_form_tag :action => 'my_account' %> + <%= start_form_tag({:action => 'my_account'}, :class => "tabular") %> -


+

<%= text_field 'user', 'firstname' %>

-


+

<%= text_field 'user', 'lastname' %>

-


+

<%= text_field 'user', 'mail', :size => 40 %>

-


+

<%= select("user", "language", lang_options_for_select) %>

-

<%= check_box 'user', 'mail_notification' %>

+

+ <%= check_box 'user', 'mail_notification' %>

<%= submit_tag l(:button_save) %>
<%= end_form_tag %>
-
- -
+ <% unless @user.auth_source_id %>

<%=l(:field_password)%>

- <%= start_form_tag :action => 'change_password' %> + <%= start_form_tag({:action => 'change_password'}, :class => "tabular") %> -


+

<%= password_field_tag 'password', nil, :size => 25 %>

-


+

<%= password_field_tag 'new_password', nil, :size => 25 %>

-


+

<%= password_field_tag 'new_password_confirmation', nil, :size => 25 %>

<%= submit_tag l(:button_save) %>
<%= end_form_tag %>
<% end %> -
\ No newline at end of file diff --git a/redmine/app/views/account/password_recovery.rhtml b/redmine/app/views/account/password_recovery.rhtml index b4f73d28c..39a8071a9 100644 --- a/redmine/app/views/account/password_recovery.rhtml +++ b/redmine/app/views/account/password_recovery.rhtml @@ -6,12 +6,12 @@ <%= error_messages_for 'user' %> - <%= start_form_tag :token => @token.value %> + <%= start_form_tag({:token => @token.value}, :class => "tabular") %> -


+

<%= password_field_tag 'new_password', nil, :size => 25 %>

-


+

<%= password_field_tag 'new_password_confirmation', nil, :size => 25 %>

<%= submit_tag l(:button_save) %>

diff --git a/redmine/app/views/account/register.rhtml b/redmine/app/views/account/register.rhtml index 74a5c74c0..b34aff79c 100644 --- a/redmine/app/views/account/register.rhtml +++ b/redmine/app/views/account/register.rhtml @@ -1,36 +1,37 @@

<%=l(:label_register)%>

-<%= start_form_tag %> +<%= start_form_tag({:action => 'register'}, :class => "tabular") %> <%= error_messages_for 'user' %>
-

*
+

<%= text_field 'user', 'login', :size => 25 %>

-

*
+

<%= password_field_tag 'password', nil, :size => 25 %>

-

*
+

<%= password_field_tag 'password_confirmation', nil, :size => 25 %>

-

*
+

<%= text_field 'user', 'firstname' %>

-

*
+

<%= text_field 'user', 'lastname' %>

-

*
+

<%= text_field 'user', 'mail' %>

-


+

<%= select("user", "language", lang_options_for_select) %>

<% for @custom_value in @custom_values %>

<%= custom_field_tag_with_label @custom_value %>

<% end %> -

<%= check_box 'user', 'mail_notification' %>

+

+<%= check_box 'user', 'mail_notification' %>

diff --git a/redmine/app/views/admin/projects.rhtml b/redmine/app/views/admin/projects.rhtml index 68552fb90..39e4d9bf7 100644 --- a/redmine/app/views/admin/projects.rhtml +++ b/redmine/app/views/admin/projects.rhtml @@ -1,6 +1,6 @@

<%=l(:label_project_plural)%>

- +
<%= sort_header_tag('name', :caption => l(:label_project)) %> @@ -17,10 +17,8 @@ <% end %> diff --git a/redmine/app/views/auth_sources/_form.rhtml b/redmine/app/views/auth_sources/_form.rhtml index 4bb3c3335..b6365dce5 100644 --- a/redmine/app/views/auth_sources/_form.rhtml +++ b/redmine/app/views/auth_sources/_form.rhtml @@ -2,48 +2,44 @@
-

*
+

<%= text_field 'auth_source', 'name' %>

-

*
+

<%= text_field 'auth_source', 'host' %>

-

*
+

<%= text_field 'auth_source', 'port', :size => 6 %>

-


+

<%= text_field 'auth_source', 'account' %>

-


+

<%= password_field 'auth_source', 'account_password' %>

-

*
+

<%= text_field 'auth_source', 'base_dn', :size => 60 %>

+
-

<%= check_box 'auth_source', 'onthefly_register' %> -

+
+

+<%= check_box 'auth_source', 'onthefly_register' %>

+

<%=l(:label_attribute_plural)%> -
-

*
+

<%= text_field 'auth_source', 'attr_login', :size => 20 %>

-
-
-


+

<%= text_field 'auth_source', 'attr_firstname', :size => 20 %>

-
-
-


+

<%= text_field 'auth_source', 'attr_lastname', :size => 20 %>

-
-
-


+

<%= text_field 'auth_source', 'attr_mail', :size => 20 %>

-
- - +

+ + diff --git a/redmine/app/views/auth_sources/edit.rhtml b/redmine/app/views/auth_sources/edit.rhtml index 7e4ee01ce..149463e7f 100644 --- a/redmine/app/views/auth_sources/edit.rhtml +++ b/redmine/app/views/auth_sources/edit.rhtml @@ -1,6 +1,6 @@

<%=l(:label_auth_source)%> (<%= @auth_source.auth_method_name %>)

-<%= start_form_tag :action => 'update', :id => @auth_source %> +<%= start_form_tag({:action => 'update', :id => @auth_source}, :class => "tabular") %> <%= render :partial => 'form' %> <%= submit_tag l(:button_save) %> <%= end_form_tag %> diff --git a/redmine/app/views/auth_sources/list.rhtml b/redmine/app/views/auth_sources/list.rhtml index cbaa9c3eb..1c27ddaf7 100644 --- a/redmine/app/views/auth_sources/list.rhtml +++ b/redmine/app/views/auth_sources/list.rhtml @@ -1,6 +1,6 @@

<%=l(:label_auth_source_plural)%>

-
<%=l(:field_description)%><%= image_tag 'true' if project.is_public? %> <%= project.projects_count %> <%= format_date(project.created_on) %> - - <%= start_form_tag({:controller => 'projects', :action => 'destroy', :id => project}) %> - <%= submit_tag l(:button_delete), :class => "button-small" %> - <%= end_form_tag %> + + <%= button_to l(:button_delete), { :controller => 'projects', :action => 'destroy', :id => project }, :class => "button-small" %>
+
@@ -18,9 +18,7 @@ <%= link_to l(:button_test), :action => 'test_connection', :id => source %> <% end %> diff --git a/redmine/app/views/auth_sources/new.rhtml b/redmine/app/views/auth_sources/new.rhtml index 7cb81dab0..29d66327b 100644 --- a/redmine/app/views/auth_sources/new.rhtml +++ b/redmine/app/views/auth_sources/new.rhtml @@ -1,6 +1,6 @@

<%=l(:label_auth_source_new)%> (<%= @auth_source.auth_method_name %>)

-<%= start_form_tag :action => 'create' %> +<%= start_form_tag({:action => 'create'}, :class => "tabular") %> <%= render :partial => 'form' %> <%= submit_tag l(:button_create) %> <%= end_form_tag %> diff --git a/redmine/app/views/custom_fields/_form.rhtml b/redmine/app/views/custom_fields/_form.rhtml index 00e36dd36..f7f968e33 100644 --- a/redmine/app/views/custom_fields/_form.rhtml +++ b/redmine/app/views/custom_fields/_form.rhtml @@ -2,21 +2,21 @@
-

*
+

<%= text_field 'custom_field', 'name' %>

-


+

<%= select("custom_field", "field_format", custom_field_formats_for_select) %>

-

(<%=l(:text_min_max_length_info)%>)
+

<%= text_field 'custom_field', 'min_length', :size => 5 %> - -<%= text_field 'custom_field', 'max_length', :size => 5 %>

+<%= text_field 'custom_field', 'max_length', :size => 5 %>
(<%=l(:text_min_max_length_info)%>)

-

(<%=l(:text_regexp_info)%>)
-<%= text_field 'custom_field', 'regexp', :size => 50 %>

+

+<%= text_field 'custom_field', 'regexp', :size => 50 %>
(<%=l(:text_regexp_info)%>)

-

(<%=l(:text_possible_values_info)%>)
-<%= text_area 'custom_field', 'possible_values', :rows => 5, :cols => 60 %>

+

+<%= text_area 'custom_field', 'possible_values', :rows => 5, :cols => 60 %>
(<%=l(:text_possible_values_info)%>)

@@ -34,20 +34,19 @@ <% end %>   -

<%= check_box 'custom_field', 'is_required' %> -

+

+<%= check_box 'custom_field', 'is_required' %>

-

<%= check_box 'custom_field', 'is_for_all' %> -

+

+<%= check_box 'custom_field', 'is_for_all' %>

<% when "UserCustomField" %> -

<%= check_box 'custom_field', 'is_required' %> -

+

+<%= check_box 'custom_field', 'is_required' %>

<% when "ProjectCustomField" %> -

<%= check_box 'custom_field', 'is_required' %> -

- +

+<%= check_box 'custom_field', 'is_required' %>

<% end %> diff --git a/redmine/app/views/custom_fields/edit.rhtml b/redmine/app/views/custom_fields/edit.rhtml index c9473fd04..201047a8d 100644 --- a/redmine/app/views/custom_fields/edit.rhtml +++ b/redmine/app/views/custom_fields/edit.rhtml @@ -1,6 +1,6 @@

<%=l(:label_custom_field)%> (<%=l(@custom_field.type_name)%>)

-<%= start_form_tag :action => 'edit', :id => @custom_field %> +<%= start_form_tag({:action => 'edit', :id => @custom_field}, :class => "tabular") %> <%= render :partial => 'form', :locals => { :type => @custom_field.type } %> <%= submit_tag l(:button_save) %> <%= end_form_tag %> diff --git a/redmine/app/views/custom_fields/list.rhtml b/redmine/app/views/custom_fields/list.rhtml index 7f45f7a89..858590c49 100644 --- a/redmine/app/views/custom_fields/list.rhtml +++ b/redmine/app/views/custom_fields/list.rhtml @@ -1,6 +1,6 @@

<%=l(:label_custom_field_plural)%>

-
<%=l(:field_name)%> <%=l(:field_type)%> - <%= start_form_tag :action => 'destroy', :id => source %> - <%= submit_tag l(:button_delete), :class => "button-small" %> - <%= end_form_tag %> + <%= button_to l(:button_delete), { :action => 'destroy', :id => source }, :confirm => l(:text_are_you_sure), :class => "button-small" %>
+
@@ -19,9 +19,8 @@ + <%= button_to l(:button_delete), { :action => 'destroy', :id => custom_field }, :confirm => l(:text_are_you_sure), :class => "button-small" %> + <% end %>
<%=l(:field_name)%> <%=l(:field_type)%><%= image_tag 'true' 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? %> - <%= start_form_tag :action => 'destroy', :id => custom_field %> - <%= submit_tag l(:button_delete), :class => "button-small" %> - <%= end_form_tag %>
diff --git a/redmine/app/views/custom_fields/new.rhtml b/redmine/app/views/custom_fields/new.rhtml index 1605ada2b..3b215dc9f 100644 --- a/redmine/app/views/custom_fields/new.rhtml +++ b/redmine/app/views/custom_fields/new.rhtml @@ -1,6 +1,6 @@

<%=l(:label_custom_field_new)%> (<%=l(@custom_field.type_name)%>)

-<%= start_form_tag :action => 'new' %> +<%= start_form_tag({:action => 'new'}, :class => "tabular") %> <%= render :partial => 'form', :locals => { :type => @custom_field.type } %> <%= hidden_field_tag 'type', @custom_field.type %> <%= submit_tag l(:button_save) %> diff --git a/redmine/app/views/documents/_form.rhtml b/redmine/app/views/documents/_form.rhtml index ae56cdd46..724bcbaa2 100644 --- a/redmine/app/views/documents/_form.rhtml +++ b/redmine/app/views/documents/_form.rhtml @@ -1,15 +1,15 @@ <%= error_messages_for 'document' %> - +
-


+

-


+

<%= text_field 'document', 'title', :size => 60 %>

-


+

<%= text_area 'document', 'description', :cols => 60, :rows => 5 %>

- +
\ No newline at end of file diff --git a/redmine/app/views/documents/edit.rhtml b/redmine/app/views/documents/edit.rhtml index 059c99d9b..3db4bcc6a 100644 --- a/redmine/app/views/documents/edit.rhtml +++ b/redmine/app/views/documents/edit.rhtml @@ -1,6 +1,6 @@

<%=l(:label_document)%>

-<%= start_form_tag :action => 'edit', :id => @document %> +<%= start_form_tag({:action => 'edit', :id => @document}, :class => "tabular") %> <%= render :partial => 'form' %> <%= submit_tag l(:button_save) %> <%= end_form_tag %> diff --git a/redmine/app/views/enumerations/_form.rhtml b/redmine/app/views/enumerations/_form.rhtml index 280eebfbd..637605939 100644 --- a/redmine/app/views/enumerations/_form.rhtml +++ b/redmine/app/views/enumerations/_form.rhtml @@ -1,9 +1,9 @@ <%= error_messages_for 'enumeration' %> - +
<%= hidden_field 'enumeration', 'opt' %> -


+

<%= text_field 'enumeration', 'name' %>

- +
\ No newline at end of file diff --git a/redmine/app/views/enumerations/edit.rhtml b/redmine/app/views/enumerations/edit.rhtml index 5c26414eb..3002b5936 100644 --- a/redmine/app/views/enumerations/edit.rhtml +++ b/redmine/app/views/enumerations/edit.rhtml @@ -1,6 +1,6 @@

<%=l(:label_enumerations)%>

-<%= start_form_tag :action => 'update', :id => @enumeration %> +<%= start_form_tag({:action => 'update', :id => @enumeration}, :class => "tabular") %> <%= render :partial => 'form' %> <%= submit_tag l(:button_save) %> <%= end_form_tag %> diff --git a/redmine/app/views/enumerations/new.rhtml b/redmine/app/views/enumerations/new.rhtml index 87ede016c..aa0e68173 100644 --- a/redmine/app/views/enumerations/new.rhtml +++ b/redmine/app/views/enumerations/new.rhtml @@ -1,6 +1,6 @@

<%=l(:label_enumeration_new)%>

-<%= start_form_tag :action => 'create' %> +<%= start_form_tag({:action => 'create'}, :class => "tabular") %> <%= render :partial => 'form' %> <%= submit_tag l(:button_create) %> <%= end_form_tag %> diff --git a/redmine/app/views/issue_categories/_form.rhtml b/redmine/app/views/issue_categories/_form.rhtml index fdf0cfda8..765b8f53d 100644 --- a/redmine/app/views/issue_categories/_form.rhtml +++ b/redmine/app/views/issue_categories/_form.rhtml @@ -1,7 +1,7 @@ <%= error_messages_for 'issue_category' %> -


+

<%= text_field 'issue_category', 'name' %>

diff --git a/redmine/app/views/issue_categories/edit.rhtml b/redmine/app/views/issue_categories/edit.rhtml index 087dd7c1b..053facbf7 100644 --- a/redmine/app/views/issue_categories/edit.rhtml +++ b/redmine/app/views/issue_categories/edit.rhtml @@ -1,6 +1,6 @@

<%=l(:label_issue_category)%>

-<%= start_form_tag :action => 'edit', :id => @category %> +<%= start_form_tag({:action => 'edit', :id => @category}, :class => "tabular") %> <%= render :partial => 'form' %> <%= submit_tag l(:button_save) %> <%= end_form_tag %> diff --git a/redmine/app/views/issue_statuses/_form.rhtml b/redmine/app/views/issue_statuses/_form.rhtml index 237466a3e..f3b1cf2ca 100644 --- a/redmine/app/views/issue_statuses/_form.rhtml +++ b/redmine/app/views/issue_statuses/_form.rhtml @@ -1,17 +1,18 @@ <%= error_messages_for 'issue_status' %> +
-

*
+

<%= text_field 'issue_status', 'name' %>

-

<%= check_box 'issue_status', 'is_closed' %> -

+

+<%= check_box 'issue_status', 'is_closed' %>

-

<%= check_box 'issue_status', 'is_default' %> -

+

+<%= check_box 'issue_status', 'is_default' %>

-

-#<%= text_field 'issue_status', 'html_color', :maxlength => 6 %> *

+

+#<%= text_field 'issue_status', 'html_color', :maxlength => 6 %>

- +
\ No newline at end of file diff --git a/redmine/app/views/issue_statuses/edit.rhtml b/redmine/app/views/issue_statuses/edit.rhtml index 140a40d94..80f856a2a 100644 --- a/redmine/app/views/issue_statuses/edit.rhtml +++ b/redmine/app/views/issue_statuses/edit.rhtml @@ -1,6 +1,6 @@

<%=l(:label_issue_status)%>

-<%= start_form_tag :action => 'update', :id => @issue_status %> +<%= start_form_tag({:action => 'update', :id => @issue_status}, :class => "tabular") %> <%= render :partial => 'form' %> <%= submit_tag l(:button_save) %> <%= end_form_tag %> diff --git a/redmine/app/views/issue_statuses/list.rhtml b/redmine/app/views/issue_statuses/list.rhtml index ce7f8469c..023863437 100644 --- a/redmine/app/views/issue_statuses/list.rhtml +++ b/redmine/app/views/issue_statuses/list.rhtml @@ -1,6 +1,6 @@

<%=l(:label_issue_status_plural)%>

- +
@@ -14,11 +14,9 @@ - - + <% end %> diff --git a/redmine/app/views/issue_statuses/new.rhtml b/redmine/app/views/issue_statuses/new.rhtml index 1dc61eb85..2dacb1e21 100644 --- a/redmine/app/views/issue_statuses/new.rhtml +++ b/redmine/app/views/issue_statuses/new.rhtml @@ -1,6 +1,6 @@

<%=l(:label_issue_status_new)%>

-<%= start_form_tag :action => 'create' %> +<%= start_form_tag({:action => 'create'}, :class => "tabular") %> <%= render :partial => 'form' %> <%= submit_tag l(:button_create) %> <%= end_form_tag %> diff --git a/redmine/app/views/issues/_list_simple.rhtml b/redmine/app/views/issues/_list_simple.rhtml index bcc05d1e8..bbf193bfd 100644 --- a/redmine/app/views/issues/_list_simple.rhtml +++ b/redmine/app/views/issues/_list_simple.rhtml @@ -1,7 +1,7 @@ <% if issues.length > 0 %>
<%=l(:field_status)%> <%=l(:field_is_default)%><%= link_to status.name, :action => 'edit', :id => status %> <%= image_tag 'true' if status.is_default? %> <%= image_tag 'true' if status.is_closed? %>  - <%= start_form_tag :action => 'destroy', :id => status %> - <%= submit_tag l(:button_delete), :class => "button-small" %> - <%= end_form_tag %> +
 
+ <%= button_to l(:button_delete), { :action => 'destroy', :id => status }, :confirm => l(:text_are_you_sure), :class => "button-small" %>
- +
diff --git a/redmine/app/views/issues/change_status.rhtml b/redmine/app/views/issues/change_status.rhtml index 35494dbb9..9c14bdb88 100644 --- a/redmine/app/views/issues/change_status.rhtml +++ b/redmine/app/views/issues/change_status.rhtml @@ -1,29 +1,27 @@

<%=l(:label_issue)%> #<%= @issue.id %>: <%= @issue.subject %>

<%= error_messages_for 'history' %> -<%= start_form_tag :action => 'change_status', :id => @issue %> +<%= start_form_tag({:action => 'change_status', :id => @issue}, :class => "tabular") %> <%= hidden_field_tag 'confirm', 1 %> <%= hidden_field 'history', 'status_id' %>
-

<%=l(:label_issue_status_new)%>: <%= @history.status.name %>

+

<%= @history.status.name %>

-
-


+

-
-


+

-


+

<%= text_area 'history', 'notes', :cols => 60, :rows => 10 %>

diff --git a/redmine/app/views/issues/edit.rhtml b/redmine/app/views/issues/edit.rhtml index 0386173ef..5a118f893 100644 --- a/redmine/app/views/issues/edit.rhtml +++ b/redmine/app/views/issues/edit.rhtml @@ -1,56 +1,26 @@

<%= @issue.tracker.name %> #<%= @issue.id %> - <%= @issue.subject %>

-<%= error_messages_for 'issue' %> -<%= start_form_tag :action => 'edit', :id => @issue %> - +<% labelled_tabular_form_for :issue, @issue, :url => {:action => 'edit'} do |f| %> +<%= error_messages_for 'issue' %>
- -

<%=l(:field_status)%>: <%= @issue.status.name %>

- -
-


-

-
- -
-


-

-
- -
-


-

-
- -

*
-<%= text_field 'issue', 'subject', :size => 60 %>

+ +

<%= @issue.status.name %>

-

*
-<%= text_area 'issue', 'description', :cols => 60, :rows => 10 %>

+

<%= f.select :priority_id, (@priorities.collect {|p| [p.name, p.id]}), :required => true %>

+

<%= f.select :assigned_to_id, (@issue.project.members.collect {|m| [m.name, m.user_id]}), :include_blank => true %>

+

<%= f.select :category_id, (@project.issue_categories.collect {|c| [c.name, c.id]}) %>

+

<%= f.text_field :subject, :size => 80, :required => true %>

+

<%= f.text_area :description, :cols => 60, :rows => 10, :required => true %>

+

<%= f.date_select :due_date, :start_year => Date.today.year, :include_blank => true %>

-


-<%= date_select 'issue', 'due_date', :start_year => Date.today.year, :include_blank => true %>

- <% for @custom_value in @custom_values %>

<%= custom_field_tag_with_label @custom_value %>

-<% end %> - -


-

+<% end %> - +

<%= f.select :fixed_version_id, (@project.versions.collect {|v| [v.name, v.id]}), { :include_blank => true } %> +

+
- + <%= submit_tag l(:button_save) %> -<%= end_form_tag %> +<% end %> \ No newline at end of file diff --git a/redmine/app/views/news/_form.rhtml b/redmine/app/views/news/_form.rhtml index 564a8834a..02bb824d9 100644 --- a/redmine/app/views/news/_form.rhtml +++ b/redmine/app/views/news/_form.rhtml @@ -1,13 +1,6 @@ <%= error_messages_for 'news' %> - - -

*
-<%= text_field 'news', 'title', :size => 60 %>

- -


-<%= text_area 'news', 'summary', :cols => 60, :rows => 2 %>

- -


-<%= text_area 'news', 'description', :cols => 60, :rows => 10 %>

- - +
+

<%= f.text_field :title, :required => true, :size => 60 %>

+

<%= f.text_area :summary, :cols => 60, :rows => 2 %>

+

<%= f.text_area :description, :required => true, :cols => 60, :rows => 10 %>

+
\ No newline at end of file diff --git a/redmine/app/views/news/edit.rhtml b/redmine/app/views/news/edit.rhtml index 27f7ac993..5e015c4c7 100644 --- a/redmine/app/views/news/edit.rhtml +++ b/redmine/app/views/news/edit.rhtml @@ -1,6 +1,6 @@

<%=l(:label_news)%>

-<%= start_form_tag :action => 'edit', :id => @news %> - <%= render :partial => 'form' %> - <%= submit_tag l(:button_save) %> -<%= end_form_tag %> +<% labelled_tabular_form_for :news, @news, :url => { :action => "edit" } do |f| %> +<%= render :partial => 'form', :locals => { :f => f } %> +<%= submit_tag l(:button_save) %> +<% end %> \ No newline at end of file diff --git a/redmine/app/views/news/show.rhtml b/redmine/app/views/news/show.rhtml index 2ff75fa8a..bea9af4fb 100644 --- a/redmine/app/views/news/show.rhtml +++ b/redmine/app/views/news/show.rhtml @@ -7,4 +7,15 @@

<%= simple_format auto_link @news.description %> - + +<% if authorize_for('news', 'edit') %> + <%= start_form_tag ({:controller => 'news', :action => 'edit', :id => @news}, :method => 'get' ) %> + <%= submit_tag l(:button_edit) %> + <%= end_form_tag %> +<% end %> + +<% if authorize_for('news', 'destroy') %> + <%= start_form_tag ({:controller => 'news', :action => 'destroy', :id => @news}) %> + <%= submit_tag l(:button_delete) %> + <%= end_form_tag %> +<% end %> diff --git a/redmine/app/views/projects/_form.rhtml b/redmine/app/views/projects/_form.rhtml index 18b703cbd..889404bbc 100644 --- a/redmine/app/views/projects/_form.rhtml +++ b/redmine/app/views/projects/_form.rhtml @@ -1,41 +1,24 @@ <%= error_messages_for 'project' %> -
-


-<%= text_field 'project', 'name' %>

+

<%= f.text_field :name, :required => true %>

<% if admin_loggedin? %> -


-

+

<%= f.select :parent_id, (@root_projects.collect {|p| [p.name, p.id]}), { :include_blank => true } %>

<% end %> -


-<%= text_area 'project', 'description', :cols => 60, :rows => 3 %>

- -


-<%= text_field 'project', 'homepage', :size => 40 %>

- -

<%= check_box 'project', 'is_public' %> -

+

<%= f.text_area :description, :required => true, :cols => 60, :rows => 3 %>

+

<%= f.text_field :homepage, :size => 40 %>

+

<%= f.check_box :is_public %>

<% for @custom_value in @custom_values %>

<%= custom_field_tag_with_label @custom_value %>

<% end %> -
<%=l(:label_custom_field_plural)%> -<% for custom_field in @custom_fields %> - checked="checked"<%end%> - > <%= custom_field.name %> - -<% end %>
- +

+<% for custom_field in @custom_fields %> + <%= check_box_tag "custom_field_ids[]", custom_field.id, (@project.custom_fields.include? custom_field) %> + <%= custom_field.name %> +<% end %>

+
- diff --git a/redmine/app/views/projects/add.rhtml b/redmine/app/views/projects/add.rhtml index 2dd4eb450..bafbf9145 100644 --- a/redmine/app/views/projects/add.rhtml +++ b/redmine/app/views/projects/add.rhtml @@ -1,6 +1,6 @@

<%=l(:label_project_new)%>

-<%= start_form_tag :action => 'add' %> -<%= render :partial => 'form' %> -<%= submit_tag l(:button_create) %> -<%= end_form_tag %> +<% labelled_tabular_form_for :project, @project, :url => { :action => "add" } do |f| %> +<%= render :partial => 'form', :locals => { :f => f } %> +<%= submit_tag l(:button_save) %> +<% end %> \ No newline at end of file diff --git a/redmine/app/views/projects/add_document.rhtml b/redmine/app/views/projects/add_document.rhtml index 8d6d2e39d..88572f409 100644 --- a/redmine/app/views/projects/add_document.rhtml +++ b/redmine/app/views/projects/add_document.rhtml @@ -1,10 +1,12 @@

<%=l(:label_document_new)%>

-<%= start_form_tag( { :action => 'add_document', :id => @project }, :multipart => true) %> +<%= start_form_tag( { :action => 'add_document', :id => @project }, :class => "tabular", :multipart => true) %> <%= render :partial => 'documents/form' %> - -


-<%= file_field 'attachment', 'file' %>

+ +
+

+<%= file_field 'attachment', 'file' %>

+
<%= submit_tag l(:button_create) %> <%= end_form_tag %> diff --git a/redmine/app/views/projects/add_issue.rhtml b/redmine/app/views/projects/add_issue.rhtml index 123513371..f640ad2b7 100644 --- a/redmine/app/views/projects/add_issue.rhtml +++ b/redmine/app/views/projects/add_issue.rhtml @@ -1,52 +1,26 @@

<%=l(:label_issue_new)%>: <%= @tracker.name %>

-<%= start_form_tag( { :action => 'add_issue', :id => @project }, :multipart => true) %> +<% labelled_tabular_form_for :issue, @issue, :url => {:action => 'add_issue'}, :html => {:multipart => true} do |f| %> <%= error_messages_for 'issue' %> -
- - + <%= hidden_field_tag 'tracker_id', @tracker.id %> -
-


-

-
- -
-


-

-
- -
-


-

-
- -


-<%= text_field 'issue', 'subject', :size => 80 %>

- -


-<%= text_area 'issue', 'description', :cols => 60, :rows => 10 %>

- -


-<%= date_select 'issue', 'due_date', :start_year => Date.today.year, :include_blank => true %>

+

<%= f.select :priority_id, (@priorities.collect {|p| [p.name, p.id]}), :required => true %>

+

<%= f.select :assigned_to_id, (@issue.project.members.collect {|m| [m.name, m.user_id]}), :include_blank => true %>

+

<%= f.select :category_id, (@project.issue_categories.collect {|c| [c.name, c.id]}) %>

+

<%= f.text_field :subject, :size => 80, :required => true %>

+

<%= f.text_area :description, :cols => 60, :rows => 10, :required => true %>

+

<%= f.date_select :due_date, :start_year => Date.today.year, :include_blank => true %>

<% for @custom_value in @custom_values %>

<%= custom_field_tag_with_label @custom_value %>

<% end %> -


+

<%= file_field 'attachment', 'file' %>

<%= submit_tag l(:button_create) %> -<%= end_form_tag %> \ No newline at end of file +<% end %> \ No newline at end of file diff --git a/redmine/app/views/projects/add_news.rhtml b/redmine/app/views/projects/add_news.rhtml index abe6e96e0..a6ecd3da7 100644 --- a/redmine/app/views/projects/add_news.rhtml +++ b/redmine/app/views/projects/add_news.rhtml @@ -1,7 +1,6 @@

<%=l(:label_news_new)%>

-<%= start_form_tag :action => 'add_news', :id => @project %> - <%= render :partial => 'news/form' %> - <%= submit_tag l(:button_create) %> -<%= end_form_tag %> - +<% labelled_tabular_form_for :news, @news, :url => { :action => "add_news" } do |f| %> +<%= render :partial => 'news/form', :locals => { :f => f } %> +<%= submit_tag l(:button_create) %> +<% end %> \ No newline at end of file diff --git a/redmine/app/views/projects/add_version.rhtml b/redmine/app/views/projects/add_version.rhtml index 501a7e615..c038b7de9 100644 --- a/redmine/app/views/projects/add_version.rhtml +++ b/redmine/app/views/projects/add_version.rhtml @@ -1,7 +1,6 @@

<%=l(:label_version_new)%>

-<%= start_form_tag :action => 'add_version', :id => @project %> - <%= render :partial => 'versions/form' %> - <%= submit_tag l(:button_create) %> -<%= end_form_tag %> - +<% labelled_tabular_form_for :version, @version, :url => { :action => 'add_version' } do |f| %> +<%= render :partial => 'versions/form', :locals => { :f => f } %> +<%= submit_tag l(:button_create) %> +<% end %> \ No newline at end of file diff --git a/redmine/app/views/projects/list.rhtml b/redmine/app/views/projects/list.rhtml index b48fef39a..0137086d9 100644 --- a/redmine/app/views/projects/list.rhtml +++ b/redmine/app/views/projects/list.rhtml @@ -1,6 +1,6 @@

<%=l(:label_public_projects)%>

-
# <%=l(:field_tracker)%>
+
<%= sort_header_tag('name', :caption => l(:label_project)) %> diff --git a/redmine/app/views/projects/list_files.rhtml b/redmine/app/views/projects/list_files.rhtml index a2a06c936..5fe65e6a6 100644 --- a/redmine/app/views/projects/list_files.rhtml +++ b/redmine/app/views/projects/list_files.rhtml @@ -2,7 +2,7 @@ <% delete_allowed = authorize_for('versions', 'destroy_file') %> -
<%=l(:field_description)%>
+
diff --git a/redmine/app/views/projects/list_issues.rhtml b/redmine/app/views/projects/list_issues.rhtml index 4bba76bb7..d18799acf 100644 --- a/redmine/app/views/projects/list_issues.rhtml +++ b/redmine/app/views/projects/list_issues.rhtml @@ -22,7 +22,7 @@
<%=l(:field_version)%> <%=l(:field_filename)%>
  - +
diff --git a/redmine/app/views/projects/list_news.rhtml b/redmine/app/views/projects/list_news.rhtml index a1b15941a..f31f927ac 100644 --- a/redmine/app/views/projects/list_news.rhtml +++ b/redmine/app/views/projects/list_news.rhtml @@ -2,11 +2,8 @@ <% for news in @news %>

- <%= news.title %> (<%= link_to_user news.author %> <%= format_time(news.created_on) %>) - <%= link_to_if_authorized image_tag('edit_small'), :controller => 'news', :action => 'edit', :id => news %> - <%= link_to_if_authorized image_tag('delete'), { :controller => 'news', :action => 'destroy', :id => news }, :confirm => 'Are you sure?' %> -
- <%= news.summary %> + <%= news.title %> (<%= link_to_user news.author %> <%= format_time(news.created_on) %>)
+ <%= news.summary %>
[<%= link_to l(:label_read), :controller => 'news', :action => 'show', :id => news %>]

<% end %> diff --git a/redmine/app/views/projects/settings.rhtml b/redmine/app/views/projects/settings.rhtml index 1d1684ff6..cb6864a23 100644 --- a/redmine/app/views/projects/settings.rhtml +++ b/redmine/app/views/projects/settings.rhtml @@ -1,9 +1,9 @@

<%=l(:label_settings)%>

-<%= start_form_tag :action => 'edit', :id => @project %> -<%= render :partial => 'form' %> -
<%= submit_tag l(:button_save) %>
-<%= end_form_tag %> +<% labelled_tabular_form_for :project, @project, :url => { :action => "edit", :id => @project } do |f| %> +<%= render :partial => 'form', :locals => { :f => f } %> +<%= submit_tag l(:button_save) %> +<% end %>   diff --git a/redmine/app/views/reports/issue_report.rhtml b/redmine/app/views/reports/issue_report.rhtml index 08347bdb2..1717583d3 100644 --- a/redmine/app/views/reports/issue_report.rhtml +++ b/redmine/app/views/reports/issue_report.rhtml @@ -11,3 +11,4 @@ <%=l(:field_category)%> <%= render :partial => 'simple', :locals => { :data => @issues_by_category, :field_name => "category_id", :rows => @categories } %> +  diff --git a/redmine/app/views/roles/_form.rhtml b/redmine/app/views/roles/_form.rhtml index b007d1e34..ea7bafc33 100644 --- a/redmine/app/views/roles/_form.rhtml +++ b/redmine/app/views/roles/_form.rhtml @@ -1,9 +1,7 @@ <%= error_messages_for 'role' %> -
-


-<%= text_field 'role', 'name' %>

+

<%= f.text_field :name, :required => true %>

<%=l(:label_permissions)%>: <% permissions = @permissions.group_by {|p| p.group_id } %> diff --git a/redmine/app/views/roles/edit.rhtml b/redmine/app/views/roles/edit.rhtml index 0bc352506..ffe117cef 100644 --- a/redmine/app/views/roles/edit.rhtml +++ b/redmine/app/views/roles/edit.rhtml @@ -1,8 +1,6 @@

<%=l(:label_role)%>

-<%= start_form_tag ({ :action => 'edit', :id => @role }, :id => 'role_form') %> -<%= render :partial => 'form' %> +<% labelled_tabular_form_for :role, @role, :url => { :action => 'edit' }, :html => {:id => 'role_form'} do |f| %> +<%= render :partial => 'form', :locals => { :f => f } %> <%= submit_tag l(:button_save) %> -<%= end_form_tag %> - - +<% end %> diff --git a/redmine/app/views/roles/list.rhtml b/redmine/app/views/roles/list.rhtml index ae92a8071..169b3d1c0 100644 --- a/redmine/app/views/roles/list.rhtml +++ b/redmine/app/views/roles/list.rhtml @@ -1,6 +1,6 @@

<%=l(:label_role_plural)%>

-
<%= link_to l(:label_export_csv), :action => 'export_issues_csv', :id => @project.id %>
+
@@ -9,10 +9,8 @@ <% for role in @roles %> "> - <% end %>
<%=l(:label_role)%>
<%= link_to role.name, :action => 'edit', :id => role %> - <%= start_form_tag :action => 'destroy', :id => role %> - <%= submit_tag l(:button_delete), :class => "button-small" %> - <%= end_form_tag %> + + <%= button_to l(:button_delete), { :action => 'destroy', :id => role }, :confirm => l(:text_are_you_sure), :class => "button-small" %>
diff --git a/redmine/app/views/roles/new.rhtml b/redmine/app/views/roles/new.rhtml index 11d2d9209..a73c36cb1 100644 --- a/redmine/app/views/roles/new.rhtml +++ b/redmine/app/views/roles/new.rhtml @@ -1,7 +1,6 @@

<%=l(:label_role_new)%>

-<%= start_form_tag ({ :action => 'new' }, :id => 'role_form') %> -<%= render :partial => 'form' %> +<% labelled_tabular_form_for :role, @role, :url => { :action => 'new' }, :html => {:id => 'role_form'} do |f| %> +<%= render :partial => 'form', :locals => { :f => f } %> <%= submit_tag l(:button_create) %> -<%= end_form_tag %> - +<% end %> \ No newline at end of file diff --git a/redmine/app/views/trackers/_form.rhtml b/redmine/app/views/trackers/_form.rhtml index e0b74ec37..625c0d636 100644 --- a/redmine/app/views/trackers/_form.rhtml +++ b/redmine/app/views/trackers/_form.rhtml @@ -1,10 +1,7 @@ <%= error_messages_for 'tracker' %> - +
-

*
-<%= text_field 'tracker', 'name' %>

- -

<%= check_box 'tracker', 'is_in_chlog' %> -

+

<%= f.text_field :name, :required => true %>

+

<%= f.check_box :is_in_chlog %>

- +
diff --git a/redmine/app/views/trackers/edit.rhtml b/redmine/app/views/trackers/edit.rhtml index 25cec51d2..d8411099c 100644 --- a/redmine/app/views/trackers/edit.rhtml +++ b/redmine/app/views/trackers/edit.rhtml @@ -1,6 +1,6 @@

<%=l(:label_tracker)%>

-<%= start_form_tag :action => 'edit', :id => @tracker %> - <%= render :partial => 'form' %> - <%= submit_tag l(:button_save) %> -<%= end_form_tag %> +<% labelled_tabular_form_for :tracker, @tracker, :url => { :action => 'edit' } do |f| %> +<%= render :partial => 'form', :locals => { :f => f } %> +<%= submit_tag l(:button_save) %> +<% end %> \ No newline at end of file diff --git a/redmine/app/views/trackers/list.rhtml b/redmine/app/views/trackers/list.rhtml index 475a6b9da..8d4a5c595 100644 --- a/redmine/app/views/trackers/list.rhtml +++ b/redmine/app/views/trackers/list.rhtml @@ -1,6 +1,6 @@

<%=l(:label_tracker_plural)%>

- +
@@ -9,10 +9,8 @@ <% for tracker in @trackers %> "> - <% end %> diff --git a/redmine/app/views/trackers/new.rhtml b/redmine/app/views/trackers/new.rhtml index 788854c28..b318a5dc4 100644 --- a/redmine/app/views/trackers/new.rhtml +++ b/redmine/app/views/trackers/new.rhtml @@ -1,7 +1,6 @@

<%=l(:label_tracker_new)%>

-<%= start_form_tag :action => 'new' %> - <%= render :partial => 'form' %> - <%= submit_tag l(:button_create) %> -<%= end_form_tag %> - +<% labelled_tabular_form_for :tracker, @tracker, :url => { :action => 'new' } do |f| %> +<%= render :partial => 'form', :locals => { :f => f } %> +<%= submit_tag l(:button_create) %> +<% end %> \ No newline at end of file diff --git a/redmine/app/views/users/_form.rhtml b/redmine/app/views/users/_form.rhtml index 08bce06c0..6a714a7b0 100644 --- a/redmine/app/views/users/_form.rhtml +++ b/redmine/app/views/users/_form.rhtml @@ -2,36 +2,25 @@
-

*
-<%= text_field 'user', 'login', :size => 25 %>

+

<%= f.text_field :login, :required => true, :size => 25 %>

-

*
+

<%= password_field_tag 'password', nil, :size => 25 %>

-

*
+

<%= password_field_tag 'password_confirmation', nil, :size => 25 %>

-

*
-<%= text_field 'user', 'firstname' %>

- -

*
-<%= text_field 'user', 'lastname' %>

- -

*
-<%= text_field 'user', 'mail' %>

- -


-<%= select("user", "language", lang_options_for_select) %>

+

<%= f.text_field :firstname, :required => true %>

+

<%= f.text_field :lastname, :required => true %>

+

<%= f.text_field :mail, :required => true %>

+

<%= f.select :language, lang_options_for_select %>

<% for @custom_value in @custom_values %>

<%= custom_field_tag_with_label @custom_value %>

<% end %> -
- -

<%= check_box 'user', 'admin' %>

- -

<%= check_box 'user', 'mail_notification' %>

+

<%= f.check_box :admin %>

+

<%= f.check_box :mail_notification %>

diff --git a/redmine/app/views/users/add.rhtml b/redmine/app/views/users/add.rhtml index 13e7069fc..d4c6a15f4 100644 --- a/redmine/app/views/users/add.rhtml +++ b/redmine/app/views/users/add.rhtml @@ -1,6 +1,6 @@

<%=l(:label_user_new)%>

-<%= start_form_tag :action => 'add' %> - <%= render :partial => 'form' %> - <%= submit_tag l(:button_create) %> -<%= end_form_tag %> +<% labelled_tabular_form_for :user, @user, :url => { :action => "add" } do |f| %> +<%= render :partial => 'form', :locals => { :f => f } %> +<%= submit_tag l(:button_create) %> +<% end %> \ No newline at end of file diff --git a/redmine/app/views/users/edit.rhtml b/redmine/app/views/users/edit.rhtml index 524b920f6..2332b70ad 100644 --- a/redmine/app/views/users/edit.rhtml +++ b/redmine/app/views/users/edit.rhtml @@ -1,6 +1,6 @@

<%=l(:label_user)%>

-<%= start_form_tag :action => 'edit', :id => @user %> - <%= render :partial => 'form' %> - <%= submit_tag l(:button_save) %> -<%= end_form_tag %> +<% labelled_tabular_form_for :user, @user, :url => { :action => "edit" } do |f| %> +<%= render :partial => 'form', :locals => { :f => f } %> +<%= submit_tag l(:button_save) %> +<% end %> diff --git a/redmine/app/views/users/list.rhtml b/redmine/app/views/users/list.rhtml index 129decd71..10540daa7 100644 --- a/redmine/app/views/users/list.rhtml +++ b/redmine/app/views/users/list.rhtml @@ -1,6 +1,6 @@

<%=l(:label_user_plural)%>

-
<%=l(:label_tracker)%>
<%= link_to tracker.name, :action => 'edit', :id => tracker %> - <%= start_form_tag :action => 'destroy', :id => tracker %> - <%= submit_tag l(:button_delete), :class => "button-small" %> - <%= end_form_tag %> + + <%= button_to l(:button_delete), { :action => 'destroy', :id => tracker }, :confirm => l(:text_are_you_sure), :class => "button-small" %>
+
<%= sort_header_tag('login', :caption => l(:field_login)) %> <%= sort_header_tag('firstname', :caption => l(:field_firstname)) %> diff --git a/redmine/app/views/versions/_form.rhtml b/redmine/app/views/versions/_form.rhtml index 18de3c5c3..577e1c37f 100644 --- a/redmine/app/views/versions/_form.rhtml +++ b/redmine/app/views/versions/_form.rhtml @@ -1,13 +1,8 @@ <%= error_messages_for 'version' %> - +
-

*
-<%= text_field 'version', 'name', :size => 20 %>

- -


-<%= text_field 'version', 'description', :size => 60 %>

- -


-<%= date_select 'version', 'effective_date' %>

+

<%= f.text_field :name, :size => 20, :required => true %>

+

<%= f.text_field :description, :size => 60 %>

+

<%= f.date_select :effective_date, :required => true %>

- +
\ No newline at end of file diff --git a/redmine/app/views/versions/edit.rhtml b/redmine/app/views/versions/edit.rhtml index 6851d79b8..1556ebba1 100644 --- a/redmine/app/views/versions/edit.rhtml +++ b/redmine/app/views/versions/edit.rhtml @@ -1,8 +1,7 @@

<%=l(:label_version)%>

-<%= start_form_tag :action => 'edit', :id => @version %> - <%= render :partial => 'form' %> - <%= submit_tag l(:button_save) %> -<%= end_form_tag %> - +<% labelled_tabular_form_for :version, @version, :url => { :action => 'edit' } do |f| %> +<%= render :partial => 'form', :locals => { :f => f } %> +<%= submit_tag l(:button_save) %> +<% end %> diff --git a/redmine/config/environment.rb b/redmine/config/environment.rb index 23b8a99be..ee85b5b8a 100644 --- a/redmine/config/environment.rb +++ b/redmine/config/environment.rb @@ -123,7 +123,7 @@ ActiveRecord::Errors.default_error_messages = { :not_a_number => "activerecord_error_not_a_number" } -ActionView::Base.field_error_proc = Proc.new{ |html_tag, instance| "#{html_tag}" } +ActionView::Base.field_error_proc = Proc.new{ |html_tag, instance| "#{html_tag}" } GLoc.set_config :default_language => $RDM_DEFAULT_LANG GLoc.clear_strings diff --git a/redmine/doc/CHANGELOG b/redmine/doc/CHANGELOG index 5d9140dd7..fb59f2a66 100644 --- a/redmine/doc/CHANGELOG +++ b/redmine/doc/CHANGELOG @@ -7,22 +7,26 @@ http://redmine.org/ == xx/xx/2006 v0.3.0 -* user authentication against multiple LDAP +* user authentication against multiple LDAP (optional) * token based "lost password" functionality * user self-registration functionality (optional) * custom fields now available for issues, users and projects * new custom field format "text" (displayed as a textarea field) * project & administration drop down menus in navigation bar for quicker access * "due date" field added on issues -* error messages internationalization +* tracker selection filter added on change log * Localization plugin replaced with GLoc 1.1.0 +* error messages internationalization +* german translation added (thanks to Karim Trott) * new filter in issues list: "Fixed version" * active filters are displayed with colored background on issues list * custom configuration is now defined in config/config_custom.rb * user object no more stored in session (only user_id) * news summary field is no longer required +* tables and forms redesign * Fixed: boolean custom field not working * Fixed: error messages for custom fields are not displayed +* Fixed: invalid custom fields should have a red border * Fixed: custom fields values are not validated on issue update * Fixed: unable to choose an empty value for 'List' custom fields * Fixed: no issue categories sorting diff --git a/redmine/lang/de.yml b/redmine/lang/de.yml new file mode 100644 index 000000000..cdfffabde --- /dev/null +++ b/redmine/lang/de.yml @@ -0,0 +1,290 @@ +_gloc_rule_default: '|n| n==1 ? "" : "_plural" ' + +actionview_datehelper_select_day_prefix: +actionview_datehelper_select_month_names: January,February,March,April,May,June,July,August,September,October,November,December +actionview_datehelper_select_month_names_abbr: Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec +actionview_datehelper_select_month_prefix: +actionview_datehelper_select_year_prefix: +actionview_datehelper_time_in_words_day: 1 day +actionview_datehelper_time_in_words_day_plural: %d days +actionview_datehelper_time_in_words_hour_about: about an hour +actionview_datehelper_time_in_words_hour_about_plural: about %d hours +actionview_datehelper_time_in_words_hour_about_single: about an hour +actionview_datehelper_time_in_words_minute: 1 minute +actionview_datehelper_time_in_words_minute_half: half a minute +actionview_datehelper_time_in_words_minute_less_than: less than a minute +actionview_datehelper_time_in_words_minute_plural: %d minutes +actionview_datehelper_time_in_words_minute_single: 1 minute +actionview_datehelper_time_in_words_second_less_than: less than a second +actionview_datehelper_time_in_words_second_less_than_plural: less than %d seconds +actionview_instancetag_blank_option: Bitte auserwählt + +activerecord_error_inclusion: ist nicht in der Liste eingeschlossen +activerecord_error_exclusion: ist reserviert +activerecord_error_invalid: ist unzulässig +activerecord_error_confirmation: bringt nicht Bestätigung zusammen +activerecord_error_accepted: muß angenommen werden +activerecord_error_empty: kann nicht leer sein +activerecord_error_blank: kann nicht leer sein +activerecord_error_too_long: ist zu lang +activerecord_error_too_short: ist zu kurz +activerecord_error_wrong_length: ist die falsche Länge +activerecord_error_taken: ist bereits genommen worden +activerecord_error_not_a_number: ist nicht eine Zahl + +general_fmt_age: %d yr +general_fmt_age_plural: %d yrs +general_fmt_date: %%b %%d, %%Y (%%a) +general_fmt_datetime: %%b %%d, %%Y (%%a), %%I:%%M %%p +general_fmt_datetime_short: %%b %%d, %%I:%%M %%p +general_fmt_time: %%I:%%M %%p +general_text_No: 'Nein' +general_text_Yes: 'Ja' +general_text_no: 'nein' +general_text_yes: 'ja' +general_lang_de: 'Deutsch' + +notice_account_updated: Konto wurde erfolgreich aktualisiert. +notice_account_invalid_creditentials: Unzulässiger Benutzer oder Passwort +notice_account_password_updated: Passwort wurde erfolgreich aktualisiert. +notice_account_wrong_password: Falsches Passwort +notice_account_register_done: Konto wurde erfolgreich verursacht. +notice_account_unknown_email: Unbekannter Benutzer. +notice_can_t_change_password: Dieses Konto verwendet eine externe Authentisierung Quelle. Unmöglich, das Kennwort zu ändern. +notice_account_lost_email_sent: Ein email mit Anweisungen, ein neues Kennwort zu wählen ist dir geschickt worden. +notice_account_activated: Dein Konto ist aktiviert worden. Du kannst jetzt einloggen. +notice_successful_create: Erfolgreiche Kreation. +notice_successful_update: Erfolgreiches Update. +notice_successful_delete: Erfolgreiche Auslassung. +notice_successful_connection: Erfolgreicher Anschluß. +notice_file_not_found: Erbetene Akte besteht nicht oder ist gelöscht worden. + +gui_validation_error: 1 Störung +gui_validation_error_plural: %d Störungen + +field_name: Name +field_description: Beschreibung +field_summary: Zusammenfassung +field_is_required: Erforderlich +field_firstname: Vorname +field_lastname: Nachname +field_mail: Email +field_filename: Datei +field_filesize: Grootte +field_downloads: Downloads +field_author: Autor +field_created_on: Angelegt +field_updated_on: aktualisiert +field_field_format: Format +field_is_for_all: Für alle Projekte +field_possible_values: Mögliche Werte +field_regexp: Regulärer Ausdruck +field_min_length: Minimale Länge +field_max_length: Maximale Länge +field_value: Wert +field_category: Kategorie +field_title: Títel +field_project: Projekt +#field_issue: Issue +field_status: Status +field_notes: Anmerkungen +field_is_closed: Problem erledigt +#field_is_default: Default status +field_html_color: Farbe +field_tracker: Tracker +field_subject: Thema +#field_due_date: Due date +field_assigned_to: Zugewiesen an +field_priority: Priorität +field_fixed_version: Erledigt in Version +field_user: Benutzer +field_role: Rolle +field_homepage: Startseite +field_is_public: Öffentlich +#field_parent: Subprojekt von +field_is_in_chlog: Ansicht der Issues in der Historie +field_login: Mitgliedsname +field_mail_notification: Mailbenachrichtigung +#field_admin: Administrator +field_locked: Gesperrt +field_last_login_on: Letzte Anmeldung +field_language: Sprache +field_effective_date: Datum +field_password: Passwort +field_new_password: Neues Passwort +field_password_confirmation: Bestätigung +field_version: Version +field_type: Typ +field_host: Host +#field_port: Port +#field_account: Account +#field_base_dn: Base DN +#field_attr_login: Login attribute +#field_attr_firstname: Firstname attribute +#field_attr_lastname: Lastname attribute +#field_attr_mail: Email attribute +#field_onthefly: On-the-fly user creation + +label_user: Benutzer +label_user_plural: Benutzer +label_user_new: Neuer Benutzer +label_project: Projekt +label_project_new: Neues Projekt +label_project_plural: Projekte +#label_project_latest: Latest projects +#label_issue: Issue +#label_issue_new: New issue +#label_issue_plural: Issues +#label_issue_view_all: View all issues +label_document: Dokument +label_document_new: Neues Dokument +label_document_plural: Dokumente +label_role: Rolle +label_role_plural: Rollen +label_role_new: Neue Rolle +label_role_and_permissions: Rollen und Rechte +label_member: Mitglied +label_member_new: Neues Mitglied +label_member_plural: Mitglieder +label_tracker: Tracker +label_tracker_plural: Tracker +label_tracker_new: Neuer Tracker +label_workflow: Workflow +label_issue_status: Problem Status +label_issue_status_plural: Problem Stati +label_issue_status_new: Neuer Status +label_issue_category: Problem Kategorie +label_issue_category_plural: Problem Kategorien +label_issue_category_new: Neue Kategorie +label_custom_field: Benutzerdefiniertes Feld +label_custom_field_plural: Benutzerdefinierte Felder +label_custom_field_new: Neues Feld +label_enumerations: Enumerationen +label_enumeration_new: Neuer Wert +label_information: Information +label_information_plural: Informationen +#label_please_login: Please login +label_register: Anmelden +label_password_lost: Passwort vergessen +label_home: Hauptseite +label_my_page: Meine Seite +label_my_account: Mein Konto +label_my_projects: Meine Projekte +label_administration: Administration +label_login: Einloggen +label_logout: Abmelden +label_help: Hilfe +label_reported_issues: Gemeldete Issues +label_assigned_to_me_issues: Mir zugewiesen +label_last_login: Letzte Anmeldung +#label_last_updates: Last updated +#label_last_updates_plural: %d last updated +label_registered_on: Angemeldet am +label_activity: Aktivität +label_new: Neue +label_logged_as: Angemeldet als +#label_environment: Environment +label_authentication: Authentisierung +#label_auth_source: Authentification mode +#label_auth_source_new: New authentication mode +#label_auth_source_plural: Authentification modes +#label_subproject: Subproject +#label_subproject_plural: Subprojects +label_min_max_length: Min - Max Länge +label_list: Liste +label_date: Date +label_integer: Zahl +label_boolean: Boolesch +#label_string: String +label_text: Text +label_attribute: Attribut +label_attribute_plural: Attribute +#label_download: %d Download +#label_download_plural: %d Downloads +label_no_data: Nichts anzuzeigen +label_change_status: Statuswechsel +label_history: Historie +label_attachment: Datei +label_attachment_new: Neue Datei +#label_attachment_delete: Delete file +label_attachment_plural: Dateien +label_report: Bericht +label_report_plural: Berichte +#label_news: Neuigkeiten +#label_news_new: Add news +#label_news_plural: Neuigkeiten +label_news_latest: Letzte Neuigkeiten +label_news_view_all: Alle Neuigkeiten anzeigen +label_change_log: Change log +label_settings: Konfiguration +label_overview: Übersicht +label_version: Version +label_version_new: Neue Version +label_version_plural: Versionen +label_confirmation: Bestätigung +#label_export_csv: Export to CSV +label_read: Lesen... +label_public_projects: Öffentliche Projekte +#label_open_issues: Open +#label_open_issues_plural: Open +#label_closed_issues: Closed +#label_closed_issues_plural: Closed +label_total: Gesamtzahl +label_permissions: Berechtigungen +label_current_status: Gegenwärtiger Status +label_new_statuses_allowed: Neue Status gewährten +label_all: Alle +label_none: Kein +label_next: Weiter +label_previous: Zurück +label_used_by: Benutzt von + +button_login: Einloggen +button_submit: Einreichen +button_save: Speichern +button_check_all: Alles auswählen +button_uncheck_all: Alles abwählen +button_delete: Löschen +button_create: Anlegen +button_test: Testen +button_edit: Bearbeiten +button_add: Hinzufügen +button_change: Wechseln +button_apply: Anwenden +button_clear: Zurücksetzen +button_lock: Verriegeln +button_unlock: Entriegeln +button_download: Fernzuladen +button_list: Aufzulisten +button_view: Siehe + +text_select_mail_notifications: Aktionen für die Mailbenachrichtigung aktiviert werden soll. +text_regexp_info: eg. ^[A-Z0-9]+$ +text_min_max_length_info: 0 heisst keine Beschränkung +#text_possible_values_info: values separated with | +text_project_destroy_confirmation: Sind sie sicher, daß sie das Projekt löschen wollen ? +text_workflow_edit: Auswahl Workflow zum Bearbeiten +text_are_you_sure: Sind sie sicher ? + +default_role_manager: Manager +default_role_developper: Developer +default_role_reporter: Reporter +default_tracker_bug: Fehler +default_tracker_feature: Feature +default_tracker_support: Support +default_issue_status_new: Neu +default_issue_status_assigned: Zugewiesen +default_issue_status_resolved: Gelöst +default_issue_status_feedback: Feedback +default_issue_status_closed: Erledigt +default_issue_status_rejected: Abgewiesen +default_doc_category_user: Benutzerdokumentation +default_doc_category_tech: Technische Dokumentation +default_priority_low: Niedrig +default_priority_normal: Normal +default_priority_high: Hoch +default_priority_urgent: Dringend +default_priority_immediate: Sofort + +enumeration_issue_priorities: Issue-Prioritäten +enumeration_doc_categories: Dokumentenkategorien diff --git a/redmine/lang/en.yml b/redmine/lang/en.yml index 14c78e79c..7fd806362 100644 --- a/redmine/lang/en.yml +++ b/redmine/lang/en.yml @@ -101,7 +101,7 @@ field_user: User field_role: Role field_homepage: Homepage field_is_public: Public -field_parent: Subproject de +field_parent: Subproject of field_is_in_chlog: Issues displayed in changelog field_login: Login field_mail_notification: Mail notifications @@ -264,6 +264,7 @@ text_min_max_length_info: 0 means no restriction text_possible_values_info: values separated with | text_project_destroy_confirmation: Are you sure you want to delete this project and all related data ? text_workflow_edit: Select a role and a tracker to edit the workflow +text_are_you_sure: Are you sure ? default_role_manager: Manager default_role_developper: Developer diff --git a/redmine/lang/es.yml b/redmine/lang/es.yml index 33baf28a6..a9806b3e3 100644 --- a/redmine/lang/es.yml +++ b/redmine/lang/es.yml @@ -264,6 +264,7 @@ text_min_max_length_info: 0 para ninguna restricción #text_possible_values_info: values separated with | text_project_destroy_confirmation: ¿ Estás seguro de querer eliminar el proyecto ? text_workflow_edit: Seleccionar un workflow para actualizar +text_are_you_sure: ¿ Estás seguro ? default_role_manager: Manager default_role_developper: Desarrollador diff --git a/redmine/lang/fr.yml b/redmine/lang/fr.yml index 5a515d869..5c2936801 100644 --- a/redmine/lang/fr.yml +++ b/redmine/lang/fr.yml @@ -264,6 +264,7 @@ text_min_max_length_info: 0 pour aucune restriction text_possible_values_info: valeurs séparées par | text_project_destroy_confirmation: Etes-vous sûr de vouloir supprimer ce projet et tout ce qui lui est rattaché ? text_workflow_edit: Sélectionner un tracker et un rôle pour éditer le workflow +text_are_you_sure: Etes-vous sûr ? default_role_manager: Manager default_role_developper: Développeur diff --git a/redmine/public/stylesheets/application.css b/redmine/public/stylesheets/application.css index 787347d83..6ad4281a1 100644 --- a/redmine/public/stylesheets/application.css +++ b/redmine/public/stylesheets/application.css @@ -13,6 +13,7 @@ line-height:1.4em; text-align:center; color:#303030; background:#e8eaec; +margin:0; } @@ -39,25 +40,25 @@ img.right{float:right; margin:0 0 5px 12px;} #container{ width:100%; min-width: 800px; -margin:5px auto; -padding:1px 0; +margin:0; +padding:0; text-align:left; background:#ffffff; color:#303030; -border:2px solid #a0a0a0; } #header{ -height:5.5em; +height:4.5em; /*width:758px;*/ -margin:0 1px 1px 1px; +margin:0; background:#467aa7; color:#ffffff; +margin-bottom:1px; } #header h1{ -padding:14px 0 0 20px; -font-size:2.4em; +padding:10px 0 0 20px; +font-size:1.8em; background-color:inherit; color:#fff; /*rgb(152, 26, 33);*/ letter-spacing:-2px; @@ -65,7 +66,7 @@ font-weight:normal; } #header h2{ -margin:10px 0 0 40px; +margin:3px 0 0 40px; font-size:1.4em; background-color:inherit; color:#f0f2f4; @@ -77,7 +78,7 @@ font-weight:normal; height:2.2em; line-height:2.2em; /*width:758px;*/ -margin:0 1px; +margin:0; background:#578bb8; color:#ffffff; } @@ -127,16 +128,22 @@ background-color: #80b0da; /**************** Content styles ****************/ +html>body #content { +height: auto; +min-height: 300px; +} + #content{ /*float:right;*/ /*width:530px;*/ width: auto; -min-height: 500px; +height:300px; font-size:0.9em; padding:20px 10px 10px 20px; /*position: absolute;*/ -margin: 0 0 0 140px; +margin-left: 120px; border-left: 1px dashed #c0c0c0; + } #content h2{ @@ -176,6 +183,10 @@ form { .noborder { border:0px; +Exception exceptions.AssertionError: in > +ignored + background-color:#fff; width:100%; } @@ -186,7 +197,7 @@ textarea { } input { - vertical-align: top; + vertical-align: middle; } input.button-small @@ -227,14 +238,13 @@ legend { } table.listTableContent { - /*margin: 2em 2em 2em 0; */ - border:1px solid #c0c0c0; + border:1px solid #578bb8; width:99%; + border-collapse: collapse; } table.listTableContent td { - margin: 2px; - + padding:4px; } tr.ListHead { @@ -249,10 +259,10 @@ tr.ListHead a { } tr.odd { - background-color: #C1E2F7; + background-color:#f0f1f2; } tr.even { - background-color:#CEE1ED; + background-color: #fff; } hr { border:none; border-bottom: dotted 2px #c0c0c0; } @@ -263,19 +273,18 @@ hr { border:none; border-bottom: dotted 2px #c0c0c0; } #subcontent{ float:left; clear:both; -width:130px; +width:110px; padding:20px 20px 10px 5px; -line-height:1.4em; } #subcontent h2{ display:block; -margin:0 0 15px 0; -font-size:1.6em; -font-weight:normal; +margin:0 0 5px 0; +font-size:1.0em; +font-weight:bold; text-align:left; letter-spacing:-1px; -color:#505050; +color:#606060; background-color:inherit; } @@ -283,11 +292,11 @@ background-color:inherit; /**************** Menublock styles ****************/ -.menublock{margin:0 0 20px 8px; font-size:0.9em;} +.menublock{margin:0 0 20px 8px; font-size:0.8em;} .menublock li{list-style:none; display:block; padding:1px; margin-bottom:0px;} .menublock li a{font-weight:bold; text-decoration:none;} .menublock li a:hover{text-decoration:none;} -.menublock li ul{margin:3px 0 3px 15px; font-size:1em; font-weight:normal;} +.menublock li ul{margin:0; font-size:1em; font-weight:normal;} .menublock li ul li{margin-bottom:0;} .menublock li ul a{font-weight:normal;} @@ -317,7 +326,7 @@ text-align:center; clear:both; /*width:758px;*/ padding:5px 0; -margin:0 1px; +margin:0; font-size:0.9em; color:#f0f0f0; background:#467aa7; @@ -352,3 +361,33 @@ width: 50%; text-align: left; } + +/***** CSS FORM ******/ +.tabular p{ +margin: 0; +padding: 5px 0 8px 0; +padding-left: 180px; /*width of left column containing the label elements*/ +height: 1%; +} + +.tabular label{ +font-weight: bold; +float: left; +margin-left: -180px; /*width of left column*/ +width: 175px; /*width of labels. Should be smaller than left column to create some right +margin*/ +} + +.error { +color: #cc0000; +} + + +/*.threepxfix class below: +Targets IE6- ONLY. Adds 3 pixel indent for multi-line form contents. +to account for 3 pixel bug: http://www.positioniseverything.net/explorer/threepxtest.html +*/ + +* html .threepxfix{ +margin-left: 3px; +} \ No newline at end of file