Sha256: 13ca9eb8deaed4002e1ded1919946708535944ec6863e8d4692434887b925552

Contents?: true

Size: 544 Bytes

Versions: 13

Compression:

Stored size: 544 Bytes

Contents

module ForemanTasks
  module TasksHelper
    def format_task_input(task, include_action = false)
      parts = []
      parts << task.get_humanized(:name) if include_action
      parts << Array(task.get_humanized(:input)).map do |part|
        if part.is_a? Array
          part[1][:text]
        else
          part.to_s
        end
      end.join('; ')
      parts.join(" ")
    end

    def format_recurring_logic_limit(thing)
      if thing.nil?
        content_tag(:i, N_('Unlimited'))
      else
        thing
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
foreman-tasks-0.7.19 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.7.18 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.7.17 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.7.16 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.7.15 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.7.14 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.7.13 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.7.12 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.7.11 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.7.10 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.7.9 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.7.8 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.7.7 app/helpers/foreman_tasks/tasks_helper.rb