Sha256: e7b090cdf9d472cfe535c94aa3fe27b447631ff1ab269a142d85acd18fd9ea1e

Contents?: true

Size: 573 Bytes

Versions: 13

Compression:

Stored size: 573 Bytes

Contents

module ForemanTasks
  module TasksHelper
    def format_task_input(task, include_action = false)
      return '-' unless task
      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.10.6 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.10.4 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.9.6 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.10.3 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.10.2 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.10.1 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.9.5 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.10.0 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.9.4 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.9.3 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.9.2 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.9.1 app/helpers/foreman_tasks/tasks_helper.rb
foreman-tasks-0.9.0 app/helpers/foreman_tasks/tasks_helper.rb