Actualizar plugin Additionals a 3.0.0
This commit is contained in:
parent
3d976f1b3b
commit
a26f5567af
399 changed files with 70374 additions and 4093 deletions
52
plugins/additionals/app/models/dashboard_content_project.rb
Normal file
52
plugins/additionals/app/models/dashboard_content_project.rb
Normal file
|
@ -0,0 +1,52 @@
|
|||
class DashboardContentProject < DashboardContent
|
||||
TYPE_NAME = 'ProjectDashboard'.freeze
|
||||
|
||||
def block_definitions
|
||||
blocks = super
|
||||
|
||||
# legacy_left or legacy_right should not be moved to DashboardContent,
|
||||
# because DashboardContent is used for areas in other plugins
|
||||
blocks['legacy_left'] = { label: l(:label_dashboard_legacy_left),
|
||||
no_settings: true }
|
||||
|
||||
blocks['legacy_right'] = { label: l(:label_dashboard_legacy_right),
|
||||
no_settings: true }
|
||||
|
||||
blocks['projectinformation'] = { label: l(:label_project_information),
|
||||
no_settings: true,
|
||||
if: (lambda do |project|
|
||||
project.description.present? ||
|
||||
project.homepage.present? ||
|
||||
project.visible_custom_field_values.any? { |o| o.value.present? }
|
||||
end),
|
||||
partial: 'dashboards/blocks/project_information' }
|
||||
|
||||
blocks['projectissues'] = { label: l(:label_issues_summary),
|
||||
no_settings: true,
|
||||
permission: :view_issues,
|
||||
partial: 'dashboards/blocks/project_issues' }
|
||||
|
||||
blocks['projecttimeentries'] = { label: l(:label_time_tracking),
|
||||
no_settings: true,
|
||||
permission: :view_time_entries,
|
||||
partial: 'dashboards/blocks/project_time_entries' }
|
||||
|
||||
blocks['projectmembers'] = { label: l(:label_member_plural),
|
||||
no_settings: true,
|
||||
partial: 'projects/members_box' }
|
||||
|
||||
blocks['projectsubprojects'] = { label: l(:label_subproject_plural),
|
||||
no_settings: true,
|
||||
partial: 'dashboards/blocks/project_subprojects' }
|
||||
|
||||
blocks
|
||||
end
|
||||
|
||||
# Returns the default layout for a new dashboard
|
||||
def default_layout
|
||||
{
|
||||
'left' => %w[projectinformation projectissues projecttimeentries],
|
||||
'right' => %w[projectmembers projectsubprojects]
|
||||
}
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue