fix wiki name in the timeline
parent
67cae3ae5f
commit
a1ae9e9f28
|
@ -1,3 +1,5 @@
|
||||||
|
unslugify = @.taiga.unslugify
|
||||||
|
|
||||||
class UserTimelineItemTitle
|
class UserTimelineItemTitle
|
||||||
@.$inject = [
|
@.$inject = [
|
||||||
"$translate"
|
"$translate"
|
||||||
|
@ -56,7 +58,7 @@ class UserTimelineItemTitle
|
||||||
url = @._getDetailObjUrl(event)
|
url = @._getDetailObjUrl(event)
|
||||||
|
|
||||||
if event.obj == 'wikipage'
|
if event.obj == 'wikipage'
|
||||||
text = obj.slug
|
text = unslugify(obj.slug)
|
||||||
else if event.obj == 'milestone'
|
else if event.obj == 'milestone'
|
||||||
text = obj.name
|
text = obj.name
|
||||||
else
|
else
|
||||||
|
|
|
@ -188,7 +188,7 @@ describe "tgUserTimelineItemTitle", ->
|
||||||
timeline = {
|
timeline = {
|
||||||
data: {
|
data: {
|
||||||
wikipage: {
|
wikipage: {
|
||||||
slug: 'slugwiki',
|
slug: 'slug-wiki',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -203,7 +203,7 @@ describe "tgUserTimelineItemTitle", ->
|
||||||
}
|
}
|
||||||
|
|
||||||
objparam = sinon.match ((value) ->
|
objparam = sinon.match ((value) ->
|
||||||
return value.obj_name == '<a tg-nav="project-wiki-page:project=vm.activity.project.slug,slug=vm.activity.obj.slug" title="slugwiki">slugwiki</a>'
|
return value.obj_name == '<a tg-nav="project-wiki-page:project=vm.activity.project.slug,slug=vm.activity.obj.slug" title="Slug wiki">Slug wiki</a>'
|
||||||
), "objparam"
|
), "objparam"
|
||||||
|
|
||||||
mockTranslate.instant
|
mockTranslate.instant
|
||||||
|
|
Loading…
Reference in New Issue