Sha256: c1e1f6161fcde395753849a277e444ebc87af16688c0da8cb9fca5dc9048b154
Contents?: true
Size: 1.21 KB
Versions: 2
Compression:
Stored size: 1.21 KB
Contents
module DiscoversHelper def disc_report_column(record) return record.last_report? ? time_ago_in_words(record.last_report.getlocal) +" ago": "" end def discovers_title_actions(host) title_actions( button_group( link_to("Provision", hash_for_edit_discover_path(:id => host), :class => 'btn-primary') ), button_group( link_to("Refresh Facts", hash_for_refresh_facts_discover_path(:id => host)) ), button_group( link_to("Delete", hash_for_discover_path(:id => host), :class => "btn btn-danger", :confirm => 'Are you sure?', :method => :delete) ) ) end def multiple_discovers_actions_select actions = [ ['Delete Hosts', multiple_destroy_discovers_path, 'trash'], ] actions << ['Assign Organization', select_multiple_organization_discovers_path, 'tags'] if SETTINGS[:organizations_enabled] actions << ['Assign Location', select_multiple_location_discovers_path, 'map-marker'] if SETTINGS[:locations_enabled] content_tag :span, :id => 'submit_multiple', :class => 'fl' do actions.map do |action| link_to(icon_text(action[2]), action[1], :title => action[0]) end.join(' ').html_safe end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
foreman_discovery-1.0.0.rc2 | app/helpers/discovers_helper.rb |
foreman_discovery-1.0.0.rc1 | app/helpers/discovers_helper.rb |