Ver Fonte

Adjust responsive layout

Alan Lam há 3 anos atrás
pai
commit
a0c6e10903
2 ficheiros alterados com 150 adições e 135 exclusões
  1. 119 111
      views/document.php
  2. 31 24
      views/sale.php

+ 119 - 111
views/document.php

@@ -222,129 +222,137 @@ $location = $document->getLocation();
 
 			</div>
 			<div class="col-xl-4">
-				<?php
-				$root_document = $document->getRootDocument();
-
-				View::include("related_items_section", [
-					"sale" => $root_document->getSale(),
-					"document" => $root_document,
-					"current" => $document
-				]);
-				?>
 
-				<h4><?=htmlspecialchars(__("Additional Details"))?></h4>
-
-				<?php
-				if($document->isSalesOrder()) {
-					?>
-					<div class="mb-3">
-						<label for="dts-finalised" class="form-label">
-							<?=htmlspecialchars(__("Date/Time Finalised"))?>
-						</label>
-						<input class="form-control" type="datetime-local" name="dts_finalised" id="dts-finalised" value="<?=$document->dts_finalised?>" />
-					</div>
-					<div class="mb-3">
-						<label for="dts-paid" class="form-label">
-							<?=htmlspecialchars(__("Date/Time Paid"))?>
-						</label>
-						<input class="form-control" type="datetime-local" name="dts_paid" id="dts-paid" value="<?=$document->dts_paid?>" />
-					</div>
-					<?php
-				}
-				?>
+				<div class="row">
+					<div class="col-sm-6 col-xl-12">
+						<?php
+						$root_document = $document->getRootDocument();
 
-				<div class="mb-3">
-					<label for="delivery-company" class="form-label">
-						<?=htmlspecialchars(__("Delivery Company"))?>
-					</label>
-					<input type="text" class="form-control" name="delivery_company" id="delivery-company" placeholder="<?=htmlspecialchars(__("Type delivery company"))?>" value="<?=htmlspecialchars($document->delivery_company)?>" list="delivery-company-options" />
-					<datalist id="delivery-company-options">
-						<option value="Royal Mail"></option>
-						<option value="FedEx"></option>
-						<option value="DHL"></option>
-						<option value="UPS"></option>
-						<option value="Palletways"></option>
-						<option value="Evri"></option>
-						<option value="Hermes"></option>
-						<option value="Other"></option>
-					</datalist>
-				</div>
-				<div class="mb-3">
-					<label for="tracking-number" class="form-label">
-						<?=htmlspecialchars(__("Tracking Number"))?>
-					</label>
-					<input type="text" class="form-control" name="tracking_number" id="tracking-number" placeholder="<?=htmlspecialchars(__("Type tracking number"))?>" value="<?=htmlspecialchars($document->tracking_number)?>" />
-				</div>
-				<?php
-				if($document->isDeliveryNote() && $document->isPartOfAru()) {
-					?>
-					<div class="mb-3">
-						<label for="delivery-cost" class="form-label">
-							<?=htmlspecialchars(__("Delivery Cost"))?>
-						</label>
-						<input type="number" class="form-control" name="delivery_cost" id="delivery-cost" placeholder="<?=htmlspecialchars(__("Type delivery cost"))?>" value="<?=htmlspecialchars($document->delivery_cost)?>" min="0" required />
+						View::include("related_items_section", [
+							"sale" => $root_document->getSale(),
+							"document" => $root_document,
+							"current" => $document
+						]);
+						?>
 					</div>
-					<?php
-				}
-				?>
+					<div class="col-sm-6 col-xl-12">
+						<section class="mb-4">
+							<h4><?=htmlspecialchars(__("Additional Details"))?></h4>
 
-				<div class="mb-3">
-					<label for="contact-name" class="form-label">
-						<?=htmlspecialchars(__("Contact Name"))?>
-					</label>
-					<input type="text" class="form-control" name="contact_name" id="contact-name" placeholder="<?=htmlspecialchars(__("Type contact name"))?>" value="<?=htmlspecialchars($document->contact_name)?>" />
-				</div>
-				<div class="mb-3">
-					<label for="contact-phone" class="form-label">
-						<?=htmlspecialchars(__("Contact Phone / Mobile"))?>
-					</label>
-					<input type="tel" class="form-control" name="contact_phone" id="contact-phone" placeholder="<?=htmlspecialchars(__("Type contact phone or mobile number"))?>" value="<?=htmlspecialchars($document->contact_phone)?>" />
-				</div>
-				<div class="mb-3">
-					<label for="contact-email" class="form-label">
-						<?=htmlspecialchars(__("Contact Email Address"))?>
-					</label>
-					<input type="text" class="form-control" name="contact_email" id="contact-email" placeholder="<?=htmlspecialchars(__("Type contact email address"))?>" value="<?=htmlspecialchars($document->contact_email)?>" />
-				</div>
+							<?php
+							if($document->isSalesOrder()) {
+								?>
+								<div class="mb-3">
+									<label for="dts-finalised" class="form-label">
+										<?=htmlspecialchars(__("Date/Time Finalised"))?>
+									</label>
+									<input class="form-control" type="datetime-local" name="dts_finalised" id="dts-finalised" value="<?=$document->dts_finalised?>" />
+								</div>
+								<div class="mb-3">
+									<label for="dts-paid" class="form-label">
+										<?=htmlspecialchars(__("Date/Time Paid"))?>
+									</label>
+									<input class="form-control" type="datetime-local" name="dts_paid" id="dts-paid" value="<?=$document->dts_paid?>" />
+								</div>
+								<?php
+							}
+							?>
 
-				<dl>
-					<?php
-					if($document->isAru()) {
-						$tickets = $document->getTickets();
-						if($tickets) {
+							<div class="mb-3">
+								<label for="delivery-company" class="form-label">
+									<?=htmlspecialchars(__("Delivery Company"))?>
+								</label>
+								<input type="text" class="form-control" name="delivery_company" id="delivery-company" placeholder="<?=htmlspecialchars(__("Type delivery company"))?>" value="<?=htmlspecialchars($document->delivery_company)?>" list="delivery-company-options" />
+								<datalist id="delivery-company-options">
+									<option value="Royal Mail"></option>
+									<option value="FedEx"></option>
+									<option value="DHL"></option>
+									<option value="UPS"></option>
+									<option value="Palletways"></option>
+									<option value="Evri"></option>
+									<option value="Hermes"></option>
+									<option value="Other"></option>
+								</datalist>
+							</div>
+							<div class="mb-3">
+								<label for="tracking-number" class="form-label">
+									<?=htmlspecialchars(__("Tracking Number"))?>
+								</label>
+								<input type="text" class="form-control" name="tracking_number" id="tracking-number" placeholder="<?=htmlspecialchars(__("Type tracking number"))?>" value="<?=htmlspecialchars($document->tracking_number)?>" />
+							</div>
+							<?php
+							if($document->isDeliveryNote() && $document->isPartOfAru()) {
+								?>
+								<div class="mb-3">
+									<label for="delivery-cost" class="form-label">
+										<?=htmlspecialchars(__("Delivery Cost"))?>
+									</label>
+									<input type="number" class="form-control" name="delivery_cost" id="delivery-cost" placeholder="<?=htmlspecialchars(__("Type delivery cost"))?>" value="<?=htmlspecialchars($document->delivery_cost)?>" min="0" required />
+								</div>
+								<?php
+							}
 							?>
-							<dt><?=htmlspecialchars(__("Related Tickets"))?></dt>
-							<dd>
+
+							<div class="mb-3">
+								<label for="contact-name" class="form-label">
+									<?=htmlspecialchars(__("Contact Name"))?>
+								</label>
+								<input type="text" class="form-control" name="contact_name" id="contact-name" placeholder="<?=htmlspecialchars(__("Type contact name"))?>" value="<?=htmlspecialchars($document->contact_name)?>" />
+							</div>
+							<div class="mb-3">
+								<label for="contact-phone" class="form-label">
+									<?=htmlspecialchars(__("Contact Phone / Mobile"))?>
+								</label>
+								<input type="tel" class="form-control" name="contact_phone" id="contact-phone" placeholder="<?=htmlspecialchars(__("Type contact phone or mobile number"))?>" value="<?=htmlspecialchars($document->contact_phone)?>" />
+							</div>
+							<div class="mb-3">
+								<label for="contact-email" class="form-label">
+									<?=htmlspecialchars(__("Contact Email Address"))?>
+								</label>
+								<input type="text" class="form-control" name="contact_email" id="contact-email" placeholder="<?=htmlspecialchars(__("Type contact email address"))?>" value="<?=htmlspecialchars($document->contact_email)?>" />
+							</div>
+
+							<dl>
 								<?php
-								foreach($tickets as $ticket) {
-									?>
-									<a href="<?=htmlspecialchars($ticket->getUrl())?>"><?=htmlspecialchars(__("Ticket %d - %s", $ticket->id, $ticket->subject))?></a>
-									<?php
+								if($document->isAru()) {
+									$tickets = $document->getTickets();
+									if($tickets) {
+										?>
+										<dt><?=htmlspecialchars(__("Related Tickets"))?></dt>
+										<dd>
+											<?php
+											foreach($tickets as $ticket) {
+												?>
+												<a href="<?=htmlspecialchars($ticket->getUrl())?>"><?=htmlspecialchars(__("Ticket %d - %s", $ticket->id, $ticket->subject))?></a>
+												<?php
+											}
+											?>
+										</dd>
+										<?php
+									}
 								}
 								?>
-							</dd>
-							<?php
-						}
-					}
-					?>
 
-					<dt><?=htmlspecialchars(__("Created By"))?></dt>
-					<dd><?=htmlspecialchars($document->getUser()->getDisplayName())?></dd>
+								<dt><?=htmlspecialchars(__("Created By"))?></dt>
+								<dd><?=htmlspecialchars($document->getUser()->getDisplayName())?></dd>
 
-					<dt><?=htmlspecialchars(__("Date/Time Created"))?></dt>
-					<dd><?=htmlspecialchars($user->formatDateTime($document->getDateTimeCreated()))?></dd>
+								<dt><?=htmlspecialchars(__("Date/Time Created"))?></dt>
+								<dd><?=htmlspecialchars($user->formatDateTime($document->getDateTimeCreated()))?></dd>
 
-					<?php
-					if($location) {
-						?>
-						<dt><?=htmlspecialchars(__("Location"))?></dt>
-						<dd>
-							<a href="<?=htmlspecialchars($location->getUrl())?>"><?=htmlspecialchars($location->getDisplayName())?></a>
-						</dd>
-						<?php
-					}
-					?>
-				</dl>
+								<?php
+								if($location) {
+									?>
+									<dt><?=htmlspecialchars(__("Location"))?></dt>
+									<dd>
+										<a href="<?=htmlspecialchars($location->getUrl())?>"><?=htmlspecialchars($location->getDisplayName())?></a>
+									</dd>
+									<?php
+								}
+								?>
+							</dl>
+						</section>
+					</div>
+				</div>
 			</div>
 		</div>
 

+ 31 - 24
views/sale.php

@@ -88,30 +88,37 @@ $location = $sale->getLocation();
 			</div>
 			<div class="col-xl-4">
 
-				<?php
-				View::include("related_items_section", [
-					"sale" => $sale,
-					"current" => $sale
-				]);
-				?>
-
-				<h4><?=htmlspecialchars(__("Additional Details"))?></h4>
-
-				<dl>
-					<dt><?=htmlspecialchars(__("Location"))?></dt>
-					<dd>
-						<a href="<?=htmlspecialchars($location->getUrl())?>">
-							<?=htmlspecialchars($location->getDisplayName())?>
-						</a>
-					</dd>
-
-					<dt><?=htmlspecialchars(__("Created By"))?></dt>
-					<dd><?=htmlspecialchars($sale->getUser()->getDisplayName())?></dd>
-
-					<dt><?=htmlspecialchars(__("Created Date/Time"))?></dt>
-					<dd><?=htmlspecialchars($sale->getDateTimeCreated()->format("d/m/Y H:i"))?></dd>
-
-				</dl>
+				<div class="row">
+					<div class="col-sm-6 col-xl-12">
+						<?php
+						View::include("related_items_section", [
+							"sale" => $sale,
+							"current" => $sale
+						]);
+						?>
+					</div>
+					<div class="col-sm-6 col-xl-12">
+						<section class="mb-4">
+							<h4><?=htmlspecialchars(__("Additional Details"))?></h4>
+
+							<dl>
+								<dt><?=htmlspecialchars(__("Location"))?></dt>
+								<dd>
+									<a href="<?=htmlspecialchars($location->getUrl())?>">
+										<?=htmlspecialchars($location->getDisplayName())?>
+									</a>
+								</dd>
+
+								<dt><?=htmlspecialchars(__("Created By"))?></dt>
+								<dd><?=htmlspecialchars($sale->getUser()->getDisplayName())?></dd>
+
+								<dt><?=htmlspecialchars(__("Created Date/Time"))?></dt>
+								<dd><?=htmlspecialchars($sale->getDateTimeCreated()->format("d/m/Y H:i"))?></dd>
+
+							</dl>
+						</section>
+					</div>
+				</div>
 			</div>
 		</div>