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
eb650743
Valider
eb650743
rédigé
13 years ago
par
Johannes Hackel
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Fix Bug 2274, empty tag
parent
7e402862
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/people_controller.rb
+3
-0
3 ajouts, 0 suppression
app/controllers/people_controller.rb
app/controllers/tag_followings_controller.rb
+11
-6
11 ajouts, 6 suppressions
app/controllers/tag_followings_controller.rb
config/locales/diaspora/en.yml
+2
-0
2 ajouts, 0 suppression
config/locales/diaspora/en.yml
avec
16 ajouts
et
6 suppressions
app/controllers/people_controller.rb
+
3
−
0
Voir le fichier @
eb650743
...
@@ -22,6 +22,9 @@ class PeopleController < ApplicationController
...
@@ -22,6 +22,9 @@ class PeopleController < ApplicationController
if
(
params
[
:q
][
0
]
==
35
||
params
[
:q
][
0
]
==
'#'
)
&&
params
[
:q
].
length
>
1
if
(
params
[
:q
][
0
]
==
35
||
params
[
:q
][
0
]
==
'#'
)
&&
params
[
:q
].
length
>
1
redirect_to
tag_path
(
:name
=>
params
[
:q
].
gsub
(
/[#\.]/
,
''
),
:q
=>
params
[
:q
])
redirect_to
tag_path
(
:name
=>
params
[
:q
].
gsub
(
/[#\.]/
,
''
),
:q
=>
params
[
:q
])
return
return
elsif
(
params
[
:q
][
0
]
==
35
||
params
[
:q
][
0
]
==
'#'
)
&&
params
[
:q
].
length
==
1
flash
[
:error
]
=
I18n
.
t
(
'tags.show.none'
,
:name
=>
params
[
:q
])
redirect_to
multi_path
()
end
end
limit
=
params
[
:limit
]
?
params
[
:limit
].
to_i
:
15
limit
=
params
[
:limit
]
?
params
[
:limit
].
to_i
:
15
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
app/controllers/tag_followings_controller.rb
+
11
−
6
Voir le fichier @
eb650743
...
@@ -15,13 +15,18 @@ class TagFollowingsController < ApplicationController
...
@@ -15,13 +15,18 @@ class TagFollowingsController < ApplicationController
# POST /tag_followings.xml
# POST /tag_followings.xml
def
create
def
create
name_normalized
=
ActsAsTaggableOn
::
Tag
.
normalize
(
params
[
'name'
])
name_normalized
=
ActsAsTaggableOn
::
Tag
.
normalize
(
params
[
'name'
])
@tag
=
ActsAsTaggableOn
::
Tag
.
find_or_create_by_name
(
name_normalized
)
@tag_following
=
current_user
.
tag_followings
.
new
(
:tag_id
=>
@tag
.
id
)
if
name_normalized
.
nil?
||
name_normalized
.
empty?
flash
[
:error
]
=
I18n
.
t
(
'tag_followings.create.none'
,
:name
=>
name_normalized
)
if
@tag_following
.
save
flash
[
:notice
]
=
I18n
.
t
(
'tag_followings.create.success'
,
:name
=>
name_normalized
)
else
else
flash
[
:error
]
=
I18n
.
t
(
'tag_followings.create.failure'
,
:name
=>
name_normalized
)
@tag
=
ActsAsTaggableOn
::
Tag
.
find_or_create_by_name
(
name_normalized
)
@tag_following
=
current_user
.
tag_followings
.
new
(
:tag_id
=>
@tag
.
id
)
if
@tag_following
.
save
flash
[
:notice
]
=
I18n
.
t
(
'tag_followings.create.success'
,
:name
=>
name_normalized
)
else
flash
[
:error
]
=
I18n
.
t
(
'tag_followings.create.failure'
,
:name
=>
name_normalized
)
end
end
end
redirect_to
:back
redirect_to
:back
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
config/locales/diaspora/en.yml
+
2
−
0
Voir le fichier @
eb650743
...
@@ -846,10 +846,12 @@ en:
...
@@ -846,10 +846,12 @@ en:
following
:
"
Following
#%{tag}"
following
:
"
Following
#%{tag}"
stop_following
:
"
Stop
Following
#%{tag}"
stop_following
:
"
Stop
Following
#%{tag}"
followed_by
:
'
followed
by'
followed_by
:
'
followed
by'
none
:
"
The
empty
tag
don't
exists!"
tag_followings
:
tag_followings
:
create
:
create
:
success
:
"
Hooray!
You're
now
following
#%{name}."
success
:
"
Hooray!
You're
now
following
#%{name}."
failure
:
"
Failed
to
follow
#%{name}.
Are
you
already
following
it?"
failure
:
"
Failed
to
follow
#%{name}.
Are
you
already
following
it?"
none
:
"
You
can't
follow
the
empty
tag!"
destroy
:
destroy
:
success
:
"
Alas!
You
aren't
following
#%{name}
anymore."
success
:
"
Alas!
You
aren't
following
#%{name}
anymore."
failure
:
"
Failed
to
stop
following
#%{name}.
Maybe
you
already
stopped
following
it?"
failure
:
"
Failed
to
stop
following
#%{name}.
Maybe
you
already
stopped
following
it?"
...
...
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