Many improvements
This commit is contained in:
13
web/layouts/journeys/_partials/journeys-local-solutions.html
Normal file
13
web/layouts/journeys/_partials/journeys-local-solutions.html
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
{{define "journeys_local_solutions"}}
|
||||
<!--KNOWLEDGE BASE-->
|
||||
<div class="p-10">
|
||||
{{ range .ViewState.kb_data }}
|
||||
<div class="m-4">
|
||||
<h2 class="text-sm font-bold">{{.title}}</h2>
|
||||
<p class="text-sm">{{.description}}</p>
|
||||
<p class="text-sm text-co-blue"><a href="{{.url}}" target="_blank">Voir plus ...</a></p>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{end}}
|
||||
36
web/layouts/journeys/_partials/journeys-vehicles.html
Normal file
36
web/layouts/journeys/_partials/journeys-vehicles.html
Normal file
@@ -0,0 +1,36 @@
|
||||
{{define "journeys_vehicles"}}
|
||||
<!--VEHICLES-->
|
||||
{{if moduleAvailable "vehicles"}}
|
||||
<div class="p-4 flex text-sm text-grey-900">
|
||||
<div class="flex-1">
|
||||
{{.IconSet.Icon "tabler-icons:car" "h-6 w-6 inline-flex mr-4"}}
|
||||
<span class=" font-bold">{{len .ViewState.vehicles}} véhicules</span> partagés disponibles ce jour là et la semaine suivante
|
||||
</div>
|
||||
<div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="p-2">
|
||||
<table class="min-w-full divide-y divide-gray-300">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6 md:pl-0">Véhicule</th>
|
||||
<th scope="col" class="py-3.5 px-3 text-left text-sm font-semibold text-gray-900">Numéro</th>
|
||||
<th scope="col" class="py-3.5 px-3 text-left text-sm font-semibold text-gray-900">Lieu</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-200">
|
||||
{{range .ViewState.vehicles}}
|
||||
<tr>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6 md:pl-0">{{.Data.name}}</td>
|
||||
<td class="whitespace-nowrap py-4 px-3 text-sm text-gray-500">{{.Data.licence_plate}}</td>
|
||||
<td class="whitespace-nowrap py-4 px-3 text-sm text-gray-500">{{if .Data.address}}{{.Data.address.properties.label}}{{end}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="p-4 text-center">
|
||||
<a href="/app/vehicles/"><button class="text-md px-4 py-1 bg-gray-200 text-co-blue rounded-xl">Réserver un véhicule</button></a>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
@@ -39,14 +39,14 @@
|
||||
|
||||
<div class="py-4 grid grid-cols-2">
|
||||
<div class="lg:col-span-1">
|
||||
<label for="departuredate" class="block text-sm font-medium text-gray-700">Le</label>
|
||||
<label for="departuredate" class="block text-sm font-medium text-gray-700">Date de départ</label>
|
||||
<div class="mt-1">
|
||||
<input type="date" id="departuredate" name="departuredate" value="{{.ViewState.departuredate}}"
|
||||
class="p-2 shadow-sm focus:ring-co-blue focus:border-co-blue block w-full sm:text-sm border-gray-300 rounded-l-2xl border-r-1">
|
||||
</div>
|
||||
</div>
|
||||
<div class="lg:col-span-1">
|
||||
<label for="departuretime" class="block text-sm font-medium text-gray-700">A</label>
|
||||
<label for="departuretime" class="block text-sm font-medium text-gray-700">Heure de départ</label>
|
||||
<div class="mt-1">
|
||||
<input type="time" id="departuretime" name="departuretime" value="{{.ViewState.departuretime}}"
|
||||
class="p-2 shadow-sm focus:ring-co-blue focus:border-co-blue block w-full sm:text-sm border-gray-300 rounded-r-2xl border-l-0">
|
||||
@@ -78,52 +78,25 @@
|
||||
<label for="tabs" class="sr-only">Select a tab</label>
|
||||
<select id="tabs" name="tabs" @change="to"
|
||||
class="block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm rounded-md">
|
||||
<option value="all">Tous modes</option>
|
||||
|
||||
<option value="carpool">Covoiturage</option>
|
||||
|
||||
<option value="public-transit">Transports</option>
|
||||
|
||||
<option value="solidarity-transport">Transport solidaire</option> -->
|
||||
|
||||
<option value="others">Autres</option>
|
||||
{{range .ViewState.journey_tabs}}
|
||||
{{if or .enabled (and .module (moduleAvailable .module))}}
|
||||
<option value="{{.name}}">{{.title}}</option>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</select>
|
||||
</div>
|
||||
<div class="hidden sm:block">
|
||||
<div class="border-b border-gray-200 pl-4">
|
||||
<nav class="-mb-px flex space-x-8" aria-label="Tabs">
|
||||
<div class="border-b border-gray-200 pl-4 overflow-x-auto">
|
||||
<nav class="-mb-px flex space-x-8 min-w-max" aria-label="Tabs">
|
||||
<!-- Current: "border-indigo-500 text-indigo-600", Default: "border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300" -->
|
||||
<a href="#" @click="tab = 'all'"
|
||||
{{range .ViewState.journey_tabs}}
|
||||
{{if or .enabled (and .module (moduleAvailable .module))}}
|
||||
<a href="#" @click="tab = '{{.name}}'"
|
||||
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
||||
:class="tab == 'all' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
||||
Tous modes </a>
|
||||
|
||||
<a href="#" @click="tab = 'carpool'"
|
||||
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
||||
:class="tab == 'carpool' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
||||
Covoiturage </a>
|
||||
|
||||
<a href="#" @click="tab = 'public-transit'"
|
||||
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
||||
:class="tab == 'public-transit' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
||||
Transports </a>
|
||||
|
||||
{{ if moduleAvailable "solidarity_transport"}}
|
||||
<a href="#" @click="tab = 'solidarity-transport'"
|
||||
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
||||
:class="tab == 'solidarity-transport' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
||||
Transport solidaire </a>
|
||||
:class="tab == '{{.name}}' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
||||
{{.title}} </a>
|
||||
{{end}}
|
||||
{{if moduleAvailable "organized_carpool"}}
|
||||
<a href="#" @click="tab = 'organized-carpool'"
|
||||
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
||||
:class="tab == 'organized-carpool' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
||||
Covoiturage solidaire </a>
|
||||
{{end}}
|
||||
<a href="#" @click="tab = 'others'"
|
||||
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
||||
:class="tab == 'others' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
||||
Autres </a>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
@@ -134,6 +107,8 @@
|
||||
<div x-show="tab == 'public-transit'">{{template "journeys_public_transit" .}}</div>
|
||||
<div x-show="tab == 'organized-carpool'">{{template "journeys_organized_carpool" .}}</div>
|
||||
<div x-show="tab == 'solidarity-transport'">{{template "journeys_solidarity_transport" .}}</div>
|
||||
<div x-show="tab == 'vehicles'">{{template "journeys_vehicles" .}}</div>
|
||||
<div x-show="tab == 'directory'">{{template "journeys_local_solutions" .}}</div>
|
||||
<div x-show="tab == 'others'">{{template "journeys_others" .}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user