| @@ -142,12 +142,14 @@ | ||
| 142 | 142 | <a target="_blank" href="<?php echo esc_url($template->extension()->item($template->get('item1'))->url); ?>" class="e2pdf-link"> |
| 143 | 143 | <?php echo esc_html($template->extension()->item($template->get('item1'))->name) ?> |
| 144 | 144 | </a> |
| 145 | 145 | <?php } else { ?> |
| 146 | - <?php echo esc_html($template->extension()->item($template->get('item1'))->name) ?> | |
| 146 | + <?php echo $template->extension()->item($template->get('item1'))->name ? esc_html($template->extension()->item($template->get('item1'))->name) : __('N/A', 'e2pdf'); ?> | |
| 147 | 147 | <?php } ?> |
| 148 | 148 | <?php } ?> |
| 149 | - | | |
| 149 | + <?php if ($template->get('item1') && $template->get('item2')) { ?> | |
| 150 | + | | |
| 151 | + <?php } ?> | |
| 150 | 152 | <?php if ($template->get('item2')) { ?> |
| 151 | 153 | <?php if ($template->extension()->item($template->get('item2'))->url) { ?> |
| 152 | 154 | <a target="_blank" href="<?php echo esc_url($template->extension()->item($template->get('item2'))->url); ?>" class="e2pdf-link"> |
| 153 | 155 | <?php echo esc_html($template->extension()->item($template->get('item2'))->name) ?> |
| @@ -152,9 +154,9 @@ | ||
| 152 | 154 | <a target="_blank" href="<?php echo esc_url($template->extension()->item($template->get('item2'))->url); ?>" class="e2pdf-link"> |
| 153 | 155 | <?php echo esc_html($template->extension()->item($template->get('item2'))->name) ?> |
| 154 | 156 | </a> |
| 155 | 157 | <?php } else { ?> |
| 156 | - <?php echo esc_html($template->extension()->item($template->get('item2'))->name) ?> | |
| 158 | + <?php echo $template->extension()->item($template->get('item2'))->name ? esc_html($template->extension()->item($template->get('item2'))->name) : __('N/A', 'e2pdf'); ?> | |
| 157 | 159 | <?php } ?> |
| 158 | 160 | <?php } ?> |
| 159 | 161 | <?php } else { ?> |
| 160 | 162 | — |
| @@ -162,9 +164,9 @@ | ||
| 162 | 164 | <?php } else { ?> |
| 163 | 165 | <?php if ($template->extension()->item()->url) { ?> |
| 164 | 166 | <a target="_blank" href="<?php echo esc_url($template->extension()->item()->url); ?>"><?php echo esc_html($template->extension()->item()->name); ?></a> |
| 165 | 167 | <?php } else { ?> |
| 166 | - <?php echo esc_html($template->extension()->item()->name); ?> | |
| 168 | + <?php echo $template->extension()->item()->name ? esc_html($template->extension()->item()->name) : __('N/A', 'e2pdf'); ?> | |
| 167 | 169 | <?php } ?> |
| 168 | 170 | <?php } ?> |
| 169 | 171 | <?php } else { ?> |
| 170 | 172 | — |
| @@ -279,9 +281,9 @@ | ||
| 279 | 281 | )); |
| 280 | 282 | } |
| 281 | 283 | $this->render('blocks', 'pagination', array( |
| 282 | 284 | 'total' => $this->controller->get_templates_list($this->get->get(), true), |
| 283 | - 'limit' => (int) get_option('e2pdf_templates_screen_per_page', '20') > '0' ? get_option('e2pdf_templates_screen_per_page', '20') : '20', | |
| 285 | + 'limit' => (int) get_option('e2pdf_templates_screen_per_page', '20'), | |
| 284 | 286 | 'paged' => $this->get->get('paged') && (int) $this->get->get('paged') > '0' ? (int) $this->get->get('paged') : '1', |
| 285 | 287 | 'url' => array('page' => 'e2pdf-templates', 'action' => $this->get->get('action'), 'status' => $this->get->get('status'), 's' => $this->get->get('s'), 'orderby' => $this->get->get('orderby'), 'order' => $this->get->get('order')) |
| 286 | 288 | )); |
| 287 | 289 | ?> |