Add user-defined order to campsite types, options, seasons and carousels
I use Sortable, exactly like HTMx’s sorting example does[0]. Had to export the slug or ID of some entries to be able to add it in the hidden input. For forms that use ID instead of slug, had to use an input name other than “id” because otherwise the swap would fail due to bug #1496[1]. It is apparently fixed in a recent version of HTMx, but i did not want to update for fear of behaviour changes. [0]: https://htmx.org/examples/sortable/ [1]: https://github.com/bigskysoftware/htmx/issues/1496
This commit is contained in:
parent
d2858302ef
commit
678b5cc523
File diff suppressed because it is too large
Load Diff
|
@ -21,7 +21,8 @@ create table campsite_type (
|
|||
description xml not null default ''::xml,
|
||||
max_campers integer not null constraint at_least_one_camper check(max_campers > 0),
|
||||
dogs_allowed boolean not null,
|
||||
active boolean not null default true
|
||||
active boolean not null default true,
|
||||
position integer not null default 2147483647
|
||||
);
|
||||
|
||||
grant select on table campsite_type to guest;
|
||||
|
|
|
@ -13,6 +13,7 @@ create table campsite_type_carousel (
|
|||
campsite_type_id integer not null references campsite_type,
|
||||
media_id integer not null references media,
|
||||
caption text not null,
|
||||
position integer not null default 2147483647,
|
||||
primary key (campsite_type_id, media_id)
|
||||
);
|
||||
|
||||
|
|
|
@ -12,7 +12,8 @@ create table campsite_type_option (
|
|||
campsite_type_option_id integer generated by default as identity primary key,
|
||||
campsite_type_id integer not null references campsite_type,
|
||||
name text not null constraint name_not_empty check(length(trim(name)) > 0),
|
||||
range int4range not null constraint range_not_negative check(lower(range) >= 0)
|
||||
range int4range not null constraint range_not_negative check(lower(range) >= 0),
|
||||
position integer not null default 2147483647
|
||||
);
|
||||
|
||||
alter table campsite_type_option enable row level security;
|
||||
|
|
|
@ -11,7 +11,8 @@ set search_path to camper, public;
|
|||
|
||||
create table home_carousel (
|
||||
media_id integer not null references media primary key,
|
||||
caption text not null
|
||||
caption text not null,
|
||||
position integer not null default 2147483647
|
||||
);
|
||||
|
||||
grant select on table home_carousel to guest;
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
-- Deploy camper:order_campsite_type_carousel to pg
|
||||
-- requires: schema_camper
|
||||
-- requires: roles
|
||||
-- requires: campsite_type
|
||||
-- requires: campsite_type_carousel
|
||||
|
||||
begin;
|
||||
|
||||
set search_path to camper, public;
|
||||
|
||||
create or replace function order_campsite_type_carousel(slug uuid, positions integer[]) returns void as
|
||||
$$
|
||||
update campsite_type_carousel
|
||||
set position = cast(temp.position as integer)
|
||||
from unnest(positions) with ordinality as temp(media_id, position)
|
||||
join campsite_type on campsite_type.slug = order_campsite_type_carousel.slug
|
||||
where campsite_type_carousel.campsite_type_id = campsite_type.campsite_type_id
|
||||
and campsite_type_carousel.media_id = temp.media_id
|
||||
;
|
||||
$$
|
||||
language sql
|
||||
;
|
||||
|
||||
revoke execute on function order_campsite_type_carousel(uuid, integer[]) from public;
|
||||
grant execute on function order_campsite_type_carousel(uuid, integer[]) to admin;
|
||||
|
||||
commit;
|
|
@ -0,0 +1,24 @@
|
|||
-- Deploy camper:order_campsite_type_options to pg
|
||||
-- requires: schema_camper
|
||||
-- requires: roles
|
||||
-- requires: campsite_type_option
|
||||
|
||||
begin;
|
||||
|
||||
set search_path to camper, public;
|
||||
|
||||
create or replace function order_campsite_type_options(positions integer[]) returns void as
|
||||
$$
|
||||
update campsite_type_option
|
||||
set position = cast(temp.position as integer)
|
||||
from unnest(positions) with ordinality as temp(option_id, position)
|
||||
where campsite_type_option_id = temp.option_id
|
||||
;
|
||||
$$
|
||||
language sql
|
||||
;
|
||||
|
||||
revoke execute on function order_campsite_type_options(integer[]) from public;
|
||||
grant execute on function order_campsite_type_options(integer[]) to admin;
|
||||
|
||||
commit;
|
|
@ -0,0 +1,24 @@
|
|||
-- Deploy camper:order_campsite_types to pg
|
||||
-- requires: schema_camper
|
||||
-- requires: roles
|
||||
-- requires: campsite_type
|
||||
|
||||
begin;
|
||||
|
||||
set search_path to camper, public;
|
||||
|
||||
create or replace function order_campsite_types(positions uuid[]) returns void as
|
||||
$$
|
||||
update campsite_type
|
||||
set position = cast(temp.position as integer)
|
||||
from unnest(positions) with ordinality as temp(slug, position)
|
||||
where campsite_type.slug = temp.slug
|
||||
;
|
||||
$$
|
||||
language sql
|
||||
;
|
||||
|
||||
revoke execute on function order_campsite_types(uuid[]) from public;
|
||||
grant execute on function order_campsite_types(uuid[]) to admin;
|
||||
|
||||
commit;
|
|
@ -0,0 +1,24 @@
|
|||
-- Deploy camper:order_home_carousel to pg
|
||||
-- requires: schema_camper
|
||||
-- requires: roles
|
||||
-- requires: home_carousel
|
||||
|
||||
begin;
|
||||
|
||||
set search_path to camper, public;
|
||||
|
||||
create or replace function order_home_carousel(positions integer[]) returns void as
|
||||
$$
|
||||
update home_carousel
|
||||
set position = cast(temp.position as integer)
|
||||
from unnest(positions) with ordinality as temp(media_id, position)
|
||||
where home_carousel.media_id = temp.media_id
|
||||
;
|
||||
$$
|
||||
language sql
|
||||
;
|
||||
|
||||
revoke execute on function order_home_carousel(integer[]) from public;
|
||||
grant execute on function order_home_carousel(integer[]) to admin;
|
||||
|
||||
commit;
|
|
@ -0,0 +1,24 @@
|
|||
-- Deploy camper:order_seasons to pg
|
||||
-- requires: schema_camper
|
||||
-- requires: roles
|
||||
-- requires: season
|
||||
|
||||
begin;
|
||||
|
||||
set search_path to camper, public;
|
||||
|
||||
create or replace function order_seasons(positions uuid[]) returns void as
|
||||
$$
|
||||
update season
|
||||
set position = cast(temp.position as integer)
|
||||
from unnest(positions) with ordinality as temp(slug, position)
|
||||
where season.slug = temp.slug
|
||||
;
|
||||
$$
|
||||
language sql
|
||||
;
|
||||
|
||||
revoke execute on function order_seasons(uuid[]) from public;
|
||||
grant execute on function order_seasons(uuid[]) to admin;
|
||||
|
||||
commit;
|
|
@ -0,0 +1,24 @@
|
|||
-- Deploy camper:order_services_carousel to pg
|
||||
-- requires: schema_camper
|
||||
-- requires: roles
|
||||
-- requires: services_carousel
|
||||
|
||||
begin;
|
||||
|
||||
set search_path to camper, public;
|
||||
|
||||
create or replace function order_services_carousel(positions integer[]) returns void as
|
||||
$$
|
||||
update services_carousel
|
||||
set position = cast(temp.position as integer)
|
||||
from unnest(positions) with ordinality as temp(media_id, position)
|
||||
where services_carousel.media_id = temp.media_id
|
||||
;
|
||||
$$
|
||||
language sql
|
||||
;
|
||||
|
||||
revoke execute on function order_services_carousel(integer[]) from public;
|
||||
grant execute on function order_services_carousel(integer[]) to admin;
|
||||
|
||||
commit;
|
|
@ -14,7 +14,8 @@ create table season (
|
|||
slug uuid not null unique default gen_random_uuid(),
|
||||
name text not null constraint name_not_empty check(length(trim(name)) > 0),
|
||||
color integer not null default 0,
|
||||
active boolean not null default true
|
||||
active boolean not null default true,
|
||||
position integer not null default 2147483647
|
||||
);
|
||||
|
||||
grant select on table season to guest;
|
||||
|
|
|
@ -11,7 +11,8 @@ set search_path to camper, public;
|
|||
|
||||
create table services_carousel (
|
||||
media_id integer not null primary key references media,
|
||||
caption text not null
|
||||
caption text not null,
|
||||
position integer not null default 2147483647
|
||||
);
|
||||
|
||||
grant select on table services_carousel to guest;
|
||||
|
|
|
@ -174,7 +174,7 @@ func newBookingForm(ctx context.Context, company *auth.Company, conn *database.C
|
|||
},
|
||||
CampsiteType: &form.Select{
|
||||
Name: "campsite_type",
|
||||
Options: form.MustGetOptions(ctx, conn, "select type.slug, coalesce(i18n.name, type.name) as l10n_name from campsite_type as type left join campsite_type_i18n as i18n on type.campsite_type_id = i18n.campsite_type_id and i18n.lang_tag = $1 where company_id = $2 order by l10n_name", l.Language, company.ID),
|
||||
Options: form.MustGetOptions(ctx, conn, "select type.slug, coalesce(i18n.name, type.name) as l10n_name from campsite_type as type left join campsite_type_i18n as i18n on type.campsite_type_id = i18n.campsite_type_id and i18n.lang_tag = $1 where company_id = $2 order by position, l10n_name", l.Language, company.ID),
|
||||
},
|
||||
CampsiteTypeOptions: make(map[string][]*campsiteTypeOption),
|
||||
ArrivalDate: &form.Input{
|
||||
|
@ -204,6 +204,7 @@ func newBookingForm(ctx context.Context, company *auth.Company, conn *database.C
|
|||
join campsite_type using (campsite_type_id)
|
||||
left join campsite_type_option_i18n as i18n on i18n.campsite_type_option_id = option.campsite_type_id and i18n.lang_tag = $1
|
||||
where company_id = $2
|
||||
order by option.position, l10_name
|
||||
`, l.Language, company.ID)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
|
|
@ -55,6 +55,13 @@ func (h *AdminHandler) Handler(user *auth.User, company *auth.Company, conn *dat
|
|||
default:
|
||||
httplib.MethodNotAllowed(w, r, http.MethodGet, http.MethodPost)
|
||||
}
|
||||
case "order":
|
||||
switch r.Method {
|
||||
case http.MethodPost:
|
||||
orderTypes(w, r, user, company, conn)
|
||||
default:
|
||||
httplib.MethodNotAllowed(w, r, http.MethodPost)
|
||||
}
|
||||
default:
|
||||
if !uuid.Valid(head) {
|
||||
http.NotFound(w, r)
|
||||
|
@ -157,8 +164,9 @@ func collectTypeEntries(ctx context.Context, company *auth.Company, conn *databa
|
|||
and campsite_type.company_id = $1
|
||||
group by campsite_type.slug
|
||||
, campsite_type.name
|
||||
, campsite_type.position
|
||||
, campsite_type.active
|
||||
order by name
|
||||
order by position, name
|
||||
`, pgx.QueryResultFormats{pgx.BinaryFormatCode}, company.ID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -225,6 +233,30 @@ func editType(w http.ResponseWriter, r *http.Request, user *auth.User, company *
|
|||
})
|
||||
}
|
||||
|
||||
func orderTypes(w http.ResponseWriter, r *http.Request, user *auth.User, company *auth.Company, conn *database.Conn) {
|
||||
if err := r.ParseForm(); err != nil {
|
||||
http.Error(w, err.Error(), http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
if err := user.VerifyCSRFToken(r); err != nil {
|
||||
http.Error(w, err.Error(), http.StatusForbidden)
|
||||
return
|
||||
}
|
||||
slugs := r.PostForm["slug"]
|
||||
if len(slugs) > 0 {
|
||||
for _, slug := range slugs {
|
||||
if !uuid.Valid(slug) {
|
||||
w.WriteHeader(http.StatusUnprocessableEntity)
|
||||
return
|
||||
}
|
||||
}
|
||||
if err := conn.OrderCampsiteTypes(r.Context(), slugs); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
serveTypeIndex(w, r, user, company, conn)
|
||||
}
|
||||
|
||||
func processTypeForm(w http.ResponseWriter, r *http.Request, user *auth.User, company *auth.Company, conn *database.Conn, f *typeForm, act func(ctx context.Context, tx *database.Tx) error) {
|
||||
if err := f.Parse(r); err != nil {
|
||||
http.Error(w, err.Error(), http.StatusBadRequest)
|
||||
|
|
|
@ -44,10 +44,18 @@ func (h *AdminHandler) carouselHandler(user *auth.User, company *auth.Company, c
|
|||
default:
|
||||
httplib.MethodNotAllowed(w, r, http.MethodGet)
|
||||
}
|
||||
case "order":
|
||||
switch r.Method {
|
||||
case http.MethodPost:
|
||||
orderCarousel(w, r, user, company, conn, typeSlug)
|
||||
default:
|
||||
httplib.MethodNotAllowed(w, r, http.MethodGet)
|
||||
}
|
||||
default:
|
||||
mediaID, err := strconv.Atoi(head)
|
||||
if err != nil {
|
||||
http.NotFound(w, r)
|
||||
return
|
||||
}
|
||||
f := newSlideForm(typeSlug)
|
||||
if err := f.FillFromDatabase(r.Context(), conn, mediaID); err != nil {
|
||||
|
@ -129,6 +137,7 @@ func mustCollectSlides(ctx context.Context, conn *database.Conn, loc *locale.Loc
|
|||
and i18n.media_id = slide.media_id
|
||||
and lang_tag = $1
|
||||
where campsite_type.slug = $2
|
||||
order by slide.position, l10_caption
|
||||
`, loc.Language, typeSlug)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
@ -166,9 +175,10 @@ func collectSlideEntries(ctx context.Context, conn *database.Conn, typeSlug stri
|
|||
and language.selectable
|
||||
and campsite_type.slug = $1
|
||||
group by carousel.media_id
|
||||
, carousel.position
|
||||
, media.path
|
||||
, caption
|
||||
order by caption
|
||||
order by carousel.position, caption
|
||||
`, pgx.QueryResultFormats{pgx.BinaryFormatCode}, typeSlug)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -295,3 +305,30 @@ func (f *slideForm) Valid(ctx context.Context, conn *database.Conn, l *locale.Lo
|
|||
func (f *slideForm) MustRender(w http.ResponseWriter, r *http.Request, user *auth.User, company *auth.Company) {
|
||||
template.MustRenderAdmin(w, r, user, company, "campsite/carousel/form.gohtml", f)
|
||||
}
|
||||
|
||||
func orderCarousel(w http.ResponseWriter, r *http.Request, user *auth.User, company *auth.Company, conn *database.Conn, typeSlug string) {
|
||||
if err := r.ParseForm(); err != nil {
|
||||
http.Error(w, err.Error(), http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
if err := user.VerifyCSRFToken(r); err != nil {
|
||||
http.Error(w, err.Error(), http.StatusForbidden)
|
||||
return
|
||||
}
|
||||
input := r.PostForm["media_id"]
|
||||
if len(input) > 0 {
|
||||
var ids []int
|
||||
for _, s := range input {
|
||||
if id, err := strconv.Atoi(s); err == nil {
|
||||
ids = append(ids, id)
|
||||
} else {
|
||||
http.Error(w, err.Error(), http.StatusUnprocessableEntity)
|
||||
return
|
||||
}
|
||||
}
|
||||
if err := conn.OrderCampsiteTypeCarousel(r.Context(), typeSlug, ids); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
serveCarouselIndex(w, r, user, company, conn, typeSlug)
|
||||
}
|
||||
|
|
|
@ -47,6 +47,13 @@ func (h *AdminHandler) optionsHandler(user *auth.User, company *auth.Company, co
|
|||
default:
|
||||
httplib.MethodNotAllowed(w, r, http.MethodGet)
|
||||
}
|
||||
case "order":
|
||||
switch r.Method {
|
||||
case http.MethodPost:
|
||||
orderOptions(w, r, user, company, conn, typeSlug)
|
||||
default:
|
||||
httplib.MethodNotAllowed(w, r, http.MethodPost)
|
||||
}
|
||||
default:
|
||||
id, err := strconv.Atoi(head)
|
||||
if err != nil {
|
||||
|
@ -120,7 +127,8 @@ func serveOptionIndex(w http.ResponseWriter, r *http.Request, user *auth.User, c
|
|||
|
||||
func collectOptionEntries(ctx context.Context, conn *database.Conn, typeSlug string) ([]*optionEntry, error) {
|
||||
rows, err := conn.Query(ctx, `
|
||||
select '/admin/campsites/types/' || campsite_type.slug || '/options/' || campsite_type_option_id
|
||||
select campsite_type_option_id
|
||||
, '/admin/campsites/types/' || campsite_type.slug || '/options/' || campsite_type_option_id
|
||||
, option.name
|
||||
, array_agg((lang_tag, endonym, not exists (select 1 from campsite_type_option_i18n as i18n where i18n.campsite_type_option_id = option.campsite_type_option_id and i18n.lang_tag = language.lang_tag)) order by endonym)
|
||||
from campsite_type_option as option
|
||||
|
@ -132,8 +140,9 @@ func collectOptionEntries(ctx context.Context, conn *database.Conn, typeSlug str
|
|||
and campsite_type.slug = $1
|
||||
group by campsite_type_option_id
|
||||
, campsite_type.slug
|
||||
, option.position
|
||||
, option.name
|
||||
order by name
|
||||
order by option.position, option.name
|
||||
`, pgx.QueryResultFormats{pgx.BinaryFormatCode}, typeSlug)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -144,7 +153,7 @@ func collectOptionEntries(ctx context.Context, conn *database.Conn, typeSlug str
|
|||
for rows.Next() {
|
||||
option := &optionEntry{}
|
||||
var translations database.RecordArray
|
||||
if err = rows.Scan(&option.URL, &option.Name, &translations); err != nil {
|
||||
if err = rows.Scan(&option.ID, &option.URL, &option.Name, &translations); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
for _, el := range translations.Elements {
|
||||
|
@ -161,6 +170,7 @@ func collectOptionEntries(ctx context.Context, conn *database.Conn, typeSlug str
|
|||
}
|
||||
|
||||
type optionEntry struct {
|
||||
ID int
|
||||
URL string
|
||||
Name string
|
||||
Translations []*locale.Translation
|
||||
|
@ -366,3 +376,30 @@ func (f *optionForm) Valid(l *locale.Locale) bool {
|
|||
func (f *optionForm) MustRender(w http.ResponseWriter, r *http.Request, user *auth.User, company *auth.Company) {
|
||||
template.MustRenderAdmin(w, r, user, company, "campsite/option/form.gohtml", f)
|
||||
}
|
||||
|
||||
func orderOptions(w http.ResponseWriter, r *http.Request, user *auth.User, company *auth.Company, conn *database.Conn, typeSlug string) {
|
||||
if err := r.ParseForm(); err != nil {
|
||||
http.Error(w, err.Error(), http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
if err := user.VerifyCSRFToken(r); err != nil {
|
||||
http.Error(w, err.Error(), http.StatusForbidden)
|
||||
return
|
||||
}
|
||||
input := r.PostForm["option_id"]
|
||||
if len(input) > 0 {
|
||||
var ids []int
|
||||
for _, s := range input {
|
||||
if id, err := strconv.Atoi(s); err == nil {
|
||||
ids = append(ids, id)
|
||||
} else {
|
||||
http.Error(w, err.Error(), http.StatusUnprocessableEntity)
|
||||
return
|
||||
}
|
||||
}
|
||||
if err := conn.OrderCampsiteTypeOptions(r.Context(), ids); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
serveOptionIndex(w, r, user, company, conn, typeSlug)
|
||||
}
|
||||
|
|
|
@ -133,6 +133,7 @@ func collectPrices(ctx context.Context, conn *database.Conn, language language.T
|
|||
, coalesce(cost.min_nights, 1)
|
||||
, to_price(coalesce(cost.cost_per_night, 0) + coalesce(option.cost_per_night, 0))
|
||||
, option.cost_per_night is not null
|
||||
, season.position
|
||||
from season
|
||||
left join season_i18n as i18n on season.season_id = i18n.season_id and i18n.lang_tag = $1
|
||||
left join (
|
||||
|
@ -154,6 +155,8 @@ func collectPrices(ctx context.Context, conn *database.Conn, language language.T
|
|||
, 1
|
||||
, ''
|
||||
, false
|
||||
, 2147483647 as position
|
||||
order by position, l10n_name
|
||||
`, language, slug, locale.PgettextNoop("Closed", "season"), season.UnsetColor)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -162,7 +165,8 @@ func collectPrices(ctx context.Context, conn *database.Conn, language language.T
|
|||
var prices []*typePrice
|
||||
for rows.Next() {
|
||||
price := &typePrice{}
|
||||
if err := rows.Scan(&price.SeasonName, &price.SeasonColor, &price.MinNights, &price.PricePerNight, &price.HasOptions); err != nil {
|
||||
var position int
|
||||
if err := rows.Scan(&price.SeasonName, &price.SeasonColor, &price.MinNights, &price.PricePerNight, &price.HasOptions, &position); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
prices = append(prices, price)
|
||||
|
|
|
@ -22,14 +22,18 @@ import (
|
|||
)
|
||||
|
||||
type AdminHandler struct {
|
||||
name string
|
||||
locales locale.Locales
|
||||
name string
|
||||
indexHandler IndexHandler
|
||||
locales locale.Locales
|
||||
}
|
||||
|
||||
func NewAdminHandler(name string, locales locale.Locales) *AdminHandler {
|
||||
type IndexHandler func(w http.ResponseWriter, r *http.Request, user *auth.User, company *auth.Company, conn *database.Conn)
|
||||
|
||||
func NewAdminHandler(name string, indexHandler IndexHandler, locales locale.Locales) *AdminHandler {
|
||||
return &AdminHandler{
|
||||
name: name,
|
||||
locales: locales,
|
||||
name: name,
|
||||
indexHandler: indexHandler,
|
||||
locales: locales,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -54,10 +58,18 @@ func (h *AdminHandler) Handler(user *auth.User, company *auth.Company, conn *dat
|
|||
default:
|
||||
httplib.MethodNotAllowed(w, r, http.MethodGet)
|
||||
}
|
||||
case "order":
|
||||
switch r.Method {
|
||||
case http.MethodPost:
|
||||
h.orderSlides(w, r, user, company, conn)
|
||||
default:
|
||||
httplib.MethodNotAllowed(w, r, http.MethodPost)
|
||||
}
|
||||
default:
|
||||
id, err := strconv.Atoi(head)
|
||||
if err != nil {
|
||||
http.NotFound(w, r)
|
||||
return
|
||||
}
|
||||
f := newSlideForm(h.name)
|
||||
if err := f.FillFromDatabase(r.Context(), conn, id); err != nil {
|
||||
|
@ -106,6 +118,33 @@ func (h *AdminHandler) Handler(user *auth.User, company *auth.Company, conn *dat
|
|||
})
|
||||
}
|
||||
|
||||
func (h *AdminHandler) orderSlides(w http.ResponseWriter, r *http.Request, user *auth.User, company *auth.Company, conn *database.Conn) {
|
||||
if err := r.ParseForm(); err != nil {
|
||||
http.Error(w, err.Error(), http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
if err := user.VerifyCSRFToken(r); err != nil {
|
||||
http.Error(w, err.Error(), http.StatusForbidden)
|
||||
return
|
||||
}
|
||||
input := r.PostForm["media_id"]
|
||||
if len(input) > 0 {
|
||||
var ids []int
|
||||
for _, s := range input {
|
||||
if id, err := strconv.Atoi(s); err == nil {
|
||||
ids = append(ids, id)
|
||||
} else {
|
||||
http.Error(w, err.Error(), http.StatusUnprocessableEntity)
|
||||
return
|
||||
}
|
||||
}
|
||||
if _, err := conn.Exec(r.Context(), fmt.Sprintf("select order_%[1]s_carousel($1)", h.name), ids); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
h.indexHandler(w, r, user, company, conn)
|
||||
}
|
||||
|
||||
type Slide struct {
|
||||
Media string
|
||||
Caption string
|
||||
|
@ -119,6 +158,7 @@ func MustCollectSlides(ctx context.Context, company *auth.Company, conn *databas
|
|||
join media using (media_id)
|
||||
left join %[1]s_carousel_i18n as i18n on i18n.media_id = slide.media_id and lang_tag = $1
|
||||
where media.company_id = $2
|
||||
order by slide.position, l10_caption
|
||||
`, carouselName), loc.Language, company.ID)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
@ -168,8 +208,9 @@ func CollectSlideEntries(ctx context.Context, company *auth.Company, conn *datab
|
|||
and media.company_id = $1
|
||||
group by media_id
|
||||
, media.path
|
||||
, position
|
||||
, caption
|
||||
order by caption
|
||||
order by position, caption
|
||||
`, carouselName), pgx.QueryResultFormats{pgx.BinaryFormatCode}, company.ID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
|
@ -19,6 +19,11 @@ func (tx *Tx) EditCampsiteType(ctx context.Context, slug string, mediaID int, na
|
|||
return tx.GetText(ctx, "select edit_campsite_type($1, $2, $3, $4, $5, $6, $7, $8, $9, $10)", slug, mediaID, name, spiel, info, facilities, description, maxCampers, dogsAllowed, active)
|
||||
}
|
||||
|
||||
func (c *Conn) OrderCampsiteTypes(ctx context.Context, slugs []string) error {
|
||||
_, err := c.Exec(ctx, "select order_campsite_types($1)", slugs)
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *Conn) TranslateCampsiteType(ctx context.Context, slug string, langTag language.Tag, name string, spiel string, info string, facilities string, description string) error {
|
||||
_, err := c.Exec(ctx, "select translate_campsite_type($1, $2, $3, $4, $5, $6, $7)", slug, langTag, name, spiel, info, facilities, description)
|
||||
return err
|
||||
|
@ -46,6 +51,16 @@ func (c *Conn) TranslateCampsiteTypeOption(ctx context.Context, id int, langTag
|
|||
return err
|
||||
}
|
||||
|
||||
func (c *Conn) OrderCampsiteTypeOptions(ctx context.Context, ids []int) error {
|
||||
_, err := c.Exec(ctx, "select order_campsite_type_options($1)", ids)
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *Conn) OrderCampsiteTypeCarousel(ctx context.Context, typeSlug string, media_ids []int) error {
|
||||
_, err := c.Exec(ctx, "select order_campsite_type_carousel($1, $2)", typeSlug, media_ids)
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *Conn) AddCampsiteTypeFeature(ctx context.Context, typeSlug string, iconName string, name string) (int, error) {
|
||||
return c.GetInt(ctx, "select add_campsite_type_feature($1, $2, $3)", typeSlug, iconName, name)
|
||||
}
|
||||
|
@ -67,3 +82,8 @@ func (c *Conn) SetupRedsys(ctx context.Context, companyID int, merchantCode stri
|
|||
_, err := c.Exec(ctx, "select setup_redsys($1, $2, $3, $4, $5, $6)", companyID, merchantCode, terminalNumber, environment, integration, encryptKeyParam)
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *Conn) OrderSeasons(ctx context.Context, slugs []string) error {
|
||||
_, err := c.Exec(ctx, "select order_seasons($1)", slugs)
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ type AdminHandler struct {
|
|||
func NewAdminHandler(locales locale.Locales) *AdminHandler {
|
||||
return &AdminHandler{
|
||||
locales: locales,
|
||||
carousel: carousel.NewAdminHandler(carouselName, locales),
|
||||
carousel: carousel.NewAdminHandler(carouselName, serveHomeIndex, locales),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -69,6 +69,7 @@ func mustCollectCampsiteTypes(ctx context.Context, company *auth.Company, conn *
|
|||
join media using (media_id)
|
||||
where campsite_type.company_id = $2
|
||||
and campsite_type.active
|
||||
order by position, l10_name
|
||||
`, loc.Language, company.ID)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
|
|
@ -61,6 +61,13 @@ func (h *AdminHandler) Handler(user *auth.User, company *auth.Company, conn *dat
|
|||
default:
|
||||
httplib.MethodNotAllowed(w, r, http.MethodGet)
|
||||
}
|
||||
case "order":
|
||||
switch r.Method {
|
||||
case http.MethodPost:
|
||||
orderSeasons(w, r, user, company, conn)
|
||||
default:
|
||||
httplib.MethodNotAllowed(w, r, http.MethodPost)
|
||||
}
|
||||
case "range":
|
||||
switch r.Method {
|
||||
case http.MethodGet:
|
||||
|
@ -158,7 +165,8 @@ func GetCalendarMonth(query url.Values) time.Month {
|
|||
|
||||
func collectSeasonEntries(ctx context.Context, company *auth.Company, conn *database.Conn) ([]*seasonEntry, error) {
|
||||
rows, err := conn.Query(ctx, `
|
||||
select '/admin/seasons/' || season.slug
|
||||
select season.slug
|
||||
, '/admin/seasons/' || season.slug
|
||||
, season.name
|
||||
, to_color(color)::text
|
||||
, active
|
||||
|
@ -170,10 +178,11 @@ func collectSeasonEntries(ctx context.Context, company *auth.Company, conn *data
|
|||
and language.selectable
|
||||
and season.company_id = $1
|
||||
group by season.slug
|
||||
, season.position
|
||||
, season.name
|
||||
, to_color(color)::text
|
||||
, active
|
||||
order by name`, pgx.QueryResultFormats{pgx.BinaryFormatCode}, company.ID)
|
||||
order by position, name`, pgx.QueryResultFormats{pgx.BinaryFormatCode}, company.ID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -183,7 +192,7 @@ func collectSeasonEntries(ctx context.Context, company *auth.Company, conn *data
|
|||
for rows.Next() {
|
||||
entry := &seasonEntry{}
|
||||
var translations database.RecordArray
|
||||
if err = rows.Scan(&entry.URL, &entry.Name, &entry.Color, &entry.Active, &translations); err != nil {
|
||||
if err = rows.Scan(&entry.Slug, &entry.URL, &entry.Name, &entry.Color, &entry.Active, &translations); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
for _, el := range translations.Elements {
|
||||
|
@ -201,6 +210,7 @@ func collectSeasonEntries(ctx context.Context, company *auth.Company, conn *data
|
|||
|
||||
type seasonEntry struct {
|
||||
ID int
|
||||
Slug string
|
||||
URL string
|
||||
Name string
|
||||
Color string
|
||||
|
@ -404,6 +414,30 @@ func (f *seasonForm) MustRender(w http.ResponseWriter, r *http.Request, user *au
|
|||
template.MustRenderAdmin(w, r, user, company, "season/form.gohtml", f)
|
||||
}
|
||||
|
||||
func orderSeasons(w http.ResponseWriter, r *http.Request, user *auth.User, company *auth.Company, conn *database.Conn) {
|
||||
if err := r.ParseForm(); err != nil {
|
||||
http.Error(w, err.Error(), http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
if err := user.VerifyCSRFToken(r); err != nil {
|
||||
http.Error(w, err.Error(), http.StatusForbidden)
|
||||
return
|
||||
}
|
||||
slugs := r.PostForm["slug"]
|
||||
if len(slugs) > 0 {
|
||||
for _, slug := range slugs {
|
||||
if !uuid.Valid(slug) {
|
||||
w.WriteHeader(http.StatusUnprocessableEntity)
|
||||
return
|
||||
}
|
||||
}
|
||||
if err := conn.OrderSeasons(r.Context(), slugs); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
serveSeasonIndex(w, r, user, company, conn)
|
||||
}
|
||||
|
||||
func serveSeasonCalendar(w http.ResponseWriter, r *http.Request, user *auth.User, company *auth.Company, conn *database.Conn) {
|
||||
f := newCalendarForm(r.Context(), company, conn)
|
||||
f.MustRender(w, r, user, company, conn, GetCalendarYear(r.URL.Query()))
|
||||
|
@ -459,17 +493,17 @@ func mustCollectCalendarSeasons(ctx context.Context, company *auth.Company, conn
|
|||
, $1 as name
|
||||
, to_color($2)::text
|
||||
, true
|
||||
, 0 as sort
|
||||
, 0 as position
|
||||
union all
|
||||
select season_id
|
||||
, name
|
||||
, to_color(color)::text
|
||||
, active
|
||||
, 1 as sort
|
||||
, position
|
||||
from season
|
||||
where company_id = $3
|
||||
and active
|
||||
order by sort, name`, locale.PgettextNoop("Unset", "action"), UnsetColor, company.ID)
|
||||
order by position, name`, locale.PgettextNoop("Unset", "action"), UnsetColor, company.ID)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ type AdminHandler struct {
|
|||
func NewAdminHandler(locales locale.Locales) *AdminHandler {
|
||||
return &AdminHandler{
|
||||
locales: locales,
|
||||
carousel: carousel.NewAdminHandler(carouselName, locales),
|
||||
carousel: carousel.NewAdminHandler(carouselName, serveServicesIndex, locales),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ func (h *AdminHandler) Handler(user *auth.User, company *auth.Company, conn *dat
|
|||
case "":
|
||||
switch r.Method {
|
||||
case http.MethodGet:
|
||||
serveHomeIndex(w, r, user, company, conn)
|
||||
serveServicesIndex(w, r, user, company, conn)
|
||||
case http.MethodPost:
|
||||
addService(w, r, user, company, conn)
|
||||
default:
|
||||
|
@ -113,7 +113,7 @@ func (h *AdminHandler) Handler(user *auth.User, company *auth.Company, conn *dat
|
|||
})
|
||||
}
|
||||
|
||||
func serveHomeIndex(w http.ResponseWriter, r *http.Request, user *auth.User, company *auth.Company, conn *database.Conn) {
|
||||
func serveServicesIndex(w http.ResponseWriter, r *http.Request, user *auth.User, company *auth.Company, conn *database.Conn) {
|
||||
slides, err := carousel.CollectSlideEntries(r.Context(), company, conn, carouselName)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
|
|
@ -50,6 +50,7 @@ func (p *PublicPage) Setup(r *http.Request, user *auth.User, company *auth.Compa
|
|||
left join campsite_type_i18n as i18n on campsite_type.campsite_type_id = i18n.campsite_type_id and i18n.lang_tag = $1
|
||||
where company_id = $2
|
||||
and active
|
||||
order by position, l10n_name
|
||||
`, user.Locale.Language, company.ID),
|
||||
}
|
||||
|
||||
|
|
298
po/ca.po
298
po/ca.po
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: camper\n"
|
||||
"Report-Msgid-Bugs-To: jordi@tandem.blog\n"
|
||||
"POT-Creation-Date: 2023-12-13 23:44+0100\n"
|
||||
"POT-Creation-Date: 2023-12-20 19:48+0100\n"
|
||||
"PO-Revision-Date: 2023-07-22 23:45+0200\n"
|
||||
"Last-Translator: jordi fita mas <jordi@tandem.blog>\n"
|
||||
"Language-Team: Catalan <ca@dodds.net>\n"
|
||||
|
@ -44,7 +44,7 @@ msgstr "Ha fallat el pagament"
|
|||
#: web/templates/public/services.gohtml:6
|
||||
#: web/templates/public/services.gohtml:15
|
||||
#: web/templates/public/layout.gohtml:44 web/templates/public/layout.gohtml:71
|
||||
#: web/templates/admin/services/index.gohtml:53
|
||||
#: web/templates/admin/services/index.gohtml:66
|
||||
msgctxt "title"
|
||||
msgid "Services"
|
||||
msgstr "Serveis"
|
||||
|
@ -136,7 +136,7 @@ msgid "*Minimum %d nights per stay"
|
|||
msgstr "*Mínim %d nits per estada"
|
||||
|
||||
#: web/templates/public/campsite/type.gohtml:89
|
||||
#: web/templates/admin/season/index.gohtml:48
|
||||
#: web/templates/admin/season/index.gohtml:59
|
||||
msgctxt "title"
|
||||
msgid "Calendar"
|
||||
msgstr "Calendari"
|
||||
|
@ -203,61 +203,61 @@ msgctxt "day"
|
|||
msgid "Sun"
|
||||
msgstr "dg"
|
||||
|
||||
#: web/templates/public/surroundings.gohtml:13
|
||||
#: web/templates/public/surroundings.gohtml:28
|
||||
msgctxt "title"
|
||||
msgid "What to Do Outside the Campsite?"
|
||||
msgstr "Què fer des del càmping?"
|
||||
|
||||
#: web/templates/public/surroundings.gohtml:15
|
||||
#: web/templates/public/surroundings.gohtml:31
|
||||
msgid "Campsite Montagut is an ideal starting point for quiet outings, climbing, swimming in the river and gorges, volcanoes, the Fageda d’en Jordà, cycle tours for all ages…."
|
||||
msgstr "El Càmping Montagut és ideal com a punt de partida d’excursions tranquil·les, escalada, banyar-se en el riu i gorgues, volcans, la Fageda d’en Jordà, sortides amb bicicleta per a tots els nivells…."
|
||||
|
||||
#: web/templates/public/surroundings.gohtml:22
|
||||
#: web/templates/public/surroundings.gohtml:38
|
||||
msgid "Get to the Costa Brava and enjoy the beaches, the gastronomy or go kayaking…."
|
||||
msgstr "Arribar fins a la costa brava i gaudir de les platges, la gastronomia o anar amb caiac…."
|
||||
|
||||
#: web/templates/public/surroundings.gohtml:31
|
||||
#: web/templates/public/surroundings.gohtml:47
|
||||
msgid "You will also find museums in Olot, Figures, Girona."
|
||||
msgstr "També trobareu museus a Olot, Figueres, Girona."
|
||||
|
||||
#: web/templates/public/surroundings.gohtml:32
|
||||
#: web/templates/public/surroundings.gohtml:48
|
||||
msgid "As well as music festivals, dance, theater…."
|
||||
msgstr "Com festivals de música, dansa, teatre…."
|
||||
|
||||
#: web/templates/public/surroundings.gohtml:38
|
||||
#: web/templates/public/surroundings.gohtml:54
|
||||
msgctxt "title"
|
||||
msgid "Once at the Campsite, We Can Inform You about What Activities are Available"
|
||||
msgstr "Un cop en el càmping, us podem informar de quines activitats fer"
|
||||
|
||||
#: web/templates/public/surroundings.gohtml:41
|
||||
#: web/templates/public/surroundings.gohtml:57
|
||||
msgid "Cycle routes"
|
||||
msgstr "Rutes amb bicicleta"
|
||||
|
||||
#: web/templates/public/surroundings.gohtml:42
|
||||
#: web/templates/public/surroundings.gohtml:58
|
||||
msgid "There are many bicycle rental companies in Olot."
|
||||
msgstr "A Olot podeu trobar empreses de lloguer de bicicletes."
|
||||
|
||||
#: web/templates/public/surroundings.gohtml:46
|
||||
#: web/templates/public/surroundings.gohtml:62
|
||||
msgid "Routes"
|
||||
msgstr "Rutes"
|
||||
|
||||
#: web/templates/public/surroundings.gohtml:47
|
||||
#: web/templates/public/surroundings.gohtml:63
|
||||
msgid "Routes of all kinds, climbing, mountain passes, for all levels."
|
||||
msgstr "Rutes de tota mena, escalada, ports de muntanya, per a tots els nivells."
|
||||
|
||||
#: web/templates/public/surroundings.gohtml:51
|
||||
#: web/templates/public/surroundings.gohtml:67
|
||||
msgid "Family outing"
|
||||
msgstr "Excursions familiars"
|
||||
|
||||
#: web/templates/public/surroundings.gohtml:52
|
||||
#: web/templates/public/surroundings.gohtml:68
|
||||
msgid "Many outing possibilities, for all ages."
|
||||
msgstr "Múltiples excursions per a totes les edats."
|
||||
|
||||
#: web/templates/public/surroundings.gohtml:56
|
||||
#: web/templates/public/surroundings.gohtml:72
|
||||
msgid "Kayak"
|
||||
msgstr "Caiac"
|
||||
|
||||
#: web/templates/public/surroundings.gohtml:57
|
||||
#: web/templates/public/surroundings.gohtml:73
|
||||
msgid "There are several points where you can go by kayak, from sections of the Ter river as well as on the coast…."
|
||||
msgstr "Hi ha diversos punts on poder anar amb caiac, des de trams del riu Ter com també a la costa…."
|
||||
|
||||
|
@ -363,18 +363,18 @@ msgid "I have read and I accept the reservation conditions"
|
|||
msgstr "He llegit i accepto les condicions de reserves"
|
||||
|
||||
#: web/templates/public/layout.gohtml:11 web/templates/public/layout.gohtml:25
|
||||
#: web/templates/public/layout.gohtml:96
|
||||
#: web/templates/public/layout.gohtml:102
|
||||
msgid "Campsite Montagut"
|
||||
msgstr "Càmping Montagut"
|
||||
|
||||
#: web/templates/public/layout.gohtml:23 web/templates/admin/layout.gohtml:18
|
||||
#: web/templates/public/layout.gohtml:23 web/templates/admin/layout.gohtml:19
|
||||
msgid "Skip to main content"
|
||||
msgstr "Salta al contingut principal"
|
||||
|
||||
#: web/templates/public/layout.gohtml:35 web/templates/public/layout.gohtml:80
|
||||
#: web/templates/admin/campsite/index.gohtml:6
|
||||
#: web/templates/admin/campsite/index.gohtml:12
|
||||
#: web/templates/admin/layout.gohtml:43 web/templates/admin/layout.gohtml:74
|
||||
#: web/templates/admin/layout.gohtml:44 web/templates/admin/layout.gohtml:75
|
||||
msgctxt "title"
|
||||
msgid "Campsites"
|
||||
msgstr "Allotjaments"
|
||||
|
@ -384,7 +384,7 @@ msgctxt "title"
|
|||
msgid "Sections"
|
||||
msgstr "Apartats"
|
||||
|
||||
#: web/templates/public/layout.gohtml:93
|
||||
#: web/templates/public/layout.gohtml:99
|
||||
msgid "<abbr title=\"Catalonia Tourism Registry\">RTC</abbr> <abbr title=\"Number\">#</abbr>%s"
|
||||
msgstr "<abbr title=\"Número\">Núm.</abbr> <abbr title=\"Registre de Turisme de Catalunya\">RTC</abbr> %s"
|
||||
|
||||
|
@ -526,21 +526,21 @@ msgid "Add Feature"
|
|||
msgstr "Afegeix característica"
|
||||
|
||||
#: web/templates/admin/campsite/feature/index.gohtml:17
|
||||
#: web/templates/admin/campsite/option/index.gohtml:17
|
||||
#: web/templates/admin/campsite/type/index.gohtml:17
|
||||
#: web/templates/admin/season/index.gohtml:18
|
||||
#: web/templates/admin/campsite/option/index.gohtml:25
|
||||
#: web/templates/admin/campsite/type/index.gohtml:25
|
||||
#: web/templates/admin/season/index.gohtml:26
|
||||
msgctxt "header"
|
||||
msgid "Name"
|
||||
msgstr "Nom"
|
||||
|
||||
#: web/templates/admin/campsite/feature/index.gohtml:18
|
||||
#: web/templates/admin/campsite/carousel/index.gohtml:19
|
||||
#: web/templates/admin/campsite/option/index.gohtml:18
|
||||
#: web/templates/admin/campsite/type/index.gohtml:18
|
||||
#: web/templates/admin/season/index.gohtml:19
|
||||
#: web/templates/admin/services/index.gohtml:19
|
||||
#: web/templates/admin/services/index.gohtml:60
|
||||
#: web/templates/admin/home/index.gohtml:19
|
||||
#: web/templates/admin/campsite/carousel/index.gohtml:27
|
||||
#: web/templates/admin/campsite/option/index.gohtml:26
|
||||
#: web/templates/admin/campsite/type/index.gohtml:26
|
||||
#: web/templates/admin/season/index.gohtml:27
|
||||
#: web/templates/admin/services/index.gohtml:27
|
||||
#: web/templates/admin/services/index.gohtml:73
|
||||
#: web/templates/admin/home/index.gohtml:27
|
||||
msgctxt "header"
|
||||
msgid "Translations"
|
||||
msgstr "Traduccions"
|
||||
|
@ -580,45 +580,45 @@ msgctxt "action"
|
|||
msgid "Add slide"
|
||||
msgstr "Afegeix diapositiva"
|
||||
|
||||
#: web/templates/admin/campsite/carousel/index.gohtml:17
|
||||
#: web/templates/admin/services/index.gohtml:17
|
||||
#: web/templates/admin/home/index.gohtml:17
|
||||
#: web/templates/admin/campsite/carousel/index.gohtml:25
|
||||
#: web/templates/admin/services/index.gohtml:25
|
||||
#: web/templates/admin/home/index.gohtml:25
|
||||
msgctxt "header"
|
||||
msgid "Image"
|
||||
msgstr "Imatge"
|
||||
|
||||
#: web/templates/admin/campsite/carousel/index.gohtml:18
|
||||
#: web/templates/admin/services/index.gohtml:18
|
||||
#: web/templates/admin/home/index.gohtml:18
|
||||
#: web/templates/admin/campsite/carousel/index.gohtml:26
|
||||
#: web/templates/admin/services/index.gohtml:26
|
||||
#: web/templates/admin/home/index.gohtml:26
|
||||
msgctxt "header"
|
||||
msgid "Caption"
|
||||
msgstr "Llegenda"
|
||||
|
||||
#: web/templates/admin/campsite/carousel/index.gohtml:20
|
||||
#: web/templates/admin/services/index.gohtml:20
|
||||
#: web/templates/admin/services/index.gohtml:61
|
||||
#: web/templates/admin/home/index.gohtml:20
|
||||
#: web/templates/admin/campsite/carousel/index.gohtml:28
|
||||
#: web/templates/admin/services/index.gohtml:28
|
||||
#: web/templates/admin/services/index.gohtml:74
|
||||
#: web/templates/admin/home/index.gohtml:28
|
||||
msgctxt "header"
|
||||
msgid "Actions"
|
||||
msgstr "Accions"
|
||||
|
||||
#: web/templates/admin/campsite/carousel/index.gohtml:24
|
||||
#: web/templates/admin/services/index.gohtml:24
|
||||
#: web/templates/admin/home/index.gohtml:24
|
||||
#: web/templates/admin/campsite/carousel/index.gohtml:32
|
||||
#: web/templates/admin/services/index.gohtml:32
|
||||
#: web/templates/admin/home/index.gohtml:32
|
||||
msgid "Are you sure you wish to delete this slide?"
|
||||
msgstr "Esteu segur de voler esborrar aquesta diapositiva?"
|
||||
|
||||
#: web/templates/admin/campsite/carousel/index.gohtml:42
|
||||
#: web/templates/admin/services/index.gohtml:42
|
||||
#: web/templates/admin/services/index.gohtml:80
|
||||
#: web/templates/admin/home/index.gohtml:42
|
||||
#: web/templates/admin/campsite/carousel/index.gohtml:55
|
||||
#: web/templates/admin/services/index.gohtml:54
|
||||
#: web/templates/admin/services/index.gohtml:93
|
||||
#: web/templates/admin/home/index.gohtml:54
|
||||
msgctxt "action"
|
||||
msgid "Delete"
|
||||
msgstr "Esborra"
|
||||
|
||||
#: web/templates/admin/campsite/carousel/index.gohtml:50
|
||||
#: web/templates/admin/services/index.gohtml:50
|
||||
#: web/templates/admin/home/index.gohtml:50
|
||||
#: web/templates/admin/campsite/carousel/index.gohtml:64
|
||||
#: web/templates/admin/services/index.gohtml:63
|
||||
#: web/templates/admin/home/index.gohtml:63
|
||||
msgid "No slides added yet."
|
||||
msgstr "No s’ha afegit cap diapositiva encara."
|
||||
|
||||
|
@ -699,7 +699,7 @@ msgctxt "action"
|
|||
msgid "Add Option"
|
||||
msgstr "Afegeix opció"
|
||||
|
||||
#: web/templates/admin/campsite/option/index.gohtml:39
|
||||
#: web/templates/admin/campsite/option/index.gohtml:52
|
||||
msgid "No campsite type options added yet."
|
||||
msgstr "No s’ha afegit cap opció al tipus d’allotjament encara."
|
||||
|
||||
|
@ -725,14 +725,14 @@ msgid "Type"
|
|||
msgstr "Tipus"
|
||||
|
||||
#: web/templates/admin/campsite/index.gohtml:28
|
||||
#: web/templates/admin/campsite/type/index.gohtml:47
|
||||
#: web/templates/admin/season/index.gohtml:39
|
||||
#: web/templates/admin/campsite/type/index.gohtml:59
|
||||
#: web/templates/admin/season/index.gohtml:49
|
||||
msgid "Yes"
|
||||
msgstr "Sí"
|
||||
|
||||
#: web/templates/admin/campsite/index.gohtml:28
|
||||
#: web/templates/admin/campsite/type/index.gohtml:47
|
||||
#: web/templates/admin/season/index.gohtml:39
|
||||
#: web/templates/admin/campsite/type/index.gohtml:59
|
||||
#: web/templates/admin/season/index.gohtml:49
|
||||
msgid "No"
|
||||
msgstr "No"
|
||||
|
||||
|
@ -753,7 +753,7 @@ msgid "New Campsite Type"
|
|||
msgstr "Nou tipus d’allotjament"
|
||||
|
||||
#: web/templates/admin/campsite/type/form.gohtml:37
|
||||
#: web/templates/admin/campsite/type/index.gohtml:22
|
||||
#: web/templates/admin/campsite/type/index.gohtml:30
|
||||
msgctxt "campsite type"
|
||||
msgid "Active"
|
||||
msgstr "Actiu"
|
||||
|
@ -801,7 +801,7 @@ msgstr "Descripció"
|
|||
|
||||
#: web/templates/admin/campsite/type/index.gohtml:6
|
||||
#: web/templates/admin/campsite/type/index.gohtml:12
|
||||
#: web/templates/admin/layout.gohtml:40
|
||||
#: web/templates/admin/layout.gohtml:41
|
||||
msgctxt "title"
|
||||
msgid "Campsite Types"
|
||||
msgstr "Tipus d’allotjaments"
|
||||
|
@ -811,37 +811,37 @@ msgctxt "action"
|
|||
msgid "Add Type"
|
||||
msgstr "Afegeix tipus"
|
||||
|
||||
#: web/templates/admin/campsite/type/index.gohtml:19
|
||||
#: web/templates/admin/campsite/type/index.gohtml:27
|
||||
msgctxt "header"
|
||||
msgid "Features"
|
||||
msgstr "Característiques"
|
||||
|
||||
#: web/templates/admin/campsite/type/index.gohtml:20
|
||||
#: web/templates/admin/campsite/type/index.gohtml:28
|
||||
msgctxt "header"
|
||||
msgid "Options"
|
||||
msgstr "Opcions"
|
||||
|
||||
#: web/templates/admin/campsite/type/index.gohtml:21
|
||||
#: web/templates/admin/campsite/type/index.gohtml:29
|
||||
msgctxt "header"
|
||||
msgid "Carousel"
|
||||
msgstr "Carrusel"
|
||||
|
||||
#: web/templates/admin/campsite/type/index.gohtml:39
|
||||
#: web/templates/admin/campsite/type/index.gohtml:51
|
||||
msgctxt "action"
|
||||
msgid "Edit Features"
|
||||
msgstr "Edita les característiques"
|
||||
|
||||
#: web/templates/admin/campsite/type/index.gohtml:42
|
||||
#: web/templates/admin/campsite/type/index.gohtml:54
|
||||
msgctxt "action"
|
||||
msgid "Edit Options"
|
||||
msgstr "Edita les opcions"
|
||||
|
||||
#: web/templates/admin/campsite/type/index.gohtml:45
|
||||
#: web/templates/admin/campsite/type/index.gohtml:57
|
||||
msgctxt "action"
|
||||
msgid "Edit Carousel"
|
||||
msgstr "Edita el carrusel"
|
||||
|
||||
#: web/templates/admin/campsite/type/index.gohtml:53
|
||||
#: web/templates/admin/campsite/type/index.gohtml:66
|
||||
msgid "No campsite types added yet."
|
||||
msgstr "No s’ha afegit cap tipus d’allotjament encara."
|
||||
|
||||
|
@ -864,7 +864,7 @@ msgid "New Season"
|
|||
msgstr "Nova temporada"
|
||||
|
||||
#: web/templates/admin/season/form.gohtml:37
|
||||
#: web/templates/admin/season/index.gohtml:20
|
||||
#: web/templates/admin/season/index.gohtml:28
|
||||
msgctxt "season"
|
||||
msgid "Active"
|
||||
msgstr "Activa"
|
||||
|
@ -876,7 +876,7 @@ msgstr "Color"
|
|||
|
||||
#: web/templates/admin/season/index.gohtml:6
|
||||
#: web/templates/admin/season/index.gohtml:12
|
||||
#: web/templates/admin/layout.gohtml:46
|
||||
#: web/templates/admin/layout.gohtml:47
|
||||
msgctxt "title"
|
||||
msgid "Seasons"
|
||||
msgstr "Temporades"
|
||||
|
@ -886,12 +886,12 @@ msgctxt "action"
|
|||
msgid "Add Season"
|
||||
msgstr "Afegeix temporada"
|
||||
|
||||
#: web/templates/admin/season/index.gohtml:17
|
||||
#: web/templates/admin/season/index.gohtml:25
|
||||
msgctxt "header"
|
||||
msgid "Color"
|
||||
msgstr "Color"
|
||||
|
||||
#: web/templates/admin/season/index.gohtml:45
|
||||
#: web/templates/admin/season/index.gohtml:56
|
||||
msgid "No seasons added yet."
|
||||
msgstr "No s’ha afegit cap temporada encara."
|
||||
|
||||
|
@ -908,7 +908,7 @@ msgid "Cancel"
|
|||
msgstr "Canceŀla"
|
||||
|
||||
#: web/templates/admin/payment.gohtml:6 web/templates/admin/payment.gohtml:12
|
||||
#: web/templates/admin/layout.gohtml:37
|
||||
#: web/templates/admin/layout.gohtml:38
|
||||
msgctxt "title"
|
||||
msgid "Payment Settings"
|
||||
msgstr "Paràmetres de pagament"
|
||||
|
@ -950,7 +950,7 @@ msgid "Save changes"
|
|||
msgstr "Desa els canvis"
|
||||
|
||||
#: web/templates/admin/dashboard.gohtml:6
|
||||
#: web/templates/admin/dashboard.gohtml:10 web/templates/admin/layout.gohtml:71
|
||||
#: web/templates/admin/dashboard.gohtml:10 web/templates/admin/layout.gohtml:72
|
||||
msgctxt "title"
|
||||
msgid "Dashboard"
|
||||
msgstr "Tauler"
|
||||
|
@ -983,7 +983,7 @@ msgid "New Service"
|
|||
msgstr "Nou servei"
|
||||
|
||||
#: web/templates/admin/services/index.gohtml:6
|
||||
#: web/templates/admin/layout.gohtml:55
|
||||
#: web/templates/admin/layout.gohtml:56
|
||||
msgctxt "title"
|
||||
msgid "Services Page"
|
||||
msgstr "Pàgina de serveis"
|
||||
|
@ -994,21 +994,21 @@ msgctxt "title"
|
|||
msgid "Carousel"
|
||||
msgstr "Carrusel"
|
||||
|
||||
#: web/templates/admin/services/index.gohtml:54
|
||||
#: web/templates/admin/services/index.gohtml:67
|
||||
msgctxt "action"
|
||||
msgid "Add service"
|
||||
msgstr "Afegeix servei"
|
||||
|
||||
#: web/templates/admin/services/index.gohtml:59
|
||||
#: web/templates/admin/services/index.gohtml:72
|
||||
msgctxt "header"
|
||||
msgid "Service"
|
||||
msgstr "Servei"
|
||||
|
||||
#: web/templates/admin/services/index.gohtml:65
|
||||
#: web/templates/admin/services/index.gohtml:78
|
||||
msgid "Are you sure you wish to delete this service?"
|
||||
msgstr "Esteu segur de voler esborrar aquest servei?"
|
||||
|
||||
#: web/templates/admin/services/index.gohtml:88
|
||||
#: web/templates/admin/services/index.gohtml:101
|
||||
msgid "No services added yet."
|
||||
msgstr "No s’ha afegit cap servei encara."
|
||||
|
||||
|
@ -1019,7 +1019,7 @@ msgid "Translate Service to %s"
|
|||
msgstr "Traducció del servei a %s"
|
||||
|
||||
#: web/templates/admin/profile.gohtml:6 web/templates/admin/profile.gohtml:12
|
||||
#: web/templates/admin/layout.gohtml:30
|
||||
#: web/templates/admin/layout.gohtml:31
|
||||
msgctxt "title"
|
||||
msgid "Profile"
|
||||
msgstr "Perfil"
|
||||
|
@ -1111,29 +1111,29 @@ msgctxt "input"
|
|||
msgid "Legal Disclaimer"
|
||||
msgstr "Nota legal"
|
||||
|
||||
#: web/templates/admin/layout.gohtml:26
|
||||
#: web/templates/admin/layout.gohtml:27
|
||||
msgctxt "title"
|
||||
msgid "User Menu"
|
||||
msgstr "Menú d’usuari"
|
||||
|
||||
#: web/templates/admin/layout.gohtml:34
|
||||
#: web/templates/admin/layout.gohtml:35
|
||||
msgctxt "title"
|
||||
msgid "Company Settings"
|
||||
msgstr "Paràmetres de l’empresa"
|
||||
|
||||
#: web/templates/admin/layout.gohtml:49
|
||||
#: web/templates/admin/layout.gohtml:50
|
||||
#: web/templates/admin/media/index.gohtml:6
|
||||
#: web/templates/admin/media/index.gohtml:11
|
||||
msgctxt "title"
|
||||
msgid "Media"
|
||||
msgstr "Mèdia"
|
||||
|
||||
#: web/templates/admin/layout.gohtml:52 web/templates/admin/home/index.gohtml:6
|
||||
#: web/templates/admin/layout.gohtml:53 web/templates/admin/home/index.gohtml:6
|
||||
msgctxt "title"
|
||||
msgid "Home Page"
|
||||
msgstr "Pàgina d’inici"
|
||||
|
||||
#: web/templates/admin/layout.gohtml:60
|
||||
#: web/templates/admin/layout.gohtml:61
|
||||
msgctxt "action"
|
||||
msgid "Logout"
|
||||
msgstr "Surt"
|
||||
|
@ -1203,31 +1203,31 @@ msgctxt "title"
|
|||
msgid "Upload Media"
|
||||
msgstr "Pujada de mèdia"
|
||||
|
||||
#: pkg/carousel/admin.go:233 pkg/campsite/types/carousel.go:232
|
||||
#: pkg/carousel/admin.go:274 pkg/campsite/types/carousel.go:242
|
||||
msgctxt "input"
|
||||
msgid "Slide image"
|
||||
msgstr "Imatge de la diapositiva"
|
||||
|
||||
#: pkg/carousel/admin.go:234 pkg/campsite/types/carousel.go:233
|
||||
#: pkg/carousel/admin.go:275 pkg/campsite/types/carousel.go:243
|
||||
msgctxt "action"
|
||||
msgid "Set slide image"
|
||||
msgstr "Estableix la imatge de la diapositiva"
|
||||
|
||||
#: pkg/carousel/admin.go:286 pkg/campsite/types/carousel.go:287
|
||||
#: pkg/carousel/admin.go:327 pkg/campsite/types/carousel.go:297
|
||||
msgid "Slide image can not be empty."
|
||||
msgstr "No podeu deixar la imatge de la diapositiva en blanc."
|
||||
|
||||
#: pkg/carousel/admin.go:287 pkg/campsite/types/carousel.go:288
|
||||
#: pkg/carousel/admin.go:328 pkg/campsite/types/carousel.go:298
|
||||
msgid "Slide image must be an image media type."
|
||||
msgstr "La imatge de la diapositiva ha de ser un mèdia de tipus imatge."
|
||||
|
||||
#: pkg/app/login.go:56 pkg/app/user.go:246 pkg/company/admin.go:210
|
||||
#: pkg/booking/public.go:265
|
||||
#: pkg/booking/public.go:269
|
||||
msgid "Email can not be empty."
|
||||
msgstr "No podeu deixar el correu-e en blanc."
|
||||
|
||||
#: pkg/app/login.go:57 pkg/app/user.go:247 pkg/company/admin.go:211
|
||||
#: pkg/booking/public.go:266
|
||||
#: pkg/booking/public.go:270
|
||||
msgid "This email is not valid. It should be like name@domain.com."
|
||||
msgstr "Aquest correu-e no és vàlid. Hauria de ser similar a nom@domini.com."
|
||||
|
||||
|
@ -1246,9 +1246,9 @@ msgstr "Automàtic"
|
|||
|
||||
#: pkg/app/user.go:249 pkg/campsite/types/l10n.go:87
|
||||
#: pkg/campsite/types/l10n.go:144 pkg/campsite/types/l10n.go:268
|
||||
#: pkg/campsite/types/option.go:340 pkg/campsite/types/feature.go:243
|
||||
#: pkg/campsite/types/admin.go:415 pkg/season/l10n.go:69
|
||||
#: pkg/season/admin.go:394 pkg/services/l10n.go:73 pkg/services/admin.go:266
|
||||
#: pkg/campsite/types/option.go:350 pkg/campsite/types/feature.go:243
|
||||
#: pkg/campsite/types/admin.go:447 pkg/season/l10n.go:69
|
||||
#: pkg/season/admin.go:404 pkg/services/l10n.go:73 pkg/services/admin.go:266
|
||||
msgid "Name can not be empty."
|
||||
msgstr "No podeu deixar el nom en blanc."
|
||||
|
||||
|
@ -1268,44 +1268,44 @@ msgstr "El fitxer has de ser una imatge PNG o JPEG vàlida."
|
|||
msgid "Access forbidden"
|
||||
msgstr "Accés prohibit"
|
||||
|
||||
#: pkg/campsite/types/option.go:341 pkg/campsite/types/feature.go:244
|
||||
#: pkg/campsite/types/admin.go:416
|
||||
#: pkg/campsite/types/option.go:351 pkg/campsite/types/feature.go:244
|
||||
#: pkg/campsite/types/admin.go:448
|
||||
msgid "Name must have at least one letter."
|
||||
msgstr "El nom ha de tenir com a mínim una lletra."
|
||||
|
||||
#: pkg/campsite/types/option.go:344
|
||||
#: pkg/campsite/types/option.go:354
|
||||
msgid "Minimum can not be empty."
|
||||
msgstr "No podeu deixar el mínim en blanc."
|
||||
|
||||
#: pkg/campsite/types/option.go:345
|
||||
#: pkg/campsite/types/option.go:355
|
||||
msgid "Minimum must be an integer number."
|
||||
msgstr "El valor del mínim ha de ser un número enter."
|
||||
|
||||
#: pkg/campsite/types/option.go:347
|
||||
#: pkg/campsite/types/option.go:357
|
||||
msgid "Minimum must be zero or greater."
|
||||
msgstr "El valor del mínim ha de ser com a mínim zero."
|
||||
|
||||
#: pkg/campsite/types/option.go:350
|
||||
#: pkg/campsite/types/option.go:360
|
||||
msgid "Maximum can not be empty."
|
||||
msgstr "No podeu deixar el màxim en blanc."
|
||||
|
||||
#: pkg/campsite/types/option.go:351
|
||||
#: pkg/campsite/types/option.go:361
|
||||
msgid "Maximum must be an integer number."
|
||||
msgstr "El valor del màxim ha de ser un número enter."
|
||||
|
||||
#: pkg/campsite/types/option.go:353
|
||||
#: pkg/campsite/types/option.go:363
|
||||
msgid "Maximum must be equal or greater than minimum."
|
||||
msgstr "El valor del màxim ha de ser igual o superir al del mínim."
|
||||
|
||||
#: pkg/campsite/types/option.go:357 pkg/campsite/types/admin.go:429
|
||||
#: pkg/campsite/types/option.go:367 pkg/campsite/types/admin.go:461
|
||||
msgid "Price per night can not be empty."
|
||||
msgstr "No podeu deixar el preu per nit en blanc."
|
||||
|
||||
#: pkg/campsite/types/option.go:358 pkg/campsite/types/admin.go:430
|
||||
#: pkg/campsite/types/option.go:368 pkg/campsite/types/admin.go:462
|
||||
msgid "Price per night must be a decimal number."
|
||||
msgstr "El preu per nit ha de ser un número decimal."
|
||||
|
||||
#: pkg/campsite/types/option.go:359 pkg/campsite/types/admin.go:431
|
||||
#: pkg/campsite/types/option.go:369 pkg/campsite/types/admin.go:463
|
||||
msgid "Price per night must be zero or greater."
|
||||
msgstr "El preu per nit ha de ser com a mínim zero."
|
||||
|
||||
|
@ -1313,54 +1313,54 @@ msgstr "El preu per nit ha de ser com a mínim zero."
|
|||
msgid "Selected icon is not valid."
|
||||
msgstr "La icona escollida no és vàlida."
|
||||
|
||||
#: pkg/campsite/types/admin.go:291
|
||||
#: pkg/campsite/types/admin.go:323
|
||||
msgctxt "input"
|
||||
msgid "Cover image"
|
||||
msgstr "Imatge de portada"
|
||||
|
||||
#: pkg/campsite/types/admin.go:292
|
||||
#: pkg/campsite/types/admin.go:324
|
||||
msgctxt "action"
|
||||
msgid "Set campsite type cover"
|
||||
msgstr "Estableix la portada del tipus d’allotjament"
|
||||
|
||||
#: pkg/campsite/types/admin.go:418
|
||||
#: pkg/campsite/types/admin.go:450
|
||||
msgid "Cover image can not be empty."
|
||||
msgstr "No podeu deixar la imatge de portada en blanc."
|
||||
|
||||
#: pkg/campsite/types/admin.go:419
|
||||
#: pkg/campsite/types/admin.go:451
|
||||
msgid "Cover image must be an image media type."
|
||||
msgstr "La imatge de portada ha de ser un mèdia de tipus imatge."
|
||||
|
||||
#: pkg/campsite/types/admin.go:423
|
||||
#: pkg/campsite/types/admin.go:455
|
||||
msgid "Maximum number of campers can not be empty."
|
||||
msgstr "No podeu deixar el número màxim de persones en blanc."
|
||||
|
||||
#: pkg/campsite/types/admin.go:424
|
||||
#: pkg/campsite/types/admin.go:456
|
||||
msgid "Maximum number of campers must be an integer number."
|
||||
msgstr "El número màxim de persones ha de ser enter."
|
||||
|
||||
#: pkg/campsite/types/admin.go:425
|
||||
#: pkg/campsite/types/admin.go:457
|
||||
msgid "Maximum number of campers must be one or greater."
|
||||
msgstr "El número màxim de persones no pot ser zero."
|
||||
|
||||
#: pkg/campsite/types/admin.go:434
|
||||
#: pkg/campsite/types/admin.go:466
|
||||
msgid "Minimum number of nights can not be empty."
|
||||
msgstr "No podeu deixar el número mínim de nits en blanc."
|
||||
|
||||
#: pkg/campsite/types/admin.go:435
|
||||
#: pkg/campsite/types/admin.go:467
|
||||
msgid "Minimum number of nights must be an integer."
|
||||
msgstr "El número mínim de nits ha de ser enter."
|
||||
|
||||
#: pkg/campsite/types/admin.go:436
|
||||
#: pkg/campsite/types/admin.go:468
|
||||
msgid "Minimum number of nights must be one or greater."
|
||||
msgstr "El número mínim de nits no pot ser zero."
|
||||
|
||||
#: pkg/campsite/types/public.go:157
|
||||
#: pkg/campsite/types/public.go:160
|
||||
msgctxt "season"
|
||||
msgid "Closed"
|
||||
msgstr "Tancat"
|
||||
|
||||
#: pkg/campsite/admin.go:226 pkg/booking/public.go:274
|
||||
#: pkg/campsite/admin.go:226 pkg/booking/public.go:278
|
||||
msgid "Selected campsite type is not valid."
|
||||
msgstr "El tipus d’allotjament escollit no és vàlid."
|
||||
|
||||
|
@ -1368,96 +1368,96 @@ msgstr "El tipus d’allotjament escollit no és vàlid."
|
|||
msgid "Label can not be empty."
|
||||
msgstr "No podeu deixar l’etiqueta en blanc."
|
||||
|
||||
#: pkg/season/admin.go:212
|
||||
#: pkg/season/admin.go:222
|
||||
msgctxt "month"
|
||||
msgid "January"
|
||||
msgstr "gener"
|
||||
|
||||
#: pkg/season/admin.go:213
|
||||
#: pkg/season/admin.go:223
|
||||
msgctxt "month"
|
||||
msgid "February"
|
||||
msgstr "febrer"
|
||||
|
||||
#: pkg/season/admin.go:214
|
||||
#: pkg/season/admin.go:224
|
||||
msgctxt "month"
|
||||
msgid "March"
|
||||
msgstr "març"
|
||||
|
||||
#: pkg/season/admin.go:215
|
||||
#: pkg/season/admin.go:225
|
||||
msgctxt "month"
|
||||
msgid "April"
|
||||
msgstr "abril"
|
||||
|
||||
#: pkg/season/admin.go:216
|
||||
#: pkg/season/admin.go:226
|
||||
msgctxt "month"
|
||||
msgid "May"
|
||||
msgstr "maig"
|
||||
|
||||
#: pkg/season/admin.go:217
|
||||
#: pkg/season/admin.go:227
|
||||
msgctxt "month"
|
||||
msgid "June"
|
||||
msgstr "juny"
|
||||
|
||||
#: pkg/season/admin.go:218
|
||||
#: pkg/season/admin.go:228
|
||||
msgctxt "month"
|
||||
msgid "July"
|
||||
msgstr "juliol"
|
||||
|
||||
#: pkg/season/admin.go:219
|
||||
#: pkg/season/admin.go:229
|
||||
msgctxt "month"
|
||||
msgid "August"
|
||||
msgstr "agost"
|
||||
|
||||
#: pkg/season/admin.go:220
|
||||
#: pkg/season/admin.go:230
|
||||
msgctxt "month"
|
||||
msgid "September"
|
||||
msgstr "setembre"
|
||||
|
||||
#: pkg/season/admin.go:221
|
||||
#: pkg/season/admin.go:231
|
||||
msgctxt "month"
|
||||
msgid "October"
|
||||
msgstr "octubre"
|
||||
|
||||
#: pkg/season/admin.go:222
|
||||
#: pkg/season/admin.go:232
|
||||
msgctxt "month"
|
||||
msgid "November"
|
||||
msgstr "novembre"
|
||||
|
||||
#: pkg/season/admin.go:223
|
||||
#: pkg/season/admin.go:233
|
||||
msgctxt "month"
|
||||
msgid "December"
|
||||
msgstr "desembre"
|
||||
|
||||
#: pkg/season/admin.go:395
|
||||
#: pkg/season/admin.go:405
|
||||
msgid "Color can not be empty."
|
||||
msgstr "No podeu deixar el color en blanc."
|
||||
|
||||
#: pkg/season/admin.go:396
|
||||
#: pkg/season/admin.go:406
|
||||
msgid "This color is not valid. It must be like #123abc."
|
||||
msgstr "Aquest color no és vàlid. Hauria de ser similar a #123abc."
|
||||
|
||||
#: pkg/season/admin.go:472
|
||||
#: pkg/season/admin.go:506
|
||||
msgctxt "action"
|
||||
msgid "Unset"
|
||||
msgstr "Desassigna"
|
||||
|
||||
#: pkg/season/admin.go:503
|
||||
#: pkg/season/admin.go:537
|
||||
msgid "Start date can not be empty."
|
||||
msgstr "No podeu deixar la data d’inici en blanc."
|
||||
|
||||
#: pkg/season/admin.go:504
|
||||
#: pkg/season/admin.go:538
|
||||
msgid "Start date must be a valid date."
|
||||
msgstr "La data d’inici ha de ser una data vàlida."
|
||||
|
||||
#: pkg/season/admin.go:506
|
||||
#: pkg/season/admin.go:540
|
||||
msgid "End date can not be empty."
|
||||
msgstr "No podeu deixar la data de fi en blanc."
|
||||
|
||||
#: pkg/season/admin.go:507
|
||||
#: pkg/season/admin.go:541
|
||||
msgid "End date must be a valid date."
|
||||
msgstr "La data de fi ha de ser una data vàlida."
|
||||
|
||||
#: pkg/company/admin.go:193 pkg/booking/public.go:252
|
||||
#: pkg/company/admin.go:193 pkg/booking/public.go:256
|
||||
msgid "Selected country is not valid."
|
||||
msgstr "El país escollit no és vàlid."
|
||||
|
||||
|
@ -1477,11 +1477,11 @@ msgstr "No podeu deixar el NIF en blanc."
|
|||
msgid "This VAT number is not valid."
|
||||
msgstr "Aquest NIF no és vàlid."
|
||||
|
||||
#: pkg/company/admin.go:205 pkg/booking/public.go:268
|
||||
#: pkg/company/admin.go:205 pkg/booking/public.go:272
|
||||
msgid "Phone can not be empty."
|
||||
msgstr "No podeu deixar el telèfon en blanc."
|
||||
|
||||
#: pkg/company/admin.go:206 pkg/booking/public.go:269
|
||||
#: pkg/company/admin.go:206 pkg/booking/public.go:273
|
||||
msgid "This phone number is not valid."
|
||||
msgstr "Aquest número de telèfon no és vàlid."
|
||||
|
||||
|
@ -1505,7 +1505,7 @@ msgstr "No podeu deixar la província en blanc."
|
|||
msgid "Postal code can not be empty."
|
||||
msgstr "No podeu deixar el codi postal en blanc."
|
||||
|
||||
#: pkg/company/admin.go:220 pkg/booking/public.go:261
|
||||
#: pkg/company/admin.go:220 pkg/booking/public.go:265
|
||||
msgid "This postal code is not valid."
|
||||
msgstr "Aquest codi postal no és vàlid."
|
||||
|
||||
|
@ -1585,54 +1585,54 @@ msgstr "La integració escollida no és vàlida."
|
|||
msgid "The merchant key is not valid."
|
||||
msgstr "Aquesta clau del comerç no és vàlid."
|
||||
|
||||
#: pkg/booking/public.go:256
|
||||
#: pkg/booking/public.go:260
|
||||
msgid "Full name can not be empty."
|
||||
msgstr "No podeu deixar el nom i els cognoms en blanc."
|
||||
|
||||
#: pkg/booking/public.go:257
|
||||
#: pkg/booking/public.go:261
|
||||
msgid "Full name must have at least one letter."
|
||||
msgstr "El nom i els cognoms han de tenir com a mínim una lletra."
|
||||
|
||||
#: pkg/booking/public.go:275
|
||||
#: pkg/booking/public.go:279
|
||||
msgid "Arrival date can not be empty"
|
||||
msgstr "No podeu deixar la data d’arribada en blanc."
|
||||
|
||||
#: pkg/booking/public.go:276
|
||||
#: pkg/booking/public.go:280
|
||||
msgid "Arrival date must be a valid date."
|
||||
msgstr "La data d’arribada ha de ser una data vàlida."
|
||||
|
||||
#: pkg/booking/public.go:280
|
||||
#: pkg/booking/public.go:284
|
||||
msgid "Departure date can not be empty"
|
||||
msgstr "No podeu deixar la data de sortida en blanc."
|
||||
|
||||
#: pkg/booking/public.go:281
|
||||
#: pkg/booking/public.go:285
|
||||
msgid "Departure date must be a valid date."
|
||||
msgstr "La data de sortida ha de ser una data vàlida."
|
||||
|
||||
#: pkg/booking/public.go:282
|
||||
#: pkg/booking/public.go:286
|
||||
msgid "The departure date must be after the arrival date."
|
||||
msgstr "La data de sortida ha de ser posterior a la d’arribada."
|
||||
|
||||
#: pkg/booking/public.go:285
|
||||
#: pkg/booking/public.go:289
|
||||
msgid "It is mandatory to agree to the reservation conditions."
|
||||
msgstr "És obligatori acceptar les condicions de reserves."
|
||||
|
||||
#: pkg/booking/public.go:288
|
||||
#: pkg/booking/public.go:292
|
||||
#, c-format
|
||||
msgid "%s can not be empty"
|
||||
msgstr "No podeu deixar %s en blanc."
|
||||
|
||||
#: pkg/booking/public.go:289
|
||||
#: pkg/booking/public.go:293
|
||||
#, c-format
|
||||
msgid "%s must be an integer."
|
||||
msgstr "%s ha de ser un número enter."
|
||||
|
||||
#: pkg/booking/public.go:290
|
||||
#: pkg/booking/public.go:294
|
||||
#, c-format
|
||||
msgid "%s must be %d or greater."
|
||||
msgstr "El valor de %s ha de ser com a mínim %d."
|
||||
|
||||
#: pkg/booking/public.go:291
|
||||
#: pkg/booking/public.go:295
|
||||
#, c-format
|
||||
msgid "%s must be at most %d."
|
||||
msgstr "El valor de %s ha de ser com a màxim %d."
|
||||
|
|
298
po/es.po
298
po/es.po
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: camper\n"
|
||||
"Report-Msgid-Bugs-To: jordi@tandem.blog\n"
|
||||
"POT-Creation-Date: 2023-12-13 23:44+0100\n"
|
||||
"POT-Creation-Date: 2023-12-20 19:48+0100\n"
|
||||
"PO-Revision-Date: 2023-07-22 23:46+0200\n"
|
||||
"Last-Translator: jordi fita mas <jordi@tandem.blog>\n"
|
||||
"Language-Team: Spanish <es@tp.org.es>\n"
|
||||
|
@ -44,7 +44,7 @@ msgstr "Pago fallido"
|
|||
#: web/templates/public/services.gohtml:6
|
||||
#: web/templates/public/services.gohtml:15
|
||||
#: web/templates/public/layout.gohtml:44 web/templates/public/layout.gohtml:71
|
||||
#: web/templates/admin/services/index.gohtml:53
|
||||
#: web/templates/admin/services/index.gohtml:66
|
||||
msgctxt "title"
|
||||
msgid "Services"
|
||||
msgstr "Servicios"
|
||||
|
@ -136,7 +136,7 @@ msgid "*Minimum %d nights per stay"
|
|||
msgstr "*Mínimo %d noches por estancia"
|
||||
|
||||
#: web/templates/public/campsite/type.gohtml:89
|
||||
#: web/templates/admin/season/index.gohtml:48
|
||||
#: web/templates/admin/season/index.gohtml:59
|
||||
msgctxt "title"
|
||||
msgid "Calendar"
|
||||
msgstr "Calendario"
|
||||
|
@ -203,61 +203,61 @@ msgctxt "day"
|
|||
msgid "Sun"
|
||||
msgstr "do"
|
||||
|
||||
#: web/templates/public/surroundings.gohtml:13
|
||||
#: web/templates/public/surroundings.gohtml:28
|
||||
msgctxt "title"
|
||||
msgid "What to Do Outside the Campsite?"
|
||||
msgstr "¿Qué hacer desde el camping?"
|
||||
|
||||
#: web/templates/public/surroundings.gohtml:15
|
||||
#: web/templates/public/surroundings.gohtml:31
|
||||
msgid "Campsite Montagut is an ideal starting point for quiet outings, climbing, swimming in the river and gorges, volcanoes, the Fageda d’en Jordà, cycle tours for all ages…."
|
||||
msgstr "El Camping Montagut es ideal como punto de salida de excursiones tranquilas, escalada, bañarse en el río y piletones, volcanes, la Fageda d’en Jordà, salidas en bicicleta para todos los niveles…."
|
||||
|
||||
#: web/templates/public/surroundings.gohtml:22
|
||||
#: web/templates/public/surroundings.gohtml:38
|
||||
msgid "Get to the Costa Brava and enjoy the beaches, the gastronomy or go kayaking…."
|
||||
msgstr "Llegar hasta la Costa Brava y disfrutar de las playas, la gastronomía o ir en kayak…."
|
||||
|
||||
#: web/templates/public/surroundings.gohtml:31
|
||||
#: web/templates/public/surroundings.gohtml:47
|
||||
msgid "You will also find museums in Olot, Figures, Girona."
|
||||
msgstr "También encontraréis museos en Olot, Figueres, Girona."
|
||||
|
||||
#: web/templates/public/surroundings.gohtml:32
|
||||
#: web/templates/public/surroundings.gohtml:48
|
||||
msgid "As well as music festivals, dance, theater…."
|
||||
msgstr "Como festivales de música, danza, teatro…."
|
||||
|
||||
#: web/templates/public/surroundings.gohtml:38
|
||||
#: web/templates/public/surroundings.gohtml:54
|
||||
msgctxt "title"
|
||||
msgid "Once at the Campsite, We Can Inform You about What Activities are Available"
|
||||
msgstr "Una vez en el camping, os podemos informar de qué actividades hacer"
|
||||
|
||||
#: web/templates/public/surroundings.gohtml:41
|
||||
#: web/templates/public/surroundings.gohtml:57
|
||||
msgid "Cycle routes"
|
||||
msgstr "Rutas en bicicleta"
|
||||
|
||||
#: web/templates/public/surroundings.gohtml:42
|
||||
#: web/templates/public/surroundings.gohtml:58
|
||||
msgid "There are many bicycle rental companies in Olot."
|
||||
msgstr "A Olot podéis encontrar empresas de alquiler de bicicletas."
|
||||
|
||||
#: web/templates/public/surroundings.gohtml:46
|
||||
#: web/templates/public/surroundings.gohtml:62
|
||||
msgid "Routes"
|
||||
msgstr "Rutas"
|
||||
|
||||
#: web/templates/public/surroundings.gohtml:47
|
||||
#: web/templates/public/surroundings.gohtml:63
|
||||
msgid "Routes of all kinds, climbing, mountain passes, for all levels."
|
||||
msgstr "Rutas de todo tipo, escalada, puertos de montaña, para todos los niveles."
|
||||
|
||||
#: web/templates/public/surroundings.gohtml:51
|
||||
#: web/templates/public/surroundings.gohtml:67
|
||||
msgid "Family outing"
|
||||
msgstr "Excusiones familiares"
|
||||
|
||||
#: web/templates/public/surroundings.gohtml:52
|
||||
#: web/templates/public/surroundings.gohtml:68
|
||||
msgid "Many outing possibilities, for all ages."
|
||||
msgstr "Múltiples excursiones para todas las edades."
|
||||
|
||||
#: web/templates/public/surroundings.gohtml:56
|
||||
#: web/templates/public/surroundings.gohtml:72
|
||||
msgid "Kayak"
|
||||
msgstr "Kayak"
|
||||
|
||||
#: web/templates/public/surroundings.gohtml:57
|
||||
#: web/templates/public/surroundings.gohtml:73
|
||||
msgid "There are several points where you can go by kayak, from sections of the Ter river as well as on the coast…."
|
||||
msgstr "Hay diversos puntos dónde podéis ir en kayak, desde tramos del río Ter como también en la costa…."
|
||||
|
||||
|
@ -363,18 +363,18 @@ msgid "I have read and I accept the reservation conditions"
|
|||
msgstr "He leído y acepto las condiciones de reserva"
|
||||
|
||||
#: web/templates/public/layout.gohtml:11 web/templates/public/layout.gohtml:25
|
||||
#: web/templates/public/layout.gohtml:96
|
||||
#: web/templates/public/layout.gohtml:102
|
||||
msgid "Campsite Montagut"
|
||||
msgstr "Camping Montagut"
|
||||
|
||||
#: web/templates/public/layout.gohtml:23 web/templates/admin/layout.gohtml:18
|
||||
#: web/templates/public/layout.gohtml:23 web/templates/admin/layout.gohtml:19
|
||||
msgid "Skip to main content"
|
||||
msgstr "Saltar al contenido principal"
|
||||
|
||||
#: web/templates/public/layout.gohtml:35 web/templates/public/layout.gohtml:80
|
||||
#: web/templates/admin/campsite/index.gohtml:6
|
||||
#: web/templates/admin/campsite/index.gohtml:12
|
||||
#: web/templates/admin/layout.gohtml:43 web/templates/admin/layout.gohtml:74
|
||||
#: web/templates/admin/layout.gohtml:44 web/templates/admin/layout.gohtml:75
|
||||
msgctxt "title"
|
||||
msgid "Campsites"
|
||||
msgstr "Alojamientos"
|
||||
|
@ -384,7 +384,7 @@ msgctxt "title"
|
|||
msgid "Sections"
|
||||
msgstr "Apartados"
|
||||
|
||||
#: web/templates/public/layout.gohtml:93
|
||||
#: web/templates/public/layout.gohtml:99
|
||||
msgid "<abbr title=\"Catalonia Tourism Registry\">RTC</abbr> <abbr title=\"Number\">#</abbr>%s"
|
||||
msgstr "<abbr title=\"Número\">Nº</abbr> <abbr title=\"Registro de Turismo de Cataluña\">RTC</abbr> %s"
|
||||
|
||||
|
@ -526,21 +526,21 @@ msgid "Add Feature"
|
|||
msgstr "Añadir características"
|
||||
|
||||
#: web/templates/admin/campsite/feature/index.gohtml:17
|
||||
#: web/templates/admin/campsite/option/index.gohtml:17
|
||||
#: web/templates/admin/campsite/type/index.gohtml:17
|
||||
#: web/templates/admin/season/index.gohtml:18
|
||||
#: web/templates/admin/campsite/option/index.gohtml:25
|
||||
#: web/templates/admin/campsite/type/index.gohtml:25
|
||||
#: web/templates/admin/season/index.gohtml:26
|
||||
msgctxt "header"
|
||||
msgid "Name"
|
||||
msgstr "Nombre"
|
||||
|
||||
#: web/templates/admin/campsite/feature/index.gohtml:18
|
||||
#: web/templates/admin/campsite/carousel/index.gohtml:19
|
||||
#: web/templates/admin/campsite/option/index.gohtml:18
|
||||
#: web/templates/admin/campsite/type/index.gohtml:18
|
||||
#: web/templates/admin/season/index.gohtml:19
|
||||
#: web/templates/admin/services/index.gohtml:19
|
||||
#: web/templates/admin/services/index.gohtml:60
|
||||
#: web/templates/admin/home/index.gohtml:19
|
||||
#: web/templates/admin/campsite/carousel/index.gohtml:27
|
||||
#: web/templates/admin/campsite/option/index.gohtml:26
|
||||
#: web/templates/admin/campsite/type/index.gohtml:26
|
||||
#: web/templates/admin/season/index.gohtml:27
|
||||
#: web/templates/admin/services/index.gohtml:27
|
||||
#: web/templates/admin/services/index.gohtml:73
|
||||
#: web/templates/admin/home/index.gohtml:27
|
||||
msgctxt "header"
|
||||
msgid "Translations"
|
||||
msgstr "Traducciones"
|
||||
|
@ -580,45 +580,45 @@ msgctxt "action"
|
|||
msgid "Add slide"
|
||||
msgstr "Añadir diapositiva"
|
||||
|
||||
#: web/templates/admin/campsite/carousel/index.gohtml:17
|
||||
#: web/templates/admin/services/index.gohtml:17
|
||||
#: web/templates/admin/home/index.gohtml:17
|
||||
#: web/templates/admin/campsite/carousel/index.gohtml:25
|
||||
#: web/templates/admin/services/index.gohtml:25
|
||||
#: web/templates/admin/home/index.gohtml:25
|
||||
msgctxt "header"
|
||||
msgid "Image"
|
||||
msgstr "Imagen"
|
||||
|
||||
#: web/templates/admin/campsite/carousel/index.gohtml:18
|
||||
#: web/templates/admin/services/index.gohtml:18
|
||||
#: web/templates/admin/home/index.gohtml:18
|
||||
#: web/templates/admin/campsite/carousel/index.gohtml:26
|
||||
#: web/templates/admin/services/index.gohtml:26
|
||||
#: web/templates/admin/home/index.gohtml:26
|
||||
msgctxt "header"
|
||||
msgid "Caption"
|
||||
msgstr "Leyenda"
|
||||
|
||||
#: web/templates/admin/campsite/carousel/index.gohtml:20
|
||||
#: web/templates/admin/services/index.gohtml:20
|
||||
#: web/templates/admin/services/index.gohtml:61
|
||||
#: web/templates/admin/home/index.gohtml:20
|
||||
#: web/templates/admin/campsite/carousel/index.gohtml:28
|
||||
#: web/templates/admin/services/index.gohtml:28
|
||||
#: web/templates/admin/services/index.gohtml:74
|
||||
#: web/templates/admin/home/index.gohtml:28
|
||||
msgctxt "header"
|
||||
msgid "Actions"
|
||||
msgstr "Acciones"
|
||||
|
||||
#: web/templates/admin/campsite/carousel/index.gohtml:24
|
||||
#: web/templates/admin/services/index.gohtml:24
|
||||
#: web/templates/admin/home/index.gohtml:24
|
||||
#: web/templates/admin/campsite/carousel/index.gohtml:32
|
||||
#: web/templates/admin/services/index.gohtml:32
|
||||
#: web/templates/admin/home/index.gohtml:32
|
||||
msgid "Are you sure you wish to delete this slide?"
|
||||
msgstr "¿Estáis seguro de querer borrar esta diapositiva?"
|
||||
|
||||
#: web/templates/admin/campsite/carousel/index.gohtml:42
|
||||
#: web/templates/admin/services/index.gohtml:42
|
||||
#: web/templates/admin/services/index.gohtml:80
|
||||
#: web/templates/admin/home/index.gohtml:42
|
||||
#: web/templates/admin/campsite/carousel/index.gohtml:55
|
||||
#: web/templates/admin/services/index.gohtml:54
|
||||
#: web/templates/admin/services/index.gohtml:93
|
||||
#: web/templates/admin/home/index.gohtml:54
|
||||
msgctxt "action"
|
||||
msgid "Delete"
|
||||
msgstr "Borrar"
|
||||
|
||||
#: web/templates/admin/campsite/carousel/index.gohtml:50
|
||||
#: web/templates/admin/services/index.gohtml:50
|
||||
#: web/templates/admin/home/index.gohtml:50
|
||||
#: web/templates/admin/campsite/carousel/index.gohtml:64
|
||||
#: web/templates/admin/services/index.gohtml:63
|
||||
#: web/templates/admin/home/index.gohtml:63
|
||||
msgid "No slides added yet."
|
||||
msgstr "No se ha añadido ninguna diapositiva todavía."
|
||||
|
||||
|
@ -699,7 +699,7 @@ msgctxt "action"
|
|||
msgid "Add Option"
|
||||
msgstr "Añadir opción"
|
||||
|
||||
#: web/templates/admin/campsite/option/index.gohtml:39
|
||||
#: web/templates/admin/campsite/option/index.gohtml:52
|
||||
msgid "No campsite type options added yet."
|
||||
msgstr "No se ha añadido ninguna opció al tipo de alojamiento todavía."
|
||||
|
||||
|
@ -725,14 +725,14 @@ msgid "Type"
|
|||
msgstr "Tipo"
|
||||
|
||||
#: web/templates/admin/campsite/index.gohtml:28
|
||||
#: web/templates/admin/campsite/type/index.gohtml:47
|
||||
#: web/templates/admin/season/index.gohtml:39
|
||||
#: web/templates/admin/campsite/type/index.gohtml:59
|
||||
#: web/templates/admin/season/index.gohtml:49
|
||||
msgid "Yes"
|
||||
msgstr "Sí"
|
||||
|
||||
#: web/templates/admin/campsite/index.gohtml:28
|
||||
#: web/templates/admin/campsite/type/index.gohtml:47
|
||||
#: web/templates/admin/season/index.gohtml:39
|
||||
#: web/templates/admin/campsite/type/index.gohtml:59
|
||||
#: web/templates/admin/season/index.gohtml:49
|
||||
msgid "No"
|
||||
msgstr "No"
|
||||
|
||||
|
@ -753,7 +753,7 @@ msgid "New Campsite Type"
|
|||
msgstr "Nuevo tipo de alojamiento"
|
||||
|
||||
#: web/templates/admin/campsite/type/form.gohtml:37
|
||||
#: web/templates/admin/campsite/type/index.gohtml:22
|
||||
#: web/templates/admin/campsite/type/index.gohtml:30
|
||||
msgctxt "campsite type"
|
||||
msgid "Active"
|
||||
msgstr "Activo"
|
||||
|
@ -801,7 +801,7 @@ msgstr "Descripción"
|
|||
|
||||
#: web/templates/admin/campsite/type/index.gohtml:6
|
||||
#: web/templates/admin/campsite/type/index.gohtml:12
|
||||
#: web/templates/admin/layout.gohtml:40
|
||||
#: web/templates/admin/layout.gohtml:41
|
||||
msgctxt "title"
|
||||
msgid "Campsite Types"
|
||||
msgstr "Tipos de alojamientos"
|
||||
|
@ -811,37 +811,37 @@ msgctxt "action"
|
|||
msgid "Add Type"
|
||||
msgstr "Añadir tipo"
|
||||
|
||||
#: web/templates/admin/campsite/type/index.gohtml:19
|
||||
#: web/templates/admin/campsite/type/index.gohtml:27
|
||||
msgctxt "header"
|
||||
msgid "Features"
|
||||
msgstr "Características"
|
||||
|
||||
#: web/templates/admin/campsite/type/index.gohtml:20
|
||||
#: web/templates/admin/campsite/type/index.gohtml:28
|
||||
msgctxt "header"
|
||||
msgid "Options"
|
||||
msgstr "Opciones"
|
||||
|
||||
#: web/templates/admin/campsite/type/index.gohtml:21
|
||||
#: web/templates/admin/campsite/type/index.gohtml:29
|
||||
msgctxt "header"
|
||||
msgid "Carousel"
|
||||
msgstr "Carrusel"
|
||||
|
||||
#: web/templates/admin/campsite/type/index.gohtml:39
|
||||
#: web/templates/admin/campsite/type/index.gohtml:51
|
||||
msgctxt "action"
|
||||
msgid "Edit Features"
|
||||
msgstr "Editar las características"
|
||||
|
||||
#: web/templates/admin/campsite/type/index.gohtml:42
|
||||
#: web/templates/admin/campsite/type/index.gohtml:54
|
||||
msgctxt "action"
|
||||
msgid "Edit Options"
|
||||
msgstr "Editar opciones"
|
||||
|
||||
#: web/templates/admin/campsite/type/index.gohtml:45
|
||||
#: web/templates/admin/campsite/type/index.gohtml:57
|
||||
msgctxt "action"
|
||||
msgid "Edit Carousel"
|
||||
msgstr "Editar el carrusel"
|
||||
|
||||
#: web/templates/admin/campsite/type/index.gohtml:53
|
||||
#: web/templates/admin/campsite/type/index.gohtml:66
|
||||
msgid "No campsite types added yet."
|
||||
msgstr "No se ha añadido ningún tipo de alojamiento todavía."
|
||||
|
||||
|
@ -864,7 +864,7 @@ msgid "New Season"
|
|||
msgstr "Nueva temporada"
|
||||
|
||||
#: web/templates/admin/season/form.gohtml:37
|
||||
#: web/templates/admin/season/index.gohtml:20
|
||||
#: web/templates/admin/season/index.gohtml:28
|
||||
msgctxt "season"
|
||||
msgid "Active"
|
||||
msgstr "Activa"
|
||||
|
@ -876,7 +876,7 @@ msgstr "Color"
|
|||
|
||||
#: web/templates/admin/season/index.gohtml:6
|
||||
#: web/templates/admin/season/index.gohtml:12
|
||||
#: web/templates/admin/layout.gohtml:46
|
||||
#: web/templates/admin/layout.gohtml:47
|
||||
msgctxt "title"
|
||||
msgid "Seasons"
|
||||
msgstr "Temporadas"
|
||||
|
@ -886,12 +886,12 @@ msgctxt "action"
|
|||
msgid "Add Season"
|
||||
msgstr "Añadir temporada"
|
||||
|
||||
#: web/templates/admin/season/index.gohtml:17
|
||||
#: web/templates/admin/season/index.gohtml:25
|
||||
msgctxt "header"
|
||||
msgid "Color"
|
||||
msgstr "Color"
|
||||
|
||||
#: web/templates/admin/season/index.gohtml:45
|
||||
#: web/templates/admin/season/index.gohtml:56
|
||||
msgid "No seasons added yet."
|
||||
msgstr "No se ha añadido ninguna temporada todavía."
|
||||
|
||||
|
@ -908,7 +908,7 @@ msgid "Cancel"
|
|||
msgstr "Cancelar"
|
||||
|
||||
#: web/templates/admin/payment.gohtml:6 web/templates/admin/payment.gohtml:12
|
||||
#: web/templates/admin/layout.gohtml:37
|
||||
#: web/templates/admin/layout.gohtml:38
|
||||
msgctxt "title"
|
||||
msgid "Payment Settings"
|
||||
msgstr "Parámetros de pago"
|
||||
|
@ -950,7 +950,7 @@ msgid "Save changes"
|
|||
msgstr "Guardar los cambios"
|
||||
|
||||
#: web/templates/admin/dashboard.gohtml:6
|
||||
#: web/templates/admin/dashboard.gohtml:10 web/templates/admin/layout.gohtml:71
|
||||
#: web/templates/admin/dashboard.gohtml:10 web/templates/admin/layout.gohtml:72
|
||||
msgctxt "title"
|
||||
msgid "Dashboard"
|
||||
msgstr "Panel"
|
||||
|
@ -983,7 +983,7 @@ msgid "New Service"
|
|||
msgstr "Nuevo servicio"
|
||||
|
||||
#: web/templates/admin/services/index.gohtml:6
|
||||
#: web/templates/admin/layout.gohtml:55
|
||||
#: web/templates/admin/layout.gohtml:56
|
||||
msgctxt "title"
|
||||
msgid "Services Page"
|
||||
msgstr "Página de servicios"
|
||||
|
@ -994,21 +994,21 @@ msgctxt "title"
|
|||
msgid "Carousel"
|
||||
msgstr "Carrusel"
|
||||
|
||||
#: web/templates/admin/services/index.gohtml:54
|
||||
#: web/templates/admin/services/index.gohtml:67
|
||||
msgctxt "action"
|
||||
msgid "Add service"
|
||||
msgstr "Añadir servicio"
|
||||
|
||||
#: web/templates/admin/services/index.gohtml:59
|
||||
#: web/templates/admin/services/index.gohtml:72
|
||||
msgctxt "header"
|
||||
msgid "Service"
|
||||
msgstr "Servicio"
|
||||
|
||||
#: web/templates/admin/services/index.gohtml:65
|
||||
#: web/templates/admin/services/index.gohtml:78
|
||||
msgid "Are you sure you wish to delete this service?"
|
||||
msgstr "¿Estáis seguro de querer borrar este servicio?"
|
||||
|
||||
#: web/templates/admin/services/index.gohtml:88
|
||||
#: web/templates/admin/services/index.gohtml:101
|
||||
msgid "No services added yet."
|
||||
msgstr "No se ha añadido ningún servicio todavía."
|
||||
|
||||
|
@ -1019,7 +1019,7 @@ msgid "Translate Service to %s"
|
|||
msgstr "Traducción del servicio a %s"
|
||||
|
||||
#: web/templates/admin/profile.gohtml:6 web/templates/admin/profile.gohtml:12
|
||||
#: web/templates/admin/layout.gohtml:30
|
||||
#: web/templates/admin/layout.gohtml:31
|
||||
msgctxt "title"
|
||||
msgid "Profile"
|
||||
msgstr "Perfil"
|
||||
|
@ -1111,29 +1111,29 @@ msgctxt "input"
|
|||
msgid "Legal Disclaimer"
|
||||
msgstr "Nota legal"
|
||||
|
||||
#: web/templates/admin/layout.gohtml:26
|
||||
#: web/templates/admin/layout.gohtml:27
|
||||
msgctxt "title"
|
||||
msgid "User Menu"
|
||||
msgstr "Menú de usuario"
|
||||
|
||||
#: web/templates/admin/layout.gohtml:34
|
||||
#: web/templates/admin/layout.gohtml:35
|
||||
msgctxt "title"
|
||||
msgid "Company Settings"
|
||||
msgstr "Parámetros de la empresa"
|
||||
|
||||
#: web/templates/admin/layout.gohtml:49
|
||||
#: web/templates/admin/layout.gohtml:50
|
||||
#: web/templates/admin/media/index.gohtml:6
|
||||
#: web/templates/admin/media/index.gohtml:11
|
||||
msgctxt "title"
|
||||
msgid "Media"
|
||||
msgstr "Medios"
|
||||
|
||||
#: web/templates/admin/layout.gohtml:52 web/templates/admin/home/index.gohtml:6
|
||||
#: web/templates/admin/layout.gohtml:53 web/templates/admin/home/index.gohtml:6
|
||||
msgctxt "title"
|
||||
msgid "Home Page"
|
||||
msgstr "Página de inicio"
|
||||
|
||||
#: web/templates/admin/layout.gohtml:60
|
||||
#: web/templates/admin/layout.gohtml:61
|
||||
msgctxt "action"
|
||||
msgid "Logout"
|
||||
msgstr "Salir"
|
||||
|
@ -1203,31 +1203,31 @@ msgctxt "title"
|
|||
msgid "Upload Media"
|
||||
msgstr "Subida de medio"
|
||||
|
||||
#: pkg/carousel/admin.go:233 pkg/campsite/types/carousel.go:232
|
||||
#: pkg/carousel/admin.go:274 pkg/campsite/types/carousel.go:242
|
||||
msgctxt "input"
|
||||
msgid "Slide image"
|
||||
msgstr "Imagen de la diapositiva"
|
||||
|
||||
#: pkg/carousel/admin.go:234 pkg/campsite/types/carousel.go:233
|
||||
#: pkg/carousel/admin.go:275 pkg/campsite/types/carousel.go:243
|
||||
msgctxt "action"
|
||||
msgid "Set slide image"
|
||||
msgstr "Establecer la imagen de la diapositiva"
|
||||
|
||||
#: pkg/carousel/admin.go:286 pkg/campsite/types/carousel.go:287
|
||||
#: pkg/carousel/admin.go:327 pkg/campsite/types/carousel.go:297
|
||||
msgid "Slide image can not be empty."
|
||||
msgstr "No podéis dejar la imagen de la diapositiva en blanco."
|
||||
|
||||
#: pkg/carousel/admin.go:287 pkg/campsite/types/carousel.go:288
|
||||
#: pkg/carousel/admin.go:328 pkg/campsite/types/carousel.go:298
|
||||
msgid "Slide image must be an image media type."
|
||||
msgstr "La imagen de la diapositiva tiene que ser un medio de tipo imagen."
|
||||
|
||||
#: pkg/app/login.go:56 pkg/app/user.go:246 pkg/company/admin.go:210
|
||||
#: pkg/booking/public.go:265
|
||||
#: pkg/booking/public.go:269
|
||||
msgid "Email can not be empty."
|
||||
msgstr "No podéis dejar el correo-e en blanco."
|
||||
|
||||
#: pkg/app/login.go:57 pkg/app/user.go:247 pkg/company/admin.go:211
|
||||
#: pkg/booking/public.go:266
|
||||
#: pkg/booking/public.go:270
|
||||
msgid "This email is not valid. It should be like name@domain.com."
|
||||
msgstr "Este correo-e no es válido. Tiene que ser parecido a nombre@dominio.com."
|
||||
|
||||
|
@ -1246,9 +1246,9 @@ msgstr "Automático"
|
|||
|
||||
#: pkg/app/user.go:249 pkg/campsite/types/l10n.go:87
|
||||
#: pkg/campsite/types/l10n.go:144 pkg/campsite/types/l10n.go:268
|
||||
#: pkg/campsite/types/option.go:340 pkg/campsite/types/feature.go:243
|
||||
#: pkg/campsite/types/admin.go:415 pkg/season/l10n.go:69
|
||||
#: pkg/season/admin.go:394 pkg/services/l10n.go:73 pkg/services/admin.go:266
|
||||
#: pkg/campsite/types/option.go:350 pkg/campsite/types/feature.go:243
|
||||
#: pkg/campsite/types/admin.go:447 pkg/season/l10n.go:69
|
||||
#: pkg/season/admin.go:404 pkg/services/l10n.go:73 pkg/services/admin.go:266
|
||||
msgid "Name can not be empty."
|
||||
msgstr "No podéis dejar el nombre en blanco."
|
||||
|
||||
|
@ -1268,44 +1268,44 @@ msgstr "El archivo tiene que ser una imagen PNG o JPEG válida."
|
|||
msgid "Access forbidden"
|
||||
msgstr "Acceso prohibido"
|
||||
|
||||
#: pkg/campsite/types/option.go:341 pkg/campsite/types/feature.go:244
|
||||
#: pkg/campsite/types/admin.go:416
|
||||
#: pkg/campsite/types/option.go:351 pkg/campsite/types/feature.go:244
|
||||
#: pkg/campsite/types/admin.go:448
|
||||
msgid "Name must have at least one letter."
|
||||
msgstr "El nombre tiene que tener como mínimo una letra."
|
||||
|
||||
#: pkg/campsite/types/option.go:344
|
||||
#: pkg/campsite/types/option.go:354
|
||||
msgid "Minimum can not be empty."
|
||||
msgstr "No podéis dejar el mínimo en blanco."
|
||||
|
||||
#: pkg/campsite/types/option.go:345
|
||||
#: pkg/campsite/types/option.go:355
|
||||
msgid "Minimum must be an integer number."
|
||||
msgstr "El valor de mínimo tiene que ser un número entero."
|
||||
|
||||
#: pkg/campsite/types/option.go:347
|
||||
#: pkg/campsite/types/option.go:357
|
||||
msgid "Minimum must be zero or greater."
|
||||
msgstr "El valor de mínimo tiene que ser como mínimo cero."
|
||||
|
||||
#: pkg/campsite/types/option.go:350
|
||||
#: pkg/campsite/types/option.go:360
|
||||
msgid "Maximum can not be empty."
|
||||
msgstr "No podéis dejar el máxmimo en blanco."
|
||||
|
||||
#: pkg/campsite/types/option.go:351
|
||||
#: pkg/campsite/types/option.go:361
|
||||
msgid "Maximum must be an integer number."
|
||||
msgstr "El valor del máximo tiene que ser un número entero."
|
||||
|
||||
#: pkg/campsite/types/option.go:353
|
||||
#: pkg/campsite/types/option.go:363
|
||||
msgid "Maximum must be equal or greater than minimum."
|
||||
msgstr "El valor del máximo tiene que ser igual o mayor al del mínimo."
|
||||
|
||||
#: pkg/campsite/types/option.go:357 pkg/campsite/types/admin.go:429
|
||||
#: pkg/campsite/types/option.go:367 pkg/campsite/types/admin.go:461
|
||||
msgid "Price per night can not be empty."
|
||||
msgstr "No podéis dejar el precio por noche en blanco."
|
||||
|
||||
#: pkg/campsite/types/option.go:358 pkg/campsite/types/admin.go:430
|
||||
#: pkg/campsite/types/option.go:368 pkg/campsite/types/admin.go:462
|
||||
msgid "Price per night must be a decimal number."
|
||||
msgstr "El precio por noche tien que ser un número decimal."
|
||||
|
||||
#: pkg/campsite/types/option.go:359 pkg/campsite/types/admin.go:431
|
||||
#: pkg/campsite/types/option.go:369 pkg/campsite/types/admin.go:463
|
||||
msgid "Price per night must be zero or greater."
|
||||
msgstr "El precio por noche tiene que ser como mínimo cero."
|
||||
|
||||
|
@ -1313,54 +1313,54 @@ msgstr "El precio por noche tiene que ser como mínimo cero."
|
|||
msgid "Selected icon is not valid."
|
||||
msgstr "El icono escogido no es válido."
|
||||
|
||||
#: pkg/campsite/types/admin.go:291
|
||||
#: pkg/campsite/types/admin.go:323
|
||||
msgctxt "input"
|
||||
msgid "Cover image"
|
||||
msgstr "Imagen de portada"
|
||||
|
||||
#: pkg/campsite/types/admin.go:292
|
||||
#: pkg/campsite/types/admin.go:324
|
||||
msgctxt "action"
|
||||
msgid "Set campsite type cover"
|
||||
msgstr "Establecer la portada del tipo de alojamiento"
|
||||
|
||||
#: pkg/campsite/types/admin.go:418
|
||||
#: pkg/campsite/types/admin.go:450
|
||||
msgid "Cover image can not be empty."
|
||||
msgstr "No podéis dejar la imagen de portada en blanco."
|
||||
|
||||
#: pkg/campsite/types/admin.go:419
|
||||
#: pkg/campsite/types/admin.go:451
|
||||
msgid "Cover image must be an image media type."
|
||||
msgstr "La imagen de portada tiene que ser un medio de tipo imagen."
|
||||
|
||||
#: pkg/campsite/types/admin.go:423
|
||||
#: pkg/campsite/types/admin.go:455
|
||||
msgid "Maximum number of campers can not be empty."
|
||||
msgstr "No podéis dejar el número máximo de personas en blanco."
|
||||
|
||||
#: pkg/campsite/types/admin.go:424
|
||||
#: pkg/campsite/types/admin.go:456
|
||||
msgid "Maximum number of campers must be an integer number."
|
||||
msgstr "El número máximo de personas tiene que ser entero."
|
||||
|
||||
#: pkg/campsite/types/admin.go:425
|
||||
#: pkg/campsite/types/admin.go:457
|
||||
msgid "Maximum number of campers must be one or greater."
|
||||
msgstr "El número máximo de personas no puede ser cero."
|
||||
|
||||
#: pkg/campsite/types/admin.go:434
|
||||
#: pkg/campsite/types/admin.go:466
|
||||
msgid "Minimum number of nights can not be empty."
|
||||
msgstr "No podéis dejar el número mínimo de noches en blanco."
|
||||
|
||||
#: pkg/campsite/types/admin.go:435
|
||||
#: pkg/campsite/types/admin.go:467
|
||||
msgid "Minimum number of nights must be an integer."
|
||||
msgstr "El número mínimo de noches tiene que ser entero."
|
||||
|
||||
#: pkg/campsite/types/admin.go:436
|
||||
#: pkg/campsite/types/admin.go:468
|
||||
msgid "Minimum number of nights must be one or greater."
|
||||
msgstr "El número mínimo de noches no puede ser cero."
|
||||
|
||||
#: pkg/campsite/types/public.go:157
|
||||
#: pkg/campsite/types/public.go:160
|
||||
msgctxt "season"
|
||||
msgid "Closed"
|
||||
msgstr "Cerrado"
|
||||
|
||||
#: pkg/campsite/admin.go:226 pkg/booking/public.go:274
|
||||
#: pkg/campsite/admin.go:226 pkg/booking/public.go:278
|
||||
msgid "Selected campsite type is not valid."
|
||||
msgstr "El tipo de alojamiento escogido no es válido."
|
||||
|
||||
|
@ -1368,96 +1368,96 @@ msgstr "El tipo de alojamiento escogido no es válido."
|
|||
msgid "Label can not be empty."
|
||||
msgstr "No podéis dejar la etiqueta en blanco."
|
||||
|
||||
#: pkg/season/admin.go:212
|
||||
#: pkg/season/admin.go:222
|
||||
msgctxt "month"
|
||||
msgid "January"
|
||||
msgstr "enero"
|
||||
|
||||
#: pkg/season/admin.go:213
|
||||
#: pkg/season/admin.go:223
|
||||
msgctxt "month"
|
||||
msgid "February"
|
||||
msgstr "febrero"
|
||||
|
||||
#: pkg/season/admin.go:214
|
||||
#: pkg/season/admin.go:224
|
||||
msgctxt "month"
|
||||
msgid "March"
|
||||
msgstr "marzo"
|
||||
|
||||
#: pkg/season/admin.go:215
|
||||
#: pkg/season/admin.go:225
|
||||
msgctxt "month"
|
||||
msgid "April"
|
||||
msgstr "abril"
|
||||
|
||||
#: pkg/season/admin.go:216
|
||||
#: pkg/season/admin.go:226
|
||||
msgctxt "month"
|
||||
msgid "May"
|
||||
msgstr "mayo"
|
||||
|
||||
#: pkg/season/admin.go:217
|
||||
#: pkg/season/admin.go:227
|
||||
msgctxt "month"
|
||||
msgid "June"
|
||||
msgstr "junio"
|
||||
|
||||
#: pkg/season/admin.go:218
|
||||
#: pkg/season/admin.go:228
|
||||
msgctxt "month"
|
||||
msgid "July"
|
||||
msgstr "julio"
|
||||
|
||||
#: pkg/season/admin.go:219
|
||||
#: pkg/season/admin.go:229
|
||||
msgctxt "month"
|
||||
msgid "August"
|
||||
msgstr "agosto"
|
||||
|
||||
#: pkg/season/admin.go:220
|
||||
#: pkg/season/admin.go:230
|
||||
msgctxt "month"
|
||||
msgid "September"
|
||||
msgstr "septiembre"
|
||||
|
||||
#: pkg/season/admin.go:221
|
||||
#: pkg/season/admin.go:231
|
||||
msgctxt "month"
|
||||
msgid "October"
|
||||
msgstr "octubre"
|
||||
|
||||
#: pkg/season/admin.go:222
|
||||
#: pkg/season/admin.go:232
|
||||
msgctxt "month"
|
||||
msgid "November"
|
||||
msgstr "noviembre"
|
||||
|
||||
#: pkg/season/admin.go:223
|
||||
#: pkg/season/admin.go:233
|
||||
msgctxt "month"
|
||||
msgid "December"
|
||||
msgstr "diciembre"
|
||||
|
||||
#: pkg/season/admin.go:395
|
||||
#: pkg/season/admin.go:405
|
||||
msgid "Color can not be empty."
|
||||
msgstr "No podéis dejar el color en blanco."
|
||||
|
||||
#: pkg/season/admin.go:396
|
||||
#: pkg/season/admin.go:406
|
||||
msgid "This color is not valid. It must be like #123abc."
|
||||
msgstr "Este color no es válido. Tiene que ser parecido a #123abc."
|
||||
|
||||
#: pkg/season/admin.go:472
|
||||
#: pkg/season/admin.go:506
|
||||
msgctxt "action"
|
||||
msgid "Unset"
|
||||
msgstr "Desasignar"
|
||||
|
||||
#: pkg/season/admin.go:503
|
||||
#: pkg/season/admin.go:537
|
||||
msgid "Start date can not be empty."
|
||||
msgstr "No podéis dejar la fecha de inicio en blanco."
|
||||
|
||||
#: pkg/season/admin.go:504
|
||||
#: pkg/season/admin.go:538
|
||||
msgid "Start date must be a valid date."
|
||||
msgstr "La fecha de inicio tiene que ser una fecha válida."
|
||||
|
||||
#: pkg/season/admin.go:506
|
||||
#: pkg/season/admin.go:540
|
||||
msgid "End date can not be empty."
|
||||
msgstr "No podéis dejar la fecha final en blanco."
|
||||
|
||||
#: pkg/season/admin.go:507
|
||||
#: pkg/season/admin.go:541
|
||||
msgid "End date must be a valid date."
|
||||
msgstr "La fecha final tiene que ser una fecha válida."
|
||||
|
||||
#: pkg/company/admin.go:193 pkg/booking/public.go:252
|
||||
#: pkg/company/admin.go:193 pkg/booking/public.go:256
|
||||
msgid "Selected country is not valid."
|
||||
msgstr "El país escogido no es válido."
|
||||
|
||||
|
@ -1477,11 +1477,11 @@ msgstr "No podéis dejar el NIF en blanco."
|
|||
msgid "This VAT number is not valid."
|
||||
msgstr "Este NIF no es válido."
|
||||
|
||||
#: pkg/company/admin.go:205 pkg/booking/public.go:268
|
||||
#: pkg/company/admin.go:205 pkg/booking/public.go:272
|
||||
msgid "Phone can not be empty."
|
||||
msgstr "No podéis dejar el teléfono en blanco."
|
||||
|
||||
#: pkg/company/admin.go:206 pkg/booking/public.go:269
|
||||
#: pkg/company/admin.go:206 pkg/booking/public.go:273
|
||||
msgid "This phone number is not valid."
|
||||
msgstr "Este teléfono no es válido."
|
||||
|
||||
|
@ -1505,7 +1505,7 @@ msgstr "No podéis dejar la provincia en blanco."
|
|||
msgid "Postal code can not be empty."
|
||||
msgstr "No podéis dejar el código postal en blanco."
|
||||
|
||||
#: pkg/company/admin.go:220 pkg/booking/public.go:261
|
||||
#: pkg/company/admin.go:220 pkg/booking/public.go:265
|
||||
msgid "This postal code is not valid."
|
||||
msgstr "Este código postal no es válido."
|
||||
|
||||
|
@ -1585,54 +1585,54 @@ msgstr "La integración escogida no es válida."
|
|||
msgid "The merchant key is not valid."
|
||||
msgstr "Esta clave del comercio no es válida."
|
||||
|
||||
#: pkg/booking/public.go:256
|
||||
#: pkg/booking/public.go:260
|
||||
msgid "Full name can not be empty."
|
||||
msgstr "No podéis dejar el nombre y los apellidos en blanco."
|
||||
|
||||
#: pkg/booking/public.go:257
|
||||
#: pkg/booking/public.go:261
|
||||
msgid "Full name must have at least one letter."
|
||||
msgstr "El nombre y los apellidos tienen que tener como mínimo una letra."
|
||||
|
||||
#: pkg/booking/public.go:275
|
||||
#: pkg/booking/public.go:279
|
||||
msgid "Arrival date can not be empty"
|
||||
msgstr "No podéis dejar la fecha de llegada en blanco."
|
||||
|
||||
#: pkg/booking/public.go:276
|
||||
#: pkg/booking/public.go:280
|
||||
msgid "Arrival date must be a valid date."
|
||||
msgstr "La fecha de llegada tiene que ser una fecha válida."
|
||||
|
||||
#: pkg/booking/public.go:280
|
||||
#: pkg/booking/public.go:284
|
||||
msgid "Departure date can not be empty"
|
||||
msgstr "No podéis dejar la fecha de partida en blanco."
|
||||
|
||||
#: pkg/booking/public.go:281
|
||||
#: pkg/booking/public.go:285
|
||||
msgid "Departure date must be a valid date."
|
||||
msgstr "La fecha de partida tiene que ser una fecha válida."
|
||||
|
||||
#: pkg/booking/public.go:282
|
||||
#: pkg/booking/public.go:286
|
||||
msgid "The departure date must be after the arrival date."
|
||||
msgstr "La fecha de partida tiene que ser posterior a la de llegada."
|
||||
|
||||
#: pkg/booking/public.go:285
|
||||
#: pkg/booking/public.go:289
|
||||
msgid "It is mandatory to agree to the reservation conditions."
|
||||
msgstr "Es obligatorio aceptar las condiciones de reserva."
|
||||
|
||||
#: pkg/booking/public.go:288
|
||||
#: pkg/booking/public.go:292
|
||||
#, c-format
|
||||
msgid "%s can not be empty"
|
||||
msgstr "No podéis dejar %s en blanco."
|
||||
|
||||
#: pkg/booking/public.go:289
|
||||
#: pkg/booking/public.go:293
|
||||
#, c-format
|
||||
msgid "%s must be an integer."
|
||||
msgstr "%s tiene que ser un número entero."
|
||||
|
||||
#: pkg/booking/public.go:290
|
||||
#: pkg/booking/public.go:294
|
||||
#, c-format
|
||||
msgid "%s must be %d or greater."
|
||||
msgstr "%s tiene que ser como mínimo %d."
|
||||
|
||||
#: pkg/booking/public.go:291
|
||||
#: pkg/booking/public.go:295
|
||||
#, c-format
|
||||
msgid "%s must be at most %d."
|
||||
msgstr "%s tiene que ser como máximo %d"
|
||||
|
|
266
po/fr.po
266
po/fr.po
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: camper\n"
|
||||
"Report-Msgid-Bugs-To: jordi@tandem.blog\n"
|
||||
"POT-Creation-Date: 2023-12-20 15:04+0100\n"
|
||||
"POT-Creation-Date: 2023-12-20 19:48+0100\n"
|
||||
"PO-Revision-Date: 2023-12-20 10:13+0100\n"
|
||||
"Last-Translator: Oriol Carbonell <info@oriolcarbonell.cat>\n"
|
||||
"Language-Team: French <traduc@traduc.org>\n"
|
||||
|
@ -45,7 +45,7 @@ msgstr "Le paiement a échoué"
|
|||
#: web/templates/public/services.gohtml:6
|
||||
#: web/templates/public/services.gohtml:15
|
||||
#: web/templates/public/layout.gohtml:44 web/templates/public/layout.gohtml:71
|
||||
#: web/templates/admin/services/index.gohtml:53
|
||||
#: web/templates/admin/services/index.gohtml:66
|
||||
msgctxt "title"
|
||||
msgid "Services"
|
||||
msgstr "Services"
|
||||
|
@ -137,7 +137,7 @@ msgid "*Minimum %d nights per stay"
|
|||
msgstr "*Minimum %d nuits par séjour"
|
||||
|
||||
#: web/templates/public/campsite/type.gohtml:89
|
||||
#: web/templates/admin/season/index.gohtml:48
|
||||
#: web/templates/admin/season/index.gohtml:59
|
||||
msgctxt "title"
|
||||
msgid "Calendar"
|
||||
msgstr "Calendrier"
|
||||
|
@ -368,14 +368,14 @@ msgstr "J’ai lu et j’accepte les conditions de réservation"
|
|||
msgid "Campsite Montagut"
|
||||
msgstr "Camping Montagut"
|
||||
|
||||
#: web/templates/public/layout.gohtml:23 web/templates/admin/layout.gohtml:18
|
||||
#: web/templates/public/layout.gohtml:23 web/templates/admin/layout.gohtml:19
|
||||
msgid "Skip to main content"
|
||||
msgstr "Passer au contenu principal"
|
||||
|
||||
#: web/templates/public/layout.gohtml:35 web/templates/public/layout.gohtml:80
|
||||
#: web/templates/admin/campsite/index.gohtml:6
|
||||
#: web/templates/admin/campsite/index.gohtml:12
|
||||
#: web/templates/admin/layout.gohtml:43 web/templates/admin/layout.gohtml:74
|
||||
#: web/templates/admin/layout.gohtml:44 web/templates/admin/layout.gohtml:75
|
||||
msgctxt "title"
|
||||
msgid "Campsites"
|
||||
msgstr "Camping"
|
||||
|
@ -527,21 +527,21 @@ msgid "Add Feature"
|
|||
msgstr "Ajouter une fonctionnalité"
|
||||
|
||||
#: web/templates/admin/campsite/feature/index.gohtml:17
|
||||
#: web/templates/admin/campsite/option/index.gohtml:17
|
||||
#: web/templates/admin/campsite/type/index.gohtml:17
|
||||
#: web/templates/admin/season/index.gohtml:18
|
||||
#: web/templates/admin/campsite/option/index.gohtml:25
|
||||
#: web/templates/admin/campsite/type/index.gohtml:25
|
||||
#: web/templates/admin/season/index.gohtml:26
|
||||
msgctxt "header"
|
||||
msgid "Name"
|
||||
msgstr "Nom"
|
||||
|
||||
#: web/templates/admin/campsite/feature/index.gohtml:18
|
||||
#: web/templates/admin/campsite/carousel/index.gohtml:19
|
||||
#: web/templates/admin/campsite/option/index.gohtml:18
|
||||
#: web/templates/admin/campsite/type/index.gohtml:18
|
||||
#: web/templates/admin/season/index.gohtml:19
|
||||
#: web/templates/admin/services/index.gohtml:19
|
||||
#: web/templates/admin/services/index.gohtml:60
|
||||
#: web/templates/admin/home/index.gohtml:19
|
||||
#: web/templates/admin/campsite/carousel/index.gohtml:27
|
||||
#: web/templates/admin/campsite/option/index.gohtml:26
|
||||
#: web/templates/admin/campsite/type/index.gohtml:26
|
||||
#: web/templates/admin/season/index.gohtml:27
|
||||
#: web/templates/admin/services/index.gohtml:27
|
||||
#: web/templates/admin/services/index.gohtml:73
|
||||
#: web/templates/admin/home/index.gohtml:27
|
||||
msgctxt "header"
|
||||
msgid "Translations"
|
||||
msgstr "Traductions"
|
||||
|
@ -581,45 +581,45 @@ msgctxt "action"
|
|||
msgid "Add slide"
|
||||
msgstr "Ajouter la diapositive"
|
||||
|
||||
#: web/templates/admin/campsite/carousel/index.gohtml:17
|
||||
#: web/templates/admin/services/index.gohtml:17
|
||||
#: web/templates/admin/home/index.gohtml:17
|
||||
#: web/templates/admin/campsite/carousel/index.gohtml:25
|
||||
#: web/templates/admin/services/index.gohtml:25
|
||||
#: web/templates/admin/home/index.gohtml:25
|
||||
msgctxt "header"
|
||||
msgid "Image"
|
||||
msgstr "Image"
|
||||
|
||||
#: web/templates/admin/campsite/carousel/index.gohtml:18
|
||||
#: web/templates/admin/services/index.gohtml:18
|
||||
#: web/templates/admin/home/index.gohtml:18
|
||||
#: web/templates/admin/campsite/carousel/index.gohtml:26
|
||||
#: web/templates/admin/services/index.gohtml:26
|
||||
#: web/templates/admin/home/index.gohtml:26
|
||||
msgctxt "header"
|
||||
msgid "Caption"
|
||||
msgstr "Légende"
|
||||
|
||||
#: web/templates/admin/campsite/carousel/index.gohtml:20
|
||||
#: web/templates/admin/services/index.gohtml:20
|
||||
#: web/templates/admin/services/index.gohtml:61
|
||||
#: web/templates/admin/home/index.gohtml:20
|
||||
#: web/templates/admin/campsite/carousel/index.gohtml:28
|
||||
#: web/templates/admin/services/index.gohtml:28
|
||||
#: web/templates/admin/services/index.gohtml:74
|
||||
#: web/templates/admin/home/index.gohtml:28
|
||||
msgctxt "header"
|
||||
msgid "Actions"
|
||||
msgstr "Actions"
|
||||
|
||||
#: web/templates/admin/campsite/carousel/index.gohtml:24
|
||||
#: web/templates/admin/services/index.gohtml:24
|
||||
#: web/templates/admin/home/index.gohtml:24
|
||||
#: web/templates/admin/campsite/carousel/index.gohtml:32
|
||||
#: web/templates/admin/services/index.gohtml:32
|
||||
#: web/templates/admin/home/index.gohtml:32
|
||||
msgid "Are you sure you wish to delete this slide?"
|
||||
msgstr "Êtes-vous sûr de vouloir supprimer cette diapositive ?"
|
||||
|
||||
#: web/templates/admin/campsite/carousel/index.gohtml:42
|
||||
#: web/templates/admin/services/index.gohtml:42
|
||||
#: web/templates/admin/services/index.gohtml:80
|
||||
#: web/templates/admin/home/index.gohtml:42
|
||||
#: web/templates/admin/campsite/carousel/index.gohtml:55
|
||||
#: web/templates/admin/services/index.gohtml:54
|
||||
#: web/templates/admin/services/index.gohtml:93
|
||||
#: web/templates/admin/home/index.gohtml:54
|
||||
msgctxt "action"
|
||||
msgid "Delete"
|
||||
msgstr "Supprimer"
|
||||
|
||||
#: web/templates/admin/campsite/carousel/index.gohtml:50
|
||||
#: web/templates/admin/services/index.gohtml:50
|
||||
#: web/templates/admin/home/index.gohtml:50
|
||||
#: web/templates/admin/campsite/carousel/index.gohtml:64
|
||||
#: web/templates/admin/services/index.gohtml:63
|
||||
#: web/templates/admin/home/index.gohtml:63
|
||||
msgid "No slides added yet."
|
||||
msgstr "Aucune diapositive n’a encore été ajoutée."
|
||||
|
||||
|
@ -700,7 +700,7 @@ msgctxt "action"
|
|||
msgid "Add Option"
|
||||
msgstr "Ajouter une option"
|
||||
|
||||
#: web/templates/admin/campsite/option/index.gohtml:39
|
||||
#: web/templates/admin/campsite/option/index.gohtml:52
|
||||
msgid "No campsite type options added yet."
|
||||
msgstr "Aucune option de type de camping n’a encore été ajoutée."
|
||||
|
||||
|
@ -726,14 +726,14 @@ msgid "Type"
|
|||
msgstr "Type"
|
||||
|
||||
#: web/templates/admin/campsite/index.gohtml:28
|
||||
#: web/templates/admin/campsite/type/index.gohtml:47
|
||||
#: web/templates/admin/season/index.gohtml:39
|
||||
#: web/templates/admin/campsite/type/index.gohtml:59
|
||||
#: web/templates/admin/season/index.gohtml:49
|
||||
msgid "Yes"
|
||||
msgstr "Oui"
|
||||
|
||||
#: web/templates/admin/campsite/index.gohtml:28
|
||||
#: web/templates/admin/campsite/type/index.gohtml:47
|
||||
#: web/templates/admin/season/index.gohtml:39
|
||||
#: web/templates/admin/campsite/type/index.gohtml:59
|
||||
#: web/templates/admin/season/index.gohtml:49
|
||||
msgid "No"
|
||||
msgstr "Non"
|
||||
|
||||
|
@ -754,7 +754,7 @@ msgid "New Campsite Type"
|
|||
msgstr "Nouveau type d’emplacement de camping"
|
||||
|
||||
#: web/templates/admin/campsite/type/form.gohtml:37
|
||||
#: web/templates/admin/campsite/type/index.gohtml:22
|
||||
#: web/templates/admin/campsite/type/index.gohtml:30
|
||||
msgctxt "campsite type"
|
||||
msgid "Active"
|
||||
msgstr "Actif"
|
||||
|
@ -802,7 +802,7 @@ msgstr "Description"
|
|||
|
||||
#: web/templates/admin/campsite/type/index.gohtml:6
|
||||
#: web/templates/admin/campsite/type/index.gohtml:12
|
||||
#: web/templates/admin/layout.gohtml:40
|
||||
#: web/templates/admin/layout.gohtml:41
|
||||
msgctxt "title"
|
||||
msgid "Campsite Types"
|
||||
msgstr "Types d’emplacements de camping"
|
||||
|
@ -812,37 +812,37 @@ msgctxt "action"
|
|||
msgid "Add Type"
|
||||
msgstr "Ajouter un type"
|
||||
|
||||
#: web/templates/admin/campsite/type/index.gohtml:19
|
||||
#: web/templates/admin/campsite/type/index.gohtml:27
|
||||
msgctxt "header"
|
||||
msgid "Features"
|
||||
msgstr "Caractéristiques"
|
||||
|
||||
#: web/templates/admin/campsite/type/index.gohtml:20
|
||||
#: web/templates/admin/campsite/type/index.gohtml:28
|
||||
msgctxt "header"
|
||||
msgid "Options"
|
||||
msgstr "Options"
|
||||
|
||||
#: web/templates/admin/campsite/type/index.gohtml:21
|
||||
#: web/templates/admin/campsite/type/index.gohtml:29
|
||||
msgctxt "header"
|
||||
msgid "Carousel"
|
||||
msgstr "Carrousel"
|
||||
|
||||
#: web/templates/admin/campsite/type/index.gohtml:39
|
||||
#: web/templates/admin/campsite/type/index.gohtml:51
|
||||
msgctxt "action"
|
||||
msgid "Edit Features"
|
||||
msgstr "Edit Caractéristiques"
|
||||
|
||||
#: web/templates/admin/campsite/type/index.gohtml:42
|
||||
#: web/templates/admin/campsite/type/index.gohtml:54
|
||||
msgctxt "action"
|
||||
msgid "Edit Options"
|
||||
msgstr "Modifier les options"
|
||||
|
||||
#: web/templates/admin/campsite/type/index.gohtml:45
|
||||
#: web/templates/admin/campsite/type/index.gohtml:57
|
||||
msgctxt "action"
|
||||
msgid "Edit Carousel"
|
||||
msgstr "Modifier le carrousel"
|
||||
|
||||
#: web/templates/admin/campsite/type/index.gohtml:53
|
||||
#: web/templates/admin/campsite/type/index.gohtml:66
|
||||
msgid "No campsite types added yet."
|
||||
msgstr "Aucun type d’emplacement n’a encore été ajouté."
|
||||
|
||||
|
@ -865,7 +865,7 @@ msgid "New Season"
|
|||
msgstr "Nouvelle saison"
|
||||
|
||||
#: web/templates/admin/season/form.gohtml:37
|
||||
#: web/templates/admin/season/index.gohtml:20
|
||||
#: web/templates/admin/season/index.gohtml:28
|
||||
msgctxt "season"
|
||||
msgid "Active"
|
||||
msgstr "Actif"
|
||||
|
@ -877,7 +877,7 @@ msgstr "Couleur"
|
|||
|
||||
#: web/templates/admin/season/index.gohtml:6
|
||||
#: web/templates/admin/season/index.gohtml:12
|
||||
#: web/templates/admin/layout.gohtml:46
|
||||
#: web/templates/admin/layout.gohtml:47
|
||||
msgctxt "title"
|
||||
msgid "Seasons"
|
||||
msgstr "Saisons"
|
||||
|
@ -887,12 +887,12 @@ msgctxt "action"
|
|||
msgid "Add Season"
|
||||
msgstr "Ajouter une saison"
|
||||
|
||||
#: web/templates/admin/season/index.gohtml:17
|
||||
#: web/templates/admin/season/index.gohtml:25
|
||||
msgctxt "header"
|
||||
msgid "Color"
|
||||
msgstr "Couleur"
|
||||
|
||||
#: web/templates/admin/season/index.gohtml:45
|
||||
#: web/templates/admin/season/index.gohtml:56
|
||||
msgid "No seasons added yet."
|
||||
msgstr "Aucune saison n’a encore été ajoutée."
|
||||
|
||||
|
@ -909,7 +909,7 @@ msgid "Cancel"
|
|||
msgstr "Annuler"
|
||||
|
||||
#: web/templates/admin/payment.gohtml:6 web/templates/admin/payment.gohtml:12
|
||||
#: web/templates/admin/layout.gohtml:37
|
||||
#: web/templates/admin/layout.gohtml:38
|
||||
msgctxt "title"
|
||||
msgid "Payment Settings"
|
||||
msgstr "Paramètres de paiement"
|
||||
|
@ -951,7 +951,7 @@ msgid "Save changes"
|
|||
msgstr "Enregistrer les changements"
|
||||
|
||||
#: web/templates/admin/dashboard.gohtml:6
|
||||
#: web/templates/admin/dashboard.gohtml:10 web/templates/admin/layout.gohtml:71
|
||||
#: web/templates/admin/dashboard.gohtml:10 web/templates/admin/layout.gohtml:72
|
||||
msgctxt "title"
|
||||
msgid "Dashboard"
|
||||
msgstr "Tableau de bord"
|
||||
|
@ -984,7 +984,7 @@ msgid "New Service"
|
|||
msgstr "Nouveau service"
|
||||
|
||||
#: web/templates/admin/services/index.gohtml:6
|
||||
#: web/templates/admin/layout.gohtml:55
|
||||
#: web/templates/admin/layout.gohtml:56
|
||||
msgctxt "title"
|
||||
msgid "Services Page"
|
||||
msgstr "La page des services"
|
||||
|
@ -995,21 +995,21 @@ msgctxt "title"
|
|||
msgid "Carousel"
|
||||
msgstr "Carrousel"
|
||||
|
||||
#: web/templates/admin/services/index.gohtml:54
|
||||
#: web/templates/admin/services/index.gohtml:67
|
||||
msgctxt "action"
|
||||
msgid "Add service"
|
||||
msgstr "Ajouter un service"
|
||||
|
||||
#: web/templates/admin/services/index.gohtml:59
|
||||
#: web/templates/admin/services/index.gohtml:72
|
||||
msgctxt "header"
|
||||
msgid "Service"
|
||||
msgstr "Service"
|
||||
|
||||
#: web/templates/admin/services/index.gohtml:65
|
||||
#: web/templates/admin/services/index.gohtml:78
|
||||
msgid "Are you sure you wish to delete this service?"
|
||||
msgstr "Êtes-vous sûr de vouloir supprimer ce service ?"
|
||||
|
||||
#: web/templates/admin/services/index.gohtml:88
|
||||
#: web/templates/admin/services/index.gohtml:101
|
||||
msgid "No services added yet."
|
||||
msgstr "Aucun service n’a encore été ajouté."
|
||||
|
||||
|
@ -1020,7 +1020,7 @@ msgid "Translate Service to %s"
|
|||
msgstr "Traduire le service en %s"
|
||||
|
||||
#: web/templates/admin/profile.gohtml:6 web/templates/admin/profile.gohtml:12
|
||||
#: web/templates/admin/layout.gohtml:30
|
||||
#: web/templates/admin/layout.gohtml:31
|
||||
msgctxt "title"
|
||||
msgid "Profile"
|
||||
msgstr "Profil"
|
||||
|
@ -1112,29 +1112,29 @@ msgctxt "input"
|
|||
msgid "Legal Disclaimer"
|
||||
msgstr "Avertissement juridique"
|
||||
|
||||
#: web/templates/admin/layout.gohtml:26
|
||||
#: web/templates/admin/layout.gohtml:27
|
||||
msgctxt "title"
|
||||
msgid "User Menu"
|
||||
msgstr "Menu utilisateur"
|
||||
|
||||
#: web/templates/admin/layout.gohtml:34
|
||||
#: web/templates/admin/layout.gohtml:35
|
||||
msgctxt "title"
|
||||
msgid "Company Settings"
|
||||
msgstr "Paramètres de l'entreprise"
|
||||
|
||||
#: web/templates/admin/layout.gohtml:49
|
||||
#: web/templates/admin/layout.gohtml:50
|
||||
#: web/templates/admin/media/index.gohtml:6
|
||||
#: web/templates/admin/media/index.gohtml:11
|
||||
msgctxt "title"
|
||||
msgid "Media"
|
||||
msgstr "Média"
|
||||
|
||||
#: web/templates/admin/layout.gohtml:52 web/templates/admin/home/index.gohtml:6
|
||||
#: web/templates/admin/layout.gohtml:53 web/templates/admin/home/index.gohtml:6
|
||||
msgctxt "title"
|
||||
msgid "Home Page"
|
||||
msgstr "Page d'accueil"
|
||||
|
||||
#: web/templates/admin/layout.gohtml:60
|
||||
#: web/templates/admin/layout.gohtml:61
|
||||
msgctxt "action"
|
||||
msgid "Logout"
|
||||
msgstr "Déconnexion"
|
||||
|
@ -1204,31 +1204,31 @@ msgctxt "title"
|
|||
msgid "Upload Media"
|
||||
msgstr "Envoyer un fichier"
|
||||
|
||||
#: pkg/carousel/admin.go:234 pkg/campsite/types/carousel.go:233
|
||||
#: pkg/carousel/admin.go:274 pkg/campsite/types/carousel.go:242
|
||||
msgctxt "input"
|
||||
msgid "Slide image"
|
||||
msgstr "Image du diaporama"
|
||||
|
||||
#: pkg/carousel/admin.go:235 pkg/campsite/types/carousel.go:234
|
||||
#: pkg/carousel/admin.go:275 pkg/campsite/types/carousel.go:243
|
||||
msgctxt "action"
|
||||
msgid "Set slide image"
|
||||
msgstr "Définir l’image de la diapositive"
|
||||
|
||||
#: pkg/carousel/admin.go:287 pkg/campsite/types/carousel.go:288
|
||||
#: pkg/carousel/admin.go:327 pkg/campsite/types/carousel.go:297
|
||||
msgid "Slide image can not be empty."
|
||||
msgstr "L’image de la diapositive ne peut pas être vide."
|
||||
|
||||
#: pkg/carousel/admin.go:288 pkg/campsite/types/carousel.go:289
|
||||
#: pkg/carousel/admin.go:328 pkg/campsite/types/carousel.go:298
|
||||
msgid "Slide image must be an image media type."
|
||||
msgstr "L’image de la diapositive doit être de type média d’image."
|
||||
|
||||
#: pkg/app/login.go:56 pkg/app/user.go:246 pkg/company/admin.go:210
|
||||
#: pkg/booking/public.go:265
|
||||
#: pkg/booking/public.go:269
|
||||
msgid "Email can not be empty."
|
||||
msgstr "L’e-mail ne peut pas être vide."
|
||||
|
||||
#: pkg/app/login.go:57 pkg/app/user.go:247 pkg/company/admin.go:211
|
||||
#: pkg/booking/public.go:266
|
||||
#: pkg/booking/public.go:270
|
||||
msgid "This email is not valid. It should be like name@domain.com."
|
||||
msgstr "Cette adresse e-mail n’est pas valide. Il devrait en être name@domain.com."
|
||||
|
||||
|
@ -1247,9 +1247,9 @@ msgstr "Automatique"
|
|||
|
||||
#: pkg/app/user.go:249 pkg/campsite/types/l10n.go:87
|
||||
#: pkg/campsite/types/l10n.go:144 pkg/campsite/types/l10n.go:268
|
||||
#: pkg/campsite/types/option.go:341 pkg/campsite/types/feature.go:243
|
||||
#: pkg/campsite/types/admin.go:416 pkg/season/l10n.go:69
|
||||
#: pkg/season/admin.go:395 pkg/services/l10n.go:73 pkg/services/admin.go:266
|
||||
#: pkg/campsite/types/option.go:350 pkg/campsite/types/feature.go:243
|
||||
#: pkg/campsite/types/admin.go:447 pkg/season/l10n.go:69
|
||||
#: pkg/season/admin.go:404 pkg/services/l10n.go:73 pkg/services/admin.go:266
|
||||
msgid "Name can not be empty."
|
||||
msgstr "Le nom ne peut pas être laissé vide."
|
||||
|
||||
|
@ -1269,44 +1269,44 @@ msgstr "Le fichier doit être une image PNG ou JPEG valide."
|
|||
msgid "Access forbidden"
|
||||
msgstr "Accès interdit"
|
||||
|
||||
#: pkg/campsite/types/option.go:342 pkg/campsite/types/feature.go:244
|
||||
#: pkg/campsite/types/admin.go:417
|
||||
#: pkg/campsite/types/option.go:351 pkg/campsite/types/feature.go:244
|
||||
#: pkg/campsite/types/admin.go:448
|
||||
msgid "Name must have at least one letter."
|
||||
msgstr "Le nom doit comporter au moins une lettre."
|
||||
|
||||
#: pkg/campsite/types/option.go:345
|
||||
#: pkg/campsite/types/option.go:354
|
||||
msgid "Minimum can not be empty."
|
||||
msgstr "Le minimum ne peut pas être vide."
|
||||
|
||||
#: pkg/campsite/types/option.go:346
|
||||
#: pkg/campsite/types/option.go:355
|
||||
msgid "Minimum must be an integer number."
|
||||
msgstr "Le minimum doit être un nombre entier."
|
||||
|
||||
#: pkg/campsite/types/option.go:348
|
||||
#: pkg/campsite/types/option.go:357
|
||||
msgid "Minimum must be zero or greater."
|
||||
msgstr "Le minimum doit être égal ou supérieur à zéro."
|
||||
|
||||
#: pkg/campsite/types/option.go:351
|
||||
#: pkg/campsite/types/option.go:360
|
||||
msgid "Maximum can not be empty."
|
||||
msgstr "Le maximum ne peut pas être vide."
|
||||
|
||||
#: pkg/campsite/types/option.go:352
|
||||
#: pkg/campsite/types/option.go:361
|
||||
msgid "Maximum must be an integer number."
|
||||
msgstr "Le maximum doit être un nombre entier."
|
||||
|
||||
#: pkg/campsite/types/option.go:354
|
||||
#: pkg/campsite/types/option.go:363
|
||||
msgid "Maximum must be equal or greater than minimum."
|
||||
msgstr "Le maximum doit être égal ou supérieur au minimum."
|
||||
|
||||
#: pkg/campsite/types/option.go:358 pkg/campsite/types/admin.go:430
|
||||
#: pkg/campsite/types/option.go:367 pkg/campsite/types/admin.go:461
|
||||
msgid "Price per night can not be empty."
|
||||
msgstr "Le prix par nuit ne peut pas être vide."
|
||||
|
||||
#: pkg/campsite/types/option.go:359 pkg/campsite/types/admin.go:431
|
||||
#: pkg/campsite/types/option.go:368 pkg/campsite/types/admin.go:462
|
||||
msgid "Price per night must be a decimal number."
|
||||
msgstr "Le prix par nuit doit être un nombre décimal."
|
||||
|
||||
#: pkg/campsite/types/option.go:360 pkg/campsite/types/admin.go:432
|
||||
#: pkg/campsite/types/option.go:369 pkg/campsite/types/admin.go:463
|
||||
msgid "Price per night must be zero or greater."
|
||||
msgstr "Le prix par nuit doit être égal ou supérieur."
|
||||
|
||||
|
@ -1314,54 +1314,54 @@ msgstr "Le prix par nuit doit être égal ou supérieur."
|
|||
msgid "Selected icon is not valid."
|
||||
msgstr "L’icône sélectionnée n’est pas valide."
|
||||
|
||||
#: pkg/campsite/types/admin.go:292
|
||||
#: pkg/campsite/types/admin.go:323
|
||||
msgctxt "input"
|
||||
msgid "Cover image"
|
||||
msgstr "Image de couverture"
|
||||
|
||||
#: pkg/campsite/types/admin.go:293
|
||||
#: pkg/campsite/types/admin.go:324
|
||||
msgctxt "action"
|
||||
msgid "Set campsite type cover"
|
||||
msgstr "Définir une couverture type camping"
|
||||
|
||||
#: pkg/campsite/types/admin.go:419
|
||||
#: pkg/campsite/types/admin.go:450
|
||||
msgid "Cover image can not be empty."
|
||||
msgstr "L’image de couverture ne peut pas être vide."
|
||||
|
||||
#: pkg/campsite/types/admin.go:420
|
||||
#: pkg/campsite/types/admin.go:451
|
||||
msgid "Cover image must be an image media type."
|
||||
msgstr "L’image de couverture doit être de type média d’image."
|
||||
|
||||
#: pkg/campsite/types/admin.go:424
|
||||
#: pkg/campsite/types/admin.go:455
|
||||
msgid "Maximum number of campers can not be empty."
|
||||
msgstr "Le nombre maximum de campeurs ne peut pas être vide."
|
||||
|
||||
#: pkg/campsite/types/admin.go:425
|
||||
#: pkg/campsite/types/admin.go:456
|
||||
msgid "Maximum number of campers must be an integer number."
|
||||
msgstr "Le nombre maximum de campeurs doit être un nombre entier."
|
||||
|
||||
#: pkg/campsite/types/admin.go:426
|
||||
#: pkg/campsite/types/admin.go:457
|
||||
msgid "Maximum number of campers must be one or greater."
|
||||
msgstr "Le nombre maximum de campeurs doit être égal ou supérieur à un campeur."
|
||||
|
||||
#: pkg/campsite/types/admin.go:435
|
||||
#: pkg/campsite/types/admin.go:466
|
||||
msgid "Minimum number of nights can not be empty."
|
||||
msgstr "Le nombre minimum de nuits ne peut pas être vide."
|
||||
|
||||
#: pkg/campsite/types/admin.go:436
|
||||
#: pkg/campsite/types/admin.go:467
|
||||
msgid "Minimum number of nights must be an integer."
|
||||
msgstr "Le nombre minimum de nuits doit être un entier."
|
||||
|
||||
#: pkg/campsite/types/admin.go:437
|
||||
#: pkg/campsite/types/admin.go:468
|
||||
msgid "Minimum number of nights must be one or greater."
|
||||
msgstr "Le nombre minimum de nuits doit être supérieur ou égal à une nuit."
|
||||
|
||||
#: pkg/campsite/types/public.go:157
|
||||
#: pkg/campsite/types/public.go:160
|
||||
msgctxt "season"
|
||||
msgid "Closed"
|
||||
msgstr "Fermé"
|
||||
|
||||
#: pkg/campsite/admin.go:226 pkg/booking/public.go:274
|
||||
#: pkg/campsite/admin.go:226 pkg/booking/public.go:278
|
||||
msgid "Selected campsite type is not valid."
|
||||
msgstr "Le type d’emplacement sélectionné n’est pas valide."
|
||||
|
||||
|
@ -1369,96 +1369,96 @@ msgstr "Le type d’emplacement sélectionné n’est pas valide."
|
|||
msgid "Label can not be empty."
|
||||
msgstr "L'étiquette ne peut pas être vide."
|
||||
|
||||
#: pkg/season/admin.go:213
|
||||
#: pkg/season/admin.go:222
|
||||
msgctxt "month"
|
||||
msgid "January"
|
||||
msgstr "Janvier"
|
||||
|
||||
#: pkg/season/admin.go:214
|
||||
#: pkg/season/admin.go:223
|
||||
msgctxt "month"
|
||||
msgid "February"
|
||||
msgstr "Février"
|
||||
|
||||
#: pkg/season/admin.go:215
|
||||
#: pkg/season/admin.go:224
|
||||
msgctxt "month"
|
||||
msgid "March"
|
||||
msgstr "Mars"
|
||||
|
||||
#: pkg/season/admin.go:216
|
||||
#: pkg/season/admin.go:225
|
||||
msgctxt "month"
|
||||
msgid "April"
|
||||
msgstr "Avril"
|
||||
|
||||
#: pkg/season/admin.go:217
|
||||
#: pkg/season/admin.go:226
|
||||
msgctxt "month"
|
||||
msgid "May"
|
||||
msgstr "Mai"
|
||||
|
||||
#: pkg/season/admin.go:218
|
||||
#: pkg/season/admin.go:227
|
||||
msgctxt "month"
|
||||
msgid "June"
|
||||
msgstr "Juin"
|
||||
|
||||
#: pkg/season/admin.go:219
|
||||
#: pkg/season/admin.go:228
|
||||
msgctxt "month"
|
||||
msgid "July"
|
||||
msgstr "Juillet"
|
||||
|
||||
#: pkg/season/admin.go:220
|
||||
#: pkg/season/admin.go:229
|
||||
msgctxt "month"
|
||||
msgid "August"
|
||||
msgstr "Août"
|
||||
|
||||
#: pkg/season/admin.go:221
|
||||
#: pkg/season/admin.go:230
|
||||
msgctxt "month"
|
||||
msgid "September"
|
||||
msgstr "Septembre"
|
||||
|
||||
#: pkg/season/admin.go:222
|
||||
#: pkg/season/admin.go:231
|
||||
msgctxt "month"
|
||||
msgid "October"
|
||||
msgstr "Octobre"
|
||||
|
||||
#: pkg/season/admin.go:223
|
||||
#: pkg/season/admin.go:232
|
||||
msgctxt "month"
|
||||
msgid "November"
|
||||
msgstr "Novembre"
|
||||
|
||||
#: pkg/season/admin.go:224
|
||||
#: pkg/season/admin.go:233
|
||||
msgctxt "month"
|
||||
msgid "December"
|
||||
msgstr "Décembre"
|
||||
|
||||
#: pkg/season/admin.go:396
|
||||
#: pkg/season/admin.go:405
|
||||
msgid "Color can not be empty."
|
||||
msgstr "La couleur ne peut pas être vide."
|
||||
|
||||
#: pkg/season/admin.go:397
|
||||
#: pkg/season/admin.go:406
|
||||
msgid "This color is not valid. It must be like #123abc."
|
||||
msgstr "Cette couleur n’est pas valide. Il doit être comme #123abc."
|
||||
|
||||
#: pkg/season/admin.go:473
|
||||
#: pkg/season/admin.go:506
|
||||
msgctxt "action"
|
||||
msgid "Unset"
|
||||
msgstr "Unset"
|
||||
|
||||
#: pkg/season/admin.go:504
|
||||
#: pkg/season/admin.go:537
|
||||
msgid "Start date can not be empty."
|
||||
msgstr "La date de début ne peut pas être vide."
|
||||
|
||||
#: pkg/season/admin.go:505
|
||||
#: pkg/season/admin.go:538
|
||||
msgid "Start date must be a valid date."
|
||||
msgstr "La date de début doit être une date valide."
|
||||
|
||||
#: pkg/season/admin.go:507
|
||||
#: pkg/season/admin.go:540
|
||||
msgid "End date can not be empty."
|
||||
msgstr "La date de fin ne peut pas être vide."
|
||||
|
||||
#: pkg/season/admin.go:508
|
||||
#: pkg/season/admin.go:541
|
||||
msgid "End date must be a valid date."
|
||||
msgstr "La date de fin doit être une date valide."
|
||||
|
||||
#: pkg/company/admin.go:193 pkg/booking/public.go:252
|
||||
#: pkg/company/admin.go:193 pkg/booking/public.go:256
|
||||
msgid "Selected country is not valid."
|
||||
msgstr "Le pays sélectionné n’est pas valide."
|
||||
|
||||
|
@ -1478,11 +1478,11 @@ msgstr "Le numéro de TVA ne peut pas être vide."
|
|||
msgid "This VAT number is not valid."
|
||||
msgstr "Ce numéro de TVA n’est pas valide."
|
||||
|
||||
#: pkg/company/admin.go:205 pkg/booking/public.go:268
|
||||
#: pkg/company/admin.go:205 pkg/booking/public.go:272
|
||||
msgid "Phone can not be empty."
|
||||
msgstr "Le téléphone ne peut pas être vide."
|
||||
|
||||
#: pkg/company/admin.go:206 pkg/booking/public.go:269
|
||||
#: pkg/company/admin.go:206 pkg/booking/public.go:273
|
||||
msgid "This phone number is not valid."
|
||||
msgstr "Ce numéro de téléphone n’est pas valide."
|
||||
|
||||
|
@ -1506,7 +1506,7 @@ msgstr "La province ne peut pas être vide."
|
|||
msgid "Postal code can not be empty."
|
||||
msgstr "Le code postal ne peut pas être vide."
|
||||
|
||||
#: pkg/company/admin.go:220 pkg/booking/public.go:261
|
||||
#: pkg/company/admin.go:220 pkg/booking/public.go:265
|
||||
msgid "This postal code is not valid."
|
||||
msgstr "Ce code postal n’est pas valide."
|
||||
|
||||
|
@ -1586,54 +1586,54 @@ msgstr "L’intégration sélectionnée n’est pas valide."
|
|||
msgid "The merchant key is not valid."
|
||||
msgstr "La clé marchand n’est pas valide."
|
||||
|
||||
#: pkg/booking/public.go:256
|
||||
#: pkg/booking/public.go:260
|
||||
msgid "Full name can not be empty."
|
||||
msgstr "Le nom complet ne peut pas être vide."
|
||||
|
||||
#: pkg/booking/public.go:257
|
||||
#: pkg/booking/public.go:261
|
||||
msgid "Full name must have at least one letter."
|
||||
msgstr "Le nom complet doit comporter au moins une lettre."
|
||||
|
||||
#: pkg/booking/public.go:275
|
||||
#: pkg/booking/public.go:279
|
||||
msgid "Arrival date can not be empty"
|
||||
msgstr "La date d’arrivée ne peut pas être vide"
|
||||
|
||||
#: pkg/booking/public.go:276
|
||||
#: pkg/booking/public.go:280
|
||||
msgid "Arrival date must be a valid date."
|
||||
msgstr "La date d’arrivée doit être une date valide."
|
||||
|
||||
#: pkg/booking/public.go:280
|
||||
#: pkg/booking/public.go:284
|
||||
msgid "Departure date can not be empty"
|
||||
msgstr "La date de départ ne peut pas être vide"
|
||||
|
||||
#: pkg/booking/public.go:281
|
||||
#: pkg/booking/public.go:285
|
||||
msgid "Departure date must be a valid date."
|
||||
msgstr "La date de départ doit être une date valide."
|
||||
|
||||
#: pkg/booking/public.go:282
|
||||
#: pkg/booking/public.go:286
|
||||
msgid "The departure date must be after the arrival date."
|
||||
msgstr "La date de départ doit être postérieure à la date d’arrivée."
|
||||
|
||||
#: pkg/booking/public.go:285
|
||||
#: pkg/booking/public.go:289
|
||||
msgid "It is mandatory to agree to the reservation conditions."
|
||||
msgstr "Il est obligatoire d’accepter les conditions de réservation."
|
||||
|
||||
#: pkg/booking/public.go:288
|
||||
#: pkg/booking/public.go:292
|
||||
#, c-format
|
||||
msgid "%s can not be empty"
|
||||
msgstr "%s ne peut pas être vide"
|
||||
|
||||
#: pkg/booking/public.go:289
|
||||
#: pkg/booking/public.go:293
|
||||
#, c-format
|
||||
msgid "%s must be an integer."
|
||||
msgstr "%s doit être un entier."
|
||||
|
||||
#: pkg/booking/public.go:290
|
||||
#: pkg/booking/public.go:294
|
||||
#, c-format
|
||||
msgid "%s must be %d or greater."
|
||||
msgstr "%s doit être %d ou plus."
|
||||
|
||||
#: pkg/booking/public.go:291
|
||||
#: pkg/booking/public.go:295
|
||||
#, c-format
|
||||
msgid "%s must be at most %d."
|
||||
msgstr "%s doit être tout au plus %d."
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
-- Revert camper:order_campsite_type_carousel from pg
|
||||
|
||||
begin;
|
||||
|
||||
drop function if exists camper.order_campsite_type_carousel(uuid, integer[]);
|
||||
|
||||
commit;
|
|
@ -0,0 +1,7 @@
|
|||
-- Revert camper:order_campsite_type_options from pg
|
||||
|
||||
begin;
|
||||
|
||||
drop function if exists camper.order_campsite_type_options(integer[]);
|
||||
|
||||
commit;
|
|
@ -0,0 +1,7 @@
|
|||
-- Revert camper:order_campsite_types from pg
|
||||
|
||||
begin;
|
||||
|
||||
drop function if exists camper.order_campsite_types(uuid[]);
|
||||
|
||||
commit;
|
|
@ -0,0 +1,7 @@
|
|||
-- Revert camper:order_home_carousel from pg
|
||||
|
||||
begin;
|
||||
|
||||
drop function if exists camper.order_home_carousel(integer[]);
|
||||
|
||||
commit;
|
|
@ -0,0 +1,7 @@
|
|||
-- Revert camper:order_seasons from pg
|
||||
|
||||
begin;
|
||||
|
||||
drop function if exists camper.order_seasons(uuid[]);
|
||||
|
||||
commit;
|
|
@ -0,0 +1,7 @@
|
|||
-- Revert camper:order_services_carousel from pg
|
||||
|
||||
begin;
|
||||
|
||||
drop function if exists camper.order_services_carousel(integer[]);
|
||||
|
||||
commit;
|
|
@ -119,3 +119,9 @@ zero_pad [roles schema_camper] 2023-10-26T19:57:00Z jordi fita mas <jordi@tandem
|
|||
redsys_encrypt [roles schema_camper zero_pad redsys extension_pgcrypto] 2023-10-26T20:18:00Z jordi fita mas <jordi@tandem.blog> # Add function to encrypt data with Redsys’ encrypt key
|
||||
encode_base64url [roles schema_camper] 2023-10-26T21:00:47Z jordi fita mas <jordi@tandem.blog> # Add function to encode bytea the so-called base64url
|
||||
redsys_sign_request [roles extension_pgcrypto schema_camper encode_base64url redsys_encrypt redsys_request redsys_signed_request company currency language] 2023-10-26T21:12:01Z jordi fita mas <jordi@tandem.blog> # Add the function that signs Redsys requests
|
||||
order_campsite_types [schema_camper roles campsite_type] 2023-12-20T15:56:34Z jordi fita mas <jordi@tandem.blog> # Add function to order campsite types
|
||||
order_seasons [schema_camper roles season] 2023-12-20T16:56:54Z jordi fita mas <jordi@tandem.blog> # Add function to order seasons
|
||||
order_campsite_type_options [schema_camper roles campsite_type_option] 2023-12-20T17:25:09Z jordi fita mas <jordi@tandem.blog> # Add function to order campsite type options
|
||||
order_campsite_type_carousel [schema_camper roles campsite_type campsite_type_carousel] 2023-12-20T17:59:54Z jordi fita mas <jordi@tandem.blog> # Add function to order campsite type carousel
|
||||
order_home_carousel [schema_camper roles home_carousel] 2023-12-20T18:30:12Z jordi fita mas <jordi@tandem.blog> # Add function to order home carousel
|
||||
order_services_carousel [schema_camper roles services_carousel] 2023-12-20T18:39:18Z jordi fita mas <jordi@tandem.blog> # Add function to order services carousel
|
||||
|
|
|
@ -5,7 +5,7 @@ reset client_min_messages;
|
|||
|
||||
begin;
|
||||
|
||||
select plan(77);
|
||||
select plan(82);
|
||||
|
||||
set search_path to camper, public;
|
||||
|
||||
|
@ -88,6 +88,12 @@ select col_not_null('campsite_type', 'active');
|
|||
select col_has_default('campsite_type', 'active');
|
||||
select col_default_is('campsite_type', 'active', 'true');
|
||||
|
||||
select has_column('campsite_type', 'position');
|
||||
select col_type_is('campsite_type', 'position', 'integer');
|
||||
select col_not_null('campsite_type', 'position');
|
||||
select col_has_default('campsite_type', 'position');
|
||||
select col_default_is('campsite_type', 'position', '2147483647');
|
||||
|
||||
|
||||
set client_min_messages to warning;
|
||||
truncate campsite_type cascade;
|
||||
|
|
|
@ -5,7 +5,7 @@ reset client_min_messages;
|
|||
|
||||
begin;
|
||||
|
||||
select plan(40);
|
||||
select plan(45);
|
||||
|
||||
set search_path to camper, public;
|
||||
|
||||
|
@ -36,6 +36,12 @@ select col_type_is('campsite_type_carousel', 'caption', 'text');
|
|||
select col_not_null('campsite_type_carousel', 'caption');
|
||||
select col_hasnt_default('campsite_type_carousel', 'caption');
|
||||
|
||||
select has_column('campsite_type_carousel', 'position');
|
||||
select col_type_is('campsite_type_carousel', 'position', 'integer');
|
||||
select col_not_null('campsite_type_carousel', 'position');
|
||||
select col_has_default('campsite_type_carousel', 'position');
|
||||
select col_default_is('campsite_type_carousel', 'position', '2147483647');
|
||||
|
||||
|
||||
set client_min_messages to warning;
|
||||
truncate campsite_type_carousel cascade;
|
||||
|
|
|
@ -5,7 +5,7 @@ reset client_min_messages;
|
|||
|
||||
begin;
|
||||
|
||||
select plan(40);
|
||||
select plan(45);
|
||||
|
||||
set search_path to camper, public;
|
||||
|
||||
|
@ -39,6 +39,12 @@ select col_type_is('campsite_type_option', 'range', 'int4range');
|
|||
select col_not_null('campsite_type_option', 'range');
|
||||
select col_hasnt_default('campsite_type_option', 'range');
|
||||
|
||||
select has_column('campsite_type_option', 'position');
|
||||
select col_type_is('campsite_type_option', 'position', 'integer');
|
||||
select col_not_null('campsite_type_option', 'position');
|
||||
select col_has_default('campsite_type_option', 'position');
|
||||
select col_default_is('campsite_type_option', 'position', '2147483647');
|
||||
|
||||
|
||||
set client_min_messages to warning;
|
||||
truncate campsite_type_option cascade;
|
||||
|
|
|
@ -5,7 +5,7 @@ reset client_min_messages;
|
|||
|
||||
begin;
|
||||
|
||||
select plan(30);
|
||||
select plan(35);
|
||||
|
||||
set search_path to camper, public;
|
||||
|
||||
|
@ -29,6 +29,12 @@ select col_type_is('home_carousel', 'caption', 'text');
|
|||
select col_not_null('home_carousel', 'caption');
|
||||
select col_hasnt_default('home_carousel', 'caption');
|
||||
|
||||
select has_column('home_carousel', 'position');
|
||||
select col_type_is('home_carousel', 'position', 'integer');
|
||||
select col_not_null('home_carousel', 'position');
|
||||
select col_has_default('home_carousel', 'position');
|
||||
select col_default_is('home_carousel', 'position', '2147483647');
|
||||
|
||||
set client_min_messages to warning;
|
||||
truncate home_carousel cascade;
|
||||
truncate media cascade;
|
||||
|
|
|
@ -0,0 +1,87 @@
|
|||
-- Test order_campsite_type_carousel
|
||||
set client_min_messages to warning;
|
||||
create extension if not exists pgtap;
|
||||
reset client_min_messages;
|
||||
|
||||
begin;
|
||||
|
||||
select plan(11);
|
||||
|
||||
set search_path to camper, public;
|
||||
|
||||
select has_function('camper', 'order_campsite_type_carousel', array['uuid', 'integer[]']);
|
||||
select function_lang_is('camper', 'order_campsite_type_carousel', array['uuid', 'integer[]'], 'sql');
|
||||
select function_returns('camper', 'order_campsite_type_carousel', array['uuid', 'integer[]'], 'void');
|
||||
select isnt_definer('camper', 'order_campsite_type_carousel', array['uuid', 'integer[]']);
|
||||
select volatility_is('camper', 'order_campsite_type_carousel', array['uuid', 'integer[]'], 'volatile');
|
||||
select function_privs_are('camper', 'order_campsite_type_carousel', array ['uuid', 'integer[]'], 'guest', array[]::text[]);
|
||||
select function_privs_are('camper', 'order_campsite_type_carousel', array ['uuid', 'integer[]'], 'employee', array[]::text[]);
|
||||
select function_privs_are('camper', 'order_campsite_type_carousel', array ['uuid', 'integer[]'], 'admin', array['EXECUTE']);
|
||||
select function_privs_are('camper', 'order_campsite_type_carousel', array ['uuid', 'integer[]'], 'authenticator', array[]::text[]);
|
||||
|
||||
|
||||
set client_min_messages to warning;
|
||||
truncate campsite_type_carousel_i18n cascade;
|
||||
truncate campsite_type_carousel cascade;
|
||||
truncate campsite_type cascade;
|
||||
truncate media cascade;
|
||||
truncate media_content cascade;
|
||||
truncate company cascade;
|
||||
reset client_min_messages;
|
||||
|
||||
|
||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, country_code, currency_code, default_lang_tag)
|
||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 'ES', 'EUR', 'ca')
|
||||
;
|
||||
|
||||
insert into media_content (media_type, bytes)
|
||||
values ('image/x-xpixmap', 'static char *s[]={"1 1 1 1","a c #ffffff","a"};')
|
||||
, ('image/x-xpixmap', 'static char *s[]={"1 1 1 1","a c #ff00ff","a"};')
|
||||
, ('image/x-xpixmap', 'static char *s[]={"1 1 1 1","a c #ffff00","a"};')
|
||||
, ('text/plain', 'hello, world!')
|
||||
, ('image/svg+xml', '<svg xmlns="http://www.w3.org/2000/svg" width="1" height="1"/>')
|
||||
;
|
||||
|
||||
insert into media (media_id, company_id, original_filename, content_hash)
|
||||
values (2, 1, 'cover2.xpm', sha256('static char *s[]={"1 1 1 1","a c #ffffff","a"};'))
|
||||
, (3, 1, 'cover3.xpm', sha256('static char *s[]={"1 1 1 1","a c #ff00ff","a"};'))
|
||||
, (4, 1, 'cover4.xpm', sha256('static char *s[]={"1 1 1 1","a c #ffff00","a"};'))
|
||||
, (5, 1, 'text.txt', sha256('hello, world!'))
|
||||
, (6, 1, 'image.svg', sha256('<svg xmlns="http://www.w3.org/2000/svg" width="1" height="1"/>'))
|
||||
;
|
||||
|
||||
insert into campsite_type (campsite_type_id, company_id, slug, media_id, name, description, max_campers, dogs_allowed, active)
|
||||
values (10, 1, '87452b88-b48f-48d3-bb6c-0296de64164e', 2, 'Type A', '<p>A</p>', 5, false, true)
|
||||
, (11, 1, '9b6370f7-f941-46f2-bc6e-de455675bd0a', 3, 'Type B', '<p>B</p>', 4, true, false)
|
||||
;
|
||||
|
||||
insert into campsite_type_carousel (campsite_type_id, media_id, caption)
|
||||
values (10, 4, 'A caption')
|
||||
, (11, 2, '1')
|
||||
, (11, 3, '2')
|
||||
, (11, 4, '3')
|
||||
, (11, 5, '4')
|
||||
, (11, 6, '5')
|
||||
;
|
||||
|
||||
select lives_ok(
|
||||
$$ select order_campsite_type_carousel('9b6370f7-f941-46f2-bc6e-de455675bd0a', '{4,6,5,2,3}') $$,
|
||||
'Should be able to sort campsite type slides using their ID'
|
||||
);
|
||||
|
||||
select bag_eq(
|
||||
$$ select campsite_type_id, media_id, position from campsite_type_carousel $$,
|
||||
$$ values (10, 4, 2147483647)
|
||||
, (11, 4, 1)
|
||||
, (11, 6, 2)
|
||||
, (11, 5, 3)
|
||||
, (11, 2, 4)
|
||||
, (11, 3, 5)
|
||||
$$,
|
||||
'Should have sorted all campsite type slides.'
|
||||
);
|
||||
|
||||
select *
|
||||
from finish();
|
||||
|
||||
rollback;
|
|
@ -0,0 +1,76 @@
|
|||
-- Test order_campsite_type_options
|
||||
set client_min_messages to warning;
|
||||
create extension if not exists pgtap;
|
||||
reset client_min_messages;
|
||||
|
||||
begin;
|
||||
|
||||
select plan(11);
|
||||
|
||||
set search_path to camper, public;
|
||||
|
||||
select has_function('camper', 'order_campsite_type_options', array['integer[]']);
|
||||
select function_lang_is('camper', 'order_campsite_type_options', array['integer[]'], 'sql');
|
||||
select function_returns('camper', 'order_campsite_type_options', array['integer[]'], 'void');
|
||||
select isnt_definer('camper', 'order_campsite_type_options', array['integer[]']);
|
||||
select volatility_is('camper', 'order_campsite_type_options', array['integer[]'], 'volatile');
|
||||
select function_privs_are('camper', 'order_campsite_type_options', array ['integer[]'], 'guest', array[]::text[]);
|
||||
select function_privs_are('camper', 'order_campsite_type_options', array ['integer[]'], 'employee', array[]::text[]);
|
||||
select function_privs_are('camper', 'order_campsite_type_options', array ['integer[]'], 'admin', array['EXECUTE']);
|
||||
select function_privs_are('camper', 'order_campsite_type_options', array ['integer[]'], 'authenticator', array[]::text[]);
|
||||
|
||||
|
||||
set client_min_messages to warning;
|
||||
truncate campsite_type_option_i18n cascade;
|
||||
truncate campsite_type_option cascade;
|
||||
truncate campsite_type cascade;
|
||||
truncate media cascade;
|
||||
truncate media_content cascade;
|
||||
truncate company cascade;
|
||||
reset client_min_messages;
|
||||
|
||||
|
||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, country_code, currency_code, default_lang_tag)
|
||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 'ES', 'EUR', 'ca')
|
||||
;
|
||||
|
||||
insert into media_content (media_type, bytes)
|
||||
values ('image/x-xpixmap', 'static char *s[]={"1 1 1 1","a c #ffffff","a"};')
|
||||
;
|
||||
|
||||
insert into media (media_id, company_id, original_filename, content_hash)
|
||||
values (2, 1, 'cover2.xpm', sha256('static char *s[]={"1 1 1 1","a c #ffffff","a"};'))
|
||||
;
|
||||
|
||||
insert into campsite_type (campsite_type_id, company_id, media_id, name, description, active, dogs_allowed, max_campers)
|
||||
values (3, 1, 2, 'Type A', '<p>A</p>', true, false, 4)
|
||||
;
|
||||
|
||||
insert into campsite_type_option (campsite_type_option_id, campsite_type_id, name, range)
|
||||
values (4, 3, '1', '[0, 10]')
|
||||
, (5, 3, '2', '[0, 10]')
|
||||
, (6, 3, '3', '[0, 10]')
|
||||
, (7, 3, '4', '[0, 10]')
|
||||
, (8, 3, '5', '[0, 10]')
|
||||
;
|
||||
|
||||
select lives_ok(
|
||||
$$ select order_campsite_type_options('{6,8,7,4,5}') $$,
|
||||
'Should be able to sort campsite type options using their ID'
|
||||
);
|
||||
|
||||
select bag_eq(
|
||||
$$ select campsite_type_option_id, position from campsite_type_option $$,
|
||||
$$ values (6, 1)
|
||||
, (8, 2)
|
||||
, (7, 3)
|
||||
, (4, 4)
|
||||
, (5, 5)
|
||||
$$,
|
||||
'Should have sorted all campsite type options.'
|
||||
);
|
||||
|
||||
select *
|
||||
from finish();
|
||||
|
||||
rollback;
|
|
@ -0,0 +1,70 @@
|
|||
-- Test order_campsite_types
|
||||
set client_min_messages to warning;
|
||||
create extension if not exists pgtap;
|
||||
reset client_min_messages;
|
||||
|
||||
begin;
|
||||
|
||||
select plan(11);
|
||||
|
||||
set search_path to camper, public;
|
||||
|
||||
select has_function('camper', 'order_campsite_types', array['uuid[]']);
|
||||
select function_lang_is('camper', 'order_campsite_types', array['uuid[]'], 'sql');
|
||||
select function_returns('camper', 'order_campsite_types', array['uuid[]'], 'void');
|
||||
select isnt_definer('camper', 'order_campsite_types', array['uuid[]']);
|
||||
select volatility_is('camper', 'order_campsite_types', array['uuid[]'], 'volatile');
|
||||
select function_privs_are('camper', 'order_campsite_types', array ['uuid[]'], 'guest', array[]::text[]);
|
||||
select function_privs_are('camper', 'order_campsite_types', array ['uuid[]'], 'employee', array[]::text[]);
|
||||
select function_privs_are('camper', 'order_campsite_types', array ['uuid[]'], 'admin', array['EXECUTE']);
|
||||
select function_privs_are('camper', 'order_campsite_types', array ['uuid[]'], 'authenticator', array[]::text[]);
|
||||
|
||||
|
||||
set client_min_messages to warning;
|
||||
truncate campsite_type cascade;
|
||||
truncate media cascade;
|
||||
truncate media_content cascade;
|
||||
truncate company cascade;
|
||||
reset client_min_messages;
|
||||
|
||||
|
||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, country_code, currency_code, default_lang_tag)
|
||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 'ES', 'EUR', 'ca')
|
||||
;
|
||||
|
||||
insert into media_content (media_type, bytes)
|
||||
values ('image/x-xpixmap', 'static char *s[]={"1 1 1 1","a c #ffffff","a"};')
|
||||
;
|
||||
|
||||
insert into media (media_id, company_id, original_filename, content_hash)
|
||||
values (2, 1, 'cover2.xpm', sha256('static char *s[]={"1 1 1 1","a c #ffffff","a"};'))
|
||||
;
|
||||
|
||||
insert into campsite_type (company_id, slug, media_id, name, spiel, info, facilities, description, max_campers, dogs_allowed, active)
|
||||
values (1, '87452b88-b48f-48d3-bb6c-0296de64164e', 2, 'A', '', '', '', '', 5, false, true)
|
||||
, (1, '9b6370f7-f941-46f2-bc6e-de455675bd0a', 2, 'B', '', '', '', '', 5, false, true)
|
||||
, (1, 'b33cfbc9-fbcc-4aac-8335-e5f94ea7e6b2', 2, 'C', '', '', '', '', 5, false, true)
|
||||
, (1, '8c4465ec-a690-43d7-854b-7fcd35fccb1c', 2, 'D', '', '', '', '', 5, false, true)
|
||||
, (1, 'd28c30fb-57ac-4243-a8c3-ad1a26637f5a', 2, 'E', '', '', '', '', 5, false, true)
|
||||
;
|
||||
|
||||
select lives_ok(
|
||||
$$ select order_campsite_types('{b33cfbc9-fbcc-4aac-8335-e5f94ea7e6b2,d28c30fb-57ac-4243-a8c3-ad1a26637f5a,8c4465ec-a690-43d7-854b-7fcd35fccb1c,87452b88-b48f-48d3-bb6c-0296de64164e,9b6370f7-f941-46f2-bc6e-de455675bd0a}') $$,
|
||||
'Should be able to sort campsite types using their UUID'
|
||||
);
|
||||
|
||||
select bag_eq(
|
||||
$$ select slug::text, position from campsite_type $$,
|
||||
$$ values ('b33cfbc9-fbcc-4aac-8335-e5f94ea7e6b2', 1)
|
||||
, ('d28c30fb-57ac-4243-a8c3-ad1a26637f5a', 2)
|
||||
, ('8c4465ec-a690-43d7-854b-7fcd35fccb1c', 3)
|
||||
, ('87452b88-b48f-48d3-bb6c-0296de64164e', 4)
|
||||
, ('9b6370f7-f941-46f2-bc6e-de455675bd0a', 5)
|
||||
$$,
|
||||
'Should have sorted all campsite types.'
|
||||
);
|
||||
|
||||
select *
|
||||
from finish();
|
||||
|
||||
rollback;
|
|
@ -0,0 +1,79 @@
|
|||
-- Test order_home_carousel
|
||||
set client_min_messages to warning;
|
||||
create extension if not exists pgtap;
|
||||
reset client_min_messages;
|
||||
|
||||
begin;
|
||||
|
||||
select plan(11);
|
||||
|
||||
set search_path to camper, public;
|
||||
|
||||
select has_function('camper', 'order_home_carousel', array['integer[]']);
|
||||
select function_lang_is('camper', 'order_home_carousel', array['integer[]'], 'sql');
|
||||
select function_returns('camper', 'order_home_carousel', array['integer[]'], 'void');
|
||||
select isnt_definer('camper', 'order_home_carousel', array['integer[]']);
|
||||
select volatility_is('camper', 'order_home_carousel', array['integer[]'], 'volatile');
|
||||
select function_privs_are('camper', 'order_home_carousel', array ['integer[]'], 'guest', array[]::text[]);
|
||||
select function_privs_are('camper', 'order_home_carousel', array ['integer[]'], 'employee', array[]::text[]);
|
||||
select function_privs_are('camper', 'order_home_carousel', array ['integer[]'], 'admin', array['EXECUTE']);
|
||||
select function_privs_are('camper', 'order_home_carousel', array ['integer[]'], 'authenticator', array[]::text[]);
|
||||
|
||||
|
||||
set client_min_messages to warning;
|
||||
truncate home_carousel_i18n cascade;
|
||||
truncate home_carousel cascade;
|
||||
truncate media cascade;
|
||||
truncate media_content cascade;
|
||||
truncate company cascade;
|
||||
reset client_min_messages;
|
||||
|
||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, country_code, currency_code, default_lang_tag)
|
||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 'ES', 'EUR', 'ca')
|
||||
;
|
||||
|
||||
insert into media_content (media_type, bytes)
|
||||
values ('image/x-xpixmap', 'static char *s[]={"1 1 1 1","a c #ffffff","a"};')
|
||||
, ('image/x-xpixmap', 'static char *s[]={"1 1 1 1","a c #ff00ff","a"};')
|
||||
, ('image/x-xpixmap', 'static char *s[]={"1 1 1 1","a c #ffff00","a"};')
|
||||
, ('text/plain', 'hello, world!')
|
||||
, ('image/svg+xml', '<svg xmlns="http://www.w3.org/2000/svg" width="1" height="1"/>')
|
||||
;
|
||||
|
||||
insert into media (media_id, company_id, original_filename, content_hash)
|
||||
values (2, 1, 'cover2.xpm', sha256('static char *s[]={"1 1 1 1","a c #ffffff","a"};'))
|
||||
, (3, 1, 'cover3.xpm', sha256('static char *s[]={"1 1 1 1","a c #ff00ff","a"};'))
|
||||
, (4, 1, 'cover4.xpm', sha256('static char *s[]={"1 1 1 1","a c #ffff00","a"};'))
|
||||
, (5, 1, 'text.txt', sha256('hello, world!'))
|
||||
, (6, 1, 'image.svg', sha256('<svg xmlns="http://www.w3.org/2000/svg" width="1" height="1"/>'))
|
||||
;
|
||||
|
||||
insert into home_carousel (media_id, caption)
|
||||
values (2, '1')
|
||||
, (3, '2')
|
||||
, (4, '3')
|
||||
, (5, '4')
|
||||
, (6, '5')
|
||||
;
|
||||
|
||||
select lives_ok(
|
||||
$$ select order_home_carousel('{4,6,5,2,3}') $$,
|
||||
'Should be able to sort home slides using their ID'
|
||||
);
|
||||
|
||||
select bag_eq(
|
||||
$$ select media_id, position from home_carousel $$,
|
||||
$$ values (4, 1)
|
||||
, (6, 2)
|
||||
, (5, 3)
|
||||
, (2, 4)
|
||||
, (3, 5)
|
||||
$$,
|
||||
'Should have sorted all home slides.'
|
||||
);
|
||||
|
||||
|
||||
select *
|
||||
from finish();
|
||||
|
||||
rollback;
|
|
@ -0,0 +1,60 @@
|
|||
-- Test order_seasons
|
||||
set client_min_messages to warning;
|
||||
create extension if not exists pgtap;
|
||||
reset client_min_messages;
|
||||
|
||||
begin;
|
||||
|
||||
select plan(11);
|
||||
|
||||
set search_path to camper, public;
|
||||
|
||||
select has_function('camper', 'order_seasons', array['uuid[]']);
|
||||
select function_lang_is('camper', 'order_seasons', array['uuid[]'], 'sql');
|
||||
select function_returns('camper', 'order_seasons', array['uuid[]'], 'void');
|
||||
select isnt_definer('camper', 'order_seasons', array['uuid[]']);
|
||||
select volatility_is('camper', 'order_seasons', array['uuid[]'], 'volatile');
|
||||
select function_privs_are('camper', 'order_seasons', array ['uuid[]'], 'guest', array[]::text[]);
|
||||
select function_privs_are('camper', 'order_seasons', array ['uuid[]'], 'employee', array[]::text[]);
|
||||
select function_privs_are('camper', 'order_seasons', array ['uuid[]'], 'admin', array['EXECUTE']);
|
||||
select function_privs_are('camper', 'order_seasons', array ['uuid[]'], 'authenticator', array[]::text[]);
|
||||
|
||||
|
||||
set client_min_messages to warning;
|
||||
truncate season cascade;
|
||||
truncate company cascade;
|
||||
reset client_min_messages;
|
||||
|
||||
|
||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, country_code, currency_code, default_lang_tag)
|
||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 'ES', 'EUR', 'ca')
|
||||
;
|
||||
|
||||
insert into season (company_id, slug, name, color, active)
|
||||
values (1, '87452b88-b48f-48d3-bb6c-0296de64164e', 'A', to_integer('#232323'), true)
|
||||
, (1, '9b6370f7-f941-46f2-bc6e-de455675bd0a', 'B', to_integer('#323232'), true)
|
||||
, (1, 'b33cfbc9-fbcc-4aac-8335-e5f94ea7e6b2', 'C', to_integer('#323232'), true)
|
||||
, (1, '8c4465ec-a690-43d7-854b-7fcd35fccb1c', 'D', to_integer('#323232'), true)
|
||||
, (1, 'd28c30fb-57ac-4243-a8c3-ad1a26637f5a', 'E', to_integer('#323232'), true)
|
||||
;
|
||||
|
||||
select lives_ok(
|
||||
$$ select order_seasons('{b33cfbc9-fbcc-4aac-8335-e5f94ea7e6b2,d28c30fb-57ac-4243-a8c3-ad1a26637f5a,8c4465ec-a690-43d7-854b-7fcd35fccb1c,87452b88-b48f-48d3-bb6c-0296de64164e,9b6370f7-f941-46f2-bc6e-de455675bd0a}') $$,
|
||||
'Should be able to sort seasons using their UUID'
|
||||
);
|
||||
|
||||
select bag_eq(
|
||||
$$ select slug::text, position from season $$,
|
||||
$$ values ('b33cfbc9-fbcc-4aac-8335-e5f94ea7e6b2', 1)
|
||||
, ('d28c30fb-57ac-4243-a8c3-ad1a26637f5a', 2)
|
||||
, ('8c4465ec-a690-43d7-854b-7fcd35fccb1c', 3)
|
||||
, ('87452b88-b48f-48d3-bb6c-0296de64164e', 4)
|
||||
, ('9b6370f7-f941-46f2-bc6e-de455675bd0a', 5)
|
||||
$$,
|
||||
'Should have sorted all campsite types.'
|
||||
);
|
||||
|
||||
select *
|
||||
from finish();
|
||||
|
||||
rollback;
|
|
@ -0,0 +1,79 @@
|
|||
-- Test order_services_carousel
|
||||
set client_min_messages to warning;
|
||||
create extension if not exists pgtap;
|
||||
reset client_min_messages;
|
||||
|
||||
begin;
|
||||
|
||||
select plan(11);
|
||||
|
||||
set search_path to camper, public;
|
||||
|
||||
select has_function('camper', 'order_services_carousel', array['integer[]']);
|
||||
select function_lang_is('camper', 'order_services_carousel', array['integer[]'], 'sql');
|
||||
select function_returns('camper', 'order_services_carousel', array['integer[]'], 'void');
|
||||
select isnt_definer('camper', 'order_services_carousel', array['integer[]']);
|
||||
select volatility_is('camper', 'order_services_carousel', array['integer[]'], 'volatile');
|
||||
select function_privs_are('camper', 'order_services_carousel', array ['integer[]'], 'guest', array[]::text[]);
|
||||
select function_privs_are('camper', 'order_services_carousel', array ['integer[]'], 'employee', array[]::text[]);
|
||||
select function_privs_are('camper', 'order_services_carousel', array ['integer[]'], 'admin', array['EXECUTE']);
|
||||
select function_privs_are('camper', 'order_services_carousel', array ['integer[]'], 'authenticator', array[]::text[]);
|
||||
|
||||
|
||||
set client_min_messages to warning;
|
||||
truncate services_carousel_i18n cascade;
|
||||
truncate services_carousel cascade;
|
||||
truncate media cascade;
|
||||
truncate media_content cascade;
|
||||
truncate company cascade;
|
||||
reset client_min_messages;
|
||||
|
||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, country_code, currency_code, default_lang_tag)
|
||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 'ES', 'EUR', 'ca')
|
||||
;
|
||||
|
||||
insert into media_content (media_type, bytes)
|
||||
values ('image/x-xpixmap', 'static char *s[]={"1 1 1 1","a c #ffffff","a"};')
|
||||
, ('image/x-xpixmap', 'static char *s[]={"1 1 1 1","a c #ff00ff","a"};')
|
||||
, ('image/x-xpixmap', 'static char *s[]={"1 1 1 1","a c #ffff00","a"};')
|
||||
, ('text/plain', 'hello, world!')
|
||||
, ('image/svg+xml', '<svg xmlns="http://www.w3.org/2000/svg" width="1" height="1"/>')
|
||||
;
|
||||
|
||||
insert into media (media_id, company_id, original_filename, content_hash)
|
||||
values (2, 1, 'cover2.xpm', sha256('static char *s[]={"1 1 1 1","a c #ffffff","a"};'))
|
||||
, (3, 1, 'cover3.xpm', sha256('static char *s[]={"1 1 1 1","a c #ff00ff","a"};'))
|
||||
, (4, 1, 'cover4.xpm', sha256('static char *s[]={"1 1 1 1","a c #ffff00","a"};'))
|
||||
, (5, 1, 'text.txt', sha256('hello, world!'))
|
||||
, (6, 1, 'image.svg', sha256('<svg xmlns="http://www.w3.org/2000/svg" width="1" height="1"/>'))
|
||||
;
|
||||
|
||||
insert into services_carousel (media_id, caption)
|
||||
values (2, '1')
|
||||
, (3, '2')
|
||||
, (4, '3')
|
||||
, (5, '4')
|
||||
, (6, '5')
|
||||
;
|
||||
|
||||
select lives_ok(
|
||||
$$ select order_services_carousel('{4,6,5,2,3}') $$,
|
||||
'Should be able to sort services slides using their ID'
|
||||
);
|
||||
|
||||
select bag_eq(
|
||||
$$ select media_id, position from services_carousel $$,
|
||||
$$ values (4, 1)
|
||||
, (6, 2)
|
||||
, (5, 3)
|
||||
, (2, 4)
|
||||
, (3, 5)
|
||||
$$,
|
||||
'Should have sorted all services slides.'
|
||||
);
|
||||
|
||||
|
||||
select *
|
||||
from finish();
|
||||
|
||||
rollback;
|
|
@ -5,7 +5,7 @@ reset client_min_messages;
|
|||
|
||||
begin;
|
||||
|
||||
select plan(51);
|
||||
select plan(56);
|
||||
|
||||
set search_path to camper, public;
|
||||
|
||||
|
@ -53,6 +53,12 @@ select col_not_null('season', 'active');
|
|||
select col_has_default('season', 'active');
|
||||
select col_default_is('season', 'active', 'true');
|
||||
|
||||
select has_column('season', 'position');
|
||||
select col_type_is('season', 'position', 'integer');
|
||||
select col_not_null('season', 'position');
|
||||
select col_has_default('season', 'position');
|
||||
select col_default_is('season', 'position', '2147483647');
|
||||
|
||||
|
||||
set client_min_messages to warning;
|
||||
truncate season cascade;
|
||||
|
|
|
@ -5,7 +5,7 @@ reset client_min_messages;
|
|||
|
||||
begin;
|
||||
|
||||
select plan(30);
|
||||
select plan(35);
|
||||
|
||||
set search_path to camper, public;
|
||||
|
||||
|
@ -29,6 +29,13 @@ select col_type_is('services_carousel', 'caption', 'text');
|
|||
select col_not_null('services_carousel', 'caption');
|
||||
select col_hasnt_default('services_carousel', 'caption');
|
||||
|
||||
select has_column('services_carousel', 'position');
|
||||
select col_type_is('services_carousel', 'position', 'integer');
|
||||
select col_not_null('services_carousel', 'position');
|
||||
select col_has_default('services_carousel', 'position');
|
||||
select col_default_is('services_carousel', 'position', '2147483647');
|
||||
|
||||
|
||||
set client_min_messages to warning;
|
||||
truncate services_carousel cascade;
|
||||
truncate media cascade;
|
||||
|
|
|
@ -14,6 +14,7 @@ select campsite_type_id
|
|||
, max_campers
|
||||
, dogs_allowed
|
||||
, active
|
||||
, position
|
||||
from camper.campsite_type
|
||||
where false;
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ begin;
|
|||
select campsite_type_id
|
||||
, media_id
|
||||
, caption
|
||||
, position
|
||||
from camper.campsite_type_carousel
|
||||
where false;
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ select campsite_type_option_id
|
|||
, campsite_type_id
|
||||
, name
|
||||
, range
|
||||
, position
|
||||
from camper.campsite_type_option
|
||||
where false;
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ begin;
|
|||
|
||||
select media_id
|
||||
, caption
|
||||
, position
|
||||
from camper.home_carousel
|
||||
where false;
|
||||
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
-- Verify camper:order_campsite_type_carousel on pg
|
||||
|
||||
begin;
|
||||
|
||||
select has_function_privilege('camper.order_campsite_type_carousel(uuid, integer[])', 'execute');
|
||||
|
||||
rollback;
|
|
@ -0,0 +1,7 @@
|
|||
-- Verify camper:order_campsite_type_options on pg
|
||||
|
||||
begin;
|
||||
|
||||
select has_function_privilege('camper.order_campsite_type_options(integer[])', 'execute');
|
||||
|
||||
rollback;
|
|
@ -0,0 +1,7 @@
|
|||
-- Verify camper:order_campsite_types on pg
|
||||
|
||||
begin;
|
||||
|
||||
select has_function_privilege('camper.order_campsite_types(uuid[])', 'execute');
|
||||
|
||||
rollback;
|
|
@ -0,0 +1,7 @@
|
|||
-- Verify camper:order_home_carousel on pg
|
||||
|
||||
begin;
|
||||
|
||||
select has_function_privilege('camper.order_home_carousel(integer[])', 'execute');
|
||||
|
||||
rollback;
|
|
@ -0,0 +1,7 @@
|
|||
-- Verify camper:order_seasons on pg
|
||||
|
||||
begin;
|
||||
|
||||
select has_function_privilege('camper.order_seasons(uuid[])', 'execute');
|
||||
|
||||
rollback;
|
|
@ -0,0 +1,7 @@
|
|||
-- Verify camper:order_services_carousel on pg
|
||||
|
||||
begin;
|
||||
|
||||
select has_function_privilege('camper.order_services_carousel(integer[])', 'execute');
|
||||
|
||||
rollback;
|
|
@ -8,6 +8,7 @@ select season_id
|
|||
, name
|
||||
, color
|
||||
, active
|
||||
, position
|
||||
from camper.season
|
||||
where false;
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ begin;
|
|||
|
||||
select media_id
|
||||
, caption
|
||||
, position
|
||||
from camper.services_carousel
|
||||
where false;
|
||||
|
||||
|
|
|
@ -599,6 +599,28 @@ textarea {
|
|||
content: "✕";
|
||||
}
|
||||
|
||||
.sortable tbody tr td:first-child {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
#slide-index img {
|
||||
width: 192px;
|
||||
aspect-ratio: 4 / 3;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.sortable .handle {
|
||||
display: inline-block;
|
||||
width: 1.5em;
|
||||
aspect-ratio: 1;
|
||||
cursor: grab;
|
||||
background: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"%3E%3Crect width="256" height="256" fill="none"/%3E%3Ccircle cx="92" cy="60" r="12"/%3E%3Ccircle cx="164" cy="60" r="12"/%3E%3Ccircle cx="92" cy="128" r="12"/%3E%3Ccircle cx="164" cy="128" r="12"/%3E%3Ccircle cx="92" cy="196" r="12"/%3E%3Ccircle cx="164" cy="196" r="12"/%3E%3C/svg%3E') left center no-repeat;
|
||||
}
|
||||
|
||||
.sortable-ghost {
|
||||
background-color: #aaa;
|
||||
}
|
||||
|
||||
/* snack bar */
|
||||
#snackbar [role="alert"] {
|
||||
cursor: pointer;
|
||||
|
|
|
@ -179,7 +179,6 @@ export function setupCalendar(calendar) {
|
|||
const dialog = calendar.querySelector('dialog');
|
||||
|
||||
const clear = function () {
|
||||
console.log('yolo');
|
||||
startDate.value = endDate.value = "";
|
||||
days.forEach((e) => e.removeAttribute('aria-checked'));
|
||||
}
|
||||
|
@ -229,3 +228,22 @@ htmx.onLoad((target) => {
|
|||
}
|
||||
})
|
||||
|
||||
htmx.onLoad((content) => {
|
||||
const sortables = Array.from(content.querySelectorAll('.sortable table tbody'));
|
||||
for (const sortable of sortables) {
|
||||
const sortableInstance = new Sortable(sortable, {
|
||||
animation: 150,
|
||||
draggable: '>tr',
|
||||
handle: '.handle',
|
||||
onMove: (evt) => evt.related.className.indexOf('htmx-indicator') === -1,
|
||||
onEnd: function () {
|
||||
this.option('disabled', true);
|
||||
},
|
||||
});
|
||||
|
||||
sortable.addEventListener('htmx:afterSwap', function () {
|
||||
sortableInstance.option('disabled', false);
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -11,41 +11,55 @@
|
|||
<h2>{{( pgettext "Campsite Type Carousel" "title" )}}</h2>
|
||||
<a href="/admin/campsites/types/{{ .TypeSlug }}/slides/new">{{( pgettext "Add slide" "action" )}}</a>
|
||||
{{ if .Slides -}}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">{{( pgettext "Image" "header" )}}</th>
|
||||
<th scope="col">{{( pgettext "Caption" "header" )}}</th>
|
||||
<th scope="col">{{( pgettext "Translations" "header" )}}</th>
|
||||
<th scope="col">{{( pgettext "Actions" "header" )}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ $confirm := (gettext "Are you sure you wish to delete this slide?")}}
|
||||
{{ range $slide := .Slides -}}
|
||||
<form id="slide-index"
|
||||
class="sortable"
|
||||
data-hx-post="/admin/campsites/types/{{ .TypeSlug }}/slides/order"
|
||||
data-hx-trigger="end"
|
||||
data-hx-select="#slide-index"
|
||||
data-hx-swap="outerHTML"
|
||||
>
|
||||
{{ CSRFInput }}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td><a href="/admin/campsites/types/{{ $.TypeSlug }}/slides/{{ .ID }}"><img src="{{ .Media }}" alt=""></a></td>
|
||||
<td><a href="/admin/campsites/types/{{ $.TypeSlug }}/slides/{{ .ID }}">{{ .Caption }}</a></td>
|
||||
<td>
|
||||
{{ range .Translations }}
|
||||
<a
|
||||
{{ if .Missing }}
|
||||
class="missing-translation"
|
||||
{{ end }}
|
||||
href="/admin/campsites/types/{{ $.TypeSlug }}/slides/{{ $slide.ID }}/{{ .Language }}">{{ .Endonym }}</a>
|
||||
{{ end }}
|
||||
</td>
|
||||
<td>
|
||||
<form data-hx-delete="/admin/campsites/types/{{ $.TypeSlug }}/slides/{{ .ID }}"
|
||||
data-hx-confirm="{{ $confirm }}"
|
||||
data-hx-headers='{ {{ CSRFHeader }} }'>
|
||||
<button type="submit">{{( pgettext "Delete" "action" )}}</button>
|
||||
</form>
|
||||
</td>
|
||||
<th scope="col">{{( pgettext "Image" "header" )}}</th>
|
||||
<th scope="col">{{( pgettext "Caption" "header" )}}</th>
|
||||
<th scope="col">{{( pgettext "Translations" "header" )}}</th>
|
||||
<th scope="col">{{( pgettext "Actions" "header" )}}</th>
|
||||
</tr>
|
||||
{{- end }}
|
||||
</tbody>
|
||||
</table>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ $confirm := (gettext "Are you sure you wish to delete this slide?")}}
|
||||
{{ range $slide := .Slides -}}
|
||||
<tr>
|
||||
<td>
|
||||
<span class="handle"></span>
|
||||
<input type="hidden" name="media_id" value="{{ .ID }}">
|
||||
<a href="/admin/campsites/types/{{ $.TypeSlug }}/slides/{{ .ID }}"><img src="{{ .Media }}"
|
||||
alt=""></a>
|
||||
</td>
|
||||
<td><a href="/admin/campsites/types/{{ $.TypeSlug }}/slides/{{ .ID }}">{{ .Caption }}</a></td>
|
||||
<td>
|
||||
{{ range .Translations }}
|
||||
<a
|
||||
{{ if .Missing }}
|
||||
class="missing-translation"
|
||||
{{ end }}
|
||||
href="/admin/campsites/types/{{ $.TypeSlug }}/slides/{{ $slide.ID }}/{{ .Language }}">{{ .Endonym }}</a>
|
||||
{{ end }}
|
||||
</td>
|
||||
<td>
|
||||
<form data-hx-delete="/admin/campsites/types/{{ $.TypeSlug }}/slides/{{ .ID }}"
|
||||
data-hx-confirm="{{ $confirm }}"
|
||||
data-hx-headers='{ {{ CSRFHeader }} }'>
|
||||
<button type="submit">{{( pgettext "Delete" "action" )}}</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{{- end }}
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
{{ else -}}
|
||||
<p>{{( gettext "No slides added yet." )}}</p>
|
||||
{{- end }}
|
||||
|
|
|
@ -11,30 +11,43 @@
|
|||
<a href="/admin/campsites/types/{{ .TypeSlug }}/options/new">{{( pgettext "Add Option" "action" )}}</a>
|
||||
<h2>{{( pgettext "Campsite Type Options" "title" )}}</h2>
|
||||
{{ if .Options -}}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">{{( pgettext "Name" "header" )}}</th>
|
||||
<th scope="col">{{( pgettext "Translations" "header" )}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ range .Options -}}
|
||||
<form id="option-index"
|
||||
class="sortable"
|
||||
data-hx-post="/admin/campsites/types/{{ .TypeSlug }}/options/order"
|
||||
data-hx-trigger="end"
|
||||
data-hx-select="#option-index"
|
||||
data-hx-swap="outerHTML"
|
||||
>
|
||||
{{ CSRFInput }}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td><a href="{{ .URL }}">{{ .Name }}</a></td>
|
||||
<td>
|
||||
{{ range .Translations }}
|
||||
<a
|
||||
{{ if .Missing }}
|
||||
class="missing-translation"
|
||||
{{ end }}
|
||||
href="{{ .URL }}">{{ .Endonym }}</a>
|
||||
{{ end }}
|
||||
</td>
|
||||
<th scope="col">{{( pgettext "Name" "header" )}}</th>
|
||||
<th scope="col">{{( pgettext "Translations" "header" )}}</th>
|
||||
</tr>
|
||||
{{- end }}
|
||||
</tbody>
|
||||
</table>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ range .Options -}}
|
||||
<tr>
|
||||
<td>
|
||||
<span class="handle"></span>
|
||||
<input type="hidden" name="option_id" value="{{ .ID }}">
|
||||
<a href="{{ .URL }}">{{ .Name }}</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ range .Translations }}
|
||||
<a
|
||||
{{ if .Missing }}
|
||||
class="missing-translation"
|
||||
{{ end }}
|
||||
href="{{ .URL }}">{{ .Endonym }}</a>
|
||||
{{ end }}
|
||||
</td>
|
||||
</tr>
|
||||
{{- end }}
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
{{ else -}}
|
||||
<p>{{( gettext "No campsite type options added yet." )}}</p>
|
||||
{{- end }}
|
||||
|
|
|
@ -11,44 +11,57 @@
|
|||
<a href="/admin/campsites/types/new">{{( pgettext "Add Type" "action" )}}</a>
|
||||
<h2>{{( pgettext "Campsite Types" "title" )}}</h2>
|
||||
{{ if .Types -}}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">{{( pgettext "Name" "header" )}}</th>
|
||||
<th scope="col">{{( pgettext "Translations" "header" )}}</th>
|
||||
<th scope="col">{{( pgettext "Features" "header" )}}</th>
|
||||
<th scope="col">{{( pgettext "Options" "header" )}}</th>
|
||||
<th scope="col">{{( pgettext "Carousel" "header" )}}</th>
|
||||
<th scope="col">{{( pgettext "Active" "campsite type" )}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ range $type := .Types -}}
|
||||
<form id="type-index"
|
||||
class="sortable"
|
||||
data-hx-post="/admin/campsites/types/order"
|
||||
data-hx-trigger="end"
|
||||
data-hx-select="#type-index"
|
||||
data-hx-swap="outerHTML"
|
||||
>
|
||||
{{ CSRFInput }}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td><a href="/admin/campsites/types/{{ .Slug }}">{{ .Name }}</a></td>
|
||||
<td>
|
||||
{{ range .Translations }}
|
||||
<a
|
||||
{{ if .Missing }}
|
||||
class="missing-translation"
|
||||
{{ end }}
|
||||
href="/admin/campsites/types/{{ $type.Slug }}/{{ .Language }}">{{ .Endonym }}</a>
|
||||
{{ end }}
|
||||
</td>
|
||||
<td>
|
||||
<a href="/admin/campsites/types/{{ .Slug }}/features">{{( pgettext "Edit Features" "action" )}}</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="/admin/campsites/types/{{ .Slug }}/options">{{( pgettext "Edit Options" "action" )}}</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="/admin/campsites/types/{{ .Slug }}/slides">{{( pgettext "Edit Carousel" "action" )}}</a>
|
||||
</td>
|
||||
<td>{{ if .Active }}{{( gettext "Yes" )}}{{ else }}{{( gettext "No" )}}{{ end }}</td>
|
||||
<th scope="col">{{( pgettext "Name" "header" )}}</th>
|
||||
<th scope="col">{{( pgettext "Translations" "header" )}}</th>
|
||||
<th scope="col">{{( pgettext "Features" "header" )}}</th>
|
||||
<th scope="col">{{( pgettext "Options" "header" )}}</th>
|
||||
<th scope="col">{{( pgettext "Carousel" "header" )}}</th>
|
||||
<th scope="col">{{( pgettext "Active" "campsite type" )}}</th>
|
||||
</tr>
|
||||
{{- end }}
|
||||
</tbody>
|
||||
</table>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ range $type := .Types -}}
|
||||
<tr>
|
||||
<td>
|
||||
<span class="handle"></span>
|
||||
<input type="hidden" name="slug" value="{{ .Slug }}">
|
||||
<a href="/admin/campsites/types/{{ .Slug }}">{{ .Name }}</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ range .Translations }}
|
||||
<a
|
||||
{{ if .Missing }}
|
||||
class="missing-translation"
|
||||
{{ end }}
|
||||
href="/admin/campsites/types/{{ $type.Slug }}/{{ .Language }}">{{ .Endonym }}</a>
|
||||
{{ end }}
|
||||
</td>
|
||||
<td>
|
||||
<a href="/admin/campsites/types/{{ .Slug }}/features">{{( pgettext "Edit Features" "action" )}}</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="/admin/campsites/types/{{ .Slug }}/options">{{( pgettext "Edit Options" "action" )}}</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="/admin/campsites/types/{{ .Slug }}/slides">{{( pgettext "Edit Carousel" "action" )}}</a>
|
||||
</td>
|
||||
<td>{{ if .Active }}{{( gettext "Yes" )}}{{ else }}{{( gettext "No" )}}{{ end }}</td>
|
||||
</tr>
|
||||
{{- end }}
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
{{ else -}}
|
||||
<p>{{( gettext "No campsite types added yet." )}}</p>
|
||||
{{- end }}
|
||||
|
|
|
@ -11,41 +11,54 @@
|
|||
<h2>{{( pgettext "Carousel" "title" )}}</h2>
|
||||
<a href="/admin/home/slides/new">{{( pgettext "Add slide" "action" )}}</a>
|
||||
{{ if .Slides -}}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">{{( pgettext "Image" "header" )}}</th>
|
||||
<th scope="col">{{( pgettext "Caption" "header" )}}</th>
|
||||
<th scope="col">{{( pgettext "Translations" "header" )}}</th>
|
||||
<th scope="col">{{( pgettext "Actions" "header" )}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ $confirm := (gettext "Are you sure you wish to delete this slide?")}}
|
||||
{{ range $slide := .Slides -}}
|
||||
<form id="slide-index"
|
||||
class="sortable"
|
||||
data-hx-post="/admin/home/slides/order"
|
||||
data-hx-trigger="end"
|
||||
data-hx-select="#slide-index"
|
||||
data-hx-swap="outerHTML"
|
||||
>
|
||||
{{ CSRFInput }}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td><a href="/admin/home/slides/{{ .ID }}"><img src="{{ .Media }}" alt=""></a></td>
|
||||
<td><a href="/admin/home/slides/{{ .ID }}">{{ .Caption }}</a></td>
|
||||
<td>
|
||||
{{ range .Translations }}
|
||||
<a
|
||||
{{ if .Missing }}
|
||||
class="missing-translation"
|
||||
{{ end }}
|
||||
href="/admin/home/slides/{{ $slide.ID }}/{{ .Language }}">{{ .Endonym }}</a>
|
||||
{{ end }}
|
||||
</td>
|
||||
<td>
|
||||
<form data-hx-delete="/admin/home/slides/{{ .ID }}"
|
||||
data-hx-confirm="{{ $confirm }}"
|
||||
data-hx-headers='{ {{ CSRFHeader }} }'>
|
||||
<button type="submit">{{( pgettext "Delete" "action" )}}</button>
|
||||
</form>
|
||||
</td>
|
||||
<th scope="col">{{( pgettext "Image" "header" )}}</th>
|
||||
<th scope="col">{{( pgettext "Caption" "header" )}}</th>
|
||||
<th scope="col">{{( pgettext "Translations" "header" )}}</th>
|
||||
<th scope="col">{{( pgettext "Actions" "header" )}}</th>
|
||||
</tr>
|
||||
{{- end }}
|
||||
</tbody>
|
||||
</table>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ $confirm := (gettext "Are you sure you wish to delete this slide?")}}
|
||||
{{ range $slide := .Slides -}}
|
||||
<tr>
|
||||
<td>
|
||||
<span class="handle"></span>
|
||||
<input type="hidden" name="media_id" value="{{ .ID }}">
|
||||
<a href="/admin/home/slides/{{ .ID }}"><img src="{{ .Media }}" alt=""></a>
|
||||
</td>
|
||||
<td><a href="/admin/home/slides/{{ .ID }}">{{ .Caption }}</a></td>
|
||||
<td>
|
||||
{{ range .Translations }}
|
||||
<a
|
||||
{{ if .Missing }}
|
||||
class="missing-translation"
|
||||
{{ end }}
|
||||
href="/admin/home/slides/{{ $slide.ID }}/{{ .Language }}">{{ .Endonym }}</a>
|
||||
{{ end }}
|
||||
</td>
|
||||
<td>
|
||||
<form data-hx-delete="/admin/home/slides/{{ .ID }}"
|
||||
data-hx-confirm="{{ $confirm }}"
|
||||
data-hx-headers='{ {{ CSRFHeader }} }'>
|
||||
<button type="submit">{{( pgettext "Delete" "action" )}}</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{{- end }}
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
{{ else -}}
|
||||
<p>{{( gettext "No slides added yet." )}}</p>
|
||||
{{- end }}
|
||||
|
|
|
@ -10,8 +10,9 @@
|
|||
<title>{{ template "title" . }} — Camper</title>
|
||||
<link rel="stylesheet" media="screen" href="/static/camper.css">
|
||||
<link rel="stylesheet" media="screen" href="/static/icons.css">
|
||||
<script type="module" src="/static/camper.js"></script>
|
||||
<script src="/static/sortable@1.15.1.min.js"></script>
|
||||
<script src="/static/htmx@1.9.3.min.js"></script>
|
||||
<script type="module" src="/static/camper.js"></script>
|
||||
{{ block "head" . }}{{ end }}
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
@ -11,36 +11,47 @@
|
|||
<a href="/admin/seasons/new">{{( pgettext "Add Season" "action" )}}</a>
|
||||
<h2>{{( pgettext "Seasons" "title" )}}</h2>
|
||||
{{ if .Seasons -}}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">{{( pgettext "Color" "header" )}}</th>
|
||||
<th scope="col">{{( pgettext "Name" "header" )}}</th>
|
||||
<th scope="col">{{( pgettext "Translations" "header" )}}</th>
|
||||
<th scope="col">{{( pgettext "Active" "season" )}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ range .Seasons -}}
|
||||
<form id="season-index"
|
||||
class="sortable"
|
||||
data-hx-post="/admin/seasons/order"
|
||||
data-hx-trigger="end"
|
||||
data-hx-select="#season-index"
|
||||
data-hx-swap="outerHTML"
|
||||
>
|
||||
{{ CSRFInput }}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td>
|
||||
<svg width="20px" height="20px">
|
||||
<circle cx="50%" cy="50%" r="49%" fill="{{ .Color }}" stroke="#000" stroke-width=".5"/>
|
||||
</svg>
|
||||
</td>
|
||||
<td><a href="{{ .URL }}">{{ .Name }}</a></td>
|
||||
<td>
|
||||
{{ range .Translations }}
|
||||
<a
|
||||
{{ if .Missing }}class="missing-translation"{{ end }}
|
||||
href="{{ .URL }}">{{ .Endonym }}</a>
|
||||
{{ end }}
|
||||
</td>
|
||||
<td>{{ if .Active }}{{( gettext "Yes" )}}{{ else }}{{( gettext "No" )}}{{ end }}</td>
|
||||
<th scope="col">{{( pgettext "Color" "header" )}}</th>
|
||||
<th scope="col">{{( pgettext "Name" "header" )}}</th>
|
||||
<th scope="col">{{( pgettext "Translations" "header" )}}</th>
|
||||
<th scope="col">{{( pgettext "Active" "season" )}}</th>
|
||||
</tr>
|
||||
{{- end }}
|
||||
</tbody>
|
||||
</table>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ range .Seasons -}}
|
||||
<tr>
|
||||
<td>
|
||||
<input type="hidden" name="slug" value="{{ .Slug }}">
|
||||
<span class="handle"></span>
|
||||
<svg width="20px" height="20px">
|
||||
<circle cx="50%" cy="50%" r="49%" fill="{{ .Color }}" stroke="#000" stroke-width=".5"/>
|
||||
</svg>
|
||||
</td>
|
||||
<td><a href="{{ .URL }}">{{ .Name }}</a></td>
|
||||
<td>
|
||||
{{ range .Translations }}
|
||||
<a
|
||||
{{ if .Missing }}class="missing-translation"{{ end }}
|
||||
href="{{ .URL }}">{{ .Endonym }}</a>
|
||||
{{ end }}
|
||||
</td>
|
||||
<td>{{ if .Active }}{{( gettext "Yes" )}}{{ else }}{{( gettext "No" )}}{{ end }}</td>
|
||||
</tr>
|
||||
{{- end }}
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
{{ else -}}
|
||||
<p>{{( gettext "No seasons added yet." )}}</p>
|
||||
{{- end }}
|
||||
|
|
|
@ -11,41 +11,54 @@
|
|||
<h2>{{( pgettext "Carousel" "title" )}}</h2>
|
||||
<a href="/admin/services/slides/new">{{( pgettext "Add slide" "action" )}}</a>
|
||||
{{ if .Slides -}}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">{{( pgettext "Image" "header" )}}</th>
|
||||
<th scope="col">{{( pgettext "Caption" "header" )}}</th>
|
||||
<th scope="col">{{( pgettext "Translations" "header" )}}</th>
|
||||
<th scope="col">{{( pgettext "Actions" "header" )}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ $confirm := ( gettext "Are you sure you wish to delete this slide?" )}}
|
||||
{{ range $slide := .Slides -}}
|
||||
<form id="slide-index"
|
||||
class="sortable"
|
||||
data-hx-post="/admin/services/slides/order"
|
||||
data-hx-trigger="end"
|
||||
data-hx-select="#slide-index"
|
||||
data-hx-swap="outerHTML"
|
||||
>
|
||||
{{ CSRFInput }}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td><a href="/admin/services/slides/{{ .ID }}"><img src="{{ .Media }}" alt=""></a></td>
|
||||
<td><a href="/admin/services/slides/{{ .ID }}">{{ .Caption }}</a></td>
|
||||
<td>
|
||||
{{ range .Translations }}
|
||||
<a
|
||||
{{ if .Missing }}
|
||||
class="missing-translation"
|
||||
{{ end }}
|
||||
href="/admin/services/slides/{{ $slide.ID }}/{{ .Language }}">{{ .Endonym }}</a>
|
||||
{{ end }}
|
||||
</td>
|
||||
<td>
|
||||
<form data-hx-delete="/admin/services/slides/{{ .ID }}"
|
||||
data-hx-confirm="{{ $confirm }}"
|
||||
data-hx-headers='{ {{ CSRFHeader }} }'>
|
||||
<button type="submit">{{( pgettext "Delete" "action" )}}</button>
|
||||
</form>
|
||||
</td>
|
||||
<th scope="col">{{( pgettext "Image" "header" )}}</th>
|
||||
<th scope="col">{{( pgettext "Caption" "header" )}}</th>
|
||||
<th scope="col">{{( pgettext "Translations" "header" )}}</th>
|
||||
<th scope="col">{{( pgettext "Actions" "header" )}}</th>
|
||||
</tr>
|
||||
{{- end }}
|
||||
</tbody>
|
||||
</table>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ $confirm := ( gettext "Are you sure you wish to delete this slide?" )}}
|
||||
{{ range $slide := .Slides -}}
|
||||
<tr>
|
||||
<td>
|
||||
<span class="handle"></span>
|
||||
<input type="hidden" name="media_id" value="{{ .ID }}">
|
||||
<a href="/admin/services/slides/{{ .ID }}"><img src="{{ .Media }}" alt=""></a>
|
||||
</td>
|
||||
<td><a href="/admin/services/slides/{{ .ID }}">{{ .Caption }}</a></td>
|
||||
<td>
|
||||
{{ range .Translations }}
|
||||
<a
|
||||
{{ if .Missing }}
|
||||
class="missing-translation"
|
||||
{{ end }}
|
||||
href="/admin/services/slides/{{ $slide.ID }}/{{ .Language }}">{{ .Endonym }}</a>
|
||||
{{ end }}
|
||||
</td>
|
||||
<td>
|
||||
<form data-hx-delete="/admin/services/slides/{{ .ID }}"
|
||||
data-hx-confirm="{{ $confirm }}"
|
||||
data-hx-headers='{ {{ CSRFHeader }} }'>
|
||||
<button type="submit">{{( pgettext "Delete" "action" )}}</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{{- end }}
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
{{ else -}}
|
||||
<p>{{( gettext "No slides added yet." )}}</p>
|
||||
{{- end }}
|
||||
|
|
Loading…
Reference in New Issue