.section_label#handlers_label

%button#view_handlers_btn{ type: 'button', onClick: 'view_handlers();', title: 'view the handler list' }
  View
%button#hide_handlers_btn{ type: 'button', onClick: 'hide_handlers();', title: 'hide the handler list' }
  Hide
    

Current Webhook Handlers (#{@handlers_for_admin_page.size + @named_handlers_for_admin_page.size})

%button#reload_all_handlers_btn{ type: 'button', onClick: 'reload_handlers();', title: 'reload all handlers' }
  Reload All
  
%span#reloaded_notification

handlers_div

General Handler Directory:
%span.monospaced= Chook.config.handler_dir.to_s
    

%table#handlers_table
  %tr#handlers_table_header_row
    %th.handlers_table_cell File Name
    %th.handlers_table_cell{ width: '10%' } Handler Type
    %th.handlers_table_cell Actions

  - @handlers_for_admin_page.each do |hndlr_info|
    %tr
      %td.handlers_table_cell= hndlr_info[:file].basename.to_s
      %td.handlers_table_cell= hndlr_info[:type].to_s
      %td.handlers_table_cell
        %button.edit_handler_btn{ type: 'button', onClick: "view_handler_code('#{hndlr_info[:file]}', '#{hndlr_info[:type]}');", title: 'View this handler' }
          View
%br
%br
Named Handler Directory:
%span.monospaced= Chook.config.handler_dir.to_s + "/#{Chook::HandledEvent::Handlers::NAMED_HANDLER_SUBDIR}"
    

%table#handlers_table
  %tr#handlers_table_header_row
    %th.handlers_table_cell File Name
    %th.handlers_table_cell{ width: '10%' } Handler Type
    %th.handlers_table_cell Actions

  - @named_handlers_for_admin_page.each do |hndlr_info|
    %tr
      %td.handlers_table_cell= hndlr_info[:file].basename.to_s
      %td.handlers_table_cell= hndlr_info[:type].to_s
      %td.handlers_table_cell
        %button.edit_handler_btn{ type: 'button', onClick: "view_handler_code('#{hndlr_info[:file]}', '#{hndlr_info[:type]}');", title: 'View this handler' }
          View

#handler_viewer_div
  %input#currently_viewing_handler_file{ name: 'currently_viewing_handler_file', type: :hidden }
  %input#currently_editing_handler_type{ name: 'currently_editing_handler_type', type: :hidden }
  #currently_viewing_handler_label
    %button#hide_handler_viewer_btn{ type: 'button', onClick: 'hide_handler_viewer();', title: 'hide the handler editor' }
      Hide
        
    %span.monospaced#currently_viewing_filename -nothing-

  %textarea.monospaced#handler_viewer{ rows: 35 , readonly: true }