/**
     * Render the screen options to choose whether to display release help tooltips.
     *
     * @since 1.0
     *
     * @param string     $settings
     * @param \WP_Screen $screen
     *
     * @return string
     */
    public function render_release_tooltip($settings, \WP_Screen $screen)
    {
        if (!Tab_Dispatch::is_current_view('releases') || !Release_Dispatch::is_current_view('add-new')) {
            return $settings;
        }
        add_filter('screen_options_show_submit', '__return_true');
        $show = get_option('itelic_show_release_type_help', 'show');
        ob_start();
        ?>

		<fieldset class="release-help-screen-option">
			<legend><?php 
        _e("Licensing", Plugin::SLUG);
        ?>
</legend>
			<input type="checkbox" step="1" min="1" max="999" name="itelic_release_type_help" id="itelic_release_type_help" <?php 
        checked($show, 'show');
        ?>
 value="1">
			<label for="itelic_release_type_help"><?php 
        _e("Show Release Type Help", Plugin::SLUG);
        ?>
</label>
			<?php 
        wp_nonce_field('itelic-release-type-help', 'itelic_nonce');
        ?>
		</fieldset>

		<?php 
        $settings .= ob_get_clean();
        return $settings;
    }
 /**
  * Setup the table.
  */
 public function setup_table()
 {
     if (!Dispatch::is_current_view('list')) {
         return;
     }
     $query = new Releases($this->generate_query_args());
     $releases = $query->get_results();
     $total = $query->get_total_items();
     $products = itelic_get_products_with_licensing_enabled();
     $this->table = new Table($this->prepare_data($releases), $total, $products);
 }
     $html .= '</p>';
     $html .= '<h4>' . __('Minor', Plugin::SLUG) . '</h4>';
     $html .= '<p>';
     $html .= get_minor_release_help_text();
     $html .= '</p>';
     $html .= '<h4>' . __('Security', Plugin::SLUG) . '</h4>';
     $html .= '<p>';
     $html .= get_security_release_help_text();
     $html .= '</p>';
     $html .= '<h4>' . __('Pre-release', Plugin::SLUG) . '</h4>';
     $html .= '<p>';
     $html .= get_pre_release_help_text();
     $html .= '</p>';
     return $html;
 }, function () {
     return Dispatch::is_current_view('releases') && \ITELIC\Admin\Releases\Dispatch::is_current_view('add-new');
 });
 $help->add(__("Overview", Plugin::SLUG), function () {
     $html = '';
     $html .= '<p>';
     $html .= __("Renewal reminders are sent to your customers whenever their license keys are approaching their expiration date. You can create as many renewal reminders as needed. However, as the number of reminders is increase there is a performance impact. It is recommended to have no more than ten reminders.", Plugin::SLUG);
     $html .= '</p>';
     return $html;
 }, function () {
     return get_current_screen()->post_type == CPT::TYPE;
 });
 $help->add(__("Creating Reminders", Plugin::SLUG), function () {
     $html = '';
     $html .= '<p>';
     $html .= __("Creating a renewal reminder is similar to creating a WordPress post. The title is used as the subject line, and the post content is used as the message body. The message can be customized using the <em>Insert Template Tag</em> button. Use the <em>Scheduling</em> metabox to control when the reminder is sent out.", Plugin::SLUG);
     $html .= '</p>';
<?php

/**
 * Load the releases subview.
 *
 * @author    Iron Bound Designs
 * @since     1.0
 * @license   AGPL
 * @copyright Iron Bound Designs, 2015.
 */
namespace ITELIC\Admin\Releases;

use ITELIC\Admin\Releases\Controller\Add_New;
use ITELIC\Admin\Releases\Controller\ListC;
use ITELIC\Admin\Releases\Controller\Single;
Dispatch::register_view('list', new ListC());
Dispatch::register_view('single', new Single());
Dispatch::register_view('add-new', new Add_New());
 /**
  * Render the view for this controller.
  *
  * @return void
  */
 public function render()
 {
     $releases_dispatch = new Releases_Dispatch();
     $releases_dispatch->dispatch();
 }