|
|
|
@ -83,18 +83,15 @@ module Api |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
def export_formats |
|
|
|
|
export_formats = [{ identifier: 'atom', format: 'atom', label_locale: 'label_format_atom' }, |
|
|
|
|
{ identifier: 'pdf', format: 'pdf', label_locale: 'label_format_pdf' }, |
|
|
|
|
{ identifier: 'pdf-descr', format: 'pdf', label_locale: 'label_format_pdf_with_descriptions', flags: ['show_descriptions'] }, |
|
|
|
|
{ identifier: 'csv', format: 'csv', label_locale: 'label_format_csv' }] |
|
|
|
|
# TODO: This does not belong here and should be replaced by a hook that |
|
|
|
|
# aggregates possible formats from the plug-ins. |
|
|
|
|
if Redmine::Plugin.all.sort.map(&:id).include?(:openproject_xls_export) |
|
|
|
|
export_formats.push(identifier: 'xls', format: 'xls', label_locale: 'label_format_xls') |
|
|
|
|
export_formats.push(identifier: 'xls-descr', format: 'xls', label_locale: 'label_format_xls_with_descriptions', flags: ['show_descriptions']) |
|
|
|
|
export_formats.push(identifier: 'xls', format: 'xls', label_locale: 'label_format_xls_with_relations', flags: ['show_relations']) |
|
|
|
|
end |
|
|
|
|
export_formats |
|
|
|
|
[ |
|
|
|
|
{ identifier: 'atom', format: 'atom', label_locale: 'label_format_atom' }, |
|
|
|
|
{ identifier: 'pdf', format: 'pdf', label_locale: 'label_format_pdf' }, |
|
|
|
|
{ |
|
|
|
|
identifier: 'pdf-descr', format: 'pdf', |
|
|
|
|
label_locale: 'label_format_pdf_with_descriptions', flags: ['show_descriptions'] |
|
|
|
|
}, |
|
|
|
|
{ identifier: 'csv', format: 'csv', label_locale: 'label_format_csv' } |
|
|
|
|
] |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|