diff --git a/app/helpers/reports_helper.rb b/app/helpers/reports_helper.rb index 9c15582b7..374aae60b 100644 --- a/app/helpers/reports_helper.rb +++ b/app/helpers/reports_helper.rb @@ -92,4 +92,15 @@ module ReportsHelper '/4.6.3/css/font-awesome.min.css' ) end + + def step_status_label(step) + if step.completed + style = 'success' + text = t('protocols.steps.completed') + else + style = 'default' + text = t('protocols.steps.uncompleted') + end + "#{text}".html_safe + end end diff --git a/app/views/reports/elements/_my_module_step_element.html.erb b/app/views/reports/elements/_my_module_step_element.html.erb index 7a73b519e..b3019592d 100644 --- a/app/views/reports/elements/_my_module_step_element.html.erb +++ b/app/views/reports/elements/_my_module_step_element.html.erb @@ -21,6 +21,7 @@
<%=t "projects.reports.elements.step.step_pos", pos: (step.position + 1) %> <%= step.name %> + <%= step_status_label(step) %>
diff --git a/config/locales/en.yml b/config/locales/en.yml index 906f19bd1..e4c9ef6c4 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1369,6 +1369,8 @@ en: row_in_repository_public: "%{protocol} - into public protocols" row_in_repository_private: "%{protocol} - into private protocols" steps: + completed: 'Completed' + uncompleted: 'Uncompleted' expand_label: "Expand all" collapse_label: "Collapse all" new_step: "Add new"