Sha256: 8e252ebea614a207219c50ff39417e06ef323b2c6c8a1f75c70e9a23ad5f6293

Contents?: true

Size: 1.41 KB

Versions: 54

Compression:

Stored size: 1.41 KB

Contents

module ThinkFeelDoEngine
  # Provides helpers for slide creation.
  module SlidesHelper
    # Returns table of contents creation or destroy
    # button based on slideshow attributes.
    def table_of_contents_link(arm, slideshow)
      if slideshow.has_table_of_contents?
        link_to "Destroy Table of Contents",
                arm_bit_maker_slideshow_destroy_table_of_contents_path(
                  arm,
                  slideshow),
                class: "btn btn-default toc"
      else
        link_to "Add Table of Contents",
                arm_bit_maker_slideshow_create_table_of_contents_path(
                  arm,
                  slideshow),
                class: "btn btn-default toc"
      end
    end

    def table_of_contents_display(slide)
      if slide.slideshow && slide.slideshow.has_table_of_contents &&
         slide.position == 1
        render "think_feel_do_engine/slides/table_of_contents", slide: slide
      end
    end

    def slide_panel(slide, slideshow, arm)
      if slide.slideshow.has_table_of_contents && slide.position == 1
        render "/think_feel_do_engine/bit_maker/slideshows/toc_panel",
               slide: slide,
               slideshow: slideshow,
               arm: arm
      else
        render "/think_feel_do_engine/bit_maker/slideshows/slide_panel",
               slide: slide,
               slideshow: slideshow,
               arm: arm
      end
    end
  end
end

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
think_feel_do_engine-3.19.9 app/helpers/think_feel_do_engine/slides_helper.rb
think_feel_do_engine-3.19.8 app/helpers/think_feel_do_engine/slides_helper.rb
think_feel_do_engine-3.19.7 app/helpers/think_feel_do_engine/slides_helper.rb
think_feel_do_engine-3.19.6 app/helpers/think_feel_do_engine/slides_helper.rb
think_feel_do_engine-3.19.5 app/helpers/think_feel_do_engine/slides_helper.rb
think_feel_do_engine-3.19.4 app/helpers/think_feel_do_engine/slides_helper.rb
think_feel_do_engine-3.19.3 app/helpers/think_feel_do_engine/slides_helper.rb
think_feel_do_engine-3.19.2 app/helpers/think_feel_do_engine/slides_helper.rb
think_feel_do_engine-3.19.1 app/helpers/think_feel_do_engine/slides_helper.rb
think_feel_do_engine-3.19.0 app/helpers/think_feel_do_engine/slides_helper.rb
think_feel_do_engine-3.18.0 app/helpers/think_feel_do_engine/slides_helper.rb
think_feel_do_engine-3.17.2 app/helpers/think_feel_do_engine/slides_helper.rb
think_feel_do_engine-3.17.1 app/helpers/think_feel_do_engine/slides_helper.rb
think_feel_do_engine-3.17.0 app/helpers/think_feel_do_engine/slides_helper.rb
think_feel_do_engine-3.16.3 app/helpers/think_feel_do_engine/slides_helper.rb
think_feel_do_engine-3.16.2 app/helpers/think_feel_do_engine/slides_helper.rb
think_feel_do_engine-3.16.1 app/helpers/think_feel_do_engine/slides_helper.rb
think_feel_do_engine-3.15.7 app/helpers/think_feel_do_engine/slides_helper.rb
think_feel_do_engine-3.16.0 app/helpers/think_feel_do_engine/slides_helper.rb
think_feel_do_engine-3.15.6 app/helpers/think_feel_do_engine/slides_helper.rb