pages.php
58 lines
| 1 | <?php add_thickbox(); ?> |
| 2 | <div class="wrap"> |
| 3 | |
| 4 | <h2> |
| 5 | <?php echo $this->post_type->labels->name; ?> |
| 6 | <a href="<?php echo $this->addNewPageLink(); ?>" class="add-new-h2"><?php echo $this->post_type->labels->add_new; ?></a> |
| 7 | <?php if ( current_user_can('publish_pages') ) : ?> |
| 8 | <a href="#" class="add-new-h2 open-redirect-modal" title="<?php _e('Add Link', 'nestedpages'); ?>" data-parentid="0"><?php _e('Add Link', 'nestedpages'); ?></a> |
| 9 | <?php endif; ?> |
| 10 | </h2> |
| 11 | |
| 12 | <?php if ( $this->confirmation() ) echo $this->confirmation() . '<div style="clear:both;"></div>'; ?> |
| 13 | |
| 14 | <ul class="nestedpages-toggleall" <?php if ( $this->confirmation() ) echo 'style="margin-top:0"';?>> |
| 15 | <li><a href="#" class="np-btn" data-toggle="closed"><?php _e('Expand Pages'); ?></a></li> |
| 16 | </ul> |
| 17 | |
| 18 | <?php if ( current_user_can('edit_theme_options') ) : ?> |
| 19 | <div class="np-sync-menu-cont" <?php if ( $this->confirmation() ) echo 'style="margin-top:2px;"';?>> |
| 20 | <label> |
| 21 | <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'); ?> |
| 22 | </label> |
| 23 | </div> |
| 24 | <?php endif; ?> |
| 25 | |
| 26 | <img src="<?php echo plugins_url(); ?>/wp-nested-pages/assets/images/loading.gif" alt="loading" id="nested-loading" /> |
| 27 | |
| 28 | <ul class="subsubsub"> |
| 29 | <li><a href="#all" class="np-toggle-publish active"><?php _e('All'); ?></a> | </li> |
| 30 | <li><a href="#published" class="np-toggle-publish"><?php _e('Published'); ?></a> | </li> |
| 31 | <li><a href="#show" class="np-toggle-hidden"><?php _e('Show Hidden'); ?></a> | </li> |
| 32 | <?php if ( current_user_can('delete_pages') ) : ?> |
| 33 | <li><a href="edit.php?post_status=trash&post_type=page"> |
| 34 | <?php _e('Trash'); ?> (<?php echo $this->trashCount(); ?>) |
| 35 | </a></li> | </li> |
| 36 | <?php endif; ?> |
| 37 | <li><a href="<?php echo $this->defaultPagesLink(); ?>"><?php _e('Default'); ?> <?php echo $this->post_type->labels->name; ?></a></li> |
| 38 | </ul> |
| 39 | |
| 40 | <div id="np-error" class="updated error" style="clear:both;display:none;"></div> |
| 41 | |
| 42 | <div class="nestedpages"> |
| 43 | <?php $this->loopPages(); ?> |
| 44 | |
| 45 | <div class="quick-edit quick-edit-form" style="display:none;"> |
| 46 | <?php include( NP_Helpers::view('quickedit') ); ?> |
| 47 | </div> |
| 48 | |
| 49 | <?php if ( current_user_can('publish_pages') ) : ?> |
| 50 | <div class="quick-edit quick-edit-form-redirect" style="display:none;"> |
| 51 | <?php include( NP_Helpers::view('quickedit-redirect') ); ?> |
| 52 | </div> |
| 53 | <?php endif; ?> |
| 54 | </div> |
| 55 | |
| 56 | </div><!-- .wrap --> |
| 57 | |
| 58 | <?php include( NP_Helpers::view('link-form') ); ?> |