Merge branch 'labels_paper_types' of https://github.com/AndreasK79/Cloudlog into labels_paper_types
这个提交包含在:
		
						当前提交
						3974fba6bb
					
				
					共有  2 个文件被更改,包括 31 次插入 和 17 次删除
				
			
		|  | @ -162,7 +162,7 @@ class Labels extends CI_Controller { | ||||||
| 		try { | 		try { | ||||||
| 			if ($label) { | 			if ($label) { | ||||||
| 				$ptype=$this->labels_model->getPaperType($label->paper_type_id);	// fetch papersize out of paper-table
 | 				$ptype=$this->labels_model->getPaperType($label->paper_type_id);	// fetch papersize out of paper-table
 | ||||||
| 				// var_dump($ptype);
 | 				if (($ptype->paper_id ?? '') != '') { | ||||||
| 					$pdf = new PDF_Label(array( | 					$pdf = new PDF_Label(array( | ||||||
| 						'paper-size'	=> 'custom', 				// $label->paper_type,	// The only Type left is "custom" because A4 and so on are also defined at paper_types
 | 						'paper-size'	=> 'custom', 				// $label->paper_type,	// The only Type left is "custom" because A4 and so on are also defined at paper_types
 | ||||||
| 						'metric'		=> $label->metric, | 						'metric'		=> $label->metric, | ||||||
|  | @ -178,6 +178,16 @@ class Labels extends CI_Controller { | ||||||
| 						'pgX'		=> $ptype->width, | 						'pgX'		=> $ptype->width, | ||||||
| 						'pgY'		=> $ptype->height | 						'pgY'		=> $ptype->height | ||||||
| 					)); | 					)); | ||||||
|  | 				} else { | ||||||
|  | 					if ($jscall) { | ||||||
|  | 						header('Content-Type: application/json'); | ||||||
|  | 						echo json_encode(array('message' => 'You need to assign a paperType to the label before printing')); | ||||||
|  | 						return; | ||||||
|  | 					} else { | ||||||
|  | 						$this->session->set_flashdata('error', 'You need to assign a paperType to the label before printing'); | ||||||
|  | 						redirect('labels'); | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
| 			} else { | 			} else { | ||||||
| 				if ($jscall) { | 				if ($jscall) { | ||||||
| 					header('Content-Type: application/json'); | 					header('Content-Type: application/json'); | ||||||
|  | @ -204,7 +214,7 @@ class Labels extends CI_Controller { | ||||||
| 
 | 
 | ||||||
| 		if ($label->font == 'DejaVuSans') {	// leave this here, for future Use
 | 		if ($label->font == 'DejaVuSans') {	// leave this here, for future Use
 | ||||||
| 			$pdf->AddFont($label->font,'','DejaVuSansMono.ttf',true); | 			$pdf->AddFont($label->font,'','DejaVuSansMono.ttf',true); | ||||||
| 			$pdf->SetFont($label->font); | 			$pdf->SetFont($label->font,''); | ||||||
| 		} else { | 		} else { | ||||||
| 			$pdf->AddFont($label->font); | 			$pdf->AddFont($label->font); | ||||||
| 			$pdf->SetFont($label->font); | 			$pdf->SetFont($label->font); | ||||||
|  |  | ||||||
|  | @ -91,7 +91,11 @@ | ||||||
| 			<td><?php echo $label->height; ?></td>
 | 			<td><?php echo $label->height; ?></td>
 | ||||||
| 			<td><?php echo $label->font_size; ?></td>
 | 			<td><?php echo $label->font_size; ?></td>
 | ||||||
| 			<td><?php echo $label->qsos; ?></td>
 | 			<td><?php echo $label->qsos; ?></td>
 | ||||||
|  | 			<?php if (($label->paper_name ?? '') == '') { ?>
 | ||||||
|  | 			<td></td> | ||||||
|  | 			<?php } else { ?>
 | ||||||
| 			<td><input type="checkbox" <?php if ($label->useforprint == 1) {echo 'checked';}?>></td>
 | 			<td><input type="checkbox" <?php if ($label->useforprint == 1) {echo 'checked';}?>></td>
 | ||||||
|  | 			<?php } ?>
 | ||||||
| 			<td><a href="<?php echo site_url('labels/edit/' . $label->id); ?>" class="btn btn-outline-primary btn-sm"><i class="fas fa-edit"></i></a></td> | 			<td><a href="<?php echo site_url('labels/edit/' . $label->id); ?>" class="btn btn-outline-primary btn-sm"><i class="fas fa-edit"></i></a></td> | ||||||
| 			<td><a href="<?php echo site_url('labels/delete/' . $label->id); ?>" class="btn btn-outline-danger btn-sm"><i class="fas fa-trash-alt"></i></a></td> | 			<td><a href="<?php echo site_url('labels/delete/' . $label->id); ?>" class="btn btn-outline-danger btn-sm"><i class="fas fa-trash-alt"></i></a></td> | ||||||
| 			</tr> | 			</tr> | ||||||
|  |  | ||||||
		正在加载…
	
		在新工单中引用