diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-03-12 17:59:02 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-03-12 17:59:02 +0000 |
commit | 027bf93849e82ef3c60e4a3024db49d65f0fb3c9 (patch) | |
tree | c6bc438fcd50370944b94f605b3f34fe54b73248 /app/views/custom_fields | |
parent | 071f8e18d02f789149071abb8e052bae7ad01003 (diff) | |
download | redmine-027bf93849e82ef3c60e4a3024db49d65f0fb3c9.tar.gz redmine-027bf93849e82ef3c60e4a3024db49d65f0fb3c9.zip |
added svn:eol-style native property on /app files
git-svn-id: http://redmine.rubyforge.org/svn/trunk@333 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/custom_fields')
-rw-r--r-- | app/views/custom_fields/_form.rhtml | 16 | ||||
-rw-r--r-- | app/views/custom_fields/list.rhtml | 24 |
2 files changed, 20 insertions, 20 deletions
diff --git a/app/views/custom_fields/_form.rhtml b/app/views/custom_fields/_form.rhtml index 36be6259a..427276445 100644 --- a/app/views/custom_fields/_form.rhtml +++ b/app/views/custom_fields/_form.rhtml @@ -57,30 +57,30 @@ function deleteValueField(e) { <!--[form:custom_field]--> <div class="box"> <p><%= f.text_field :name, :required => true %></p> -<p><%= f.select :field_format, custom_field_formats_for_select, {}, :onchange => "toggle_custom_field_format();" %></p>
+<p><%= f.select :field_format, custom_field_formats_for_select, {}, :onchange => "toggle_custom_field_format();" %></p> <p><label for="custom_field_min_length"><%=l(:label_min_max_length)%></label> <%= f.text_field :min_length, :size => 5, :no_label => true %> - <%= f.text_field :max_length, :size => 5, :no_label => true %><br>(<%=l(:text_min_max_length_info)%>)</p> -<p><%= f.text_field :regexp, :size => 50 %><br>(<%=l(:text_regexp_info)%>)</p>
+<p><%= f.text_field :regexp, :size => 50 %><br>(<%=l(:text_regexp_info)%>)</p> <p id="custom_field_possible_values"><label><%= l(:field_possible_values) %> <%= image_to_function "add.png", "addValueField();return false" %></label> <% (@custom_field.possible_values.to_a + [""]).each do |value| %> <span><%= text_field_tag 'custom_field[possible_values][]', value, :size => 30 %> <%= image_to_function "delete.png", "deleteValueField(this);return false" %><br /></span> <% end %> </p> -</div>
+</div> <%= javascript_tag "toggle_custom_field_format();" %> <!--[eoform:custom_field]--> <div class="box"> <% case @custom_field.type.to_s -when "IssueCustomField" %>
-
- <fieldset><legend><%=l(:label_tracker_plural)%></legend>
+when "IssueCustomField" %> + + <fieldset><legend><%=l(:label_tracker_plural)%></legend> <% for tracker in @trackers %> - <%= check_box_tag "tracker_ids[]", tracker.id, (@custom_field.trackers.include? tracker) %> <%= tracker.name %>
+ <%= check_box_tag "tracker_ids[]", tracker.id, (@custom_field.trackers.include? tracker) %> <%= tracker.name %> <% end %> - </fieldset>
+ </fieldset> <p><%= f.check_box :is_required %></p> <p><%= f.check_box :is_for_all %></p> diff --git a/app/views/custom_fields/list.rhtml b/app/views/custom_fields/list.rhtml index 76637c8d5..b6f1f278e 100644 --- a/app/views/custom_fields/list.rhtml +++ b/app/views/custom_fields/list.rhtml @@ -6,29 +6,29 @@ <li><%= link_to l(:label_project_plural), {}, :id=> "tab-ProjectCustomField", :onclick => "showTab('ProjectCustomField'); this.blur(); return false;" %></li> <li><%= link_to l(:label_user_plural), {}, :id=> "tab-UserCustomField", :onclick => "showTab('UserCustomField'); this.blur(); return false;" %></li> </ul> -</div>
+</div> <% %w(IssueCustomField ProjectCustomField UserCustomField).each do |type| %> <div id="tab-content-<%= type %>" class="tab-content"> -<table class="list">
+<table class="list"> <thead><tr> - <th width="30%"><%=l(:field_name)%></th>
- <th><%=l(:field_field_format)%></th>
+ <th width="30%"><%=l(:field_name)%></th> + <th><%=l(:field_field_format)%></th> <th><%=l(:field_is_required)%></th> - <% if type == 'IssueCustomField' %>
- <th><%=l(:field_is_for_all)%></th>
+ <% if type == 'IssueCustomField' %> + <th><%=l(:field_is_for_all)%></th> <th><%=l(:label_used_by)%></th> - <% end %>
- <th width="10%"></th>
+ <% end %> + <th width="10%"></th> </tr></thead> <tbody> <% for custom_field in (@custom_fields_by_type[type] || []) %> - <tr class="<%= cycle("odd", "even") %>">
+ <tr class="<%= cycle("odd", "even") %>"> <td><%= link_to custom_field.name, :action => 'edit', :id => custom_field %></td> - <td align="center"><%= l(CustomField::FIELD_FORMATS[custom_field.field_format][:name]) %></td>
+ <td align="center"><%= l(CustomField::FIELD_FORMATS[custom_field.field_format][:name]) %></td> <td align="center"><%= image_tag 'true.png' if custom_field.is_required? %></td> - <% if type == 'IssueCustomField' %>
- <td align="center"><%= image_tag 'true.png' if custom_field.is_for_all? %></td>
+ <% if type == 'IssueCustomField' %> + <td align="center"><%= image_tag 'true.png' 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> <% end %> <td align="center"> |