Пример #1
0
/**
 * @todo comment
 */ 
function wpv_render_view_listing_dialog_templates() {
	?>
	<div class="popup-window-container"> <!-- placeholder for static colorbox popups -->

		<!-- popup: create View -->
		<div id="js-wpv-create-view-form-dialog" class="toolset-shortcode-gui-dialog-container wpv-shortcode-gui-dialog-container wpv-create-view-form-dialog js-create-view-form-dialog">
			<div class="wpv-dialog wpv-shortcode-gui-content-wrapper no-scrollbar">
				<?php
					wp_nonce_field('wp_nonce_create_view', 'wp_nonce_create_view');
					printf(
							'<input class="js-view-new-redirect" name="view_creation_redirect" type="hidden" value="%s" />',
							// Careful, it is expected that this value really ends with "view_id=". View ID gets appended to it in JS.
							admin_url( 'admin.php?page=views-editor&amp;view_id=') );
				?>
				<label for="view_new_name"><strong><?php _e( 'Name this View', 'wpv-views' ); ?></strong></label>
				<input type="text" name="view_new_name" id="view_new_name" class="js-new-post_title large-text"
						placeholder="<?php echo esc_attr( __('Enter title here', 'wpv-views') ); ?>" />
				<h3><?php _e( 'What kind of display do you want to create?', 'wpv-views' ); ?></h3>
				<p style="margin-top:0;">
					<?php _e('A View loads content from the database and displays it with your HTML.', 'wpv-views'); ?>
				</p>
				<ul>
					<li>
						<p>
							<input type="radio" name="view_purpose" class="js-view-purpose" id="view_purpose_all" value="all" />
							<label for="view_purpose_all"><?php _e('Display all results','wpv-views'); ?></label>
							<span class="wpv-helper-text"><?php _e('The View will output all the results returned from the query section.', 'wpv-views'); ?></span>
						</p>
					</li>
					<li>
						<p>
							<input type="radio" name="view_purpose" class="js-view-purpose" id="view_purpose_pagination" value="pagination" />
							<label for="view_purpose_pagination"><?php _e('Display the results with pagination','wpv-views'); ?></label>
							<span class="wpv-helper-text"><?php _e('The View will display the query results in pages.', 'wpv-views'); ?></span>
						</p>
					</li>
					<li>
						<p>
							<input type="radio" name="view_purpose" class="js-view-purpose" id="view_purpose_slider" value="slider" />
							<label for="view_purpose_slider"><?php _e('Display the results as a slider','wpv-views'); ?></label>
							<span class="wpv-helper-text"><?php _e('The View will display the query results as slides.', 'wpv-views'); ?></span>
						</p>
					</li>
					<li>
						<p>
							<input type="radio" name="view_purpose" class="js-view-purpose" id="view_purpose_parametric" value="parametric" />
							<label for="view_purpose_parametric"><?php _e('Display the results as a parametric search','wpv-views'); ?></label>
							<span class="wpv-helper-text"><?php _e('Visitors will be able to search through your content using different search criteria.', 'wpv-views'); ?></span>
						</p>
					</li>
					<li>
						<p>
							<input type="radio" name="view_purpose" class="js-view-purpose" id="view_purpose_full" value="full" />
							<label for="view_purpose_full"><?php _e('Full custom display mode','wpv-views'); ?></label>
							<span class="wpv-helper-text"><?php _e('See all the View controls open and set up things manually..', 'wpv-views'); ?></span>
						</p>
					</li>
				</ul>
				<div class="js-wpv-error-container"></div>
			</div>
		</div> <!-- js-wpv-create-view-form-dialog -->

		<?php
			wpv_render_duplicate_dialog( 'view' );
		?>

	</div> <!-- .popup-window-container" -->
	<?php
}
/**
 * @todo comment
 */
function wpv_render_view_listing_dialog_templates()
{
    ?>
	<div class="popup-window-container"> <!-- placeholder for static colorbox popups -->

		<!-- popup: create View -->
		<div class="wpv-dialog create-view-form-dialog js-create-view-form-dialog">
			<?php 
    wp_nonce_field('wp_nonce_create_view', 'wp_nonce_create_view');
    printf('<input class="js-view-new-redirect" name="view_creation_redirect" type="hidden" value="%s" />', admin_url('admin.php?page=views-editor&amp;view_id='));
    ?>
			<div class="wpv-dialog-header">
				<h2><?php 
    _e('Add a new View', 'wpv-views');
    ?>
</h2>
				<i class="icon-remove js-dialog-close"></i>
			</div>
			<div class="wpv-dialog-content no-scrollbar">
				<p>
					<?php 
    _e('A View loads content from the database and displays with your HTML.', 'wpv-views');
    ?>
				</p>
				<p>
					<strong><?php 
    _e(' What kind of display do you want to create?', 'wpv-views');
    ?>
</strong>
				</p>
				<ul>
					<li>
						<p>
							<input type="radio" name="view_purpose" class="js-view-purpose" id="view_purpose_all" value="all" />
							<label for="view_purpose_all"><?php 
    _e('Display all results', 'wpv-views');
    ?>
</label>
							<span class="helper-text"><?php 
    _e('The View will output all the results returned from the query section.', 'wpv-views');
    ?>
</span>
						</p>
					</li>
					<li>
						<p>
							<input type="radio" name="view_purpose" class="js-view-purpose" id="view_purpose_pagination" value="pagination" />
							<label for="view_purpose_pagination"><?php 
    _e('Display the results with pagination', 'wpv-views');
    ?>
</label>
							<span class="helper-text"><?php 
    _e('The View will display the query results in pages.', 'wpv-views');
    ?>
</span>
						</p>
					</li>
					<li>
						<p>
							<input type="radio" name="view_purpose" class="js-view-purpose" id="view_purpose_slider" value="slider" />
							<label for="view_purpose_slider"><?php 
    _e('Display the results as a slider', 'wpv-views');
    ?>
</label>
							<span class="helper-text"><?php 
    _e('The View will display the query results as slides.', 'wpv-views');
    ?>
</span>
						</p>
					</li>
					<li>
						<p>
							<input type="radio" name="view_purpose" class="js-view-purpose" id="view_purpose_parametric" value="parametric" />
							<label for="view_purpose_parametric"><?php 
    _e('Display the results as a parametric search', 'wpv-views');
    ?>
</label>
							<span class="helper-text"><?php 
    _e('Visitors will be able to search through your content using different search criteria.', 'wpv-views');
    ?>
</span>
						</p>
					</li>
					<li>
						<p>
							<input type="radio" name="view_purpose" class="js-view-purpose" id="view_purpose_full" value="full" />
							<label for="view_purpose_full"><?php 
    _e('Full custom display mode', 'wpv-views');
    ?>
</label>
							<span class="helper-text"><?php 
    _e('See all the View controls open and set up things manually..', 'wpv-views');
    ?>
</span>
						</p>
					</li>
				</ul>

				<p>
					<strong><label for="view_new_name"><?php 
    _e('Name this View', 'wpv-views');
    ?>
</label></strong>
				</p>
				<p>
					<input type="text" name="view_new_name" id="view_new_name" class="js-new-post_title"
							placeholder="<?php 
    echo htmlentities(__('Enter title here', 'wpv-views'), ENT_QUOTES);
    ?>
"
							data-highlight="<?php 
    echo htmlentities(__('Now give this View a name', 'wpv-views'), ENT_QUOTES);
    ?>
" />
				</p>
				<div class="js-wpv-error-container"></div>
			</div>

			<div class="wpv-dialog-footer">
				<?php 
    wp_nonce_field('wp_nonce_create_view', 'wp_nonce_create_view');
    ?>
				<button class="button js-dialog-close"><?php 
    _e('Cancel', 'wpv-views');
    ?>
</button>
				<button class="button button-primary js-create-new-view"><?php 
    _e('Create View', 'wpv-views');
    ?>
</button>
			</div>
		</div> <!-- .create-view-form-dialog -->

		<?php 
    wpv_render_duplicate_dialog('view');
    ?>

	</div> <!-- .popup-window-container" -->
	<?php 
}