mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-10-31 15:47:32 -04:00 
			
		
		
		
	Merge pull request #5766 from beganovich/v5-2005-design-updates
(v5) 20.05. design updates
This commit is contained in:
		
						commit
						e18a2f225f
					
				| @ -432,10 +432,6 @@ class Design extends BaseDesign | ||||
|             ? $this->context['variables'] | ||||
|             : ['values' => ['$entity.public_notes' => $this->entity->public_notes, '$entity.terms' => $this->entity->terms, '$entity_footer' => $this->entity->footer], 'labels' => []]; | ||||
| 
 | ||||
|         if ($this->type == 'delivery_note') { | ||||
|             return []; | ||||
|         } | ||||
| 
 | ||||
|         $variables = $this->context['pdf_variables']['total_columns']; | ||||
| 
 | ||||
|         $elements = [ | ||||
| @ -453,6 +449,10 @@ class Design extends BaseDesign | ||||
|             ['element' => 'div', 'properties' => ['class' => 'totals-table-right-side'], 'elements' => []], | ||||
|         ]; | ||||
| 
 | ||||
|         if ($this->type == 'delivery_note') { | ||||
|             return $elements; | ||||
|         } | ||||
| 
 | ||||
|         foreach (['discount'] as $property) { | ||||
|             $variable = sprintf('%s%s', '$', $property); | ||||
| 
 | ||||
|  | ||||
| @ -141,6 +141,7 @@ | ||||
|     } | ||||
| 
 | ||||
|     #table-totals { | ||||
|         margin-top: 1rem; | ||||
|         display: grid; | ||||
|         grid-template-columns: 2fr 1fr; | ||||
|         padding-top: .5rem; | ||||
| @ -241,6 +242,17 @@ | ||||
|             <div class="footer-wrapper" id="footer"> | ||||
|                 <div> | ||||
|                     <p data-ref="total_table-footer">$entity_footer</p> | ||||
| 
 | ||||
|                     <script> | ||||
|                         // Clear up space a bit, if [product-table, tasks-table, delivery-note-table] isn't present. | ||||
|                         document.addEventListener('DOMContentLoaded', () => { | ||||
|                             ['product-table', 'task-table', 'delivery-note-table'].forEach((tableIdentifier) => { | ||||
|                                 document.getElementById(tableIdentifier).childElementCount === 0 | ||||
|                                     ? document.getElementById(tableIdentifier).style.display = 'none' | ||||
|                                     : ''; | ||||
|                             }); | ||||
|                         }); | ||||
|                     </script> | ||||
|                 </div> | ||||
|                 <div> <!-- #2 column --> </div> | ||||
|                 <div> <!-- #3 column --> </div> | ||||
| @ -269,10 +281,10 @@ | ||||
| 
 | ||||
|             <table id="task-table" cellspacing="0"></table> | ||||
| 
 | ||||
|             <div id="table-totals" cellspacing="0"></div> | ||||
| 
 | ||||
|             <table id="delivery-note-table" cellspacing="0"></table> | ||||
| 
 | ||||
|             <div id="table-totals" cellspacing="0"></div> | ||||
|         </td> | ||||
|     </tr> | ||||
|     </tbody> | ||||
| </table> | ||||
| </table> | ||||
| @ -177,6 +177,7 @@ | ||||
|     } | ||||
| 
 | ||||
|     #table-totals { | ||||
|         margin-top: 1rem; | ||||
|         display: grid; | ||||
|         grid-template-columns: 2fr 1fr; | ||||
|         gap: 80px; | ||||
| @ -222,6 +223,10 @@ | ||||
|     [data-ref="total_table-footer"] { | ||||
|         padding-left: 1rem | ||||
|     } | ||||
| 
 | ||||
|     #footer { | ||||
|         margin-top: 30px; | ||||
|     } | ||||
| </style> | ||||
| 
 | ||||
| <div id="header"></div> | ||||
| @ -251,11 +256,22 @@ | ||||
| 
 | ||||
|     <table id="task-table" cellspacing="0"></table> | ||||
| 
 | ||||
|     <div id="table-totals" cellspacing="0"></div> | ||||
| 
 | ||||
|     <table id="delivery-note-table" cellspacing="0"></table> | ||||
|      | ||||
|     <div id="table-totals" cellspacing="0"></div> | ||||
| </div> | ||||
| 
 | ||||
| <div id="footer"> | ||||
|     <p data-ref="total_table-footer">$entity_footer</p> | ||||
| 
 | ||||
|     <script> | ||||
|         // Clear up space a bit, if [product-table, tasks-table, delivery-note-table] isn't present. | ||||
|         document.addEventListener('DOMContentLoaded', () => { | ||||
|             ['product-table', 'task-table', 'delivery-note-table'].forEach((tableIdentifier) => { | ||||
|                 document.getElementById(tableIdentifier).childElementCount === 0 | ||||
|                     ? document.getElementById(tableIdentifier).style.display = 'none' | ||||
|                     : ''; | ||||
|             }); | ||||
|         }); | ||||
|     </script> | ||||
| </div> | ||||
|  | ||||
| @ -148,6 +148,7 @@ | ||||
|     } | ||||
| 
 | ||||
|     #table-totals { | ||||
|         margin-top: 1rem; | ||||
|         display: grid; | ||||
|         grid-template-columns: 2fr 1fr; | ||||
|         padding-top: .5rem; | ||||
| @ -187,8 +188,8 @@ | ||||
|         padding-right: 1rem; | ||||
|     } | ||||
| 
 | ||||
|     [data-ref="total_table-footer"] { | ||||
|         padding-left: 1rem | ||||
|     #footer { | ||||
|         margin-top: 30px; | ||||
|     } | ||||
| </style> | ||||
| 
 | ||||
| @ -217,11 +218,22 @@ | ||||
| 
 | ||||
|     <table id="task-table" cellspacing="0"></table> | ||||
| 
 | ||||
|     <div id="table-totals" cellspacing="0"></div> | ||||
| 
 | ||||
|     <table id="delivery-note-table" cellspacing="0"></table> | ||||
| 
 | ||||
|     <div id="table-totals" cellspacing="0"></div> | ||||
| </div> | ||||
| 
 | ||||
| <div id="footer"> | ||||
|     <p data-ref="total_table-footer">$entity_footer</p> | ||||
|      | ||||
|     <script> | ||||
|         // Clear up space a bit, if [product-table, tasks-table, delivery-note-table] isn't present. | ||||
|         document.addEventListener('DOMContentLoaded', () => { | ||||
|             ['product-table', 'task-table', 'delivery-note-table'].forEach((tableIdentifier) => { | ||||
|                 document.getElementById(tableIdentifier).childElementCount === 0 | ||||
|                     ? document.getElementById(tableIdentifier).style.display = 'none' | ||||
|                     : ''; | ||||
|             }); | ||||
|         }); | ||||
|     </script> | ||||
| </div> | ||||
|  | ||||
| @ -144,6 +144,7 @@ | ||||
|     } | ||||
| 
 | ||||
|     #table-totals { | ||||
|         margin-top: 1rem; | ||||
|         display: grid; | ||||
|         grid-template-columns: 2fr 1fr; | ||||
|         padding-top: 1rem; | ||||
| @ -182,6 +183,10 @@ | ||||
|     [data-ref="total_table-footer"] { | ||||
|         padding-left: 1rem | ||||
|     } | ||||
| 
 | ||||
|     #footer { | ||||
|         margin-top: 30px; | ||||
|     } | ||||
| </style> | ||||
| 
 | ||||
| <div id="header"></div> | ||||
| @ -215,11 +220,22 @@ | ||||
| 
 | ||||
|     <table id="task-table" cellspacing="0"></table> | ||||
| 
 | ||||
|     <div id="table-totals" cellspacing="0"></div> | ||||
| 
 | ||||
|     <table id="delivery-note-table" cellspacing="0"></table> | ||||
|      | ||||
|     <div id="table-totals" cellspacing="0"></div> | ||||
| </div> | ||||
| 
 | ||||
| <div id="footer"> | ||||
|     <p data-ref="total_table-footer">$entity_footer</p> | ||||
| 
 | ||||
|     <script> | ||||
|         // Clear up space a bit, if [product-table, tasks-table, delivery-note-table] isn't present. | ||||
|         document.addEventListener('DOMContentLoaded', () => { | ||||
|             ['product-table', 'task-table', 'delivery-note-table'].forEach((tableIdentifier) => { | ||||
|                 document.getElementById(tableIdentifier).childElementCount === 0 | ||||
|                     ? document.getElementById(tableIdentifier).style.display = 'none' | ||||
|                     : ''; | ||||
|             }); | ||||
|         }); | ||||
|     </script> | ||||
| </div> | ||||
|  | ||||
| @ -137,6 +137,7 @@ | ||||
|     } | ||||
| 
 | ||||
|     #table-totals { | ||||
|         margin-top: 1rem; | ||||
|         display: grid; | ||||
|         grid-template-columns: 2fr 1fr; | ||||
|         padding-top: 0.5rem; | ||||
| @ -180,6 +181,10 @@ | ||||
|     [data-ref="total_table-footer"] { | ||||
|         padding-left: 1rem | ||||
|     } | ||||
| 
 | ||||
|     #footer { | ||||
|         margin-top: 30px; | ||||
|     } | ||||
| </style> | ||||
| 
 | ||||
| <div id="header"></div> | ||||
| @ -219,12 +224,23 @@ | ||||
| 
 | ||||
|     <table id="task-table" cellspacing="0"></table> | ||||
| 
 | ||||
|     <div id="table-totals" cellspacing="0"></div> | ||||
| 
 | ||||
|     <table id="delivery-note-table" cellspacing="0"></table> | ||||
|      | ||||
|     <div id="table-totals" cellspacing="0"></div> | ||||
| </div> | ||||
| 
 | ||||
| <div id="footer"> | ||||
|     <p data-ref="total_table-footer">$entity_footer</p> | ||||
| 
 | ||||
|     <script> | ||||
|         // Clear up space a bit, if [product-table, tasks-table, delivery-note-table] isn't present. | ||||
|         document.addEventListener('DOMContentLoaded', () => { | ||||
|             ['product-table', 'task-table', 'delivery-note-table'].forEach((tableIdentifier) => { | ||||
|                 document.getElementById(tableIdentifier).childElementCount === 0 | ||||
|                     ? document.getElementById(tableIdentifier).style.display = 'none' | ||||
|                     : ''; | ||||
|             }); | ||||
|         }); | ||||
|     </script> | ||||
| </div> | ||||
| 
 | ||||
|  | ||||
| @ -153,6 +153,7 @@ | ||||
|     } | ||||
| 
 | ||||
|     #table-totals { | ||||
|         margin-top: 1rem; | ||||
|         display: grid; | ||||
|         grid-template-columns: 2fr 1fr; | ||||
|         padding-top: 0.5rem; | ||||
| @ -191,6 +192,10 @@ | ||||
|         text-align: right; | ||||
|         padding-right: 1rem; | ||||
|     } | ||||
| 
 | ||||
|     #footer { | ||||
|         margin-top: 30px; | ||||
|     } | ||||
| </style> | ||||
| <div id="header"></div> | ||||
| 
 | ||||
| @ -251,11 +256,22 @@ | ||||
| 
 | ||||
|     <table id="task-table" cellspacing="0"></table> | ||||
| 
 | ||||
|     <div id="table-totals" cellspacing="0"></div> | ||||
| 
 | ||||
|     <table id="delivery-note-table" cellspacing="0"></table> | ||||
| 
 | ||||
|     <div id="table-totals" cellspacing="0"></div> | ||||
| </div> | ||||
| 
 | ||||
| <div id="footer"> | ||||
|     <p data-ref="total_table-footer">$entity_footer</p> | ||||
| 
 | ||||
|     <script> | ||||
|         // Clear up space a bit, if [product-table, tasks-table, delivery-note-table] isn't present. | ||||
|         document.addEventListener('DOMContentLoaded', () => { | ||||
|             ['product-table', 'task-table', 'delivery-note-table'].forEach((tableIdentifier) => { | ||||
|                 document.getElementById(tableIdentifier).childElementCount === 0 | ||||
|                     ? document.getElementById(tableIdentifier).style.display = 'none' | ||||
|                     : ''; | ||||
|             }); | ||||
|         }); | ||||
|     </script> | ||||
| </div> | ||||
|  | ||||
| @ -249,6 +249,17 @@ | ||||
|                     <div class="footer-content"> | ||||
|                         <div> | ||||
|                             <p data-ref="total_table-footer">$entity_footer</p> | ||||
| 
 | ||||
|                             <script> | ||||
|                                 // Clear up space a bit, if [product-table, tasks-table, delivery-note-table] isn't present. | ||||
|                                 document.addEventListener('DOMContentLoaded', () => { | ||||
|                                     ['product-table', 'task-table', 'delivery-note-table'].forEach((tableIdentifier) => { | ||||
|                                         document.getElementById(tableIdentifier).childElementCount === 0 | ||||
|                                             ? document.getElementById(tableIdentifier).style.display = 'none' | ||||
|                                             : ''; | ||||
|                                     }); | ||||
|                                 }); | ||||
|                             </script> | ||||
|                         </div> | ||||
|                         <div id="company-details"></div> | ||||
|                         <div id="company-address"></div> | ||||
|  | ||||
| @ -117,6 +117,7 @@ | ||||
|     } | ||||
| 
 | ||||
|     #table-totals { | ||||
|         margin-top: 1rem; | ||||
|         display: grid; | ||||
|         grid-template-columns: 2fr 1fr; | ||||
|         padding-top: .5rem; | ||||
| @ -154,6 +155,10 @@ | ||||
|     [data-ref="total_table-footer"] { | ||||
|         padding-left: 1rem | ||||
|     } | ||||
| 
 | ||||
|     #footer { | ||||
|         margin-top: 30px; | ||||
|     } | ||||
| </style> | ||||
| <div id="header"></div> | ||||
| 
 | ||||
| @ -179,11 +184,22 @@ | ||||
| 
 | ||||
|     <table id="task-table" cellspacing="0"></table> | ||||
| 
 | ||||
|     <div id="table-totals" cellspacing="0"></div> | ||||
| 
 | ||||
|     <table id="delivery-note-table" cellspacing="0"></table> | ||||
| 
 | ||||
|     <div id="table-totals" cellspacing="0"></div> | ||||
| </div> | ||||
| 
 | ||||
| <div id="footer"> | ||||
|     <p data-ref="total_table-footer">$entity_footer</p> | ||||
| 
 | ||||
|     <script> | ||||
|         // Clear up space a bit, if [product-table, tasks-table, delivery-note-table] isn't present. | ||||
|         document.addEventListener('DOMContentLoaded', () => { | ||||
|             ['product-table', 'task-table', 'delivery-note-table'].forEach((tableIdentifier) => { | ||||
|                 document.getElementById(tableIdentifier).childElementCount === 0 | ||||
|                     ? document.getElementById(tableIdentifier).style.display = 'none' | ||||
|                     : ''; | ||||
|             }); | ||||
|         }); | ||||
|     </script> | ||||
| </div> | ||||
|  | ||||
| @ -169,6 +169,7 @@ | ||||
|     } | ||||
| 
 | ||||
|     #table-totals { | ||||
|         margin-top: 1rem; | ||||
|         display: grid; | ||||
|         grid-template-columns: 2fr 1fr; | ||||
|         gap: 80px; | ||||
| @ -227,6 +228,10 @@ | ||||
|         padding-left: 3rem; | ||||
|         padding-right: 3rem; | ||||
|     } | ||||
| 
 | ||||
|     #footer { | ||||
|         margin-top: 1rem; | ||||
|     } | ||||
| </style> | ||||
| 
 | ||||
| 
 | ||||
| @ -275,12 +280,23 @@ | ||||
| 
 | ||||
|     <table id="task-table" cellspacing="0"></table> | ||||
| 
 | ||||
|     <div id="table-totals" cellspacing="0"></div> | ||||
| 
 | ||||
|     <table id="delivery-note-table" cellspacing="0"></table> | ||||
| 
 | ||||
|     <div id="table-totals" cellspacing="0"></div> | ||||
| </div> | ||||
| 
 | ||||
| <div id="footer"> | ||||
|     <p data-ref="total_table-footer">$entity_footer/p> | ||||
|     <p data-ref="total_table-footer">$entity_footer</p> | ||||
| 
 | ||||
|     <script> | ||||
|         // Clear up space a bit, if [product-table, tasks-table, delivery-note-table] isn't present. | ||||
|         document.addEventListener('DOMContentLoaded', () => { | ||||
|             ['product-table', 'task-table', 'delivery-note-table'].forEach((tableIdentifier) => { | ||||
|                 document.getElementById(tableIdentifier).childElementCount === 0 | ||||
|                     ? document.getElementById(tableIdentifier).style.display = 'none' | ||||
|                     : ''; | ||||
|             }); | ||||
|         }); | ||||
|     </script> | ||||
| </div> | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user