Skip to content
GitLab
Explorer
Connexion
S'inscrire
Navigation principale
Rechercher ou aller à…
Projet
agenda-libre-quebec
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Wiki
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Déploiement
Releases
Registre de paquets
Registre de conteneur
Registre de modèles
Opération
Environnements
Modules Terraform
Surveillance
Incidents
Analyse
Données d'analyse des chaînes de valeur
Analyse des contributeurs
Données d'analyse CI/CD
Données d'analyse du dépôt
Expériences du modèle
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
facil
agenda-libre-quebec
Validations
78b9d36d
Valider
78b9d36d
rédigé
il y a 9 ans
par
echarp
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Upgrade to simple calendar V2
parent
e8082e76
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
3
Masquer les modifications d'espaces
En ligne
Côte à côte
Affichage de
3 fichiers modifiés
Gemfile.lock
+7
-7
7 ajouts, 7 suppressions
Gemfile.lock
app/views/events/index.html.haml
+20
-31
20 ajouts, 31 suppressions
app/views/events/index.html.haml
app/views/simple_calendar/_month_calendar.html.haml
+26
-0
26 ajouts, 0 suppression
app/views/simple_calendar/_month_calendar.html.haml
avec
53 ajouts
et
38 suppressions
Gemfile.lock
+
7
−
7
Voir le fichier @
78b9d36d
...
...
@@ -152,7 +152,7 @@ GEM
formtastic (3.1.3)
actionpack (>= 3.2.13)
formtastic_i18n (0.4.1)
geocoder (1.2.
9
)
geocoder (1.2.
11
)
globalid (0.3.6)
activesupport (>= 4.1.0)
guard (2.13.0)
...
...
@@ -208,7 +208,7 @@ GEM
haml (~> 4.0.0)
nokogiri (~> 1.6.0)
ruby_parser (~> 3.5)
http (0.9.
4
)
http (0.9.
6
)
addressable (~> 2.3)
http-cookie (~> 1.0)
http-form_data (~> 1.0.1)
...
...
@@ -263,8 +263,8 @@ GEM
modernizr-rails (2.7.1)
multi_json (1.11.2)
multipart-post (2.0.0)
mysql2 (0.
3.2
0)
naught (1.
0
.0)
mysql2 (0.
4.
0)
naught (1.
1
.0)
nenv (0.2.0)
nokogiri (1.6.6.2)
mini_portile (~> 0.6.0)
...
...
@@ -335,7 +335,7 @@ GEM
request_store (1.2.0)
responders (2.1.0)
railties (>= 4.2.0, < 5)
rubocop (0.34.
0
)
rubocop (0.34.
1
)
astrolabe (~> 1.3)
parser (>= 2.2.2.5, < 3.0)
powerpack (~> 0.1)
...
...
@@ -361,7 +361,7 @@ GEM
thor (~> 0.14)
sexp_processor (4.6.0)
shellany (0.0.1)
simple_calendar (
1.1.1
0)
simple_calendar (
2.0.
0)
rails (>= 3.0)
simple_oauth (0.3.1)
simplecov (0.10.0)
...
...
@@ -379,7 +379,7 @@ GEM
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.3.
2
)
sprockets-rails (2.3.
3
)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0)
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
app/views/events/index.html.haml
+
20
−
31
Voir le fichier @
78b9d36d
...
...
@@ -14,14 +14,27 @@
-
(
1
..
12
).
each
do
|
i
|
-
params
[
:start_date
]
=
"
#{
params
[
:year
]
}
-
#{
i
}
-01"
=
month_calendar
day_names:
'date.day_names'
,
events:
@events
,
previous_link:
nil
,
next_link:
nil
,
title:
->
(
start_date
)
{
raw
link_to
l
(
start_date
,
format: :month
),
root_path
(
start_date:
start_date
),
class:
'month_selector'
}
do
|
date
,
events
|
=
month_calendar
do
|
date
|
-
capture_haml
do
.day_number
=
date
.
day
%ul
.events.fa-ul
-
@events
.
select
{
|
e
|
(
e
.
start_time
.
to_date
..
e
.
end_time
.
to_date
).
cover?
date
}
-
.
sort_by
{
|
e
|
e
.
city
}.
each
do
|
event
|
%li
.event
{
title:
display_date
(
event
)
}
-
if
event
.
locality?
%em
.locality.fa.fa-globe
=
link_to
event
do
%strong
.city
{
title:
event
.
address
}=
event
.
city
=
event
.
title
-
else
-# One month calendar
-
@events
=
@events
.
month
params
[
:start_date
].
try
:to_date
=
month_calendar
do
|
date
|
-
capture_haml
do
.day_number
=
date
.
day
%ul
.events.fa-ul
-
events
.
select
{
|
e
|
(
e
.
start_time
.
to_date
..
e
.
end_time
.
to_date
).
cover?
date
}
-
@
events
.
select
{
|
e
|
(
e
.
start_time
.
to_date
..
e
.
end_time
.
to_date
).
cover?
date
}
-
.
sort_by
{
|
e
|
e
.
city
}.
each
do
|
event
|
%li
.event
{
title:
display_date
(
event
)
}
-
if
event
.
locality?
...
...
@@ -30,36 +43,12 @@
%strong
.city
{
title:
event
.
address
}=
event
.
city
=
event
.
title
-
else
-# One month calendar
-
@events
=
@events
.
month
params
[
:start_date
].
try
:to_date
=
month_calendar
day_names:
'date.day_names'
,
events:
@events
,
title:
->
(
start_date
)
{
raw
"
#{
I18n
.
t
(
'date.month_names'
)[
start_date
.
month
]
}
#{
link_to
start_date
.
year
,
root_path
(
year:
start_date
.
year
)
}
"
},
previous_link:
->
(
param
,
date_range
)
{
link_to
'<<'
,
{
param
=>
(
date_range
.
first
-
1
.
day
).
beginning_of_month
,
tag:
params
[
:tag
],
region:
params
[
:region
]
}
},
next_link:
->
(
param
,
date_range
)
{
link_to
'>>'
,
{
param
=>
(
date_range
.
last
+
1
.
day
).
beginning_of_month
,
tag:
params
[
:tag
],
region:
params
[
:region
]
}
}
do
|
date
,
events
|
.day_number
=
date
.
day
%ul
.events.fa-ul
-
events
.
select
{
|
e
|
(
e
.
start_time
.
to_date
..
e
.
end_time
.
to_date
).
cover?
date
}
-
.
sort_by
{
|
e
|
e
.
city
}.
each
do
|
event
|
%li
.event
{
title:
display_date
(
event
)
}
-
if
event
.
locality?
%em
.locality.fa.fa-globe
=
link_to
event
do
%strong
.city
{
title:
event
.
address
}=
event
.
city
=
event
.
title
.formats
%em
.fa.fa-rss
=
raw
t
'.calendar_in'
,
rss:
link_to
(
'RSS'
,
events_path
(
:rss
,
tag:
params
[
:tag
],
region:
params
[
:region
])),
webcal:
link_to
(
'webcal'
,
events_path
(
:rss
,
tag:
params
[
:tag
],
protocol:
'webcal'
,
format: :ics
,
tag:
params
[
:tag
],
webcal:
link_to
(
'webcal'
,
events_path
(
tag:
params
[
:tag
],
protocol:
'webcal'
,
format: :ics
,
tag:
params
[
:tag
],
region:
params
[
:region
])),
ical:
link_to
(
'iCal'
,
events_path
(
:rss
,
tag:
params
[
:tag
],
format: :ics
,
tag:
params
[
:tag
],
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
app/views/simple_calendar/_month_calendar.html.haml
0 → 100644
+
26
−
0
Voir le fichier @
78b9d36d
%header
.calendar-header
-
if
params
[
:year
]
=
link_to
start_date:
start_date
.
beginning_of_month
,
tag:
params
[
:tag
],
region:
params
[
:region
]
do
=
I18n
.
t
(
'date.month_names'
)[
start_date
.
month
]
=
start_date
.
year
-
else
=
link_to
'<<'
,
start_date:
(
date_range
.
first
-
1
.
day
).
beginning_of_month
,
tag:
params
[
:tag
],
region:
params
[
:region
]
=
I18n
.
t
(
'date.month_names'
)[
start_date
.
month
]
=
link_to
root_path
(
year:
start_date
.
year
)
do
=
start_date
.
year
=
link_to
'>>'
,
start_date:
(
date_range
.
last
+
1
.
day
).
beginning_of_month
,
tag:
params
[
:tag
],
region:
params
[
:region
]
%table
.table.table-striped
%thead
%tr
-
date_range
.
slice
(
0
,
7
).
each
do
|
day
|
%th
=
I18n
.
t
(
'date.day_names'
)[
day
.
wday
]
%tbody
-
date_range
.
each_slice
(
7
)
do
|
week
|
%tr
-
week
.
each
do
|
day
|
=
content_tag
:td
,
class:
calendar
.
td_classes_for
(
day
)
do
=
block
.
call
day
,
sorted_events
.
fetch
(
day
,
[])
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter