listing.php
70 lines
| 1 | <div class="wrap"> |
| 2 | <h2> |
| 3 | <?php _e($this->post_type->labels->name); ?> |
| 4 | |
| 5 | <a href="<?php echo $this->post_type_repo->addNewPostLink($this->post_type->name); ?>" class="add-new-h2"> |
| 6 | <?php _e($this->post_type->labels->add_new); ?> |
| 7 | </a> |
| 8 | |
| 9 | <?php if ( current_user_can('publish_pages') && !$this->isSearch() ) : ?> |
| 10 | <a href="#" class="add-new-h2 open-bulk-modal" title="<?php _e('Add Multiple', 'nestedpages'); ?>" data-parentid="0"> |
| 11 | <?php _e('Add Multiple', 'nestedpages'); ?> |
| 12 | </a> |
| 13 | <?php endif; ?> |
| 14 | |
| 15 | <?php if ( current_user_can('publish_pages') && $this->post_type->name == 'page' && !$this->isSearch() ) : ?> |
| 16 | <a href="#" class="add-new-h2 open-redirect-modal" title="<?php _e('Add Link', 'nestedpages'); ?>" data-parentid="0"> |
| 17 | <?php _e('Add Link', 'nestedpages'); ?> |
| 18 | </a> |
| 19 | <?php endif; ?> |
| 20 | |
| 21 | </h2> |
| 22 | |
| 23 | <?php if ( $this->confirmation->getMessage() ) : ?> |
| 24 | <div id="message" class="updated below-h2"><p><?php echo $this->confirmation->getMessage(); ?></p></div> |
| 25 | <?php endif; ?> |
| 26 | |
| 27 | <?php if ( $this->post_type->hierarchical && !$this->isSearch() ) : ?> |
| 28 | <ul class="nestedpages-toggleall" <?php if ( $this->confirmation->getMessage() ) echo 'style="margin-top:0"';?>> |
| 29 | <li><a href="#" class="np-btn" data-toggle="closed"><?php _e('Expand All', 'nestedpages'); ?></a></li> |
| 30 | </ul> |
| 31 | <?php endif; ?> |
| 32 | |
| 33 | <?php if ( current_user_can('edit_theme_options') && $this->post_type->name == 'page' && !$this->isSearch() ) : ?> |
| 34 | <div class="np-sync-menu-cont" <?php if ( $this->confirmation->getMessage() ) echo 'style="margin-top:2px;"';?>> |
| 35 | <label> |
| 36 | <input type="checkbox" name="np_sync_menu" class="np-sync-menu" value="sync" <?php if ( get_option('nestedpages_menusync') == 'sync' ) echo 'checked'; ?>/> <?php _e('Sync Menu', 'nestedpages'); ?> |
| 37 | </label> |
| 38 | </div> |
| 39 | <?php endif; ?> |
| 40 | |
| 41 | <img src="<?php echo plugins_url(); ?>/wp-nested-pages/assets/images/spinner-2x.gif" alt="loading" id="nested-loading" /> |
| 42 | |
| 43 | <?php include(NestedPages\Helpers::view('partials/tool-list')); ?> |
| 44 | |
| 45 | <div id="np-error" class="updated error" style="clear:both;display:none;"></div> |
| 46 | |
| 47 | |
| 48 | <div class="nestedpages"> |
| 49 | <?php $this->loopPosts(); ?> |
| 50 | |
| 51 | <div class="quick-edit quick-edit-form np-inline-modal" style="display:none;"> |
| 52 | <?php include( NestedPages\Helpers::view('forms/quickedit-post') ); ?> |
| 53 | </div> |
| 54 | |
| 55 | <?php if ( current_user_can('publish_pages') ) : ?> |
| 56 | <div class="quick-edit quick-edit-form-redirect np-inline-modal" style="display:none;"> |
| 57 | <?php include( NestedPages\Helpers::view('forms/quickedit-link') ); ?> |
| 58 | </div> |
| 59 | |
| 60 | <div class="new-child new-child-form np-inline-modal" style="display:none;"> |
| 61 | <?php include( NestedPages\Helpers::view('forms/new-child') ); ?> |
| 62 | </div> |
| 63 | <?php endif; ?> |
| 64 | </div> |
| 65 | |
| 66 | </div><!-- .wrap --> |
| 67 | |
| 68 | <?php include( NestedPages\Helpers::view('forms/empty-trash-modal') ); ?> |
| 69 | <?php include( NestedPages\Helpers::view('forms/link-form') ); ?> |
| 70 | <?php include( NestedPages\Helpers::view('forms/bulk-add') ); ?> |