2019-12-19 12:12:56 +01:00
|
|
|
{{- define "base" -}}
|
|
|
|
{{- $isAdmin := .Claims|isAdmin -}}
|
|
|
|
{{- $isSubscriber := .Claims|isSubscriber -}}
|
|
|
|
{{- $isSchool := .Claims|isSchool -}}
|
|
|
|
{{- $isParticipant := .Claims|isParticipant -}}
|
2019-11-04 15:00:46 +01:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="it">
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
2020-01-29 13:35:12 +01:00
|
|
|
<link
|
|
|
|
rel="stylesheet"
|
|
|
|
href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
|
|
|
|
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh"
|
|
|
|
crossorigin="anonymous">
|
|
|
|
<link
|
|
|
|
rel="stylesheet"
|
|
|
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.css">
|
|
|
|
<link
|
|
|
|
rel="stylesheet"
|
|
|
|
href="https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.9/dist/css/bootstrap-select.min.css">
|
2019-11-04 15:00:46 +01:00
|
|
|
<link rel="stylesheet" href="/styles.css" />
|
2022-12-07 09:20:46 +01:00
|
|
|
<title>Campionati Italiani di Economia e Finanza - Piattaforma di gara</title>
|
2019-11-04 15:00:46 +01:00
|
|
|
</head>
|
2020-02-03 11:51:48 +01:00
|
|
|
<body data-spy="scroll">
|
2019-11-06 12:19:57 +01:00
|
|
|
<nav class="navbar navbar-expand-lg fixed-top navbar-dark bg-primary">
|
2019-12-19 12:12:56 +01:00
|
|
|
{{- $homeURL := "" -}}
|
|
|
|
{{- if $isAdmin}}{{$homeURL = all "Contest"}}{{end}}
|
|
|
|
{{- if $isSubscriber}}{{$homeURL = "#"}}{{end}}
|
|
|
|
{{- if $isParticipant}}{{$homeURL = "#"}}{{end}}
|
|
|
|
{{- if $isSchool}}{{$homeURL = "#"}}{{end -}}
|
2021-01-02 19:04:06 +01:00
|
|
|
<a class="navbar-brand" {{if $isAdmin}}href="{{$homeURL}}"{{end}}>
|
2019-11-13 11:15:21 +01:00
|
|
|
<span class="fa fa-landmark"></span>
|
2023-11-26 19:31:46 +01:00
|
|
|
CEF 2024
|
2019-11-13 11:15:21 +01:00
|
|
|
</a>
|
2019-11-04 15:00:46 +01:00
|
|
|
<button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
|
|
|
|
<span class="navbar-toggler-icon"></span>
|
|
|
|
</button>
|
|
|
|
<div id="navbar" class="collapse navbar-collapse">
|
2019-11-14 12:55:22 +01:00
|
|
|
<ul class="navbar-nav mr-auto">
|
2019-12-19 12:12:56 +01:00
|
|
|
{{- if (.Claims|isAdmin) -}}
|
2019-12-03 15:24:01 +01:00
|
|
|
<a class="nav-item nav-link {{.Options|active "Contest"}}" href="{{all "Contest"}}">Gare</a>
|
2019-11-14 12:55:22 +01:00
|
|
|
<a class="nav-item nav-link {{.Options|active "Question"}}" href="{{all "Question"}}">Domande</a>
|
2019-11-14 15:04:11 +01:00
|
|
|
<a class="nav-item nav-link {{.Options|active "Answer"}}" href="{{all "Answer"}}">Risposte</a>
|
2020-02-08 12:27:13 +01:00
|
|
|
<a id="schools_navbar_link" class="nav-item nav-link {{.Options|active "School"}}" href="{{all "School"}}">Scuole</a>
|
2020-02-10 14:29:24 +01:00
|
|
|
<a id="participants_navbar_link" class="nav-item nav-link {{.Options|active "Participant"}}" href="{{all "Participant"}}">Partecipanti</a>
|
2020-03-03 14:11:01 +01:00
|
|
|
<a id="responses_navbar_link" class="nav-item nav-link {{.Options|active "Response"}}" href="{{all "Response"}}">Prove</a>
|
2019-12-19 12:12:56 +01:00
|
|
|
{{- end -}}
|
|
|
|
{{- if $isSchool -}}
|
2020-02-10 14:29:24 +01:00
|
|
|
<a id="school_navbar_link" class="nav-item nav-link {{.Options|active "School"}}" href="{{.Claims|modelId|show "School"}}">Scuola</a>
|
|
|
|
<a id="participant_navbar_link" class="nav-item nav-link {{.Options|active "Participant"}}" href="{{all "Participant"}}">Partecipanti</a>
|
2019-12-19 12:12:56 +01:00
|
|
|
{{- end -}}
|
2019-11-14 12:55:22 +01:00
|
|
|
</ul>
|
|
|
|
<ul class="nav navbar-nav navbar-right">
|
2019-12-19 12:12:56 +01:00
|
|
|
{{- if .Claims|isSubscriber -}}
|
2020-02-07 13:05:48 +01:00
|
|
|
<li><a id="logout" class="nav-link" href="/logout">Esci</a></li>
|
2019-12-19 12:12:56 +01:00
|
|
|
{{- else -}}
|
2020-02-07 13:05:48 +01:00
|
|
|
<li><a id="logout" class="nav-link" href="/logout">Disconnetti {{.Claims|username}}</a></li>
|
2019-12-19 12:12:56 +01:00
|
|
|
{{- end -}}
|
2019-11-14 12:55:22 +01:00
|
|
|
</ul>
|
2019-11-04 15:00:46 +01:00
|
|
|
</div><!--/.nav-collapse -->
|
|
|
|
</nav>
|
|
|
|
<div class="base-template">
|
|
|
|
{{ template "content" . }}
|
|
|
|
</div>
|
|
|
|
<div class="modal fade" id="karmen-modal-remove" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
|
|
|
|
<div class="modal-dialog" role="document">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
|
|
<h4 class="modal-title" id="myModalLabel">Richiesta di conferma eliminazione</h4>
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
|
<span aria-hidden="true">×</span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
|
|
Stai per eliminare l'elemento. Ne sei sicuro?
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Annulla</button>
|
|
|
|
<button type="button" class="btn btn-primary" id="karmen-modal-btn-confirm">Conferma</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-01-29 13:35:12 +01:00
|
|
|
<script
|
2020-02-03 11:54:53 +01:00
|
|
|
src="https://code.jquery.com/jquery-3.4.1.min.js"
|
|
|
|
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
|
2020-01-29 13:35:12 +01:00
|
|
|
crossorigin="anonymous">
|
|
|
|
</script>
|
|
|
|
<script
|
|
|
|
src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
|
|
|
|
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
|
|
|
|
crossorigin="anonymous">
|
|
|
|
</script>
|
|
|
|
<script
|
|
|
|
src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"
|
|
|
|
integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6"
|
|
|
|
crossorigin="anonymous">
|
|
|
|
</script>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.9/dist/js/bootstrap-select.min.js"></script>
|
2019-11-04 15:00:46 +01:00
|
|
|
<script src="/main.bundle.js"></script>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
{{end}}
|