65 lines
3.7 KiB
HTML
65 lines
3.7 KiB
HTML
{{ range .data.groups }}
|
|
<div class="card">
|
|
<div class="flex items-center">
|
|
<span class="flex items-center justify-center w-7 h-7 rounded-full bg-blue-100">
|
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img"
|
|
class="w-5 h-5 stroke-current text-blue-600" width="64" height="64" viewBox="0 0 1200 1200">
|
|
<path fill="currentColor" d="M596.847 188.488c-103.344 0-187.12 97.81-187.12 218.465c0 83.678 40.296 156.352 99.468 193.047l-68.617 31.801l-182.599 84.688c-17.64 8.821-26.444 23.778-26.444 44.947v201.102c1.451 25.143 16.537 48.577 40.996 48.974h649.62c27.924-2.428 42.05-24.92 42.325-48.974V761.436c0-21.169-8.804-36.126-26.443-44.947l-175.988-84.688l-73.138-34.65c56.744-37.521 95.061-108.624 95.061-190.197c-.001-120.656-83.778-218.466-187.121-218.466m-301.824 76.824c-44.473 1.689-79.719 20.933-106.497 51.596c-29.62 36.918-44.06 80.75-44.339 124.354c1.819 64.478 30.669 125.518 82.029 157.446L21.163 693.997C7.05 699.289 0 711.636 0 731.041v161.398c1.102 21.405 12.216 39.395 33.055 39.703h136.284V761.436c2.255-45.639 23.687-82.529 62.196-100.531l136.247-64.817c10.584-6.175 20.731-14.568 30.433-25.152c-56.176-86.676-63.977-190.491-27.773-281.801c-23.547-14.411-50.01-23.672-75.419-23.823m608.586 0c-29.083.609-55.96 11.319-78.039 26.444c35.217 92.137 25.503 196.016-26.482 276.52c11.467 13.23 23.404 23.377 35.753 30.434l130.965 62.195c39.897 21.881 60.47 59.098 60.866 100.532v170.707h140.235c23.063-1.991 32.893-20.387 33.093-39.704V731.042c0-17.641-7.05-29.987-21.163-37.045l-202.431-96.618c52.498-38.708 78.859-96.72 79.369-156.117c-1.396-47.012-15.757-90.664-44.339-124.354c-29.866-32.399-66.91-51.253-107.827-51.596">
|
|
</path>
|
|
</svg>
|
|
</span>
|
|
<h3 class="ml-2">{{ .Name }}</h3>
|
|
</div>
|
|
|
|
<h3 class="mt-6 mb-2">Access</h3>
|
|
{{ range .AccessauthsFull }}
|
|
{{ template "access_view.html" . }}
|
|
{{ end }}
|
|
|
|
<h3 class="mt-6 mb-2">Cards</h3>
|
|
{{ range .Cards }}
|
|
{{ template "card_view.html" . }}
|
|
{{ end }}
|
|
|
|
|
|
<h3 class="mt-6">Register new card</h3>
|
|
<div class="w-full min-w-[200px] relative mt-4">
|
|
<form action="/groups/{{ .Id }}" method="POST">
|
|
<input type="text" id="name" name="name" class="input-text" placeholder="Enter card name" required/>
|
|
<button class="button-add-in-input" type="submit" name="action" value="addCard">
|
|
Register Card
|
|
</button>
|
|
</form>
|
|
</div>
|
|
|
|
<h3 class="mt-6">Grant Temporary Access</h3>
|
|
<p>
|
|
Allows the Group to open the door for the specified amount of 'uses'.
|
|
The Access is valid for the given amount of Days.
|
|
For an infinite amount of uses, specify '-1'.
|
|
</p>
|
|
<div class="w-full min-w-[200px] relative mt-4">
|
|
<form action="/groups/{{ .Id }}" method="POST">
|
|
<div class="grid grid-cols-5 w-full">
|
|
<div class="col-start-1 col-end-3">
|
|
<label>Amount Days</label>
|
|
<input type="number" id="days" name="days" class="px-3 py-1.5 input-text" placeholder="Enter Amount Days" required/>
|
|
</div>
|
|
<div class="col-start-4 col-end-6">
|
|
<label>Amount Uses</label>
|
|
<input type="number" id="uses" name="uses" class="px-3 py-1.5 input-text" placeholder="Enter Amount Uses" required/>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mt-3 relative">
|
|
<input type="text" id="name" name="name" class="input-text" placeholder="Enter access name" required/>
|
|
<button class="button-add-in-input" type="submit" name="action" value="addAccess">
|
|
Grant Access
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
</div>
|
|
{{ end }}
|