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
7223d217
Valider
7223d217
rédigé
il y a 14 ans
par
Raphael
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Add singular move friend route, it must be eliminated later
parent
5ff1bdae
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
app/controllers/groups_controller.rb
+10
-1
10 ajouts, 1 suppression
app/controllers/groups_controller.rb
app/views/people/show.html.haml
+1
-1
1 ajout, 1 suppression
app/views/people/show.html.haml
config/routes.rb
+1
-0
1 ajout, 0 suppression
config/routes.rb
avec
12 ajouts
et
2 suppressions
app/controllers/groups_controller.rb
+
10
−
1
Voir le fichier @
7223d217
...
@@ -65,5 +65,14 @@ class GroupsController < ApplicationController
...
@@ -65,5 +65,14 @@ class GroupsController < ApplicationController
redirect_to
Group
.
first
,
:action
=>
"edit"
redirect_to
Group
.
first
,
:action
=>
"edit"
end
end
def
move_friend
unless
current_user
.
move_friend
(
:friend_id
=>
params
[
:friend_id
],
:from
=>
params
[
:from
],
:to
=>
params
[
:to
][
:to
])
flash
[
:error
]
=
"didn't work
#{
params
.
inspect
}
"
end
if
group
=
Group
.
first
(
:id
=>
params
[
:to
][
:to
])
redirect_to
group
else
redirect_to
Person
.
first
(
:id
=>
params
[
:friend_id
])
end
end
end
end
Ce diff est replié.
Cliquez pour l'agrandir.
app/views/people/show.html.haml
+
1
−
1
Voir le fichier @
7223d217
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
%li
%li
%i
=
"friends since:
#{
how_long_ago
(
@person
)
}
"
%i
=
"friends since:
#{
how_long_ago
(
@person
)
}
"
%li
%li
=
form_tag
move_friend
s
_path
=
form_tag
move_friend_path
=
select
:to
,
:to
,
@groups_dropdown_array
,
:selected_value
=>
@groups_with_person
.
first
.
id
=
select
:to
,
:to
,
@groups_dropdown_array
,
:selected_value
=>
@groups_with_person
.
first
.
id
=
hidden_field_tag
:from
,
:from
,
:value
=>
@groups_with_person
.
first
.
id
=
hidden_field_tag
:from
,
:from
,
:value
=>
@groups_with_person
.
first
.
id
=
hidden_field_tag
:friend_id
,
:friend_id
,
:value
=>
@person
.
id
=
hidden_field_tag
:friend_id
,
:friend_id
,
:value
=>
@person
.
id
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
config/routes.rb
+
1
−
0
Voir le fichier @
7223d217
...
@@ -21,6 +21,7 @@ Diaspora::Application.routes.draw do
...
@@ -21,6 +21,7 @@ Diaspora::Application.routes.draw do
match
'logout'
,
:to
=>
'devise/sessions#destroy'
,
:as
=>
"destroy_user_session"
match
'logout'
,
:to
=>
'devise/sessions#destroy'
,
:as
=>
"destroy_user_session"
match
'get_to_the_choppa'
,
:to
=>
'devise/registrations#new'
,
:as
=>
"new_user_registration"
match
'get_to_the_choppa'
,
:to
=>
'devise/registrations#new'
,
:as
=>
"new_user_registration"
match
'groups/move_friends'
,
:to
=>
'groups#move_friends'
,
:as
=>
'move_friends'
match
'groups/move_friends'
,
:to
=>
'groups#move_friends'
,
:as
=>
'move_friends'
match
'groups/move_friend'
,
:to
=>
'groups#move_friend'
,
:as
=>
'move_friend'
#public routes
#public routes
#
#
match
'webfinger'
,
:to
=>
'publics#webfinger'
match
'webfinger'
,
:to
=>
'publics#webfinger'
...
...
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