Handles standard type behavior for work packages

pull/306/head
Hagen Schink 11 years ago
parent b8b22a19ce
commit 0fc83e2232
  1. 4
      app/helpers/work_packages_helper.rb
  2. 2
      app/models/work_package.rb
  3. 1
      config/locales/de.yml
  4. 1
      config/locales/en.yml

@ -235,7 +235,9 @@ module WorkPackagesHelper
end
def work_package_form_type_attribute(form, work_package, locals = {})
field = form.select :type_id, locals[:project].types.collect {|t| [t.name, t.id]}, :required => true
selectable_types = locals[:project].types.collect {|t| [((t.is_standard) ? '' : t.name), t.id]}
field = form.select :type_id, selectable_types, :required => true
url = work_package.new_record? ?
new_type_project_work_packages_path(locals[:project]) :

@ -298,7 +298,7 @@ class WorkPackage < ActiveRecord::Base
end
def to_s
"#{(kind.nil?) ? '' : "#{kind.name} "}##{id}: #{subject}"
"#{(kind.is_standard) ? l(:default_type) : "#{kind.name}"} ##{id}: #{subject}"
end
# Return true if the work_package is closed, otherwise false

@ -823,6 +823,7 @@ de:
label_project_all: "Alle Projekte"
label_project_copy_notifications: "Sende Mailbenachrichtigungen beim Kopieren des Projekts."
label_project_latest: "Neueste Projekte"
label_project_default_type: "Erlaube leere Typen"
label_project_new: "Neues Projekt"
label_project_plural: "Projekte"
label_project_settings: "Projektkonfiguration"

@ -804,6 +804,7 @@ en:
label_project_all: "All Projects"
label_project_copy_notifications: "Send email notifications during the project copy"
label_project_latest: "Latest projects"
label_project_default_type: "Allow empty type"
label_project_new: "New project"
label_project_plural: "Projects"
label_project_settings: "Project settings"

Loading…
Cancel
Save