d821d392/views/components/pagination-button.gohtml
1970-01-01 00:00:00 +00:00

22 lines
940 B
Plaintext

{{ block "paginationButton" . }}
{{ if .Enabled }}
<button class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 me-2 mb-2 dark:bg-blue-600 dark:hover:bg-blue-700 focus:outline-none dark:focus:ring-blue-800"
type="submit"
id="{{.Name}}"
>
{{.Label}}
</button>
<script>
document.getElementById("{{.Name}}").addEventListener("click", function () {
document.querySelector("input[name='page']").value = "{{.Page}}";
document.querySelector("form").submit();
});
</script>
{{ else }}
<button type="button"
class="text-white bg-blue-400 dark:bg-blue-500 cursor-not-allowed font-medium rounded-lg text-sm px-5 py-2.5 text-center"
disabled>{{.Label}}
</button>
{{end}}
{{ end }}