function wpv_admin_menu_content_template_listing_by_type_row( $sort, $page = 0 ) {
	global $WPV_settings, $post;

	$post_types_array = wpv_get_pt_tax_array();

	ob_start();
	if ( $sort == 'usage-single' ){

		$counter = count( $post_types_array['single_post'] );
		$alternate = '';
		for ( $i = 0; $i < $counter; ++$i ) {
			$type = $post_types_array['single_post'][ $i ][0];
			$label = $post_types_array['single_post'][ $i ][1];
			$alternate = ' alternate' == $alternate ? '' : ' alternate';

			?>
			<tr id="wpv_ct_list_row_<?php echo $type; ?>" class="js-wpv-ct-list-row<?php echo $alternate; ?>">

				<td class="wpv-admin-listing-col-usage post-title page-title column-title">
					<span class="row-title">
						<?php echo $label;?>
					</span>
					<?php
						$row_actions = array(
								"change_pt js-wpv-change-ct-assigned-to-something-popup" => sprintf( '<a href="#">%s</a>', __('Change Content Template','wpv-views') ) );

						echo wpv_admin_table_row_actions( $row_actions,	array(
								"data-pt" => 'views_template_for_' . $type ) );
					?>
				</td>

				<td class="wpv-admin-listing-col-used-title">
					<ul>
						<?php
							$add_button = wpv_ct_listing_render_create_ct_button(
                                sprintf( __( 'Create a Content Template for single %s', 'wpv-views' ), $label ),
                                $label,
                                array( 'single_post_types' => array( $type ) )
                            );


							if ( isset( $WPV_settings[ 'views_template_for_' . $type ] ) && $WPV_settings[ 'views_template_for_' . $type ] != 0 ) {

                                // There is a Content Template assigned for single posts of this type

                                $ct_id = $WPV_settings[ 'views_template_for_' . $type ];
                                $ct = WPV_Content_Template::get_instance( $ct_id );

                                if ( null != $ct ) {
                                    printf(
                                        '<a href="%s">%s</a>',
                                        esc_url(
                                            add_query_arg(
                                                array( 'page' => WPV_CT_EDITOR_PAGE_NAME, 'ct_id' => $ct->id, 'action' => 'edit' ),
                                                admin_url( 'admin.php' )
                                            )
                                        ),
                                        $ct->title
                                    );

									// @todo We do not need the exact number here, let's create a has_dissident_posts method instead with a LIMITed query
                                    $dissident_post_count = $ct->get_dissident_posts( $type, 'count' );

                                    if ( $dissident_post_count > 0 ) {
                                        ?>
                                        <span class="js-wpv-apply-ct-to-cpt-single-<?php echo $type; ?>">
                                            <?php
                                                printf(
                                                    '<a class="%s" data-type="%s" data-id="%s" data-nonce="%s"> %s</a>',
                                                    'button button-small button-leveled icon-warning-sign js-wpv-apply-ct-to-all-cpt-single-dialog',
													$type,
													$ct->id,
													wp_create_nonce( 'work_view_template' ),
                                                    sprintf( __( 'Bind %u %s ', 'wpv-views' ), $dissident_post_count, $label )
                                                );
                                            ?>
                                        </span>
                                        <?php
                                    }
                                    //}
                                } else {
                                    echo $add_button;
                                }
                            } else {

                                // Single posts of this type have no Content Template assigned

                                echo $add_button;

                                $assigned_posts_count = WPV_Content_Template_Embedded::get_posts_using_content_template_by_type( $type, 'count' );

                                if ( $assigned_posts_count > 0 ) {
                                    ?>
                                    <a class="button button-small js-wpv-clear-cpt-from-ct-popup" href="#"
                                            data-unclear="<?php echo $assigned_posts_count; ?>"
                                            data-slug="<?php echo $type; ?>"
                                            data-label="<?php echo htmlentities( $label, ENT_QUOTES ); ?>">
                                        <i class="icon-unlink"></i>
                                        <?php echo sprintf( __('Clear %d %s', 'wpv-views'), $assigned_posts_count, $label ); ?>
                                    </a>
                                    <?php
                                }

                            }
						?>
					</ul>
				</td>
			</tr>
			<?php
		}

	} else if ( $sort == 'usage-post-archives' ){

		$alternate = '';
		$counter = count( $post_types_array['archive_post'] );
		for ( $i = 0; $i < $counter; ++$i ) {

			$type = $post_types_array['archive_post'][ $i ][0];
			$label = $post_types_array['archive_post'][ $i ][1];

			$add_button = wpv_ct_listing_render_create_ct_button(
                __( 'Add a new Content Template for this post type', 'wpv-views' ),
                $label,
                array( 'post_archives' => array( $type ) )
            );

			$alternate = ' alternate' == $alternate ? '' : ' alternate';
			?>
			<tr id="wpv_ct_list_row_<?php echo $type; ?>" class="js-wpv-ct-list-row<?php echo $alternate; ?>">
				<td class="post-title page-title column-title">
					<span class="row-title">
						<?php echo $label; ?>
					</span>
					<?php
						$row_actions = array(
								"change_pt js-wpv-change-ct-assigned-to-something-popup" => sprintf( '<a href="#">%s</a>', __( 'Change Content Template', 'wpv-views' ) ) );

						echo wpv_admin_table_row_actions( $row_actions,	array(
								"data-pt" => 'views_template_archive_for_' . $type ) );
					?>
				</td>
				<td>
					<ul>
						<?php
							if ( isset( $WPV_settings[ 'views_template_archive_for_' . $type ] )
									&& $WPV_settings[ 'views_template_archive_for_' . $type ] != 0) {
								$post = get_post( $WPV_settings[ 'views_template_archive_for_' . $type ] );
								if ( is_object( $post ) ) {
                                    wpv_ct_editor_render_link( $post->ID, esc_html( $post->post_title ) );
								} else {
									echo $add_button;
								}
							} else {
								echo $add_button;
							}
						?>
					</ul>
				</td>
			</tr>
			<?php
		}

	} else if ( $sort == 'usage-taxonomy-archives' ){

		$counter = count( $post_types_array['taxonomy_post'] );
		$alternate = '';

		for ( $i = 0; $i < $counter; ++$i ) {
			$type = $post_types_array['taxonomy_post'][ $i ][0];
			$label = $post_types_array['taxonomy_post'][ $i ][1];

			$add_button = wpv_ct_listing_render_create_ct_button(
                __( 'Add a new Content Template for this taxonomy', 'wpv-views' ),
                $label,
                array( 'taxonomy_archives' => array( $type ) )
            );

			$alternate = ' alternate' == $alternate ? '' : ' alternate';

			?>
			<tr id="wpv_ct_list_row_<?php echo $type; ?>" class="js-wpv-ct-list-row<?php echo $alternate; ?>">
				<td class="post-title page-title column-title">
					<span class="row-title">
						<?php echo $label;?>
					</span>
					<?php
						$row_actions = array(
								"change_pt js-wpv-change-ct-assigned-to-something-popup" => sprintf( '<a href="#">%s</a>', __( 'Change Content Template', 'wpv-views' ) ) );

						echo wpv_admin_table_row_actions( $row_actions,	array(
								"data-pt" => 'views_template_loop_' . $type ) );
					?>
				</td>
				<td>
					<ul>
						<?php
							if ( isset( $WPV_settings[ 'views_template_loop_' . $type ] )
									&& $WPV_settings[ 'views_template_loop_' . $type ] != 0 ) {
								$post = get_post( $WPV_settings['views_template_loop_' . $type] );
								if ( is_object( $post ) ) {
                                    wpv_ct_editor_render_link( $post->ID, esc_html( $post->post_title ) );
								} else {
									echo $add_button;
								}
							} else {
								echo $add_button;
							}
						?>
					</ul>
				</td>
			</tr>
			<?php
		}
	}

	$row = ob_get_contents();
	ob_end_clean();

	return $row;
}