| @@ -49,9 +49,9 @@ | ||
| 49 | 49 | </div> |
| 50 | 50 | </div> |
| 51 | 51 | <div class="misc-pub-section"> |
| 52 | 52 | <div class="e2pdf-grid"> |
| 53 | - <div class="e2pdf-ib e2pdf-w50 e2pdf-pr5 e2pdf-align-left e2pdf-mt5"> | |
| 53 | + <div class="e2pdf-ib e2pdf-w50 e2pdf-pr5 e2pdf-align-left"> | |
| 54 | 54 | <?php if ($this->view->template->get('pdf')) { ?> |
| 55 | 55 | <a class="e2pdf-link" title="<?php _e('Download Original PDF', 'e2pdf') ?>" target="_blank" href="<?php echo esc_url($this->helper->get_upload_url('pdf/' . $this->view->template->get('pdf') . '/' . $this->view->template->get('pdf') . '.pdf')); ?>"><i class="dashicons dashicons-download"></i></a> |
| 56 | 56 | <?php if (!$this->get->get('revision_id')) { ?> |
| 57 | 57 | <a class="e2pdf-link e2pdf-modal" data-modal="pdf-reupload" title="<?php _e('Replace PDF', 'e2pdf') ?>" href="javascript:void(0);"><i class="dashicons dashicons-upload"></i></a> |
| @@ -61,8 +61,9 @@ | ||
| 61 | 61 | <?php if ($this->get->get('action') === 'edit' && !$this->get->get('revision_id')) { ?> |
| 62 | 62 | <a class="e2pdf-link e2pdf-modal" data-modal="pdf-reupload" title="<?php _e('Upload PDF', 'e2pdf') ?>" href="javascript:void(0);"><i class="dashicons dashicons-upload"></i></a> |
| 63 | 63 | <?php } ?> |
| 64 | 64 | <?php } ?> |
| 65 | + <br/><a <?php if ($this->get->get('action') !== 'edit') { ?>disabled="disabled"<?php } ?> target="_blank" href="<?php echo esc_url($this->helper->get_url(array('page' => 'e2pdf-templates', 'action' => 'download', 'id' => $this->view->template->get('ID')))); ?>" class="e2pdf-ib e2pdf-link e2pdf-mt6"><?php _e('Download', 'e2pdf'); ?></a> | |
| 65 | 66 | </div><div class="e2pdf-ib e2pdf-w50 e2pdf-pl5 e2pdf-center"> |
| 66 | 67 | <a <?php if ($this->get->get('action') !== 'edit') { ?>disabled="disabled"<?php } ?> target="_blank" href="<?php echo esc_url($this->helper->get_url(array('page' => 'e2pdf-templates', 'action' => 'view', 'id' => $this->view->template->get('ID')))); ?>" class="e2pdf-ib e2pdf-link"><?php _e('View Saved', 'e2pdf'); ?></a><br/> |
| 67 | 68 | <a <?php if (!$this->view->template->get('activated')) { ?>disabled="disabled"<?php } ?> target="_blank" href="<?php echo esc_url($this->helper->get_url(array('page' => 'e2pdf', 'id' => $this->view->template->get('ID')))); ?>" class="e2pdf-ib e2pdf-link e2pdf-mt6 e2pdf-generate-pdf-button"><?php _e('Create PDF', 'e2pdf'); ?></a> |
| 68 | 69 | </div> |
| @@ -120,12 +121,14 @@ | ||
| 120 | 121 | <a target="_blank" href="<?php echo esc_url($this->view->template->extension()->item($this->view->template->get('item1'))->url); ?>" class="e2pdf-link"> |
| 121 | 122 | <?php echo esc_html($this->view->template->extension()->item($this->view->template->get('item1'))->name); ?> |
| 122 | 123 | </a> |
| 123 | 124 | <?php } else { ?> |
| 124 | - <?php echo esc_html($this->view->template->extension()->item($this->view->template->get('item1'))->name); ?> | |
| 125 | + <?php echo $this->view->template->extension()->item($this->view->template->get('item1'))->name ? esc_html($this->view->template->extension()->item($this->view->template->get('item1'))->name) : __('N/A', 'e2pdf'); ?> | |
| 125 | 126 | <?php } ?> |
| 126 | 127 | <?php } ?> |
| 127 | - | | |
| 128 | + <?php if ($this->view->template->get('item1') && $this->view->template->get('item2')) { ?> | |
| 129 | + | | |
| 130 | + <?php } ?> | |
| 128 | 131 | <?php if ($this->view->template->get('item2')) { ?> |
| 129 | 132 | <?php if ($this->view->template->extension()->item($this->view->template->get('item2'))->url) { ?> |
| 130 | 133 | <a target="_blank" href="<?php echo esc_url($this->view->template->extension()->item($this->view->template->get('item2'))->url); ?>" class="e2pdf-link"> |
| 131 | 134 | <?php echo esc_html($this->view->template->extension()->item($this->view->template->get('item2'))->name); ?> |
| @@ -130,9 +133,9 @@ | ||
| 130 | 133 | <a target="_blank" href="<?php echo esc_url($this->view->template->extension()->item($this->view->template->get('item2'))->url); ?>" class="e2pdf-link"> |
| 131 | 134 | <?php echo esc_html($this->view->template->extension()->item($this->view->template->get('item2'))->name); ?> |
| 132 | 135 | </a> |
| 133 | 136 | <?php } else { ?> |
| 134 | - <?php echo esc_html($this->view->template->extension()->item($this->view->template->get('item2'))->name); ?> | |
| 137 | + <?php echo $this->view->template->extension()->item($this->view->template->get('item2'))->name ? esc_html($this->view->template->extension()->item($this->view->template->get('item2'))->name) : __('N/A', 'e2pdf'); ?> | |
| 135 | 138 | <?php } ?> |
| 136 | 139 | <?php } ?> |
| 137 | 140 | <?php } else { ?> |
| 138 | 141 | <a href="javascript:void(0);" class="e2pdf-link e2pdf-modal e2pdf-color-red" data-modal="tpl-options" <?php if ($this->get->get('revision_id')) { ?>disabled="disabled"<?php } ?> href="javascript:void(0);"><?php _e('Not linked', 'e2pdf'); ?></a> |
| @@ -140,9 +143,9 @@ | ||
| 140 | 143 | <?php } else { ?> |
| 141 | 144 | <?php if ($this->view->template->extension()->item()->url) { ?> |
| 142 | 145 | <a target="_blank" href="<?php echo esc_url($this->view->template->extension()->item()->url); ?>" class="e2pdf-link"><?php echo esc_html($this->view->template->extension()->item()->name); ?></a> |
| 143 | 146 | <?php } else { ?> |
| 144 | - <?php echo esc_html($this->view->template->extension()->item()->name); ?> | |
| 147 | + <?php echo $this->view->template->extension()->item()->name ? esc_html($this->view->template->extension()->item()->name) : __('N/A', 'e2pdf'); ?> | |
| 145 | 148 | <?php } ?> |
| 146 | 149 | <?php } ?> |
| 147 | 150 | <?php } else { ?> |
| 148 | 151 | <a href="javascript:void(0);" class="e2pdf-link e2pdf-modal e2pdf-color-red" data-modal="tpl-options" <?php if ($this->get->get('revision_id')) { ?>disabled="disabled"<?php } ?> href="javascript:void(0);"><?php _e('Not linked', 'e2pdf'); ?></a> |