A
A
Alexey Poimtsev2015-11-17 01:48:14
Redmine
Alexey Poimtsev, 2015-11-17 01:48:14

How to display additional fields in the list of projects in Redmine?

Hello everyone,
I didn’t find it anywhere in the directions, maybe someone knows a hack - how to display additional fields in the list of projects in Redmine? That is, display a brief description of the project, the start date and the name of the responsible manager

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex, 2015-11-17
@streetflush

There is such a file
\redmine-2.1.4-0\apps\redmine\htdocs\app\views\projects\index.html.erb
It displays a list of projects
There is a function
render_project_hierarchy
It is in the file
\redmine-2.1.4-0\apps \redmine\htdocs\app\helpers\projects_helper.rb We take and edit
Inserted additional fields =)
Here is part of the index.html.erb file

def render_project_hierarchy(projects)
    render_project_nested_lists(projects) do |project|
      s = link_to_project(project, {}, :class => "#{project.css_classes} #{User.current.member_of?(project) ? 'my-project' : nil}")
      if project.description.present?
        s << content_tag('div', textilizable(project.short_description, :project => project), :class => 'wiki description')
      end
// Вот отсюда
  project.visible_custom_field_values.each do |custom_value|
    if !custom_value.value.blank?
    s << content_tag('div', textilizable(custom_value.custom_field.name + ':' + show_value(custom_value) , :project => project), :class => 'wiki description')
    end
  end
// Вот до сюда
      s
    end
  end

After editing, do not forget to restart the server.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question