app/views/naf/applications/index.json.erb in naf-2.0.4 vs app/views/naf/applications/index.json.erb in naf-2.1.0
- old
+ new
@@ -1,11 +1,27 @@
<%
rows = @applications.each do |application|
- app = Naf::Application.find(application.first)
- application.insert(10, naf_last_queued_at_link(app))
- application.insert(13,(link_to image_tag('control_play_blue.png',
- class: 'action',
- title: "Enqueue Application(\nid: #{app.id},\ntitle: #{app.title},\ncommand: #{app.command})"),
- "#", { class: "enqueue", id: application[0] }))
+ app = Naf::Application.find(application.first)
+ schedules = application[4]
+ application[4] = ''
+ schedules.each do |schedule|
+ logical_schedule = ::Logical::Naf::ApplicationSchedule.new(schedule)
+ if application[4].present?
+ application[4] << (link_to logical_schedule.display,
+ application_schedule_path(schedule.id),
+ title: logical_schedule.help_title)
+ else
+ application[4] = (link_to logical_schedule.display,
+ application_schedule_path(schedule.id),
+ title: logical_schedule.help_title)
+ end
+ application[4] << ", ".html_safe
+ end
+ application[4] = application[4][0..-3]
+ application.insert(5, naf_last_queued_at_link(app))
+ application.insert(6,(link_to image_tag('control_play_blue.png',
+ class: 'action',
+ title: "Enqueue Application(\nid: #{app.id},\ntitle: #{app.title},\ncommand: #{app.command})"),
+ "#", { class: "enqueue", id: application[0] }))
end
%>
<%= raw rows %>