diff --git a/apps/dashboard/app/helpers/batch_connect/sessions_helper.rb b/apps/dashboard/app/helpers/batch_connect/sessions_helper.rb index f614f83d1c..3a2ee2b8bc 100644 --- a/apps/dashboard/app/helpers/batch_connect/sessions_helper.rb +++ b/apps/dashboard/app/helpers/batch_connect/sessions_helper.rb @@ -140,21 +140,7 @@ def display_choices(session) end def status(session) - if session.starting? - "Starting" - elsif session.running? - "Running" - elsif session.queued? - "Queued" - elsif session.held? - "Held" - elsif session.suspended? - "Suspended" - elsif session.completed? - "Completed" - else - "Undetermined" - end + render(partial: 'batch_connect/sessions/card/status', locals: { session: session }) end def status_context(session) diff --git a/apps/dashboard/app/views/batch_connect/sessions/card/_status.html.erb b/apps/dashboard/app/views/batch_connect/sessions/card/_status.html.erb new file mode 100644 index 0000000000..fce9cc5ef0 --- /dev/null +++ b/apps/dashboard/app/views/batch_connect/sessions/card/_status.html.erb @@ -0,0 +1,15 @@ + <% if session.starting? %> + Starting + <% elsif session.running? %> + Running + <% elsif session.queued? %> + Queued + <% elsif session.held? %> + Held + <% elsif session.suspended? %> + Suspended + <% elsif session.completed? %> + Completed + <% else %> + Undetermined + <% end %>