Skip to content

Commit

Permalink
Merge branch 'main' of github.com:ClubCedille/hackqc2024
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon-Boyer committed Mar 15, 2024
2 parents 60a3265 + c660888 commit b3e80a4
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 10 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ RUN go build -v -o app .
FROM alpine:3.19
COPY --from=build /go/src/app/app /go/bin/app
COPY --from=build /go/src/app/templates /go/bin/templates
COPY --from=build /go/src/app/docs /go/bin/docs

WORKDIR /go/bin

RUN mkdir -p /go/bin/tmp && chown -R 10001:10001 /go/bin/tmp
Expand Down
2 changes: 1 addition & 1 deletion k8s/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: Kustomization
namespace: hackqc2024
images:
- name: ghcr.io/clubcedille/hackqc2024
newTag: commit-efe2aaf92f7a098bf3113f8f6ff494a0e5a87807
newTag: commit-95d2df51a93fef14305b273553578e10f465dffb

resources:
- namespace.yaml
Expand Down
4 changes: 2 additions & 2 deletions pkg/event/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,9 @@ func SearchEvents(conn *clover.DB, filters map[string][]string, requireGeoJson b
sortOrder = -1 // Descending
}
sortField := filters["_.sort"][0]
filterQuery.Sort(query.SortOption{Field: sortField, Direction: sortOrder})
filterQuery = filterQuery.Sort(query.SortOption{Field: sortField, Direction: sortOrder})
} else {
filterQuery.Sort(query.SortOption{Field: "map_object.date", Direction: -1})
filterQuery = filterQuery.Sort(query.SortOption{Field: "map_object.date", Direction: -1})
}

docs, err := conn.FindAll(filterQuery)
Expand Down
4 changes: 2 additions & 2 deletions pkg/help/help.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ func SearchHelps(conn *clover.DB, filters map[string][]string, requireGeoJson bo
sortOrder = -1 // Descending
}
sortField := filters["_.sort"][0]
filterQuery.Sort(query.SortOption{Field: sortField, Direction: sortOrder})
filterQuery = filterQuery.Sort(query.SortOption{Field: sortField, Direction: sortOrder})
} else {
filterQuery.Sort(query.SortOption{Field: "map_object.date", Direction: -1})
filterQuery = filterQuery.Sort(query.SortOption{Field: "map_object.date", Direction: -1})
}

finalRes := ((geoRes && filterRes) && (searchRes))
Expand Down
2 changes: 1 addition & 1 deletion templates/forms/eventForm.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
name="map_object_geometry_coordinates" required>

<label for="map_object_tags">Tags:</label>
<input type="text" id="map_object_tags" placeholder="format: tag1, tag2, ..." name="map_object_tags" required>
<input type="text" id="map_object_tags" placeholder="format: tag1, tag2, ..." name="map_object_tags">

</fieldset>

Expand Down
4 changes: 2 additions & 2 deletions templates/forms/helpForm.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@

<div class="w3-margin-bottom">
<label for="map_object_tags">Tags:</label>
<input type="text" id="map_object_tags" placeholder="format: tag1, tag2, ..." name="map_object_tags"
required>
<input type="text" id="map_object_tags" placeholder="format: tag1, tag2, ..."
name="map_object_tags">
</div>
</fieldset>
<button class="w3-button w3-teal w3-margin-top" type="submit">Soumettre</button>
Expand Down
7 changes: 5 additions & 2 deletions templates/grid/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ <h1>Liste des événements d'urgence et des afficages de besoin en aide</h1>
Date
</label>
<label class="w3-bar-item w3-button">
<input type="radio" class="w3-radio filter" name="_.sort" value="name">
<input type="radio" class="w3-radio filter" name="_.sort" value="map_object.name">
Nom
</label>
<label class="w3-bar-item w3-button">
Expand Down Expand Up @@ -322,7 +322,10 @@ <h1>Liste des événements d'urgence et des afficages de besoin en aide</h1>
<div class="w3-button">* Note<i class="fa fa-caret-down"></i></div>
<div class="w3-dropdown-content w3-bar-block w3-card-4">
<div class="w3-bar-item w3-button">
<p>Les evenemets seront toujours affichées avant les aides, peut importe l'ordre de tri.</p>
<p>Les événements seront toujours affichés avant les aides, peu importe l'ordre de tri.</p>
</div>
<div class="w3-bar-item w3-button">
<p>Les tris lexicographiques traitent les majuscules en priorité.</p>
</div>
</div>
</div>
Expand Down

0 comments on commit b3e80a4

Please sign in to comment.