Skip to content
GitLab
Explorer
Connexion
S'inscrire
Navigation principale
Rechercher ou aller à…
Projet
P
parlote-facil
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
Extraits de code
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
parlote-facil
Validations
37a67b29
Valider
37a67b29
rédigé
14 years ago
par
danielvincent
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
left/right arrow keys on photo show page go to prev/next
parent
2355947d
Aucune branche associée trouvée
Branches contenant la validation
Aucune étiquette associée trouvée
Étiquettes contenant la validation
Aucune requête de fusion associée trouvée
Modifications
2
Masquer les modifications d'espaces
En ligne
Côte à côte
Affichage de
2 fichiers modifiés
app/helpers/photos_helper.rb
+4
-4
4 ajouts, 4 suppressions
app/helpers/photos_helper.rb
app/views/photos/show.html.haml
+15
-2
15 ajouts, 2 suppressions
app/views/photos/show.html.haml
avec
19 ajouts
et
6 suppressions
app/helpers/photos_helper.rb
+
4
−
4
Voir le fichier @
37a67b29
...
@@ -4,11 +4,11 @@ module PhotosHelper
...
@@ -4,11 +4,11 @@ module PhotosHelper
link_to
(
image_tag
photo
.
url
(
:scaled_full
)),
photo_path
(
album
.
next_photo
(
photo
)),
:rel
=>
"prefetch"
link_to
(
image_tag
photo
.
url
(
:scaled_full
)),
photo_path
(
album
.
next_photo
(
photo
)),
:rel
=>
"prefetch"
end
end
def
link
_to_prev
(
photo
,
album
)
def
url
_to_prev
(
photo
,
album
)
link_to
"<< prev"
,
photo_path
(
album
.
prev_photo
(
photo
))
,
:rel
=>
"prefetch"
photo_path
(
album
.
prev_photo
(
photo
))
end
end
def
link
_to_next
(
photo
,
album
)
def
url
_to_next
(
photo
,
album
)
link_to
"next >>"
,
photo_path
(
album
.
next_photo
(
photo
))
,
:rel
=>
"prefetch"
photo_path
(
album
.
next_photo
(
photo
))
end
end
end
end
Ce diff est replié.
Cliquez pour l'agrandir.
app/views/photos/show.html.haml
+
15
−
2
Voir le fichier @
37a67b29
:javascript
$
(
document
).
keydown
(
function
(
e
){
switch
(
e
.
keyCode
)
{
case
37
:
window
.
location
.
replace
(
"
#{
url_to_prev
(
@photo
,
@album
)
}
"
);
break
;
case
39
:
window
.
location
.
replace
(
"
#{
url_to_next
(
@photo
,
@album
)
}
"
);
break
;
}
});
.back
=
link_to
"⇧
#{
@album
.
name
}
"
,
album_path
(
@album
)
.back
=
link_to
"⇧
#{
@album
.
name
}
"
,
album_path
(
@album
)
%h1
.big_text
%h1
.big_text
=
@photo
.
image
=
@photo
.
image
...
@@ -6,11 +19,11 @@
...
@@ -6,11 +19,11 @@
=
link_to
'Edit Photo'
,
edit_photo_path
(
@photo
),
:class
=>
"button"
=
link_to
'Edit Photo'
,
edit_photo_path
(
@photo
),
:class
=>
"button"
.sub_header
.sub_header
=
link_to_prev
@photo
,
@album
=
link_to
"<< prev"
,
url_to
_prev
(
@photo
,
@album
)
|
|
=
link_to
"full size"
,
@photo
.
url
=
link_to
"full size"
,
@photo
.
url
|
|
=
link_to_next
@photo
,
@album
=
link_to
"next >>"
,
url_to
_next
(
@photo
,
@album
)
%div
{
:id
=>
@photo
.
id
}
%div
{
:id
=>
@photo
.
id
}
#show_photo
#show_photo
...
...
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