Commit 552d99d6 authored by Jean-Philippe Lang's avatar Jean-Philippe Lang

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
parent 54aeec7b
......@@ -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
......@@ -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? ? " <span class=\"required\">*</span>" : ""),
: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) + "<br />" + 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
......
......@@ -2,24 +2,17 @@
<div class="box login">
<h2><%= image_tag 'login' %>&nbsp;&nbsp;<%=l(:label_please_login)%></h2>
<%= start_form_tag :action=> "login" %>
<table cellpadding="4">
<tr>
<td><label for="login"><%=l(:field_login)%>:</label></td>
<td><%= text_field_tag 'login', nil, :size => 25 %></td>
</tr>
<tr>
<td><label for="password"><%=l(:field_password)%>:</label></td>
<td><%= password_field_tag 'password', nil, :size => 25 %></td>
</tr>
</table>
<%= start_form_tag({:action=> "login"}, :class => "tabular") %>
<p><label for="login"><%=l(:field_login)%>:</label>
<%= text_field_tag 'login', nil, :size => 25 %></p>
&nbsp;
<p><center><input type="submit" name="login" value="<%=l(:button_login)%> &#187;" class="primary" /></center></p>
<p><label for="password"><%=l(:field_password)%>:</label>
<%= password_field_tag 'password', nil, :size => 25 %></p>
<p><center><input type="submit" name="login" value="<%=l(:button_login)%> &#187;" class="primary" /></center>
<%= end_form_tag %>
<br />
<% unless $RDM_SELF_REGISTRATION == false %><%= link_to l(:label_register), :action => 'register' %> |<% end %>
<%= link_to l(:label_password_lost), :action => 'lost_password' %>
<br><% unless $RDM_SELF_REGISTRATION == false %><%= link_to l(:label_register), :action => 'register' %> |<% end %>
<%= link_to l(:label_password_lost), :action => 'lost_password' %></p>
</div>
</center>
\ No newline at end of file
......@@ -2,9 +2,9 @@
<div class="box login">
<h2><%=l(:label_password_lost)%></h2>
<%= start_form_tag %>
<%= start_form_tag({:action=> "lost_password"}, :class => "tabular") %>
<p><label for="mail"><%=l(:field_mail)%> <span class="required">*</span></label><br/>
<p><label for="mail"><%=l(:field_mail)%> <span class="required">*</span></label>
<%= text_field_tag 'mail', nil, :size => 40 %></p>
<p><center><%= submit_tag l(:button_submit) %></center></p>
......
......@@ -6,52 +6,49 @@
<%= error_messages_for 'user' %>
<div class="splitcontentleft">
<div class="box">
<h3><%=l(:label_information_plural)%></h3>
<%= start_form_tag :action => 'my_account' %>
<%= start_form_tag({:action => 'my_account'}, :class => "tabular") %>
<!--[form:user]-->
<p><label for="user_firstname"><%=l(:field_firstname)%> <span class="required">*</span></label><br/>
<p><label for="user_firstname"><%=l(:field_firstname)%> <span class="required">*</span></label>
<%= text_field 'user', 'firstname' %></p>
<p><label for="user_lastname"><%=l(:field_lastname)%> <span class="required">*</span></label><br/>
<p><label for="user_lastname"><%=l(:field_lastname)%> <span class="required">*</span></label>
<%= text_field 'user', 'lastname' %></p>
<p><label for="user_mail"><%=l(:field_mail)%> <span class="required">*</span></label><br/>
<p><label for="user_mail"><%=l(:field_mail)%> <span class="required">*</span></label>
<%= text_field 'user', 'mail', :size => 40 %></p>
<p><label for="user_language"><%=l(:field_language)%></label><br/>
<p><label for="user_language"><%=l(:field_language)%></label>
<%= select("user", "language", lang_options_for_select) %></p>
<!--[eoform:user]-->
<p><%= check_box 'user', 'mail_notification' %> <label for="user_mail_notification"><%=l(:field_mail_notification)%></label></p>
<p><label for="user_mail_notification"><%=l(:field_mail_notification)%></label>
<%= check_box 'user', 'mail_notification' %></p>
<center><%= submit_tag l(:button_save) %></center>
<%= end_form_tag %>
</div>
</div>
<div class="splitcontentright">
<% unless @user.auth_source_id %>
<div class="box">
<h3><%=l(:field_password)%></h3>
<%= start_form_tag :action => 'change_password' %>
<%= start_form_tag({:action => 'change_password'}, :class => "tabular") %>
<p><label for="password"><%=l(:field_password)%> <span class="required">*</span></label><br/>
<p><label for="password"><%=l(:field_password)%> <span class="required">*</span></label>
<%= password_field_tag 'password', nil, :size => 25 %></p>
<p><label for="new_password"><%=l(:field_new_password)%> <span class="required">*</span></label><br/>
<p><label for="new_password"><%=l(:field_new_password)%> <span class="required">*</span></label>
<%= password_field_tag 'new_password', nil, :size => 25 %></p>
<p><label for="new_password_confirmation"><%=l(:field_password_confirmation)%> <span class="required">*</span></label><br/>
<p><label for="new_password_confirmation"><%=l(:field_password_confirmation)%> <span class="required">*</span></label>
<%= password_field_tag 'new_password_confirmation', nil, :size => 25 %></p>
<center><%= submit_tag l(:button_save) %></center>
<%= end_form_tag %>
</div>
<% end %>
</div>
\ No newline at end of file
......@@ -6,12 +6,12 @@
<%= error_messages_for 'user' %>
<%= start_form_tag :token => @token.value %>
<%= start_form_tag({:token => @token.value}, :class => "tabular") %>
<p><label for="new_password"><%=l(:field_new_password)%> <span class="required">*</span></label><br/>
<p><label for="new_password"><%=l(:field_new_password)%> <span class="required">*</span></label>
<%= password_field_tag 'new_password', nil, :size => 25 %></p>
<p><label for="new_password_confirmation"><%=l(:field_password_confirmation)%> <span class="required">*</span></label><br/>
<p><label for="new_password_confirmation"><%=l(:field_password_confirmation)%> <span class="required">*</span></label>
<%= password_field_tag 'new_password_confirmation', nil, :size => 25 %></p>
<p><center><%= submit_tag l(:button_save) %></center></p>
......
<h2><%=l(:label_register)%></h2>
<%= start_form_tag %>
<%= start_form_tag({:action => 'register'}, :class => "tabular") %>
<%= error_messages_for 'user' %>
<div class="box">
<!--[form:user]-->
<p><label for="user_login"><%=l(:field_login)%></label> <span class="required">*</span><br/>
<p><label for="user_login"><%=l(:field_login)%> <span class="required">*</span></label>
<%= text_field 'user', 'login', :size => 25 %></p>
<p><label for="password"><%=l(:field_password)%></label> <span class="required">*</span><br/>
<p><label for="password"><%=l(:field_password)%> <span class="required">*</span></label>
<%= password_field_tag 'password', nil, :size => 25 %></p>
<p><label for="password_confirmation"><%=l(:field_password_confirmation)%></label> <span class="required">*</span><br/>
<p><label for="password_confirmation"><%=l(:field_password_confirmation)%> <span class="required">*</span></label>
<%= password_field_tag 'password_confirmation', nil, :size => 25 %></p>
<p><label for="user_firstname"><%=l(:field_firstname)%></label> <span class="required">*</span><br/>
<p><label for="user_firstname"><%=l(:field_firstname)%> <span class="required">*</span></label>
<%= text_field 'user', 'firstname' %></p>
<p><label for="user_lastname"><%=l(:field_lastname)%></label> <span class="required">*</span><br/>
<p><label for="user_lastname"><%=l(:field_lastname)%> <span class="required">*</span></label>
<%= text_field 'user', 'lastname' %></p>
<p><label for="user_mail"><%=l(:field_mail)%></label> <span class="required">*</span><br/>
<p><label for="user_mail"><%=l(:field_mail)%> <span class="required">*</span></label>
<%= text_field 'user', 'mail' %></p>
<p><label for="user_language"><%=l(:field_language)%></label><br/>
<p><label for="user_language"><%=l(:field_language)%></label>
<%= select("user", "language", lang_options_for_select) %></p>
<% for @custom_value in @custom_values %>
<p><%= custom_field_tag_with_label @custom_value %></p>
<% end %>
<p><%= check_box 'user', 'mail_notification' %> <label for="user_mail_notification"><%=l(:field_mail_notification)%></label></p>
<p><label for="user_mail_notification"><%=l(:field_mail_notification)%></label>
<%= check_box 'user', 'mail_notification' %></p>
<!--[eoform:user]-->
</div>
......
<h2><%=l(:label_project_plural)%></h2>
<table width="100%" cellspacing="1" cellpadding="2" class="listTableContent">
<table class="listTableContent">
<tr class="ListHead">
<%= sort_header_tag('name', :caption => l(:label_project)) %>
<th><%=l(:field_description)%></th>
......@@ -17,10 +17,8 @@
<td align="center"><%= image_tag 'true' if project.is_public? %>
<td align="center"><%= project.projects_count %>
<td align="center"><%= format_date(project.created_on) %>
<td align="center">
<%= start_form_tag({:controller => 'projects', :action => 'destroy', :id => project}) %>
<%= submit_tag l(:button_delete), :class => "button-small" %>
<%= end_form_tag %>
<td align="center">
<%= button_to l(:button_delete), { :controller => 'projects', :action => 'destroy', :id => project }, :class => "button-small" %>
</td>
</tr>
<% end %>
......
......@@ -2,48 +2,44 @@
<div class="box">
<!--[form:auth_source]-->
<p><label for="auth_source_name"><%=l(:field_name)%></label> <span class="required">*</span><br/>
<p><label for="auth_source_name"><%=l(:field_name)%> <span class="required">*</span></label>
<%= text_field 'auth_source', 'name' %></p>
<p><label for="auth_source_host"><%=l(:field_host)%></label> <span class="required">*</span><br/>
<p><label for="auth_source_host"><%=l(:field_host)%> <span class="required">*</span></label>
<%= text_field 'auth_source', 'host' %></p>
<p><label for="auth_source_port"><%=l(:field_port)%></label> <span class="required">*</span><br/>
<p><label for="auth_source_port"><%=l(:field_port)%> <span class="required">*</span></label>
<%= text_field 'auth_source', 'port', :size => 6 %></p>
<p><label for="auth_source_account"><%=l(:field_account)%></label><br/>
<p><label for="auth_source_account"><%=l(:field_account)%></label>
<%= text_field 'auth_source', 'account' %></p>
<p><label for="auth_source_account_password"><%=l(:field_password)%></label><br/>
<p><label for="auth_source_account_password"><%=l(:field_password)%></label>
<%= password_field 'auth_source', 'account_password' %></p>
<p><label for="auth_source_base_dn"><%=l(:field_base_dn)%></label> <span class="required">*</span><br/>
<p><label for="auth_source_base_dn"><%=l(:field_base_dn)%> <span class="required">*</span></label>
<%= text_field 'auth_source', 'base_dn', :size => 60 %></p>
</div>
<p><%= check_box 'auth_source', 'onthefly_register' %>
<label for="auth_source_onthefly_register"><%=l(:field_onthefly)%></label></p>
<div class="box">
<p><label for="auth_source_onthefly_register"><%=l(:field_onthefly)%></label>
<%= check_box 'auth_source', 'onthefly_register' %></p>
<p>
<fieldset><legend><%=l(:label_attribute_plural)%></legend>
<div style="float:left;margin-right:10px;">
<p><label for="auth_source_attr_login"><%=l(:field_login)%></label> <span class="required">*</span><br/>
<p><label for="auth_source_attr_login"><%=l(:field_login)%> <span class="required">*</span></label>
<%= text_field 'auth_source', 'attr_login', :size => 20 %></p>
</div>
<div style="float:left;margin-right:10px;">
<p><label for="auth_source_attr_firstname"><%=l(:field_firstname)%></label><br/>
<p><label for="auth_source_attr_firstname"><%=l(:field_firstname)%></label>
<%= text_field 'auth_source', 'attr_firstname', :size => 20 %></p>
</div>
<div style="float:left;margin-right:10px;">
<p><label for="auth_source_attr_lastname"><%=l(:field_lastname)%></label><br/>
<p><label for="auth_source_attr_lastname"><%=l(:field_lastname)%></label>
<%= text_field 'auth_source', 'attr_lastname', :size => 20 %></p>
</div>
<div>
<p><label for="auth_source_attr_mail"><%=l(:field_mail)%></label><br/>
<p><label for="auth_source_attr_mail"><%=l(:field_mail)%></label>
<%= text_field 'auth_source', 'attr_mail', :size => 20 %></p>
</div>
</fieldset>
<!--[eoform:auth_source]-->
</p>
</div>
<!--[eoform:auth_source]-->
<h2><%=l(:label_auth_source)%> (<%= @auth_source.auth_method_name %>)</h2>
<%= 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 %>
......
<h2><%=l(:label_auth_source_plural)%></h2>
<table border="0" cellspacing="1" cellpadding="2" class="listTableContent">
<table class="listTableContent">
<tr class="ListHead">
<td><%=l(:field_name)%></td>
<td><%=l(:field_type)%></td>
......@@ -18,9 +18,7 @@
<%= link_to l(:button_test), :action => 'test_connection', :id => source %>
</td>
<td align="center">
<%= 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" %>
</td>
</tr>
<% end %>
......
<h2><%=l(:label_auth_source_new)%> (<%= @auth_source.auth_method_name %>)</h2>
<%= start_form_tag :action => 'create' %>
<%= start_form_tag({:action => 'create'}, :class => "tabular") %>
<%= render :partial => 'form' %>
<%= submit_tag l(:button_create) %>
<%= end_form_tag %>
......@@ -2,21 +2,21 @@
<!--[form:custom_field]-->
<div class="box">
<p><label for="custom_field_name"><%=l(:field_name)%></label> <span class="required">*</span><br/>
<p><label for="custom_field_name"><%=l(:field_name)%><span class="required"> *</span></label>
<%= text_field 'custom_field', 'name' %></p>
<p><label for="custom_field_typ"><%=l(:field_field_format)%></label><br/>
<p><label for="custom_field_field_format"><%=l(:field_field_format)%></label>
<%= select("custom_field", "field_format", custom_field_formats_for_select) %></p>
<p><label for="custom_field_min_length"><%=l(:label_min_max_length)%></label> (<%=l(:text_min_max_length_info)%>)<br/>
<p><label for="custom_field_min_length"><%=l(:label_min_max_length)%></label>
<%= text_field 'custom_field', 'min_length', :size => 5 %> -
<%= text_field 'custom_field', 'max_length', :size => 5 %></p>
<%= text_field 'custom_field', 'max_length', :size => 5 %><br>(<%=l(:text_min_max_length_info)%>)</p>
<p><label for="custom_field_regexp"><%=l(:field_regexp)%></label> (<%=l(:text_regexp_info)%>)<br/>
<%= text_field 'custom_field', 'regexp', :size => 50 %></p>
<p><label for="custom_field_regexp"><%=l(:field_regexp)%></label>
<%= text_field 'custom_field', 'regexp', :size => 50 %><br>(<%=l(:text_regexp_info)%>)</p>
<p><label for="custom_field_possible_values"><%=l(:field_possible_values)%></label> (<%=l(:text_possible_values_info)%>)<br/>
<%= text_area 'custom_field', 'possible_values', :rows => 5, :cols => 60 %></p>
<p><label for="custom_field_possible_values"><%=l(:field_possible_values)%></label>
<%= text_area 'custom_field', 'possible_values', :rows => 5, :cols => 60 %><br>(<%=l(:text_possible_values_info)%>)</p>
</div>
<!--[eoform:custom_field]-->
......@@ -34,20 +34,19 @@
<% end %></fieldset>
&nbsp;
<p><%= check_box 'custom_field', 'is_required' %>
<label for="custom_field_is_required"><%=l(:field_is_required)%></label></p>
<p><label for="custom_field_is_required"><%=l(:field_is_required)%></label>
<%= check_box 'custom_field', 'is_required' %></p>
<p><%= check_box 'custom_field', 'is_for_all' %>
<label for="custom_field_is_for_all"><%=l(:field_is_for_all)%></label></p>
<p><label for="custom_field_is_for_all"><%=l(:field_is_for_all)%></label>
<%= check_box 'custom_field', 'is_for_all' %></p>
<% when "UserCustomField" %>
<p><%= check_box 'custom_field', 'is_required' %>
<label for="custom_field_is_required"><%=l(:field_is_required)%></label></p>
<p><label for="custom_field_is_required"><%=l(:field_is_required)%></label>
<%= check_box 'custom_field', 'is_required' %></p>
<% when "ProjectCustomField" %>
<p><%= check_box 'custom_field', 'is_required' %>
<label for="custom_field_is_required"><%=l(:field_is_required)%></label></p>
<p><label for="custom_field_is_required"><%=l(:field_is_required)%></label>
<%= check_box 'custom_field', 'is_required' %></p>
<% end %>
</div>
<h2><%=l(:label_custom_field)%> (<%=l(@custom_field.type_name)%>)</h2>
<%= 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 %>
<h2><%=l(:label_custom_field_plural)%></h2>
<table border="0" cellspacing="1" cellpadding="2" class="listTableContent">
<table class="listTableContent">
<tr class="ListHead">
<th><%=l(:field_name)%></th>
<th><%=l(:field_type)%></th>
......@@ -19,9 +19,8 @@
<td align="center"><%= image_tag 'true' if custom_field.is_for_all? %></td>
<td align="center"><%= 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? %></td>
<td align="center">
<%= start_form_tag :action => 'destroy', :id => custom_field %>
<%= submit_tag l(:button_delete), :class => "button-small" %>
<%= end_form_tag %> </td>
<%= button_to l(:button_delete), { :action => 'destroy', :id => custom_field }, :confirm => l(:text_are_you_sure), :class => "button-small" %>
</td>
</tr>
<% end %>
</table>
......
<h2><%=l(:label_custom_field_new)%> (<%=l(@custom_field.type_name)%>)</h2>
<%= 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) %>
......
<%= error_messages_for 'document' %>
<div class="box">
<!--[form:document]-->
<p><label for="document_category_id"><%=l(:field_category)%></label><br />
<p><label for="document_category_id"><%=l(:field_category)%></label>
<select name="document[category_id]">
<%= options_from_collection_for_select @categories, "id", "name", @document.category_id %>
</select></p>
<p><label for="document_title"><%=l(:field_title)%> <span class="required">*</span></label><br />
<p><label for="document_title"><%=l(:field_title)%> <span class="required">*</span></label>
<%= text_field 'document', 'title', :size => 60 %></p>
<p><label for="document_description"><%=l(:field_description)%></label><br />
<p><label for="document_description"><%=l(:field_description)%></label>
<%= text_area 'document', 'description', :cols => 60, :rows => 5 %></p>
<!--[eoform:document]-->
</div>
\ No newline at end of file
<h2><%=l(:label_document)%></h2>
<%= 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 %>
......
<%= error_messages_for 'enumeration' %>
<div class="box">
<!--[form:optvalue]-->
<%= hidden_field 'enumeration', 'opt' %>
<p><label for="enumeration_name"><%=l(:field_name)%></label><br/>
<p><label for="enumeration_name"><%=l(:field_name)%></label>
<%= text_field 'enumeration', 'name' %></p>
<!--[eoform:optvalue]-->
</div>
\ No newline at end of file
<h2><%=l(:label_enumerations)%></h2>
<%= 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 %>
......
<h2><%=l(:label_enumeration_new)%></h2>
<%= start_form_tag :action => 'create' %>
<%= start_form_tag({:action => 'create'}, :class => "tabular") %>
<%= render :partial => 'form' %>
<%= submit_tag l(:button_create) %>
<%= end_form_tag %>
<%= error_messages_for 'issue_category' %>
<!--[form:issue_category]-->
<p><label for="issue_category_name"><%l(:field_name)%></label><br/>
<p><label for="issue_category_name"><%l(:field_name)%></label>
<%= text_field 'issue_category', 'name' %></p>
<!--[eoform:issue_category]-->
<h2><%=l(:label_issue_category)%></h2>
<%= 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 %>
<%= error_messages_for 'issue_status' %>
<div class="box">
<!--[form:issue_status]-->
<p><label for="issue_status_name"><%=l(:field_name)%></label> <span class="required">*</span><br/>
<p><label for="issue_status_name"><%=l(:field_name)%><span class="required"> *</span></label>
<%= text_field 'issue_status', 'name' %></p>
<p><%= check_box 'issue_status', 'is_closed' %>
<label for="issue_status_is_closed"><%=l(:field_is_closed)%></label></p>
<p><label for="issue_status_is_closed"><%=l(:field_is_closed)%></label>
<%= check_box 'issue_status', 'is_closed' %></p>
<p><%= check_box 'issue_status', 'is_default' %>
<label for="issue_status_is_default"><%=l(:field_is_default)%></label></p>
<p><label for="issue_status_is_default"><%=l(:field_is_default)%></label>
<%= check_box 'issue_status', 'is_default' %></p>
<p><label for="issue_status_html_color"><%=l(:field_html_color)%></label>
#<%= text_field 'issue_status', 'html_color', :maxlength => 6 %> <span class="required">*</span></p>
<p><label for="issue_status_html_color"><%=l(:field_html_color)%><span class="required"> *</span></label>
#<%= text_field 'issue_status', 'html_color', :maxlength => 6 %></p>
<!--[eoform:issue_status]-->
</div>
\ No newline at end of file
<h2><%=l(:label_issue_status)%></h2>
<%= 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 %>
<h2><%=l(:label_issue_status_plural)%></h2>
<table border="0" cellspacing="1" cellpadding="2" class="listTableContent">
<table class="listTableContent">
<tr class="ListHead">
<th><%=l(:field_status)%></th>
<th><%=l(:field_is_default)%></th>
......@@ -14,11 +14,9 @@
<td><%= link_to status.name, :action => 'edit', :id => status %></td>
<td align="center"><%= image_tag 'true' if status.is_default? %></td>
<td align="center"><%= image_tag 'true' if status.is_closed? %></td>
<td bgcolor="#<%= status.html_color %>">&nbsp</td>
<td align="center">
<%= start_form_tag :action => 'destroy', :id => status %>
<%= submit_tag l(:button_delete), :class => "button-small" %>
<%= end_form_tag %>
<td><div style="background-color:#<%= status.html_color %>">&nbsp</div></td>
<td align="center">
<%= button_to l(:button_delete), { :action => 'destroy', :id => status }, :confirm => l(:text_are_you_sure), :class => "button-small" %>
</td>
</tr>
<% end %>
......
<h2><%=l(:label_issue_status_new)%></h2>
<%= start_form_tag :action => 'create' %>
<%= start_form_tag({:action => 'create'}, :class => "tabular") %>
<%= render :partial => 'form' %>
<%= submit_tag l(:button_create) %>
<%= end_form_tag %>
<% if issues.length > 0 %>
<table cellspacing="0" cellpadding="1" width="100%" border="0" class="listTable">
<tr><td>
<table width="100%" border="0" cellspacing="1" cellpadding="2" class="listTableContent">
<table class="listTableContent">
<tr class="ListHead">
<th>#</th>
<th><%=l(:field_tracker)%></th>
......
<h2><%=l(:label_issue)%> #<%= @issue.id %>: <%= @issue.subject %></h2>
<%= 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' %>
<div class="box">
<p><%=l(:label_issue_status_new)%>: <b><%= @history.status.name %></b></p>
<p><label><%=l(:label_issue_status_new)%></label> <%= @history.status.name %></p>
<div>
<p><label for="issue_assigned_to_id"><%=l(:field_assigned_to)%></label><br/>
<p><label for="issue_assigned_to_id"><%=l(:field_assigned_to)%></label>
<select name="issue[assigned_to_id]">
<option value=""></option>
<%= options_from_collection_for_select @assignable_to, "id", "display_name", @issue.assigned_to_id %></p>
</select></p>
</div>
<p><label for="issue_fixed_version"><%=l(:field_fixed_version)%></label><br/>
<p><label for="issue_fixed_version"><%=l(:field_fixed_version)%></label>
<select name="issue[fixed_version_id]">
<option value="">--none--</option>
<%= options_from_collection_for_select @issue.project.versions, "id", "name", @issue.fixed_version_id %>
</select></p>
<p><label for="history_notes"><%=l(:field_notes)%></label><br />
<p><label for="history_notes"><%=l(:field_notes)%></label>
<%= text_area 'history', 'notes', :cols => 60, :rows => 10 %></p>
</div>
......
<h2><%= @issue.tracker.name %> #<%= @issue.id %> - <%= @issue.subject %></h2>
<%= 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' %>
<div class="box">
<!--[form:issue]-->
<p><%=l(:field_status)%>: <b><%= @issue.status.name %></b></p>
<div style="float:left;margin-right:10px;">
<p><label for="issue_priority_id"><%=l(:field_priority)%> <span class="required">*</span></label><br/>
<select name="issue[priority_id]">
<%= options_from_collection_for_select @priorities, "id", "name", @issue.priority_id %></p>
</select></p>
</div>
<div style="float:left;margin-right:10px;">
<p><label for="issue_assigned_to_id"><%=l(:field_assigned_to)%></label><br/>
<select name="issue[assigned_to_id]">
<option value=""></option>
<%= options_from_collection_for_select @issue.project.members, "user_id", "name", @issue.assigned_to_id %></p>
</select></p>
</div>
<div>
<p><label for="issue_category_id"><%=l(:field_category)%></label><br/>
<select name="issue[category_id]">
<option value=""></option>
<%= options_from_collection_for_select @project.issue_categories, "id", "name", @issue.category_id %></p>
</select></p>
</div>
<p><label for="issue_subject"><%=l(:field_subject)%></label><span class="required">*</span><br/>
<%= text_field 'issue', 'subject', :size => 60 %></p>
<!--[form:issue]-->
<p><label><%=l(:field_status)%></label> <%= @issue.status.name %></p>
<p><label for="issue_description"><%=l(:field_description)%></label><span class="required">*</span><br/>
<%= text_area 'issue', 'description', :cols => 60, :rows => 10 %></p>
<p><%= f.select :priority_id, (@priorities.collect {|p| [p.name, p.id]}), :required => true %></p>
<p><%= f.select :assigned_to_id, (@issue.project.members.collect {|m| [m.name, m.user_id]}), :include_blank => true %></p>
<p><%= f.select :category_id, (@project.issue_categories.collect {|c| [c.name, c.id]}) %></p>
<p><%= f.text_field :subject, :size => 80, :required => true %></p>
<p><%= f.text_area :description, :cols => 60, :rows => 10, :required => true %></p>
<p><%= f.date_select :due_date, :start_year => Date.today.year, :include_blank => true %></p>
<p><label for="issue_due_date"><%=l(:field_due_date)%></label><br />
<%= date_select 'issue', 'due_date', :start_year => Date.today.year, :include_blank => true %></p>
<% for @custom_value in @custom_values %>
<p><%= custom_field_tag_with_label @custom_value %></p>
<% end %>
<p><label for="issue_fixed_version"><%=l(:field_fixed_version)%></label><br/>
<select name="issue[fixed_version_id]">
<option value="">--none--</option>
<%= options_from_collection_for_select @project.versions, "id", "name", @issue.fixed_version_id %>
</select></p>
<% end %>
<!--[eoform:issue]-->
<p><%= f.select :fixed_version_id, (@project.versions.collect {|v| [v.name, v.id]}), { :include_blank => true } %>
</select></p>
<!--[eoform:issue]-->
</div>
<%= submit_tag l(:button_save) %>
<%= end_form_tag %>
<% end %>
\ No newline at end of file
<%= error_messages_for 'news' %>
<!--[form:news]-->
<p><label for="news_title"><%=l(:field_title)%></label> <span class="required">*</span><br/>
<%= text_field 'news', 'title', :size => 60 %></p>
<p><label for="news_summary"><%=l(:field_summary)%></label><br/>
<%= text_area 'news', 'summary', :cols => 60, :rows => 2 %></p>
<p><label for="news_description"><%=l(:field_description)%> <span class="required">*</span></label><br/>
<%= text_area 'news', 'description', :cols => 60, :rows => 10 %></p>
<!--[eoform:news]-->
<div class="box">
<p><%= f.text_field :title, :required => true, :size => 60 %></p>
<p><%= f.text_area :summary, :cols => 60, :rows => 2 %></p>
<p><%= f.text_area :description, :required => true, :cols => 60, :rows => 10 %></p>
</div>
\ No newline at end of file
<h2><%=l(:label_news)%></h2>
<%= 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
......@@ -7,4 +7,15 @@
</p>
<%= 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 %>
<%= error_messages_for 'project' %>
<div class="box">
<!--[form:project]-->
<p><label for="project_name"><%=l(:field_name)%> <span class="required">*</span></label><br/>
<%= text_field 'project', 'name' %></p>
<p><%= f.text_field :name, :required => true %></p>
<% if admin_loggedin? %>
<p><label for="project_parent_id"><%=l(:field_parent)%></label><br/>
<select name="project[parent_id]">
<option value=""></option>
<%= options_from_collection_for_select @root_projects, "id", "name", @project.parent_id %>
</select></p>
<p><%= f.select :parent_id, (@root_projects.collect {|p| [p.name, p.id]}), { :include_blank => true } %></p>
<% end %>
<p><label for="project_description"><%=l(:field_description)%> <span class="required">*</span></label><br/>
<%= text_area 'project', 'description', :cols => 60, :rows => 3 %></p>
<p><label for="project_homepage"><%=l(:field_homepage)%></label><br/>
<%= text_field 'project', 'homepage', :size => 40 %></p>
<p><%= check_box 'project', 'is_public' %>
<label for="project_is_public"><%=l(:field_is_public)%></label></p>
<p><%= f.text_area :description, :required => true, :cols => 60, :rows => 3 %></p>
<p><%= f.text_field :homepage, :size => 40 %></p>
<p><%= f.check_box :is_public %></p>
<% for @custom_value in @custom_values %>
<p><%= custom_field_tag_with_label @custom_value %></p>
<% end %>
<fieldset><legend><%=l(:label_custom_field_plural)%></legend>
<% for custom_field in @custom_fields %>
<input type="checkbox"
name="custom_field_ids[]"
value="<%= custom_field.id %>"
<%if @project.custom_fields.include? custom_field%>checked="checked"<%end%>
> <%= custom_field.name %>
<% end %></fieldset>
<p><label><%=l(:label_custom_field_plural)%></label>
<% 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 %></p>
<!--[eoform:project]-->
</div>
<!--[eoform:project]-->
<h2><%=l(:label_project_new)%></h2>
<%= 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
<h2><%=l(:label_document_new)%></h2>
<%= 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' %>
<p><label for="attachment_file"><%=l(:label_attachment)%></label><br/>
<%= file_field 'attachment', 'file' %></p>
<div class="box">
<p><label for="attachment_file"><%=l(:label_attachment)%></label>
<%= file_field 'attachment', 'file' %></p>
</div>
<%= submit_tag l(:button_create) %>
<%= end_form_tag %>
......
<h2><%=l(:label_issue_new)%>: <%= @tracker.name %></h2>
<%= 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' %>
<div class="box">
<!--[form:issue]-->
<!--[form:issue]-->
<%= hidden_field_tag 'tracker_id', @tracker.id %>
<div style="float:left;margin-right:10px;">
<p><label for="issue_priority_id"><%=l(:field_priority)%> <span class="required">*</span></label><br />
<select name="issue[priority_id]">
<%= options_from_collection_for_select @priorities, "id", "name", @issue.priority_id %></p>
</select></p>
</div>
<div style="float:left;margin-right:10px;">
<p><label for="issue_assigned_to_id"><%=l(:field_assigned_to)%></label><br />
<select name="issue[assigned_to_id]">
<option value=""></option>
<%= options_from_collection_for_select @issue.project.members, "user_id", "name", @issue.assigned_to_id %></p>
</select></p>
</div>
<div>
<p><label for="issue_category_id"><%=l(:field_category)%></label><br />
<select name="issue[category_id]">
<option value=""></option><%= options_from_collection_for_select @project.issue_categories, "id", "name", @issue.category_id %>
</select></p>
</div>
<p><label for="issue_subject"><%=l(:field_subject)%> <span class="required">*</span></label><br />
<%= text_field 'issue', 'subject', :size => 80 %></p>
<p><label for="issue_description"><%=l(:field_description)%> <span class="required">*</span></label><br />
<%= text_area 'issue', 'description', :cols => 60, :rows => 10 %></p>
<p><label for="issue_due_date"><%=l(:field_due_date)%></label><br />
<%= date_select 'issue', 'due_date', :start_year => Date.today.year, :include_blank => true %></p>
<p><%= f.select :priority_id, (@priorities.collect {|p| [p.name, p.id]}), :required => true %></p>
<p><%= f.select :assigned_to_id, (@issue.project.members.collect {|m| [m.name, m.user_id]}), :include_blank => true %></p>
<p><%= f.select :category_id, (@project.issue_categories.collect {|c| [c.name, c.id]}) %></p>
<p><%= f.text_field :subject, :size => 80, :required => true %></p>
<p><%= f.text_area :description, :cols => 60, :rows => 10, :required => true %></p>
<p><%= f.date_select :due_date, :start_year => Date.today.year, :include_blank => true %></p>
<% for @custom_value in @custom_values %>
<p><%= custom_field_tag_with_label @custom_value %></p>
<% end %>
<p><label for="attachment_file"><%=l(:label_attachment)%></label><br />
<p><label for="attachment_file"><%=l(:label_attachment)%></label>
<%= file_field 'attachment', 'file' %></p>
<!--[eoform:issue]-->
</div>
<%= submit_tag l(:button_create) %>
<%= end_form_tag %>
\ No newline at end of file
<% end %>
\ No newline at end of file
<h2><%=l(:label_news_new)%></h2>
<%= 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
<h2><%=l(:label_version_new)%></h2>
<%= 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
<h2><%=l(:label_public_projects)%></h2>
<table width="100%" cellspacing="1" cellpadding="2" class="listTableContent">
<table class="listTableContent">
<tr class="ListHead">
<%= sort_header_tag('name', :caption => l(:label_project)) %>
<th><%=l(:field_description)%></th>
......
......@@ -2,7 +2,7 @@
<% delete_allowed = authorize_for('versions', 'destroy_file') %>
<table border="0" cellspacing="1" cellpadding="2" class="listTableContent">
<table class="listTableContent">
<tr class="ListHead">
<th><%=l(:field_version)%></th>
<th><%=l(:field_filename)%></th>
......
......@@ -22,7 +22,7 @@
</tr>
</table>
&nbsp;
<table border="0" cellspacing="1" cellpadding="2" class="listTableContent">
<table class="listTableContent">
<tr><td colspan="7" align="right">
<small><%= link_to l(:label_export_csv), :action => 'export_issues_csv', :id => @project.id %></small>
</td></tr>
......
......@@ -2,11 +2,8 @@
<% for news in @news %>
<p>
<b><%= news.title %></b> <small>(<%= link_to_user news.author %> <%= format_time(news.created_on) %>)</small>
<%= 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?' %>
<br />
<%= news.summary %>
<b><%= news.title %></b> <small>(<%= link_to_user news.author %> <%= format_time(news.created_on) %>)</small><br />
<%= news.summary %><br />
<small>[<%= link_to l(:label_read), :controller => 'news', :action => 'show', :id => news %>]</small>
</p>
<% end %>
......
<h2><%=l(:label_settings)%></h2>
<%= start_form_tag :action => 'edit', :id => @project %>
<%= render :partial => 'form' %>
<center><%= submit_tag l(:button_save) %></center>
<%= 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 %>
&nbsp;
......
......@@ -11,3 +11,4 @@
<strong><%=l(:field_category)%></strong>
<%= render :partial => 'simple', :locals => { :data => @issues_by_category, :field_name => "category_id", :rows => @categories } %>
&nbsp;
<%= error_messages_for 'role' %>
<div class="box">
<!--[form:role]-->
<p><label for="role_name"><%=l(:field_name)%> <span class="required">*</span></label><br />
<%= text_field 'role', 'name' %></p>
<p><%= f.text_field :name, :required => true %></p>
<strong><%=l(:label_permissions)%>:</strong>
<% permissions = @permissions.group_by {|p| p.group_id } %>
......
<h2><%=l(:label_role)%></h2>
<%= 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 %>
<h2><%=l(:label_role_plural)%></h2>
<table border="0" cellspacing="1" cellpadding="2" class="listTableContent">
<table class="listTableContent">
<tr class="ListHead">
<th><%=l(:label_role)%></th>
<th></th>
......@@ -9,10 +9,8 @@
<% for role in @roles %>
<tr class="<%= cycle("odd", "even") %>">
<td><%= link_to role.name, :action => 'edit', :id => role %></td>
<td align="center">
<%= start_form_tag :action => 'destroy', :id => role %>
<%= submit_tag l(:button_delete), :class => "button-small" %>
<%= end_form_tag %>
<td align="center">
<%= button_to l(:button_delete), { :action => 'destroy', :id => role }, :confirm => l(:text_are_you_sure), :class => "button-small" %>
</tr>
<% end %>
</table>
......
<h2><%=l(:label_role_new)%></h2>
<%= 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
<%= error_messages_for 'tracker' %>
<div class="box">
<!--[form:tracker]-->
<p><label for="tracker_name"><%=l(:field_name)%></label> <span class="required">*</span><br/>
<%= text_field 'tracker', 'name' %></p>
<p><%= check_box 'tracker', 'is_in_chlog' %>
<label for="tracker_is_in_chlog"><%=l(:field_is_in_chlog)%></label></p>
<p><%= f.text_field :name, :required => true %></p>
<p><%= f.check_box :is_in_chlog %></p>
<!--[eoform:tracker]-->
</div>
<h2><%=l(:label_tracker)%></h2>
<%= 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
<h2><%=l(:label_tracker_plural)%></h2>
<table border="0" cellspacing="1" cellpadding="2" class="listTableContent">
<table class="listTableContent">
<tr class="ListHead">
<th><%=l(:label_tracker)%></th>
<th></th>
......@@ -9,10 +9,8 @@
<% for tracker in @trackers %>
<tr class="<%= cycle("odd", "even") %>">
<td><%= link_to tracker.name, :action => 'edit', :id => tracker %></td>
<td align="center">
<%= start_form_tag :action => 'destroy', :id => tracker %>
<%= submit_tag l(:button_delete), :class => "button-small" %>
<%= end_form_tag %>
<td align="center">
<%= button_to l(:button_delete), { :action => 'destroy', :id => tracker }, :confirm => l(:text_are_you_sure), :class => "button-small" %>
</td>
</tr>
<% end %>
......
<h2><%=l(:label_tracker_new)%></h2>
<%= 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
......@@ -2,36 +2,25 @@
<div class="box">
<!--[form:user]-->
<p><label for="user_login"><%=l(:field_login)%></label> <span class="required">*</span><br/>
<%= text_field 'user', 'login', :size => 25 %></p>
<p><%= f.text_field :login, :required => true, :size => 25 %></p>
<p><label for="password"><%=l(:field_password)%></label> <span class="required">*</span><br/>
<p><label for="password"><%=l(:field_password)%><span class="required"> *</span></label>
<%= password_field_tag 'password', nil, :size => 25 %></p>
<p><label for="password_confirmation"><%=l(:field_password_confirmation)%></label> <span class="required">*</span><br/>
<p><label for="password_confirmation"><%=l(:field_password_confirmation)%><span class="required"> *</span></label>
<%= password_field_tag 'password_confirmation', nil, :size => 25 %></p>
<p><label for="user_firstname"><%=l(:field_firstname)%></label> <span class="required">*</span><br/>
<%= text_field 'user', 'firstname' %></p>
<p><label for="user_lastname"><%=l(:field_lastname)%></label> <span class="required">*</span><br/>
<%= text_field 'user', 'lastname' %></p>
<p><label for="user_mail"><%=l(:field_mail)%></label> <span class="required">*</span><br/>
<%= text_field 'user', 'mail' %></p>
<p><label for="user_language"><%=l(:field_language)%></label><br/>
<%= select("user", "language", lang_options_for_select) %></p>
<p><%= f.text_field :firstname, :required => true %></p>
<p><%= f.text_field :lastname, :required => true %></p>
<p><%= f.text_field :mail, :required => true %></p>
<p><%= f.select :language, lang_options_for_select %></p>
<% for @custom_value in @custom_values %>
<p><%= custom_field_tag_with_label @custom_value %></p>
<% end %>
<div style="clear: both;"></div>
<p><%= check_box 'user', 'admin' %> <label for="user_admin"><%=l(:field_admin)%></label></p>
<p><%= check_box 'user', 'mail_notification' %> <label for="user_mail_notification"><%=l(:field_mail_notification)%></label></p>
<p><%= f.check_box :admin %></p>
<p><%= f.check_box :mail_notification %></p>
<!--[eoform:user]-->
</div>
<h2><%=l(:label_user_new)%></h2>
<%= 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
<h2><%=l(:label_user)%></h2>
<%= 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 %>
<h2><%=l(:label_user_plural)%></h2>
<table border="0" cellspacing="1" cellpadding="2" class="listTableContent">
<table class="listTableContent">
<tr class="ListHead">
<%= sort_header_tag('login', :caption => l(:field_login)) %>
<%= sort_header_tag('firstname', :caption => l(:field_firstname)) %>
......
<%= error_messages_for 'version' %>
<div class="box">
<!--[form:version]-->
<p><label for="version_name"><%=l(:field_name)%></label> <span class="required">*</span><br/>
<%= text_field 'version', 'name', :size => 20 %></p>
<p><label for="version_description"><%=l(:field_description)%></label><br/>
<%= text_field 'version', 'description', :size => 60 %></p>
<p><label for="version_effective_date"><%=l(:field_effective_date)%></label><br/>
<%= date_select 'version', 'effective_date' %></p>
<p><%= f.text_field :name, :size => 20, :required => true %></p>
<p><%= f.text_field :description, :size => 60 %></p>
<p><%= f.date_select :effective_date, :required => true %></p>
<!--[eoform:version]-->
</div>
\ No newline at end of file
<h2><%=l(:label_version)%></h2>
<%= 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 %>
......@@ -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| "<span class=\"fieldWithErrors\">#{html_tag}</span>" }
ActionView::Base.field_error_proc = Proc.new{ |html_tag, instance| "#{html_tag}" }
GLoc.set_config :default_language => $RDM_DEFAULT_LANG
GLoc.clear_strings
......
......@@ -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
......
This diff is collapsed.
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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: <exceptions.AssertionError instance at 0xb7c0b20c> in <bound
method SubversionRepository.__del__ of <vclib.svn.SubversionRepository instance at 0xb7c1252c>>
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
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