Added more Roles (address types)
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
<div class="col-lg-10">
|
||||
<select class="select2 form-control " name="parent_id" id="parent_id">
|
||||
<option></option>
|
||||
<?php foreach($parents as $parent): ?>
|
||||
<?php foreach($parents as $parent): if($parent->id == $address->id) continue; ?>
|
||||
<option value="<?=$parent->id?>" <?=($address->parent_id == $parent->id) ? "selected='selected'" : ""?>><?=($parent->company) ? $parent->company : $parent->getFullName()?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
@@ -120,15 +120,22 @@
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="addresstypes">Addresstyp</label>
|
||||
<label class="col-lg-2 col-form-label" for="addresstypes">Rolle</label>
|
||||
<div class="col-lg-10">
|
||||
<select class="select2 form-control select2-multiple" name="addresstypes[]" id="addresstypes" multiple="multiple" data-placeholder="Choose ...">
|
||||
<option value="owner" <?=(array_key_exists("owner", $address->types)) ? "selected='selected'" : ""?>><?=__("owner")?></option>
|
||||
<option value="systemowner" <?=(array_key_exists("systemowner", $address->types)) ? "selected='selected'" : ""?>><?=__("systemowner")?></option>
|
||||
<option value="netowner" <?=(array_key_exists("netowner", $address->types)) ? "selected='selected'" : "netowner"?>><?=__("netowner")?></option>
|
||||
<option value="salespartner" <?=(array_key_exists("salespartner", $address->types)) ? "selected='selected'" : "salespartner"?>><?=__("salespartner")?></option>
|
||||
<option value="pipeworker" <?=(array_key_exists("pipeworker", $address->types)) ? "selected='selected'" : "pipeworker"?>><?=__("pipeworker")?></option>
|
||||
<option value="lineworker" <?=(array_key_exists("lineworker", $address->types)) ? "selected='selected'" : "lineworker"?>><?=__("lineworker")?></option>
|
||||
<option value="netoperator" <?=(array_key_exists("netoperator", $address->types)) ? "selected='selected'" : "netoperator"?>><?=__("netoperator")?></option>
|
||||
<option value="support" <?=(array_key_exists("support", $address->types)) ? "selected='selected'" : "support"?>><?=__("support")?></option>
|
||||
<option value="billing" <?=(array_key_exists("billing", $address->types)) ? "selected='selected'" : ""?>><?=__("billing")?></option>
|
||||
<option value="employee" <?=(array_key_exists("employee", $address->types)) ? "selected='selected'" : ""?>><?=__("employee")?></option>
|
||||
<option value="customer" <?=(array_key_exists("customer", $address->types)) ? "selected='selected'" : ""?>><?=__("customer")?></option>
|
||||
<option value="supplier" <?=(array_key_exists("supplier", $address->types)) ? "selected='selected'" : ""?>><?=__("supplier")?></option>
|
||||
<option value="contact" <?=(array_key_exists("contact", $address->types)) ? "selected='selected'" : ""?>><?=__("contact")?></option>
|
||||
<option value="billing" <?=(array_key_exists("billing", $address->types)) ? "selected='selected'" : ""?>><?=__("billing")?></option>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -44,7 +44,6 @@
|
||||
<?php if(is_array($filter['addresstype']) && count($filter['addresstype'])): ?>
|
||||
Gefiltert nach Rolle: <?=implode(", ", $types)?><br />
|
||||
<?php endif; ?>
|
||||
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
@@ -61,7 +60,6 @@
|
||||
<th>Telefon</th>
|
||||
<th>Email</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<?php foreach($addresses as $address): ?>
|
||||
<tr>
|
||||
@@ -74,11 +72,10 @@
|
||||
</td>
|
||||
<td><?=$address->phone?></td>
|
||||
<td><?=$address->email?></td>
|
||||
<td>
|
||||
<a href="<?=self::getUrl("Address", "edit", ["id" => $address->id])?>"><i class="far fa-edit"></i></a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?=self::getUrl("Address", "delete", ["id" => $address->id])?>" class="text-danger"><i class="fas fa-trash"></i></a>
|
||||
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
|
||||
<a href="<?=self::getUrl("User", "Index", ["filter" => ["address_id" => $address->id]])?>" title="Benutzer anzeigen"><i class="fas fa-users"></i></a>
|
||||
<a href="<?=self::getUrl("Address", "edit", ["id" => $address->id])?>"><i class="far fa-edit" title="Bearbeiten"></i></a>
|
||||
<a href="<?=self::getUrl("Address", "delete", ["id" => $address->id])?>" class="text-danger" title="Löschen"><i class="fas fa-trash"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
|
||||
@@ -27,9 +27,18 @@
|
||||
<div class="col-lg-12">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="card-body mb-3">
|
||||
<div class="float-left">
|
||||
<h4 class="header-title mb-4">Benutzerliste</h4>
|
||||
<h4 class="header-title">Benutzerliste</h4>
|
||||
<p class="sub-header">
|
||||
<?php if(is_array($filter) && count($filter)): ?>
|
||||
<?php if($filter['address_id']): ?>
|
||||
Zugehörig zu <?=(AddressModel::getOne($filter["address_id"])->getCompanyOrName())?><br />
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
Zeige alle Benutzer
|
||||
<?php endif; ?>
|
||||
</p>
|
||||
</div>
|
||||
<div class="float-right">
|
||||
<a class="btn btn-primary" href="<?=self::getUrl("User", "add")?>"><i class="fas fa-plus"></i> Neuen Benutzer anlegen</a>
|
||||
|
||||
Reference in New Issue
Block a user