Class: Releaf::Builders::ToolboxBuilder
  
  
  
  
  
    - Inherits:
- 
      Object
      
        
          - Object
- Releaf::Builders::ToolboxBuilder
 show all
      - Includes:
- Base, Resource, Template
    - Defined in:
- app/builders/releaf/builders/toolbox_builder.rb
 
  Instance Attribute Summary
  
  Attributes included from Resource
  #resource
  
  
  Attributes included from Template
  #template
  
    
      Instance Method Summary
      collapse
    
    
  
  
  
  
  
  
  
  
  
  Methods included from Resource
  #initialize
  
  
  
  
  
  
  
  
  Methods included from Template
  #initialize
  
  
  
  
  
  
  
  
  Methods included from Base
  #default_translation_scope, #html_escape, #icon, #layout_settings, #locale_options, #resource_title, #safe_join, #t, #tag, #template_variable, #translate_locale, #wrapper
  
  
    Instance Method Details
    
      
  
  
    #destroy_confirmation_link  ⇒ Object 
  
  
  
  
    | 
20
21
22 | # File 'app/builders/releaf/builders/toolbox_builder.rb', line 20
def destroy_confirmation_link
  button(t("Delete"), nil, class: %w(ajaxbox danger), href: destroy_confirmation_url, data: {modal: true})
end | 
 
    
      
  
  
    #destroy_confirmation_url  ⇒ Object 
  
  
  
  
    | 
24
25
26 | # File 'app/builders/releaf/builders/toolbox_builder.rb', line 24
def destroy_confirmation_url
   url_for(action: :confirm_destroy, id: resource.id, index_path: index_path)
end | 
 
    
      
  
  
    #items  ⇒ Object 
  
  
  
  
    | 
14
15
16
17
18 | # File 'app/builders/releaf/builders/toolbox_builder.rb', line 14
def items
  list = []
  list << destroy_confirmation_link if feature_available? :destroy
  list
end | 
 
    
      
  
  
    #output  ⇒ Object 
  
  
  
  
    | 
6
7
8
9
10
11
12 | # File 'app/builders/releaf/builders/toolbox_builder.rb', line 6
def output
  safe_join do
    items.map do |item|
      tag('li', item)
    end
  end
end |