mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-27 01:05:21 +08:00
adds label to step in report [fixes SCI-488]
This commit is contained in:
parent
41df727e57
commit
b22350136f
3 changed files with 14 additions and 0 deletions
|
@ -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
|
||||
"<span class=\"label label-#{style}\">#{text}</span>".html_safe
|
||||
end
|
||||
end
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
<h5>
|
||||
<span class="glyphicon glyphicon-circle-arrow-right"></span>
|
||||
<b><%=t "projects.reports.elements.step.step_pos", pos: (step.position + 1) %></b> <%= step.name %>
|
||||
<%= step_status_label(step) %>
|
||||
</h5>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1369,6 +1369,8 @@ en:
|
|||
row_in_repository_public: "%{protocol} - <i>into public protocols</i>"
|
||||
row_in_repository_private: "%{protocol} - <i>into private protocols</i>"
|
||||
steps:
|
||||
completed: 'Completed'
|
||||
uncompleted: 'Uncompleted'
|
||||
expand_label: "Expand all"
|
||||
collapse_label: "Collapse all"
|
||||
new_step: "Add new"
|
||||
|
|
Loading…
Reference in a new issue